railties 4.1.0 → 4.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +229 -197
  3. data/RDOC_MAIN.rdoc +1 -1
  4. data/README.rdoc +6 -2
  5. data/lib/rails/all.rb +1 -0
  6. data/lib/rails/api/task.rb +7 -0
  7. data/lib/rails/app_rails_loader.rb +5 -3
  8. data/lib/rails/application/bootstrap.rb +15 -1
  9. data/lib/rails/application/configuration.rb +65 -8
  10. data/lib/rails/application/default_middleware_stack.rb +6 -2
  11. data/lib/rails/application/finisher.rb +0 -2
  12. data/lib/rails/application.rb +119 -24
  13. data/lib/rails/backtrace_cleaner.rb +9 -4
  14. data/lib/rails/code_statistics.rb +3 -4
  15. data/lib/rails/commands/commands_tasks.rb +2 -7
  16. data/lib/rails/commands/console.rb +24 -12
  17. data/lib/rails/commands/dbconsole.rb +20 -5
  18. data/lib/rails/commands/destroy.rb +2 -0
  19. data/lib/rails/commands/generate.rb +2 -0
  20. data/lib/rails/commands/plugin.rb +1 -1
  21. data/lib/rails/commands/server.rb +32 -21
  22. data/lib/rails/configuration.rb +2 -2
  23. data/lib/rails/engine/configuration.rb +1 -1
  24. data/lib/rails/engine.rb +15 -12
  25. data/lib/rails/gem_version.rb +2 -2
  26. data/lib/rails/generators/actions/create_migration.rb +4 -3
  27. data/lib/rails/generators/actions.rb +33 -12
  28. data/lib/rails/generators/app_base.rb +63 -55
  29. data/lib/rails/generators/base.rb +2 -2
  30. data/lib/rails/generators/erb/mailer/mailer_generator.rb +25 -2
  31. data/lib/rails/generators/erb/mailer/templates/layout.html.erb +5 -0
  32. data/lib/rails/generators/erb/mailer/templates/layout.text.erb +1 -0
  33. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb +1 -6
  34. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb +1 -1
  35. data/lib/rails/generators/erb/scaffold/templates/index.html.erb +3 -1
  36. data/lib/rails/generators/erb/scaffold/templates/new.html.erb +1 -1
  37. data/lib/rails/generators/generated_attribute.rb +28 -4
  38. data/lib/rails/generators/model_helpers.rb +28 -0
  39. data/lib/rails/generators/named_base.rb +10 -1
  40. data/lib/rails/generators/rails/app/app_generator.rb +34 -2
  41. data/lib/rails/generators/rails/app/templates/Gemfile +22 -7
  42. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +2 -2
  43. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +1 -1
  44. data/lib/rails/generators/rails/app/templates/bin/rails +1 -1
  45. data/lib/rails/generators/rails/app/templates/bin/setup +28 -0
  46. data/lib/rails/generators/rails/app/templates/config/application.rb +8 -1
  47. data/lib/rails/generators/rails/app/templates/config/boot.rb +1 -2
  48. data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml +1 -3
  49. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml +1 -1
  50. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +4 -0
  51. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +14 -20
  52. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -2
  53. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +11 -0
  54. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb +1 -1
  55. data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +10 -0
  56. data/lib/rails/generators/rails/app/templates/config.ru +1 -1
  57. data/lib/rails/generators/rails/app/templates/gitignore +4 -1
  58. data/lib/rails/generators/rails/app/templates/test/test_helper.rb +0 -3
  59. data/lib/rails/generators/rails/controller/USAGE +0 -1
  60. data/lib/rails/generators/rails/controller/controller_generator.rb +8 -4
  61. data/lib/rails/generators/rails/helper/USAGE +0 -4
  62. data/lib/rails/generators/rails/model/USAGE +12 -3
  63. data/lib/rails/generators/rails/model/model_generator.rb +4 -0
  64. data/lib/rails/generators/rails/plugin/plugin_generator.rb +23 -1
  65. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec +3 -3
  66. data/lib/rails/generators/rails/plugin/templates/Gemfile +14 -6
  67. data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE +1 -1
  68. data/lib/rails/generators/rails/plugin/templates/Rakefile +4 -0
  69. data/lib/rails/generators/rails/plugin/templates/app/controllers/%name%/application_controller.rb.tt +1 -0
  70. data/lib/rails/generators/rails/plugin/templates/rails/application.rb +1 -1
  71. data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js +2 -2
  72. data/lib/rails/generators/rails/plugin/templates/rails/stylesheets.css +1 -1
  73. data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb +0 -4
  74. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +13 -3
  75. data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +4 -2
  76. data/lib/rails/generators/rails/scaffold/USAGE +7 -1
  77. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -0
  78. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +1 -1
  79. data/lib/rails/generators/resource_helpers.rb +2 -11
  80. data/lib/rails/generators/test_unit/controller/templates/functional_test.rb +6 -0
  81. data/lib/rails/generators/test_unit/helper/helper_generator.rb +1 -5
  82. data/lib/rails/generators/test_unit/job/job_generator.rb +13 -0
  83. data/lib/rails/generators/test_unit/job/templates/unit_test.rb.erb +9 -0
  84. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +9 -0
  85. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +4 -1
  86. data/lib/rails/generators/testing/assertions.rb +3 -1
  87. data/lib/rails/generators/testing/behaviour.rb +18 -1
  88. data/lib/rails/generators.rb +66 -15
  89. data/lib/rails/info.rb +8 -24
  90. data/lib/rails/info_controller.rb +1 -1
  91. data/lib/rails/mailers_controller.rb +20 -14
  92. data/lib/rails/paths.rb +3 -3
  93. data/lib/rails/rack/log_tailer.rb +4 -0
  94. data/lib/rails/rack/logger.rb +1 -1
  95. data/lib/rails/rack.rb +1 -1
  96. data/lib/rails/railtie.rb +3 -3
  97. data/lib/rails/ruby_version_check.rb +1 -1
  98. data/lib/rails/source_annotation_extractor.rb +25 -19
  99. data/lib/rails/tasks/framework.rake +2 -2
  100. data/lib/rails/tasks/statistics.rake +9 -2
  101. data/lib/rails/tasks.rb +3 -2
  102. data/lib/rails/templates/rails/mailers/email.html.erb +22 -4
  103. data/lib/rails/templates/rails/mailers/index.html.erb +2 -2
  104. data/lib/rails/templates/rails/mailers/mailer.html.erb +1 -1
  105. data/lib/rails/templates/rails/welcome/index.html.erb +23 -7
  106. data/lib/rails/test_help.rb +1 -0
  107. data/lib/rails/test_unit/sub_test_task.rb +2 -2
  108. data/lib/rails/test_unit/testing.rake +23 -5
  109. data/lib/rails.rb +7 -1
  110. metadata +17 -12
  111. data/lib/rails/commands/update.rb +0 -9
  112. data/lib/rails/generators/test_unit/helper/templates/helper_test.rb +0 -6
  113. data/lib/rails/rubyprof_ext.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 844474036d52ee24bd3903bece5a23870e9c8ff8
