aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb10
-rw-r--r--railties/lib/rails/generators/rails/app/templates/Gemfile2
-rw-r--r--railties/lib/rails/generators/rails/model/USAGE10
-rw-r--r--railties/lib/rails/generators/rails/plugin_new/templates/bin/rails.tt2
-rw-r--r--railties/lib/rails/tasks/documentation.rake5
-rw-r--r--railties/test/generators/app_generator_test.rb3
6 files changed, 15 insertions, 17 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 5877579fc4..d48dcf9ef3 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -151,7 +151,15 @@ module Rails
desc: "Show Rails version number and quit"
def initialize(*args)
- raise Error, "Options should be given after the application name. For details run: rails --help" if args[0].blank?
+ if args[0].blank?
+ if args[1].blank?
+ # rails new
+ raise Error, "Application name should be provided in arguments. For details run: rails --help"
+ else
+ # rails new --skip-bundle my_new_application
+ raise Error, "Options should be given after the application name. For details run: rails --help"
+ end
+ end
super
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile
index 243e7e9da8..577ff651e5 100644
--- a/railties/lib/rails/generators/rails/app/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -4,8 +4,6 @@ source 'https://rubygems.org'
<%= database_gemfile_entry -%>
-<%= "gem 'jruby-openssl'\n" if defined?(JRUBY_VERSION) -%>
-
<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry -%>
diff --git a/railties/lib/rails/generators/rails/model/USAGE b/railties/lib/rails/generators/rails/model/USAGE
index 1998a392aa..145d9ee6e0 100644
--- a/railties/lib/rails/generators/rails/model/USAGE
+++ b/railties/lib/rails/generators/rails/model/USAGE
@@ -46,18 +46,18 @@ Available field types:
`rails generate model photo title:string album:references`
- It will generate an album_id column. You should generate this kind of fields when
- you will use a `belongs_to` association for instance. `references` also support
- the polymorphism, you could enable the polymorphism like this:
+ It will generate an `album_id` column. You should generate these kinds of fields when
+ you will use a `belongs_to` association, for instance. `references` also supports
+ polymorphism, you can enable polymorphism like this:
`rails generate model product supplier:references{polymorphic}`
- For integer, string, text and binary fields an integer in curly braces will
+ For integer, string, text and binary fields, an integer in curly braces will
be set as the limit:
`rails generate model user pseudo:string{30}`
- For decimal two integers separated by a comma in curly braces will be used
+ For decimal, two integers separated by a comma in curly braces will be used
for precision and scale:
`rails generate model product price:decimal{10,2}`
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/bin/rails.tt b/railties/lib/rails/generators/rails/plugin_new/templates/bin/rails.tt
index aa87d1b50c..c8de9f3e0f 100644
--- a/railties/lib/rails/generators/rails/plugin_new/templates/bin/rails.tt
+++ b/railties/lib/rails/generators/rails/plugin_new/templates/bin/rails.tt
@@ -1,4 +1,4 @@
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
ENGINE_ROOT = File.expand_path('../..', __FILE__)
ENGINE_PATH = File.expand_path('../../lib/<%= name -%>/engine', __FILE__)
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake
index d45e892424..8544890553 100644
--- a/railties/lib/rails/tasks/documentation.rake
+++ b/railties/lib/rails/tasks/documentation.rake
@@ -44,11 +44,6 @@ else
end
namespace :doc do
- def gem_path(gem_name)
- path = $LOAD_PATH.grep(/#{gem_name}[\w.-]*\/lib$/).first
- yield File.dirname(path) if path
- end
-
RDocTaskWithoutDescriptions.new("app") { |rdoc|
rdoc.rdoc_dir = 'doc/app'
rdoc.template = ENV['template'] if ENV['template']
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 0ffb615764..e992534938 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -183,9 +183,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator([destination_root, "-d", "jdbcmysql"])
assert_file "config/database.yml", /mysql/
assert_gem "activerecord-jdbcmysql-adapter"
- # TODO: When the JRuby guys merge jruby-openssl in
- # jruby this will be removed
- assert_gem "jruby-openssl" if defined?(JRUBY_VERSION)
end
def test_config_jdbcsqlite3_database