Skip to content

Commit

Permalink
therubyracer is very unstable/crashes often on rbx,jruby and maglev -…
Browse files Browse the repository at this point in the history
… revert to less 1.x for those
  • Loading branch information
timfel committed Oct 7, 2011
1 parent bf097d6 commit 5fdfa0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ gem 'haml', '>= 3.0'
gem 'sass'
gem 'builder'
gem 'erubis'
gem 'less', '~> 2.0'
gem 'liquid'
gem 'slim', '~> 1.0'
gem 'temple', '!= 0.3.3'
Expand All @@ -47,6 +46,12 @@ else
gem 'nokogiri'
end

if RUBY_ENGINE == "ruby"
gem 'less', '~> 2.0'
else
gem 'less', '~> 1.0'
end

unless RUBY_ENGINE == 'jruby' && JRUBY_VERSION < "1.6.1" && !ENV['TRAVIS']
# C extensions
gem 'rdiscount'
Expand Down
6 changes: 3 additions & 3 deletions test/less_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def less_app(options = {}, &block)
it 'renders inline Less strings' do
less_app { less "@white_color: #fff; #main { background-color: @white_color }" }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end

it 'defaults content type to css' do
Expand Down Expand Up @@ -45,13 +45,13 @@ def less_app(options = {}, &block)
it 'renders .less files in views path' do
less_app { less :hello }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end

it 'ignores the layout option' do
less_app { less :hello, :layout => :layout2 }
assert ok?
assert_body "#main {background-color: #ffffff;}"
assert_equal "#main{background-color:#ffffff;}", body.gsub(/\s/, "")
end

it "raises error if template not found" do
Expand Down

0 comments on commit 5fdfa0d

Please sign in to comment.