diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-23 17:45:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-23 17:45:15 -0300 |
commit | bec08e774438e0a6bab74f7439106e2bd02ecc5a (patch) | |
tree | 2295af9d69b1ebae84fb4c719180b59c8484f8a6 /railties/lib | |
parent | cd7d414e48f537278043bfc77cfb4217e8c89c24 (diff) | |
parent | 558f8aa2ee80ee8cb859f0da9714dc93294c856b (diff) | |
download | rails-bec08e774438e0a6bab74f7439106e2bd02ecc5a.tar.gz rails-bec08e774438e0a6bab74f7439106e2bd02ecc5a.tar.bz2 rails-bec08e774438e0a6bab74f7439106e2bd02ecc5a.zip |
Merge pull request #16267 from robin850/rbx-yaml
Set Psych as the YAML engine for Rubinius
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 20e512a7ff..c93ed10d6a 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -114,6 +114,7 @@ module Rails jbuilder_gemfile_entry, sdoc_gemfile_entry, spring_gemfile_entry, + psych_gemfile_entry, @extra_entries].flatten.find_all(&@gem_filter) end @@ -313,6 +314,14 @@ module Rails GemfileEntry.new('spring', nil, comment, group: :development) end + def psych_gemfile_entry + return [] unless defined?(Rubinius) + + comment = 'Use Psych as the YAML engine, instead of Syck, so serialized ' \ + 'data can be read safely from different rubies (see http://git.io/uuLVag)' + GemfileEntry.new('psych', '~> 2.0', comment, platforms: :rbx) + end + def bundle_command(command) say_status :run, "bundle #{command}" |