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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +229 -197
- data/RDOC_MAIN.rdoc +1 -1
- data/README.rdoc +6 -2
- data/lib/rails/all.rb +1 -0
- data/lib/rails/api/task.rb +7 -0
- data/lib/rails/app_rails_loader.rb +5 -3
- data/lib/rails/application/bootstrap.rb +15 -1
- data/lib/rails/application/configuration.rb +65 -8
- data/lib/rails/application/default_middleware_stack.rb +6 -2
- data/lib/rails/application/finisher.rb +0 -2
- data/lib/rails/application.rb +119 -24
- data/lib/rails/backtrace_cleaner.rb +9 -4
- data/lib/rails/code_statistics.rb +3 -4
- data/lib/rails/commands/commands_tasks.rb +2 -7
- data/lib/rails/commands/console.rb +24 -12
- data/lib/rails/commands/dbconsole.rb +20 -5
- data/lib/rails/commands/destroy.rb +2 -0
- data/lib/rails/commands/generate.rb +2 -0
- data/lib/rails/commands/plugin.rb +1 -1
- data/lib/rails/commands/server.rb +32 -21
- data/lib/rails/configuration.rb +2 -2
- data/lib/rails/engine/configuration.rb +1 -1
- data/lib/rails/engine.rb +15 -12
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators/actions/create_migration.rb +4 -3
- data/lib/rails/generators/actions.rb +33 -12
- data/lib/rails/generators/app_base.rb +63 -55
- data/lib/rails/generators/base.rb +2 -2
- data/lib/rails/generators/erb/mailer/mailer_generator.rb +25 -2
- data/lib/rails/generators/erb/mailer/templates/layout.html.erb +5 -0
- data/lib/rails/generators/erb/mailer/templates/layout.text.erb +1 -0
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb +1 -6
- data/lib/rails/generators/erb/scaffold/templates/edit.html.erb +1 -1
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb +3 -1
- data/lib/rails/generators/erb/scaffold/templates/new.html.erb +1 -1
- data/lib/rails/generators/generated_attribute.rb +28 -4
- data/lib/rails/generators/model_helpers.rb +28 -0
- data/lib/rails/generators/named_base.rb +10 -1
- data/lib/rails/generators/rails/app/app_generator.rb +34 -2
- data/lib/rails/generators/rails/app/templates/Gemfile +22 -7
- data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +2 -2
- data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +1 -1
- data/lib/rails/generators/rails/app/templates/bin/rails +1 -1
- data/lib/rails/generators/rails/app/templates/bin/setup +28 -0
- data/lib/rails/generators/rails/app/templates/config/application.rb +8 -1
- data/lib/rails/generators/rails/app/templates/config/boot.rb +1 -2
- data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml +1 -3
- data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml +1 -1
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +4 -0
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +14 -20
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -2
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +11 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +10 -0
- data/lib/rails/generators/rails/app/templates/config.ru +1 -1
- data/lib/rails/generators/rails/app/templates/gitignore +4 -1
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb +0 -3
- data/lib/rails/generators/rails/controller/USAGE +0 -1
- data/lib/rails/generators/rails/controller/controller_generator.rb +8 -4
- data/lib/rails/generators/rails/helper/USAGE +0 -4
- data/lib/rails/generators/rails/model/USAGE +12 -3
- data/lib/rails/generators/rails/model/model_generator.rb +4 -0
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +23 -1
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec +3 -3
- data/lib/rails/generators/rails/plugin/templates/Gemfile +14 -6
- data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE +1 -1
- data/lib/rails/generators/rails/plugin/templates/Rakefile +4 -0
- data/lib/rails/generators/rails/plugin/templates/app/controllers/%name%/application_controller.rb.tt +1 -0
- data/lib/rails/generators/rails/plugin/templates/rails/application.rb +1 -1
- data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js +2 -2
- data/lib/rails/generators/rails/plugin/templates/rails/stylesheets.css +1 -1
- data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb +0 -4
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +13 -3
- data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +4 -2
- data/lib/rails/generators/rails/scaffold/USAGE +7 -1
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -0
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +1 -1
- data/lib/rails/generators/resource_helpers.rb +2 -11
- data/lib/rails/generators/test_unit/controller/templates/functional_test.rb +6 -0
- data/lib/rails/generators/test_unit/helper/helper_generator.rb +1 -5
- data/lib/rails/generators/test_unit/job/job_generator.rb +13 -0
- data/lib/rails/generators/test_unit/job/templates/unit_test.rb.erb +9 -0
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +9 -0
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +4 -1
- data/lib/rails/generators/testing/assertions.rb +3 -1
- data/lib/rails/generators/testing/behaviour.rb +18 -1
- data/lib/rails/generators.rb +66 -15
- data/lib/rails/info.rb +8 -24
- data/lib/rails/info_controller.rb +1 -1
- data/lib/rails/mailers_controller.rb +20 -14
- data/lib/rails/paths.rb +3 -3
- data/lib/rails/rack/log_tailer.rb +4 -0
- data/lib/rails/rack/logger.rb +1 -1
- data/lib/rails/rack.rb +1 -1
- data/lib/rails/railtie.rb +3 -3
- data/lib/rails/ruby_version_check.rb +1 -1
- data/lib/rails/source_annotation_extractor.rb +25 -19
- data/lib/rails/tasks/framework.rake +2 -2
- data/lib/rails/tasks/statistics.rake +9 -2
- data/lib/rails/tasks.rb +3 -2
- data/lib/rails/templates/rails/mailers/email.html.erb +22 -4
- data/lib/rails/templates/rails/mailers/index.html.erb +2 -2
- data/lib/rails/templates/rails/mailers/mailer.html.erb +1 -1
- data/lib/rails/templates/rails/welcome/index.html.erb +23 -7
- data/lib/rails/test_help.rb +1 -0
- data/lib/rails/test_unit/sub_test_task.rb +2 -2
- data/lib/rails/test_unit/testing.rake +23 -5
- data/lib/rails.rb +7 -1
- metadata +17 -12
- data/lib/rails/commands/update.rb +0 -9
- data/lib/rails/generators/test_unit/helper/templates/helper_test.rb +0 -6
- data/lib/rails/rubyprof_ext.rb +0 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ceb23f4e33ce0d1c3bc8be7b36f705d03d6616bd
|
|
4
|
+
data.tar.gz: ba61ec3d3afc3eff5cb6434f358ffda6ac2308e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b9f82b3669cac3fea7dc1a11910914382d7ae4f14a30dda13f8790deb4c6c48a0120e8852eded3c253584b858f8cf8864aa4df08077d1c1861f44d3e15048f8
|
|
7
|
+
data.tar.gz: 418b4e8b1ddb926292cd48eec9ea1937a1ef3b39bce450e5c851b7f559a928697fc24590e6757fc4e9da0a802ebefc8472f297e32cebe7f9e58cf06c6d52b3f8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,328 +1,360 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
+
* No changes.
|
|
6
4
|
|
|
7
|
-
Rails.version #=> "4.1.2"
|
|
8
|
-
Rails.gem_version #=> #<Gem::Version "4.1.2">
|
|
9
5
|
|
|
10
|
-
|
|
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
|
-
|
|
8
|
+
* No changes.
|
|
15
9
|
|
|
16
|
-
* Do not crash when `config/secrets.yml` is empty.
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
## Rails 4.2.8 (February 21, 2017) ##
|
|
19
12
|
|
|
20
|
-
*
|
|
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
|
-
|
|
23
|
-
in the generated `config/environments/production.rb` file.
|
|
17
|
+
Fixes #24617.
|
|
24
18
|
|
|
25
|
-
*
|
|
19
|
+
*Andrew White*
|
|
26
20
|
|
|
27
|
-
*
|
|
21
|
+
* Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
|
|
28
22
|
|
|
29
|
-
Fixes
|
|
23
|
+
Fixes Issue #22742
|
|
30
24
|
|
|
31
|
-
*
|
|
25
|
+
*Tawan Sierek*
|
|
32
26
|
|
|
33
|
-
*
|
|
27
|
+
* Run `before_configuration` callbacks as soon as application constant
|
|
28
|
+
inherits from `Rails::Application`.
|
|
34
29
|
|
|
35
|
-
Fixes #
|
|
30
|
+
Fixes #19880.
|
|
36
31
|
|
|
37
|
-
*
|
|
32
|
+
*Yuji Yaginuma*
|
|
38
33
|
|
|
39
|
-
* Use single quotes in generated files.
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
## Rails 4.2.7 (July 12, 2016) ##
|
|
42
36
|
|
|
43
|
-
*
|
|
37
|
+
* Do not run `bundle install` when generating a new plugin.
|
|
44
38
|
|
|
45
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
54
|
-
from the system environment by default for production.
|
|
46
|
+
## Rails 4.2.6 (March 07, 2016) ##
|
|
55
47
|
|
|
56
|
-
|
|
48
|
+
* No changes.
|
|
57
49
|
|
|
58
|
-
* `config.assets.raise_runtime_errors` is set to true by default
|
|
59
50
|
|
|
60
|
-
|
|
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
|
-
|
|
53
|
+
* No changes.
|
|
65
54
|
|
|
66
|
-
* Generates `html` and `text` templates for mailers by default.
|
|
67
55
|
|
|
68
|
-
|
|
56
|
+
## Rails 4.2.5.1 (January 25, 2016) ##
|
|
69
57
|
|
|
70
|
-
*
|
|
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
|
-
|
|
78
|
-
in new applications.
|
|
61
|
+
## Rails 4.2.5 (November 12, 2015) ##
|
|
79
62
|
|
|
80
|
-
|
|
63
|
+
* Fix displaying mailer previews on non local requests when config
|
|
64
|
+
`action_mailer.show_previews` is set
|
|
81
65
|
|
|
82
|
-
*
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
83
|
+
## Rails 4.2.3 (June 25, 2015) ##
|
|
98
84
|
|
|
99
|
-
*
|
|
85
|
+
* `assert_file` understands paths with special characters
|
|
86
|
+
(eg. `v0.1.4~alpha+nightly`).
|
|
100
87
|
|
|
101
|
-
*
|
|
88
|
+
*Diego Carrion*
|
|
102
89
|
|
|
103
|
-
*
|
|
90
|
+
* Make generated scaffold functional tests work inside engines.
|
|
104
91
|
|
|
105
|
-
|
|
92
|
+
*Yuji Yaginuma*
|
|
106
93
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
112
|
-
|
|
98
|
+
# config/initializer/preview_interceptors.rb
|
|
99
|
+
ActionMailer::Base.register_preview_interceptor(ActionMailer::InlinePreviewInterceptor)
|
|
113
100
|
|
|
114
|
-
|
|
101
|
+
*Andrew White*
|
|
115
102
|
|
|
116
|
-
|
|
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
|
-
|
|
140
|
+
## Rails 4.2.0 (December 20, 2014) ##
|
|
126
141
|
|
|
127
|
-
*
|
|
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
|
-
|
|
145
|
+
*Godfrey Chan*
|
|
130
146
|
|
|
131
|
-
|
|
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
|
-
*
|
|
151
|
+
*Richard Schneeman*, *Godfrey Chan*
|
|
134
152
|
|
|
135
|
-
|
|
153
|
+
* Generated migrations add the appropriate foreign key constraints to
|
|
154
|
+
references.
|
|
136
155
|
|
|
137
|
-
|
|
138
|
-
to the template.
|
|
156
|
+
*Derek Prior*
|
|
139
157
|
|
|
140
|
-
|
|
158
|
+
* Deprecate different default for `log_level` in production.
|
|
141
159
|
|
|
142
|
-
*
|
|
143
|
-
from `config/initializers`. Subscribers should be attached before `load_config_initializers`
|
|
144
|
-
initializer completed.
|
|
160
|
+
*Godfrey Chan*, *Matthew Draper*
|
|
145
161
|
|
|
146
|
-
|
|
162
|
+
* Generated `.gitignore` excludes the whole `log/` directory, not only
|
|
163
|
+
`*.log` files.
|
|
147
164
|
|
|
148
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
169
|
+
*Igor Kapkov*
|
|
171
170
|
|
|
172
|
-
*
|
|
171
|
+
* Make `rake test` run all tests in test folder.
|
|
173
172
|
|
|
174
|
-
|
|
173
|
+
Deprecate `rake test:all` and replace `rake test:all:db` with `rake test:db`
|
|
175
174
|
|
|
176
|
-
*
|
|
175
|
+
*David Geukers*
|
|
177
176
|
|
|
178
|
-
|
|
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
|
-
*
|
|
181
|
-
test failures.
|
|
181
|
+
*Benjamin Fleischer*
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
* Remove `--skip-action-view` option from `Rails::Generators::AppBase`.
|
|
184
184
|
|
|
185
|
-
|
|
186
|
-
# or with rake
|
|
187
|
-
$ BACKTRACE=1 bin/rake
|
|
185
|
+
Fixes #17023.
|
|
188
186
|
|
|
189
|
-
*
|
|
187
|
+
*Dan Olson*
|
|
190
188
|
|
|
191
|
-
*
|
|
192
|
-
application using the `--skip-javascript` option.
|
|
189
|
+
* Specify dummy app's db migrate path in plugin's test_helper.rb.
|
|
193
190
|
|
|
194
|
-
|
|
191
|
+
Fixes #16877.
|
|
195
192
|
|
|
196
|
-
*
|
|
193
|
+
*Yukio Mizuta*
|
|
197
194
|
|
|
198
|
-
|
|
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
|
-
|
|
197
|
+
Fixes #15089.
|
|
203
198
|
|
|
204
|
-
*
|
|
199
|
+
*Xavier Noria*
|
|
205
200
|
|
|
206
|
-
|
|
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
|
-
*
|
|
204
|
+
*Yukio Mizuta*
|
|
209
205
|
|
|
210
|
-
|
|
206
|
+
* Fix a bug in the `gem` method for Rails templates when non-String options
|
|
207
|
+
are used.
|
|
211
208
|
|
|
212
|
-
|
|
213
|
-
in development environment.
|
|
209
|
+
Fixes #16709.
|
|
214
210
|
|
|
215
|
-
*
|
|
211
|
+
*Yves Senn*
|
|
216
212
|
|
|
217
|
-
*
|
|
218
|
-
|
|
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
|
-
*
|
|
218
|
+
*Ryan Dao*, *Genadi Samokovarov*, *Guillermo Iguaran*
|
|
221
219
|
|
|
222
|
-
*
|
|
220
|
+
* Add a `required` option to the model generator for associations
|
|
223
221
|
|
|
224
|
-
*
|
|
222
|
+
*Sean Griffin*
|
|
225
223
|
|
|
226
|
-
*
|
|
227
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
235
|
-
get "dashboard/index"
|
|
245
|
+
*DHH*
|
|
236
246
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
*
|
|
268
|
+
*Rafael Mendonça França*, *DHH*
|
|
243
269
|
|
|
244
|
-
*
|
|
270
|
+
* Deprecate `Rails::Rack::LogTailer` without replacement.
|
|
245
271
|
|
|
246
272
|
*Rafael Mendonça França*
|
|
247
273
|
|
|
248
|
-
*
|
|
274
|
+
* Add `--skip-turbolinks` option to the app generator.
|
|
249
275
|
|
|
250
|
-
*
|
|
276
|
+
*Rafael Mendonça França*
|
|
251
277
|
|
|
252
|
-
*
|
|
253
|
-
Fixes #11639.
|
|
278
|
+
* Invalid `bin/rails generate` commands will now show spelling suggestions.
|
|
254
279
|
|
|
255
|
-
*
|
|
280
|
+
*Richard Schneeman*
|
|
256
281
|
|
|
257
|
-
*
|
|
258
|
-
`test:generators` rake task.
|
|
282
|
+
* Add `bin/setup` script to bootstrap an application.
|
|
259
283
|
|
|
260
|
-
*
|
|
284
|
+
*Yves Senn*
|
|
261
285
|
|
|
262
|
-
*
|
|
286
|
+
* Replace double quotes with single quotes while adding an entry into Gemfile.
|
|
263
287
|
|
|
264
|
-
*
|
|
288
|
+
*Alexander Belaev*
|
|
265
289
|
|
|
266
|
-
*
|
|
290
|
+
* Default `config.assets.digest` to `true` in development.
|
|
267
291
|
|
|
268
|
-
*
|
|
292
|
+
*Dan Kang*
|
|
269
293
|
|
|
270
|
-
*
|
|
294
|
+
* Load database configuration from the first `database.yml` available in paths.
|
|
271
295
|
|
|
272
|
-
*
|
|
296
|
+
*Pier-Olivier Thibault*
|
|
273
297
|
|
|
274
|
-
*
|
|
298
|
+
* Reading name and email from git for plugin gemspec.
|
|
275
299
|
|
|
276
|
-
|
|
300
|
+
Fixes #9589.
|
|
277
301
|
|
|
278
|
-
*
|
|
302
|
+
*Arun Agrawal*, *Abd ar-Rahman Hamidi*, *Roman Shmatov*
|
|
279
303
|
|
|
280
|
-
|
|
304
|
+
* Fix `console` and `generators` blocks defined at different environments.
|
|
281
305
|
|
|
282
|
-
|
|
283
|
-
favor of `ActiveRecord::Generators::ActiveModel#update`.
|
|
306
|
+
Fixes #14748.
|
|
284
307
|
|
|
285
|
-
*
|
|
308
|
+
*Rafael Mendonça França*
|
|
286
309
|
|
|
287
|
-
*
|
|
310
|
+
* Move configuration of asset precompile list and version to an initializer.
|
|
288
311
|
|
|
289
|
-
*
|
|
312
|
+
*Matthew Draper*
|
|
290
313
|
|
|
291
|
-
*
|
|
314
|
+
* Remove sqlite3 lines from `.gitignore` if the application is not using sqlite3.
|
|
292
315
|
|
|
293
|
-
*
|
|
316
|
+
*Dmitrii Golub*
|
|
294
317
|
|
|
295
|
-
*
|
|
318
|
+
* Add public API to register new extensions for `rake notes`.
|
|
296
319
|
|
|
297
|
-
|
|
320
|
+
Example:
|
|
298
321
|
|
|
299
|
-
|
|
322
|
+
config.annotations.register_extensions("scss", "sass") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
|
|
300
323
|
|
|
301
|
-
*
|
|
324
|
+
*Roberto Miranda*
|
|
302
325
|
|
|
303
|
-
* Removed
|
|
304
|
-
`rake test:recent`.
|
|
326
|
+
* Removed unnecessary `rails application` command.
|
|
305
327
|
|
|
306
|
-
*
|
|
328
|
+
*Arun Agrawal*
|
|
307
329
|
|
|
308
|
-
*
|
|
309
|
-
Fixes #10685.
|
|
330
|
+
* Make the `rails:template` rake task load the application's initializers.
|
|
310
331
|
|
|
311
|
-
|
|
332
|
+
Fixes #12133.
|
|
312
333
|
|
|
313
|
-
*
|
|
314
|
-
Fixes #9525.
|
|
334
|
+
*Robin Dupret*
|
|
315
335
|
|
|
316
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
353
|
+
Mountable engines are namespaced by default so the generated routes
|
|
354
|
+
were too while they should not.
|
|
323
355
|
|
|
324
|
-
|
|
356
|
+
Fixes #14079.
|
|
325
357
|
|
|
326
|
-
*
|
|
358
|
+
*Yves Senn*, *Carlos Antonio da Silva*, *Robin Dupret*
|
|
327
359
|
|
|
328
|
-
Please check [4-
|
|
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
|
|
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-
|
|
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
|
|
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
data/lib/rails/api/task.rb
CHANGED
|
@@ -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
|
|
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
|
|
59
|
+
def find_executable
|
|
58
60
|
EXECUTABLES.find { |exe| File.file?(exe) }
|
|
59
61
|
end
|
|
60
62
|
end
|