4
- data.tar.gz: 82a1cb37eaf47023a553077bef02ce4acca3f597
3
+ metadata.gz: ceb23f4e33ce0d1c3bc8be7b36f705d03d6616bd
4
+ data.tar.gz: ba61ec3d3afc3eff5cb6434f358ffda6ac2308e7
5
5
  SHA512:
6
- metadata.gz: dbdb0f23807967942820b6560623206992e60711e3c3701af22afbf4ba05ad036f02e409e7fffeec14c17b90c9a666efe30048d86a23baf17fe2d3458ca89703
7
- data.tar.gz: 206be71f0191f6e56e3d8a703b0beed272d1cb10d78dbf9edf7cc593b96d9257b9fb452dfc76e6e288645f0ffd851cf6d06af080866720b443f6edd55a542fcb
6
+ metadata.gz: 1b9f82b3669cac3fea7dc1a11910914382d7ae4f14a30dda13f8790deb4c6c48a0120e8852eded3c253584b858f8cf8864aa4df08077d1c1861f44d3e15048f8
7
+ data.tar.gz: 418b4e8b1ddb926292cd48eec9ea1937a1ef3b39bce450e5c851b7f559a928697fc24590e6757fc4e9da0a802ebefc8472f297e32cebe7f9e58cf06c6d52b3f8
data/CHANGELOG.md CHANGED
@@ -1,328 +1,360 @@
1
- * Introduce `Rails.gem_version` as a convenience method to return
2
- `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform
3
- version comparison.
1
+ ## Rails 4.2.10 (September 27, 2017) ##
4
2
 
5
- Example:
3
+ * No changes.
6
4
 
7
- Rails.version #=> "4.1.2"
8
- Rails.gem_version #=> #<Gem::Version "4.1.2">
9
5
 
10
- Rails.version > "4.1.10" #=> false
11
- Rails.gem_version > Gem::Version.new("4.1.10") #=> true
12
- Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true
6
+ ## Rails 4.2.9 (June 26, 2017) ##
13
7
 
14
- *Prem Sichanugrist*
8
+ * No changes.
15
9
 
16
- * Do not crash when `config/secrets.yml` is empty.
17
10
 
18
- *Yves Senn*
11
+ ## Rails 4.2.8 (February 21, 2017) ##
19
12
 
20
- * Set `dump_schema_after_migration` config values in production.
13
+ * Add `config/initializers/to_time_preserves_timezone.rb`, which tells
14
+ Active Support to preserve the receiver's timezone when calling `to_time`.
15
+ This matches the new behavior that will be part of Ruby 2.4.
21
16
 
22
- Set `config.active_record.dump_schema_after_migration` as false
23
- in the generated `config/environments/production.rb` file.
17
+ Fixes #24617.
24
18
 
25
- *Emil Soman*
19
+ *Andrew White*
26
20
 
27
- * Added Thor-action for creation of migrations.
21
+ * Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
28
22
 
29
- Fixes #13588, #12674.
23
+ Fixes Issue #22742
30
24
 
31
- *Gert Goet*
25
+ *Tawan Sierek*
32
26
 
33
- * Ensure that `bin/rails` is a file before trying to execute it.
27
+ * Run `before_configuration` callbacks as soon as application constant
28
+ inherits from `Rails::Application`.
34
29
 
35
- Fixes #13825.
30
+ Fixes #19880.
36
31
 
37
- *bronzle*
32
+ *Yuji Yaginuma*
38
33
 
39
- * Use single quotes in generated files.
40
34
 
41
- *Cristian Mircea Messel*, *Chulki Lee*
35
+ ## Rails 4.2.7 (July 12, 2016) ##
42
36
 
43
- * The `Gemfile` of new applications depends on SDoc ~> 0.4.0.
37
+ * Do not run `bundle install` when generating a new plugin.
44
38
 
45
- *Xavier Noria*
39
+ Since bundler 1.12.0, the gemspec is validated so the `bundle install`
40
+ command will fail just after the gem is created causing confusion to the
41
+ users. This change was a bug fix to correctly validate gemspecs.
46
42
 
47
- * `test_help.rb` now automatically checks/maintains your test database
48
- schema. (Use `config.active_record.maintain_test_schema = false` to
49
- disable.)
43
+ *Rafael Mendonça França*
50
44
 
51
- *Jon Leighton*
52
45
 
53
- * Configure `secrets.yml` and `database.yml` to read configuration
54
- from the system environment by default for production.
46
+ ## Rails 4.2.6 (March 07, 2016) ##
55
47
 
56
- *José Valim*
48
+ * No changes.
57
49
 
58
- * `config.assets.raise_runtime_errors` is set to true by default
59
50
 
60
- This option has been introduced in
61
- [sprockets-rails#100][https://github.com/rails/sprockets-rails/pull/100]
62
- and defaults to true in new applications in development.
51
+ ## Rails 4.2.5.2 (February 26, 2016) ##
63
52
 
64
- *Richard Schneeman*
53
+ * No changes.
65
54
 
66
- * Generates `html` and `text` templates for mailers by default.
67
55
 
68
- *Kassio Borges*
56
+ ## Rails 4.2.5.1 (January 25, 2016) ##
69
57
 
70
- * Move `secret_key_base` from `config/initializers/secret_token.rb`
71
- to `config/secrets.yml`.
58
+ * No changes.
72
59
 
73
- `secret_key_base` is now saved in `Rails.application.secrets.secret_key_base`
74
- and it fallbacks to the value of `config.secret_key_base` when it is not
75
- present in `config/secrets.yml`.
76
60
 
77
- `config/initializers/secret_token.rb` is not generated by default
78
- in new applications.
61
+ ## Rails 4.2.5 (November 12, 2015) ##
79
62
 
80
- *Guillermo Iguaran*
63
+ * Fix displaying mailer previews on non local requests when config
64
+ `action_mailer.show_previews` is set
81
65
 
82
- * Generate a new `secrets.yml` file in the `config` folder for new
83
- applications. By default, this file contains the application's `secret_key_base`,
84
- but it could also be used to store other secrets such as access keys for external
85
- APIs.
66
+ *Wojciech Wnętrzak*
86
67
 
87
- The secrets added to this file will be accessible via `Rails.application.secrets`.
88
- For example, with the following `secrets.yml`:
89
68
 
90
- development:
91
- secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
92
- some_api_key: SOMEKEY
69
+ ## Rails 4.2.4 (August 24, 2015) ##
70
+
71
+ * Fix STATS_DIRECTORIES already defined warning when running rake from within
72
+ the top level directory of an engine that has a test app.
73
+
74
+ Fixes #20510
75
+
76
+ *Ersin Akinci*
77
+
78
+ * Fix `NoMethodError` when generating a scaffold inside a full engine.
79
+
80
+ *Yuji Yaginuma*
93
81
 
94
- `Rails.application.secrets.some_api_key` will return `SOMEKEY` in the development
95
- environment.
96
82
 
97
- *Guillermo Iguaran*
83
+ ## Rails 4.2.3 (June 25, 2015) ##
98
84
 
99
- * Add `ENV['DATABASE_URL']` support in `rails dbconsole`. Fixes #13320.
85
+ * `assert_file` understands paths with special characters
86
+ (eg. `v0.1.4~alpha+nightly`).
100
87
 
101
- *Huiming Teo*
88
+ *Diego Carrion*
102
89
 
103
- * Add `Application#message_verifier` method to return a message verifier.
90
+ * Make generated scaffold functional tests work inside engines.
104
91
 
