diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/api/task.rb | 13 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml | 2 | ||||
-rw-r--r-- | railties/test/application/rackup_test.rb | 2 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
5 files changed, 19 insertions, 6 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index fe789f3c2a..c024fb6641 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -52,7 +52,7 @@ module Rails end end - # Returns a Pathname object of the current rails project, + # Returns a Pathname object of the current Rails project, # otherwise it returns nil if there is no project: # # Rails.root @@ -77,7 +77,7 @@ module Rails @_env = ActiveSupport::StringInquirer.new(environment) end - # Returns all rails groups for loading based on: + # Returns all Rails groups for loading based on: # # * The Rails environment; # * The environment variable RAILS_GROUPS; @@ -100,7 +100,7 @@ module Rails end # Returns a Pathname object of the public folder of the current - # rails project, otherwise it returns nil if there is no project: + # Rails project, otherwise it returns nil if there is no project: # # Rails.public_path # # => #<Pathname:/Users/someuser/some/path/project/public> diff --git a/railties/lib/rails/api/task.rb b/railties/lib/rails/api/task.rb index d478bbf9e8..5bcc33faeb 100644 --- a/railties/lib/rails/api/task.rb +++ b/railties/lib/rails/api/task.rb @@ -121,6 +121,19 @@ module Rails rdoc_files.exclude("#{cdr}/#{pattern}") end end + + # Only generate documentation for files that have been + # changed since the API was generated. + if Dir.exist?('doc/rdoc') && !ENV['ALL'] + last_generation = DateTime.rfc2822(File.open('doc/rdoc/created.rid', &:readline)) + + rdoc_files.keep_if do |file| + File.mtime(file).to_datetime > last_generation + end + + # Nothing to do + exit(0) if rdoc_files.empty? + end end def setup_horo_variables diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml index bd5c0b10f6..145cfb7f74 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml +++ b/railties/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml @@ -17,7 +17,7 @@ default: &default adapter: postgresql encoding: unicode - # For details on connection pooling, see rails configuration guide + # For details on connection pooling, see Rails configuration guide # http://guides.rubyonrails.org/configuring.html#database-pooling pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> diff --git a/railties/test/application/rackup_test.rb b/railties/test/application/rackup_test.rb index 9fdd2d6bd9..4aef9b299c 100644 --- a/railties/test/application/rackup_test.rb +++ b/railties/test/application/rackup_test.rb @@ -18,7 +18,7 @@ module ApplicationTests teardown_app end - test "rails app is present" do + test "Rails app is present" do assert File.exist?(app_path("config")) end diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 032c245c3a..5528459ad2 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -1,7 +1,7 @@ # Note: # It is important to keep this file as light as possible # the goal for tests that require this is to test booting up -# rails from an empty state, so anything added here could +# Rails from an empty state, so anything added here could # hide potential failures # # It is also good to know what is the bare minimum to get |