Permalink
Browse files

Use bundler to allow tests to run on system with newer versions of Ra…

…ils installed.
  • Loading branch information...
1 parent aa0a61f commit 01429d824d0787f74ac7a20a3bd11b4fdc27e1cc JD Huntington committed Jun 10, 2011
Showing with 97 additions and 5 deletions.
  1. +3 −0 Gemfile
  2. +48 −0 Gemfile.lock
  3. +1 −1 lib/less/controller_extension.rb
  4. +42 −2 more.gemspec
  5. +1 −1 test/controller_test.rb
  6. +2 −1 test/test_helper.rb
View
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gemspec
View
@@ -0,0 +1,48 @@
+PATH
+ remote: .
+ specs:
+ more (0.1.0)
+ less (~> 1.2.21)
+ more
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (2.3.8)
+ actionpack (= 2.3.8)
+ actionpack (2.3.8)
+ activesupport (= 2.3.8)
+ rack (~> 1.1.0)
+ activerecord (2.3.8)
+ activesupport (= 2.3.8)
+ activeresource (2.3.8)
+ activesupport (= 2.3.8)
+ activesupport (2.3.8)
+ less (1.2.21)
+ mutter (>= 0.4.2)
+ treetop (>= 1.4.2)
+ mutter (0.5.3)
+ polyglot (0.3.1)
+ rack (1.1.0)
+ rails (2.3.8)
+ actionmailer (= 2.3.8)
+ actionpack (= 2.3.8)
+ activerecord (= 2.3.8)
+ activeresource (= 2.3.8)
+ activesupport (= 2.3.8)
+ rake (>= 0.8.3)
+ rake (0.9.2)
+ shoulda (2.10.3)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ actionpack (~> 2.3.8)
+ activesupport (~> 2.3.8)
+ more!
+ rails (~> 2.3.8)
+ rake
+ shoulda
@@ -4,4 +4,4 @@ class ActionController::Base
def generate_css_from_less
Less::More.generate_all
end
-end
+end
View
@@ -1,4 +1,3 @@
-
require 'rake'
SPEC = Gem::Specification.new do |s|
@@ -13,5 +12,46 @@ SPEC = Gem::Specification.new do |s|
s.version = "0.1.0"
s.files = FileList["README.markdown", "MIT-LICENSE", "Rakefile", "init.rb", "lib/*.rb", "rails/init.rb", "tasks/*", "test/*"]
s.has_rdoc = true
- s.add_dependency "less"
+
+ s.date = '2011-06-10'
+
+ s.extra_rdoc_files = [
+ "MIT-LICENSE",
+ "README.markdown"
+ ]
+
+ s.require_paths = ["lib"]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<actionpack>, ["~> 2.3.8"])
+ s.add_development_dependency(%q<activesupport>, ["~> 2.3.8"])
+ s.add_development_dependency(%q<rails>, ["~> 2.3.8"])
+ s.add_development_dependency(%q<rake>, [">= 0"])
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
+ s.add_runtime_dependency(%q<less>, ["~> 1.2.21"])
+ s.add_runtime_dependency(%q<more>, [">= 0"])
+ else
+ s.add_dependency(%q<actionpack>, ["~> 2.3.8"])
+ s.add_dependency(%q<activesupport>, ["~> 2.3.8"])
+ s.add_dependency(%q<jeweler>, [">= 0"])
+ s.add_dependency(%q<less>, ["~> 1.2.21"])
+ s.add_dependency(%q<more>, [">= 0"])
+ s.add_dependency(%q<rails>, ["~> 2.3.8"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<actionpack>, ["~> 2.3.8"])
+ s.add_dependency(%q<activesupport>, ["~> 2.3.8"])
+ s.add_dependency(%q<jeweler>, [">= 0"])
+ s.add_dependency(%q<less>, ["~> 1.2.21"])
+ s.add_dependency(%q<more>, [">= 0"])
+ s.add_dependency(%q<rails>, ["~> 2.3.8"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ end
end
View
@@ -23,4 +23,4 @@ def teardown
get :test
assert_equal 'a { color: red; }', read_css('xxx.css').strip
end
-end
+end
View
@@ -55,6 +55,7 @@ def write_content file, content
end
def read_css(file)
+ raise ArgumentError.new("#{file.inspect} missing") unless File.exist?(File.join(css_path, file))
File.read(File.join(css_path, file)) rescue nil
end
@@ -76,4 +77,4 @@ def setup_for_generate_test
def teardown_for_generate_test
`rm -rf #{css_path}`
`rm -rf #{less_path}`
-end
+end

0 comments on commit 01429d8

Please sign in to comment.