From 5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 14 Oct 2012 12:03:39 +0200 Subject: Use Ruby 1.9 Hash syntax in railties --- railties/lib/rails/tasks/framework.rake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'railties/lib/rails/tasks/framework.rake') diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index f9cff5b627..50499304cb 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -1,6 +1,6 @@ namespace :rails do desc "Update configs and some other initially generated files (or use just update:configs, update:scripts, or update:application_controller)" - task :update => [ "update:configs", "update:scripts", "update:application_controller" ] + task update: [ "update:configs", "update:scripts", "update:application_controller" ] desc "Applies the template supplied by LOCATION=(/path/to/template) or URL" task :template do @@ -9,8 +9,8 @@ namespace :rails do template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} require 'rails/generators' require 'rails/generators/rails/app/app_generator' - generator = Rails::Generators::AppGenerator.new [Rails.root], {}, :destination_root => Rails.root - generator.apply template, :verbose => false + generator = Rails::Generators::AppGenerator.new [Rails.root], {}, destination_root: Rails.root + generator.apply template, verbose: false end namespace :templates do @@ -44,8 +44,8 @@ namespace :rails do @app_generator ||= begin require 'rails/generators' require 'rails/generators/rails/app/app_generator' - gen = Rails::Generators::AppGenerator.new ["rails"], { :with_dispatchers => true }, - :destination_root => Rails.root + gen = Rails::Generators::AppGenerator.new ["rails"], { with_dispatchers: true }, + destination_root: Rails.root File.exists?(Rails.root.join("config", "application.rb")) ? gen.send(:app_const) : gen.send(:valid_app_const?) gen -- cgit v1.2.3