aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-25 22:08:34 +0200
committerXavier Noria <fxn@hashref.com>2010-07-25 22:55:38 +0200
commit92669b8320a45e3f0497bfb83c0c8e55d515be0c (patch)
tree67aac01d249af4f83cc0b5aa090a477f41e8eb43 /railties/lib/rails
parent331df84cc943e08459463d322ca2510490c73b7e (diff)
downloadrails-92669b8320a45e3f0497bfb83c0c8e55d515be0c.tar.gz
rails-92669b8320a45e3f0497bfb83c0c8e55d515be0c.tar.bz2
rails-92669b8320a45e3f0497bfb83c0c8e55d515be0c.zip
application generation: --skip-testunit and --skip-activerecord renamed to --skip-test-unit and --skip-active-record respectively
Reason is their proper spellings are "Test::Unit" and "Active Record". Option names and descriptions have been revised, as well as some method names and minor details here and there.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb18
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/application.rb2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt2
-rw-r--r--railties/lib/rails/generators/test_case.rb6
4 files changed, 14 insertions, 14 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index c99aa3c0cd..1324cc1f67 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -168,7 +168,7 @@ module Rails
:desc => "Path to an application builder (can be a filesystem path or URL)"
class_option :template, :type => :string, :aliases => "-m",
- :desc => "Path to an application template (can be a filesystem path or URL)."
+ :desc => "Path to an application template (can be a filesystem path or URL)"
class_option :dev, :type => :boolean, :default => false,
:desc => "Setup the application with Gemfile pointing to your Rails checkout"
@@ -179,11 +179,11 @@ module Rails
class_option :skip_gemfile, :type => :boolean, :default => false,
:desc => "Don't create a Gemfile"
- class_option :skip_activerecord, :type => :boolean, :aliases => "-O", :default => false,
- :desc => "Skip ActiveRecord files"
+ class_option :skip_active_record, :type => :boolean, :aliases => "-O", :default => false,
+ :desc => "Skip Active Record files"
- class_option :skip_testunit, :type => :boolean, :aliases => "-T", :default => false,
- :desc => "Skip TestUnit files"
+ class_option :skip_test_unit, :type => :boolean, :aliases => "-T", :default => false,
+ :desc => "Skip Test::Unit files"
class_option :skip_prototype, :type => :boolean, :aliases => "-J", :default => false,
:desc => "Skip Prototype files"
@@ -205,7 +205,7 @@ module Rails
super
- if !options[:skip_activerecord] && !DATABASES.include?(options[:database])
+ if !options[:skip_active_record] && !DATABASES.include?(options[:database])
raise Error, "Invalid value for --database option. Supported for preconfiguration are: #{DATABASES.join(", ")}."
end
end
@@ -239,8 +239,8 @@ module Rails
template "config/boot.rb"
end
- def create_activerecord_files
- return if options[:skip_activerecord]
+ def create_active_record_files
+ return if options[:skip_active_record]
build(:database_yml)
end
@@ -281,7 +281,7 @@ module Rails
end
def create_test_files
- build(:test) unless options[:skip_testunit]
+ build(:test) unless options[:skip_test_unit]
end
def create_tmp_files
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb
index 190ab04cf5..7d63e99e05 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/application.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -1,6 +1,6 @@
require File.expand_path('../boot', __FILE__)
-<% unless options[:skip_activerecord] -%>
+<% unless options[:skip_active_record] -%>
require 'rails/all'
<% else -%>
# Pick the frameworks you want:
diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt
index 86564031f5..a8f7aeac7d 100644
--- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt
@@ -3,7 +3,7 @@ require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
-<% unless options[:skip_activerecord] -%>
+<% unless options[:skip_active_record] -%>
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
diff --git a/railties/lib/rails/generators/test_case.rb b/railties/lib/rails/generators/test_case.rb
index 0dfb5cd1c9..36bc542ffe 100644
--- a/railties/lib/rails/generators/test_case.rb
+++ b/railties/lib/rails/generators/test_case.rb
@@ -51,7 +51,7 @@ module Rails
# Sets default arguments on generator invocation. This can be overwritten when
# invoking it.
#
- # arguments %w(app_name --skip-activerecord)
+ # arguments %w(app_name --skip-active-record)
#
def self.arguments(array)
self.default_arguments = array
@@ -214,8 +214,8 @@ module Rails
# destination File.expand_path("../tmp", File.dirname(__FILE__))
# teardown :cleanup_destination_root
#
- # test "database.yml is not created when skipping activerecord" do
- # run_generator %w(myapp --skip-activerecord)
+ # test "database.yml is not created when skipping Active Record" do
+ # run_generator %w(myapp --skip-active-record)
# assert_no_file "config/database.yml"
# end
# end