diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-05-22 13:26:06 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-05-22 13:26:06 +0400 |
commit | fe7038eac8c1a4df57a0aacf4dd77da5ef87f6df (patch) | |
tree | c4edab8348ee85aaa0cecf4fa86757ffaf4f80de /railties/lib | |
parent | 0638e6bb14541d128b11f21c308ae7717196cb6f (diff) | |
download | rails-fe7038eac8c1a4df57a0aacf4dd77da5ef87f6df.tar.gz rails-fe7038eac8c1a4df57a0aacf4dd77da5ef87f6df.tar.bz2 rails-fe7038eac8c1a4df57a0aacf4dd77da5ef87f6df.zip |
Use new hash syntax for generators gem method
The Gemfile of new application uses ruby 1.9 hashes. Gem method of
generators should use them too. It prevents from mixing two kinds of
syntax in one file.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 6cd2ea2bbd..92f40b9e31 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -27,7 +27,7 @@ module Rails log :gemfile, message options.each do |option, value| - parts << ":#{option} => #{value.inspect}" + parts << "#{option}: #{value.inspect}" end in_root do diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 722e37e20b..7088367462 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -139,7 +139,7 @@ task :default => :test gemfile_in_app_path = File.join(rails_app_path, "Gemfile") if File.exist? gemfile_in_app_path - entry = "gem '#{name}', :path => '#{relative_path}'" + entry = "gem '#{name}', path: '#{relative_path}'" append_file gemfile_in_app_path, entry end end |