Permalink
Browse files

Added platform dependent gems

See #12475

If people are on rbx they will get the desired gem
  • Loading branch information...
1 parent 1c47225 commit e259afe847f83ae26645d95bb73ec38279414c92 @arunagw arunagw committed Nov 7, 2013
Showing with 16 additions and 0 deletions.
  1. +9 −0 railties/lib/rails/generators/app_base.rb
  2. +7 −0 railties/test/generators/app_generator_test.rb
@@ -110,6 +110,7 @@ def gemfile_entries
javascript_gemfile_entry,
jbuilder_gemfile_entry,
sdoc_gemfile_entry,
+ platform_dependent_gemfile_entry,
@extra_entries].flatten.find_all(&@gem_filter)
end
@@ -316,6 +317,14 @@ def assets_gemfile_entry
gems
end
+ def platform_dependent_gemfile_entry
+ gems = []
+ if RUBY_ENGINE == 'rbx'
+ gems << GemfileEntry.version('rubysl', nil)
+ end
+ gems
+ end
+
def jbuilder_gemfile_entry
comment = 'Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder'
GemfileEntry.version('jbuilder', '~> 1.2', comment)
@@ -305,6 +305,13 @@ def test_inclusion_of_javascript_runtime
end
end
+ def test_inclusion_of_plateform_dependent_gems
+ run_generator([destination_root])
+ if RUBY_ENGINE == 'rbx'
+ assert_gem 'rubysl'
+ end
+ end
+
def test_creation_of_a_test_directory
run_generator
assert_file 'test'

0 comments on commit e259afe

Please sign in to comment.