105
- This verifier can be used to generate and verify signed messages in the application.
92
+ *Yuji Yaginuma*
106
93
 
107
- message = Rails.application.message_verifier(:sensitive_data).generate('my sensible data')
108
- Rails.application.message_verifier(:sensitive_data).verify(message)
109
- # => 'my sensible data'
94
+ * Add support for inline images in mailer previews by using an interceptor
95
+ class to convert cid: urls in image src attributes to data urls. The
96
+ interceptor is not enabled by default but can be done in an initializer:
110
97
 
111
- It is recommended not to use the same verifier for different things, so you can get different
112
- verifiers passing the name argument.
98
+ # config/initializer/preview_interceptors.rb
99
+ ActionMailer::Base.register_preview_interceptor(ActionMailer::InlinePreviewInterceptor)
113
100
 
114
- message = Rails.application.message_verifier(:cookies).generate('my sensible cookie data')
101
+ *Andrew White*
115
102
 
116
- See the `ActiveSupport::MessageVerifier` documentation for more information.
103
+ * Fix mailer previews with attachments by using the mail gem's own API to
104
+ locate the first part of the correct mime type.
105
+
106
+ Fixes #14435.
107
+
108
+ *Andrew White*
109
+
110
+
111
+ ## Rails 4.2.2 (June 16, 2015) ##
112
+
113
+ * No Changes *
114
+
115
+
116
+ ## Rails 4.2.1 (March 19, 2015) ##
117
+
118
+ * Add a new-line to the end of route method generated code.
119
+
120
+ We need to add a `\n`, because we cannot have two routes
121
+ in the same line.
122
+
123
+ *arthurnn*
124
+
125
+ * Force generated routes to be inserted into routes.rb
126
+
127
+ *Andrew White*
128
+
129
+ * Don't remove all line endings from routes.rb when revoking scaffold.
130
+
131
+ Fixes #15913.
132
+
133
+ *Andrew White*
134
+
135
+ * Fix scaffold generator with `--helper=false` option.
117
136
 
