aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb')
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb32
1 files changed, 16 insertions, 16 deletions
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 42e0246f76..4a0bcc35a4 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
@@ -68,7 +68,7 @@ module Rails
append_file "Rakefile", <<-EOF
#{rakefile_test_tasks}
-task :default => :test
+task default: :test
EOF
if full?
template "test/integration/navigation_test.rb"
@@ -89,10 +89,10 @@ task :default => :test
end
def test_dummy_config
- template "rails/boot.rb", "#{dummy_path}/config/boot.rb", :force => true
- template "rails/application.rb", "#{dummy_path}/config/application.rb", :force => true
+ template "rails/boot.rb", "#{dummy_path}/config/boot.rb", force: true
+ template "rails/application.rb", "#{dummy_path}/config/application.rb", force: true
if mountable?
- template "rails/routes.rb", "#{dummy_path}/config/routes.rb", :force => true
+ template "rails/routes.rb", "#{dummy_path}/config/routes.rb", force: true
end
end
@@ -135,10 +135,10 @@ task :default => :test
def script(force = false)
return unless full?
- directory "script", :force => force do |content|
+ directory "script", force: force do |content|
"#{shebang}\n" + content
end
- chmod "script", 0755, :verbose => false
+ chmod "script", 0755, verbose: false
end
def gemfile_entry
@@ -158,20 +158,20 @@ task :default => :test
alias_method :plugin_path, :app_path
- class_option :dummy_path, :type => :string, :default => "test/dummy",
- :desc => "Create dummy application at given path"
+ class_option :dummy_path, type: :string, default: "test/dummy",
+ desc: "Create dummy application at given path"
- class_option :full, :type => :boolean, :default => false,
- :desc => "Generate a rails engine with bundled Rails application for testing"
+ class_option :full, type: :boolean, default: false,
+ desc: "Generate a rails engine with bundled Rails application for testing"
- class_option :mountable, :type => :boolean, :default => false,
- :desc => "Generate mountable isolated application"
+ class_option :mountable, type: :boolean, default: false,
+ desc: "Generate mountable isolated application"
- class_option :skip_gemspec, :type => :boolean, :default => false,
- :desc => "Skip gemspec file"
+ class_option :skip_gemspec, type: :boolean, default: false,
+ desc: "Skip gemspec file"
- class_option :skip_gemfile_entry, :type => :boolean, :default => false,
- :desc => "If creating plugin in application's directory " +
+ class_option :skip_gemfile_entry, type: :boolean, default: false,
+ desc: "If creating plugin in application's directory " +
"skip adding entry to Gemfile"
def initialize(*args)