118
137
  *Rafael Mendonça França*
119
138
 
120
- * The [Spring application
121
- preloader](https://github.com/rails/spring) is now installed
122
- by default for new applications. It uses the development group of
123
- the Gemfile, so will not be installed in production.
124
139
 
125
- *Jon Leighton*
140
+ ## Rails 4.2.0 (December 20, 2014) ##
126
141
 
127
- * Uses .railsrc while creating new plugin if it is available.
142
+ * Deprecate `config.serve_static_assets` in favor of `config.serve_static_files`
143
+ to clarify that the option is unrelated to the asset pipeline.
128
144
 
129
- Fixes #10700.
145
+ *Godfrey Chan*
130
146
 
131
- *Prathamesh Sonpatki*
147
+ * `config.serve_static_files` can now be set from an environment variable in
148
+ production mode. The feature remains off by default, but can be enabled by
149
+ setting `RAILS_SERVE_STATIC_FILES` to a non-empty string at boot time.
132
150
 
133
- * Remove turbolinks when generating a new application based on a template that skips it.
151
+ *Richard Schneeman*, *Godfrey Chan*
134
152
 
135
- Example:
153
+ * Generated migrations add the appropriate foreign key constraints to
154
+ references.
136
155
 
137
- Skips turbolinks adding `add_gem_entry_filter { |gem| gem.name != "turbolinks" }`
138
- to the template.
156
+ *Derek Prior*
139
157
 
140
- *Lauro Caetano*
158
+ * Deprecate different default for `log_level` in production.
141
159
 
142
- * Instrument an `load_config_initializer.railties` event on each load of configuration initializer
143
- from `config/initializers`. Subscribers should be attached before `load_config_initializers`
144
- initializer completed.
160
+ *Godfrey Chan*, *Matthew Draper*
145
161
 
146
- Registering subscriber examples:
162
+ * Generated `.gitignore` excludes the whole `log/` directory, not only
163
+ `*.log` files.
147
164
 
148
- # config/application.rb
149
- module RailsApp
150
- class Application < Rails::Application
151
- ActiveSupport::Notifications.subscribe('load_config_initializer.railties') do |*args|
152
- event = ActiveSupport::Notifications::Event.new(*args)
153
- puts "Loaded initializer #{event.payload[:initializer]} (#{event.duration}ms)"
154
- end
155
- end
156
- end
165
+ *ShunsukeAida*
157
166
 
158
- # my_engine/lib/my_engine/engine.rb
159
- module MyEngine
160
- class Engine < ::Rails::Engine
161
- config.before_initialize do
162
- ActiveSupport::Notifications.subscribe('load_config_initializer.railties') do |*args|
163
- event = ActiveSupport::Notifications::Event.new(*args)
164
- puts "Loaded initializer #{event.payload[:initializer]} (#{event.duration}ms)"
165
- end
166
- end
167
- end
168
- end
167
+ * `Rails::Paths::Path.unshift` now has the same interface as `Array.unshift`.
169
168
 
170
- *Paul Nikitochkin*
169
+ *Igor Kapkov*
171
170
 
172
- * Support for Pathnames in eager load paths.
171
+ * Make `rake test` run all tests in test folder.
173
172
 
174
- *Mike Pack*
173
+ Deprecate `rake test:all` and replace `rake test:all:db` with `rake test:db`
175
174
 
176
- * Fixed missing line and shadow on service pages(404, 422, 500).
175
+ *David Geukers*
177
176
 
178
- *Dmitry Korotkov*
177
+ * `secret_token` is now saved in `Rails.application.secrets.secret_token`
178
+ and it falls back to the value of `config.secret_token` when it is not
179
+ present in `config/secrets.yml`.
179
180
 
180
- * `BACKTRACE` environment variable to show unfiltered backtraces for
181
- test failures.
181
+ *Benjamin Fleischer*
182
182
 
183
- Example:
183
+ * Remove `--skip-action-view` option from `Rails::Generators::AppBase`.
184
184
 
185
- $ BACKTRACE=1 ruby -Itest ...
186
- # or with rake
187
- $ BACKTRACE=1 bin/rake
185
+ Fixes #17023.
188
186
 
189
- *Yves Senn*
187
+ *Dan Olson*
190
188
 
191
- * Removal of all javascript stuff (gems and files) when generating a new
192
- application using the `--skip-javascript` option.
189
+ * Specify dummy app's db migrate path in plugin's test_helper.rb.
193
190
 
194
- *Robin Dupret*
191
+ Fixes #16877.
195
192
 
196
- * Make the application name snake cased when it contains spaces
193
+ *Yukio Mizuta*
197
194
 
198
- The application name is used to fill the `database.yml` and
199
- `session_store.rb` files ; previously, if the provided name
200
- contained whitespaces, it led to unexpected names in these files.
195
+ * Inject `Rack::Lock` if `config.eager_load` is false.
201
196
 
202
- *Robin Dupret*
197
+ Fixes #15089.
203
198
 
204
- * Added `--model-name` option to `ScaffoldControllerGenerator`.
199
+ *Xavier Noria*
205
200
 
206
- *yalab*
201
+ * Change the path of dummy app location in plugin's test_helper.rb for cases
202
+ you specify dummy_path option.
207
203
 
208
- * Expose MiddlewareStack#unshift to environment configuration.
204
+ *Yukio Mizuta*
209
205
 
210
- *Ben Pickles*
206
+ * Fix a bug in the `gem` method for Rails templates when non-String options
207
+ are used.
211
208
 
212
- * `rails server` will only extend the logger to output to STDOUT
213
- in development environment.
209
+ Fixes #16709.
214
210
 
215
- *Richard Schneeman*
211
+ *Yves Senn*
216
212
 
217
- * Don't require passing path to app before options in `rails new`
218
- and `rails plugin new`
213
+ * The [web-console](https://github.com/rails/web-console) gem is now
214
+ installed by default for new applications. It can help you debug
215
+ development exceptions by spawning an interactive console in its cause
216
+ binding.
219
217
 
220
- *Piotr Sarnacki*
218
+ *Ryan Dao*, *Genadi Samokovarov*, *Guillermo Iguaran*
221
219
 
222
- * rake notes now searches *.less files
220
+ * Add a `required` option to the model generator for associations
223
221
 
224
- *Josh Crowder*
222
+ *Sean Griffin*
225
223
 
226
- * Generate nested route for namespaced controller generated using
227
- `rails g controller`.
228
- Fixes #11532.
224
+ * Add `after_bundle` callbacks in Rails templates. Useful for allowing the
225
+ generated binstubs to be added to version control.
229
226
 
230
- Example:
227
+ Fixes #16292.
228
+
229
+ *Stefan Kanev*
230
+
231
+ * Pull in the custom configuration concept from dhh/custom_configuration, which allows you to
232
+ configure your own code through the Rails configuration object with custom configuration:
233
+
234
+ # config/environments/production.rb
235
+ config.x.payment_processing.schedule = :daily
236
+ config.x.payment_processing.retries = 3
237
+ config.x.super_debugger = true
238
+
239
+ These configuration points are then available through the configuration object:
231
240
 
232
- rails g controller admin/dashboard index
241
+ Rails.configuration.x.payment_processing.schedule # => :daily
242
+ Rails.configuration.x.payment_processing.retries # => 3
243
+ Rails.configuration.x.super_debugger # => true
233
244
 
234
- # Before:
235
- get "dashboard/index"
245
+ *DHH*
236
246
 
237
- # After:
238
- namespace :admin do
239
- get "dashboard/index"
247
+ * Scaffold generator `_form` partial adds `class="field"` for password
248
+ confirmation fields.
249
+
250
+ *noinkling*
251
+
252
+ * Add `Rails::Application.config_for` to load a configuration for the current
253
+ environment.
254
+
255
+ # config/exception_notification.yml:
256
+ production:
257
+ url: http://127.0.0.1:8080
258
+ namespace: my_app_production
259
+ development:
260
+ url: http://localhost:3001
261
+ namespace: my_app_development
262
+
263
+ # config/production.rb
264
+ Rails.application.configure do
265
+ config.middleware.use ExceptionNotifier, config_for(:exception_notification)
240
266
  end
241
267
 
242
- *Prathamesh Sonpatki*
268
+ *Rafael Mendonça França*, *DHH*
243
269
 
244
- * Fix the event name of action_dispatch requests.
270
+ * Deprecate `Rails::Rack::LogTailer` without replacement.
245
271
 
246
272
  *Rafael Mendonça França*
247
273
 
248
- * Make `config.log_level` work with custom loggers.
274
+ * Add `--skip-turbolinks` option to the app generator.
249
275
 
250
- *Max Shytikov*
276
+ *Rafael Mendonça França*
251
277
 
252
- * Changed stylesheet load order in the stylesheet manifest generator.
253
- Fixes #11639.
278
+ * Invalid `bin/rails generate` commands will now show spelling suggestions.
254
279
 
255
- *Pawel Janiak*
280
+ *Richard Schneeman*
256
281
 
257
- * Added generated unit test for generator generator using new
258
- `test:generators` rake task.
282
+ * Add `bin/setup` script to bootstrap an application.
259
283
 
260
- *Josef Šimánek*
284
+ *Yves Senn*
261
285
 
262
- * Removed `update:application_controller` rake task.
286
+ * Replace double quotes with single quotes while adding an entry into Gemfile.
263
287
 
264
- *Josef Šimánek*
288
+ *Alexander Belaev*
265
289
 
266
- * Fix `rake environment` to do not eager load modules
290
+ * Default `config.assets.digest` to `true` in development.
267
291
 
268
- *Paul Nikitochkin*
292
+ *Dan Kang*
269
293
 
270
- * Fix `rake notes` to look into `*.sass` files
294
+ * Load database configuration from the first `database.yml` available in paths.
271
295
 
272
- *Yuri Artemev*
296
+ *Pier-Olivier Thibault*
273
297
 
274
- * Removed deprecated `Rails.application.railties.engines`.
298
+ * Reading name and email from git for plugin gemspec.
275
299
 
276
- *Arun Agrawal*
300
+ Fixes #9589.
277
301
 
278
- * Removed deprecated threadsafe! from Rails Config.
302
+ *Arun Agrawal*, *Abd ar-Rahman Hamidi*, *Roman Shmatov*
279
303
 
280
- *Paul Nikitochkin*
304
+ * Fix `console` and `generators` blocks defined at different environments.
281
305
 
282
- * Remove deprecated `ActiveRecord::Generators::ActiveModel#update_attributes` in
283
- favor of `ActiveRecord::Generators::ActiveModel#update`.
306
+ Fixes #14748.
284
307
 
285
- *Vipul A M*
308
+ *Rafael Mendonça França*
286
309
 
287
- * Remove deprecated `config.whiny_nils` option.
310
+ * Move configuration of asset precompile list and version to an initializer.
288
311
 
289
- *Vipul A M*
312
+ *Matthew Draper*
290
313
 
291
- * Rename `commands/plugin_new.rb` to `commands/plugin.rb` and fix references
314
+ * Remove sqlite3 lines from `.gitignore` if the application is not using sqlite3.
292
315
 
293
- *Richard Schneeman*
316
+ *Dmitrii Golub*
294
317
 
295
- * Fix `rails plugin --help` command.
318
+ * Add public API to register new extensions for `rake notes`.
296
319
 
297
- *Richard Schneeman*
320
+ Example:
298
321
 
299
- * Omit turbolinks configuration completely on skip_javascript generator option.
322
+ config.annotations.register_extensions("scss", "sass") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
300
323
 
301
- *Nikita Fedyashev*
324
+ *Roberto Miranda*
302
325
 
303
- * Removed deprecated rake tasks for running tests: `rake test:uncommitted` and
304
- `rake test:recent`.
326
+ * Removed unnecessary `rails application` command.
305
327
 
306
- *John Wang*
328
+ *Arun Agrawal*
307
329
 
308
- * Clearing autoloaded constants triggers routes reloading.
309
- Fixes #10685.
330
+ * Make the `rails:template` rake task load the application's initializers.
310
331
 
311
- *Xavier Noria*
332
+ Fixes #12133.
312
333
 
313
- * Fixes bug with scaffold generator with `--assets=false --resource-route=false`.
314
- Fixes #9525.
334
+ *Robin Dupret*
315
335
 
316
- *Arun Agrawal*
336
+ * Introduce `Rails.gem_version` as a convenience method to return
337
+ `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform
338
+ version comparison.
339
+
340
+ Example:
341
+
342
+ Rails.version #=> "4.1.2"
343
+ Rails.gem_version #=> #<Gem::Version "4.1.2">
344
+
345
+ Rails.version > "4.1.10" #=> false
346
+ Rails.gem_version > Gem::Version.new("4.1.10") #=> true
347
+ Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true
348
+
349
+ *Prem Sichanugrist*
317
350
 
318
- * Rails::Railtie no longer forces the Rails::Configurable module on everything
319
- that subclasses it. Instead, the methods from Rails::Configurable have been
320
- moved to class methods in Railtie and the Railtie has been made abstract.
351
+ * Avoid namespacing routes inside engines.
321
352
 
322
- *John Wang*
353
+ Mountable engines are namespaced by default so the generated routes
354
+ were too while they should not.
323
355
 
324
- * Changes repetitive th tags to use colspan attribute in `index.html.erb` template.
356
+ Fixes #14079.
325
357
 
326
- *Sıtkı Bağdat*
358
+ *Yves Senn*, *Carlos Antonio da Silva*, *Robin Dupret*
327
359
 
328
- Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/railties/CHANGELOG.md) for previous changes.
360
+ Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/railties/CHANGELOG.md) for previous changes.
data/RDOC_MAIN.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  == Welcome to \Rails
2
2
 
3
3
  \Rails is a web-application framework that includes everything needed to create
4
- database-backed web applications according to the {Model-View-Controller (MVC)}[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller] pattern.
4
+ database-backed web applications according to the {Model-View-Controller (MVC)}[http://en.wikipedia.org/wiki/Model-view-controller] pattern.
5
5
 
6
6
  Understanding the MVC pattern is key to understanding \Rails. MVC divides your application
7
7
  into three layers, each with a specific responsibility.
data/README.rdoc CHANGED
@@ -17,7 +17,7 @@ The latest version of Railties can be installed with RubyGems:
17
17
 
18
18
  Source code can be downloaded as part of the Rails project on GitHub
19
19
 
20
- * https://github.com/rails/rails/tree/4-1-stable/railties
20
+ * https://github.com/rails/rails/tree/4-2-stable/railties
21
21
 
22
22
  == License
23
23
 
@@ -31,7 +31,11 @@ API documentation is at
31
31
 
32
32
  * http://api.rubyonrails.org
33
33
 
34
- Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:
34
+ Bug reports can be filed for the Ruby on Rails project here:
35
35
 
36
36
  * https://github.com/rails/rails/issues
37
37
 
38
+ Feature requests should be discussed on the rails-core mailing list here:
39
+
40
+ * https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core
41
+
data/lib/rails/all.rb CHANGED
@@ -5,6 +5,7 @@ require "rails"
5
5
  action_controller
6
6
  action_view
7
7
  action_mailer
8
+ active_job
8
9
  rails/test_unit
9
10
  sprockets
10
11
  ).each do |framework|
@@ -50,6 +50,13 @@ module Rails
50
50
  )
51
51
  },
52
52
 
53
+ 'activejob' => {
54
+ :include => %w(
55
+ README.md
56
+ lib/active_job/**/*.rb
57
+ )
58
+ },
59
+
53
60
  'railties' => {
54
61
  :include => %w(
55
62
  README.rdoc
@@ -1,7 +1,9 @@
1
1
  require 'pathname'
2
2
 
3
3
  module Rails
4
- module AppRailsLoader
4
+ module AppRailsLoader # :nodoc:
5
+ extend self
6
+
5
7
  RUBY = Gem.ruby
6
8
  EXECUTABLES = ['bin/rails', 'script/rails']
7
9
  BUNDLER_WARNING = <<EOS
@@ -26,7 +28,7 @@ generate it and add it to source control:
26
28
 
27
29
  EOS
28
30
 
29
- def self.exec_app_rails
31
+ def exec_app_rails
30
32
  original_cwd = Dir.pwd
31
33
 
32
34
  loop do
@@ -54,7 +56,7 @@ EOS
54
56
  end
55
57
  end
56
58
 
57
- def self.find_executable
59
+ def find_executable
58
60
  EXECUTABLES.find { |exe| File.file?(exe) }
59
61
  end
60
62
  end