railties 4.2.11.3 → 5.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +262 -206
  3. data/MIT-LICENSE +20 -0
  4. data/README.rdoc +1 -1
  5. data/{bin → exe}/rails +0 -0
  6. data/lib/rails.rb +19 -1
  7. data/lib/rails/all.rb +10 -9
  8. data/lib/rails/api/task.rb +7 -14
  9. data/lib/rails/{app_rails_loader.rb → app_loader.rb} +4 -3
  10. data/lib/rails/application.rb +31 -41
  11. data/lib/rails/application/bootstrap.rb +1 -14
  12. data/lib/rails/application/configuration.rb +94 -95
  13. data/lib/rails/application/default_middleware_stack.rb +30 -16
  14. data/lib/rails/application/finisher.rb +11 -2
  15. data/lib/rails/application/routes_reloader.rb +1 -3
  16. data/lib/rails/application_controller.rb +1 -1
  17. data/lib/rails/cli.rb +2 -2
  18. data/lib/rails/code_statistics.rb +6 -8
  19. data/lib/rails/code_statistics_calculator.rb +8 -1
  20. data/lib/rails/command.rb +70 -0
  21. data/lib/rails/commands.rb +5 -3
  22. data/lib/rails/commands/commands_tasks.rb +25 -14
  23. data/lib/rails/commands/console.rb +7 -52
  24. data/lib/rails/commands/console_helper.rb +34 -0
  25. data/lib/rails/commands/dbconsole.rb +59 -78
  26. data/lib/rails/commands/dev_cache.rb +21 -0
  27. data/lib/rails/commands/plugin.rb +1 -1
  28. data/lib/rails/commands/rake_proxy.rb +34 -0
  29. data/lib/rails/commands/runner.rb +0 -1
  30. data/lib/rails/commands/server.rb +29 -36
  31. data/lib/rails/commands/test.rb +9 -0
  32. data/lib/rails/configuration.rb +21 -5
  33. data/lib/rails/console/app.rb +5 -0
  34. data/lib/rails/console/helpers.rb +1 -1
  35. data/lib/rails/engine.rb +68 -58
  36. data/lib/rails/engine/commands.rb +4 -2
  37. data/lib/rails/engine/configuration.rb +4 -10
  38. data/lib/rails/gem_version.rb +4 -4
  39. data/lib/rails/generators.rb +30 -7
  40. data/lib/rails/generators/.named_base.rb.swp +0 -0
  41. data/lib/rails/generators/actions.rb +19 -5
  42. data/lib/rails/generators/app_base.rb +65 -45
  43. data/lib/rails/generators/base.rb +6 -6
  44. data/lib/rails/generators/erb/mailer/mailer_generator.rb +5 -8
  45. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb +9 -7
  46. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb +1 -1
  47. data/lib/rails/generators/erb/scaffold/templates/index.html.erb +2 -2
  48. data/lib/rails/generators/erb/scaffold/templates/new.html.erb +1 -1
  49. data/lib/rails/generators/generated_attribute.rb +5 -1
  50. data/lib/rails/generators/migration.rb +7 -7
  51. data/lib/rails/generators/named_base.rb +21 -5
  52. data/lib/rails/generators/rails/app/USAGE +0 -1
  53. data/lib/rails/generators/rails/app/app_generator.rb +75 -11
  54. data/lib/rails/generators/rails/app/templates/Gemfile +17 -13
  55. data/lib/rails/generators/rails/app/templates/{README.rdoc → README.md} +1 -5
  56. data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +7 -0
  57. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +1 -1
  58. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee +11 -0
  59. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +3 -3
  60. data/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb +5 -0
  61. data/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb +5 -0
  62. data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +3 -1
  63. data/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb +2 -0
  64. data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb +4 -0
  65. data/lib/rails/generators/rails/app/templates/app/models/application_record.rb +3 -0
  66. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +20 -17
  67. data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +13 -0
  68. data/lib/rails/generators/{erb/mailer/templates/layout.text.erb → rails/app/templates/app/views/layouts/mailer.text.erb.tt} +0 -0
  69. data/lib/rails/generators/rails/app/templates/bin/setup +17 -12
  70. data/lib/rails/generators/rails/app/templates/bin/update +28 -0
  71. data/lib/rails/generators/rails/app/templates/config.ru.tt +11 -0
  72. data/lib/rails/generators/rails/app/templates/config/application.rb +9 -14
  73. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml +1 -1
  74. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml +2 -2
  75. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +20 -3
  76. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +18 -11
  77. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +7 -3
  78. data/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb +5 -0
  79. data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb +6 -0
  80. data/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb +5 -0
  81. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb +1 -0
  82. data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb +16 -0
  83. data/lib/rails/generators/rails/app/templates/config/initializers/request_forgery_protection.rb +4 -0
  84. data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +2 -2
  85. data/lib/rails/generators/rails/app/templates/config/redis/cable.yml +9 -0
  86. data/lib/rails/generators/rails/app/templates/config/routes.rb +3 -53
  87. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +3 -3
  88. data/lib/rails/generators/rails/app/templates/gitignore +7 -1
  89. data/lib/rails/generators/rails/controller/controller_generator.rb +6 -4
  90. data/lib/rails/generators/rails/migration/migration_generator.rb +1 -1
  91. data/lib/rails/generators/rails/model/USAGE +6 -1
  92. data/lib/rails/generators/rails/model/model_generator.rb +1 -1
  93. data/lib/rails/generators/rails/plugin/plugin_generator.rb +88 -35
  94. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec +6 -9
  95. data/lib/rails/generators/rails/plugin/templates/Gemfile +3 -7
  96. data/lib/rails/generators/rails/plugin/templates/README.md +3 -0
  97. data/lib/rails/generators/rails/plugin/templates/Rakefile +2 -2
  98. data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +5 -0
  99. data/lib/rails/generators/rails/plugin/templates/app/helpers/%namespaced_name%/application_helper.rb.tt +5 -0
  100. data/lib/rails/generators/rails/plugin/templates/app/jobs/%namespaced_name%/application_job.rb.tt +5 -0
  101. data/lib/rails/generators/rails/plugin/templates/app/models/application_record.rb.tt +6 -0
  102. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +14 -0
  103. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +1 -1
  104. data/lib/rails/generators/rails/plugin/templates/bin/test.tt +8 -0
  105. data/lib/rails/generators/rails/plugin/templates/config/routes.rb +1 -1
  106. data/lib/rails/generators/rails/plugin/templates/gitignore +2 -3
  107. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb +5 -0
  108. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb +7 -0
  109. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb +1 -0
  110. data/lib/rails/generators/rails/plugin/templates/lib/tasks/{%name%_tasks.rake → %namespaced_name%_tasks.rake} +1 -1
  111. data/lib/rails/generators/rails/plugin/templates/rails/application.rb +3 -3
  112. data/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js +11 -0
  113. data/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js +6 -0
  114. data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js +1 -1
  115. data/lib/rails/generators/rails/plugin/templates/rails/routes.rb +1 -2
  116. data/lib/rails/generators/rails/plugin/templates/rails/stylesheets.css +3 -3
  117. data/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb +7 -0
  118. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +4 -2
  119. data/lib/rails/generators/rails/resource/resource_generator.rb +0 -1
  120. data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +0 -1
  121. data/lib/rails/generators/rails/scaffold/USAGE +1 -1
  122. data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -1
  123. data/lib/rails/generators/rails/scaffold/templates/scaffold.css +35 -7
  124. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +4 -1
  125. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb +61 -0
  126. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +1 -1
  127. data/lib/rails/generators/resource_helpers.rb +3 -3
  128. data/lib/rails/generators/test_unit/controller/templates/.functional_test.rb.swp +0 -0
  129. data/lib/rails/generators/test_unit/controller/templates/functional_test.rb +3 -5
  130. data/lib/rails/generators/test_unit/mailer/mailer_generator.rb +8 -3
  131. data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb +2 -2
  132. data/lib/rails/generators/test_unit/mailer/templates/preview.rb +4 -4
  133. data/lib/rails/generators/test_unit/model/model_generator.rb +1 -1
  134. data/lib/rails/generators/test_unit/model/templates/fixtures.yml +2 -0
  135. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +5 -1
  136. data/lib/rails/generators/test_unit/scaffold/templates/.api_functional_test.rb.swp +0 -0
  137. data/lib/rails/generators/test_unit/scaffold/templates/.functional_test.rb.swp +0 -0
  138. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb +44 -0
  139. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +14 -14
  140. data/lib/rails/generators/testing/assertions.rb +0 -2
  141. data/lib/rails/generators/testing/behaviour.rb +4 -17
  142. data/lib/rails/info.rb +2 -2
  143. data/lib/rails/info_controller.rb +23 -2
  144. data/lib/rails/mailers_controller.rb +2 -2
  145. data/lib/rails/paths.rb +14 -6
  146. data/lib/rails/rack.rb +1 -3
  147. data/lib/rails/rack/debugger.rb +2 -23
  148. data/lib/rails/rack/logger.rb +4 -0
  149. data/lib/rails/ruby_version_check.rb +3 -3
  150. data/lib/rails/source_annotation_extractor.rb +1 -1
  151. data/lib/rails/tasks.rb +4 -1
  152. data/lib/rails/tasks/engine.rake +1 -1
  153. data/lib/rails/tasks/framework.rake +18 -16
  154. data/lib/rails/tasks/initializers.rake +6 -0
  155. data/lib/rails/tasks/restart.rake +5 -0
  156. data/lib/rails/tasks/statistics.rake +5 -6
  157. data/lib/rails/tasks/tmp.rake +4 -12
  158. data/lib/rails/templates/rails/mailers/email.html.erb +17 -3
  159. data/lib/rails/templates/rails/welcome/index.html.erb +10 -3
  160. data/lib/rails/test_help.rb +7 -8
  161. data/lib/rails/test_unit/minitest_plugin.rb +91 -0
  162. data/lib/rails/test_unit/reporter.rb +74 -0
  163. data/lib/rails/test_unit/test_requirer.rb +28 -0
  164. data/lib/rails/test_unit/testing.rake +18 -39
  165. metadata +80 -33
  166. data/lib/rails/deprecation.rb +0 -19
  167. data/lib/rails/generators/erb/mailer/templates/layout.html.erb +0 -5
  168. data/lib/rails/generators/rails/app/templates/config.ru +0 -4
  169. data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +0 -10
  170. data/lib/rails/generators/rails/plugin/templates/README.rdoc +0 -3
  171. data/lib/rails/generators/rails/plugin/templates/app/controllers/%name%/application_controller.rb.tt +0 -5
  172. data/lib/rails/generators/rails/plugin/templates/app/helpers/%name%/application_helper.rb.tt +0 -4
  173. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%name%/application.html.erb.tt +0 -14
  174. data/lib/rails/generators/rails/plugin/templates/lib/%name%.rb +0 -6
  175. data/lib/rails/generators/rails/plugin/templates/lib/%name%/engine.rb +0 -7
  176. data/lib/rails/generators/rails/plugin/templates/lib/%name%/version.rb +0 -3
  177. data/lib/rails/generators/rails/plugin/templates/test/%name%_test.rb +0 -7
  178. data/lib/rails/rack/log_tailer.rb +0 -38
  179. data/lib/rails/tasks/documentation.rake +0 -70
  180. data/lib/rails/test_unit/sub_test_task.rb +0 -126
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 461f9ab299e149aea987f67635aca84ce9b7d2b7a571165c7b9c720b95061a33
4
- data.tar.gz: 98083866142092571702d417a199104f9e35a582b87293e778cf2585f2cec889
2
+ SHA1:
3
+ metadata.gz: 95255817d68fa4a298c6e6105c0758293d87ac85
4
+ data.tar.gz: 6260b684d281773ba43b24305935c8dc23903618
5
5
  SHA512:
6
- metadata.gz: ff69381473bb44ee4661a5123dabe13fa4db45678b5c244510ebe05f979d8e074430dde0def1cb212042d8be79787537d3780afa34908b6bec436037f7d762db
7
- data.tar.gz: a924011a0c2d1b46161dcb04598723a74b505b7103830735ecda5282b7fef36c2d80045c55bcbcfcec155c6e38c73691a490b5904db62816d380df3d858b87c0
6
+ metadata.gz: 6f2f125d4bd03bd427f304ec52b6734804196913ed61646be352b8a42e75fcafc3e60a05a9af4962e5209eb153729571fd3e02f44714e5bb5f21a2d0b5a5a072
7
+ data.tar.gz: c426e374343a5f7f54a4280958f79225a6a2936033beb41be5c87c9633b51f0d90e6bea35f331abf32b6009112549488ec2ff5541b4ac528fdb09e5274e0dc5d
@@ -1,380 +1,436 @@
1
- ## Rails 4.2.11.3 (May 15, 2020) ##
1
+ ## Rails 5.0.0.beta1 (December 18, 2015) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 4.2.11.2 (May 15, 2020) ##
6
+ * Newly generated plugins get a `README.md` in Markdown.
7
7
 
8
- * No changes.
8
+ *Yuji Yaginuma*
9
9
 
10
+ * The generated config file for the development environment includes a new
11
+ config line, commented out, showing how to enable the evented file watcher.
10
12
 
11
- ## Rails 4.2.11.1 (March 11, 2019) ##
13
+ *Xavier Noria*
12
14
 
13
- * No changes.
15
+ * `config.debug_exception_response_format` configures the format used
16
+ in responses when errors occur in development mode.
14
17
 
18
+ Set `config.debug_exception_response_format` to render an HTML page with
19
+ debug info (using the value `:default`) or render debug info preserving
20
+ the response format (using the value `:api`).
15
21
 
16
- ## Rails 4.2.11 (November 27, 2018) ##
22
+ *Jorge Bejar*
17
23
 
18
- * No changes.
24
+ * Fix setting exit status code for rake test tasks. The exit status code
25
+ was not set when tests were fired with `rake`. Now, it is being set and it matches
26
+ behavior of running tests via `rails` command (`rails test`), so no matter if
27
+ `rake test` or `rails test` command is used the exit code will be set.
19
28
 
29
+ *Arkadiusz Fal*
20
30
 
21
- ## Rails 4.2.10 (September 27, 2017) ##
31
+ * Add Command infrastructure to replace rake.
22
32
 
23
- * No changes.
33
+ Also move `rake dev:cache` to new infrastructure. You'll need to use
34
+ `rails dev:cache` to toggle development caching from now on.
24
35
 
36
+ *Chuck Callebs*
25
37
 
26
- ## Rails 4.2.9 (June 26, 2017) ##
38
+ * Allow use of minitest-rails gem with Rails test runner.
27
39
 
28
- * No changes.
40
+ Fixes #22455.
29
41
 
42
+ *Chris Kottom*
30
43
 
31
- ## Rails 4.2.8 (February 21, 2017) ##
44
+ * Add `bin/test` script to rails plugin.
32
45
 
33
- * Add `config/initializers/to_time_preserves_timezone.rb`, which tells
34
- Active Support to preserve the receiver's timezone when calling `to_time`.
35
- This matches the new behavior that will be part of Ruby 2.4.
46
+ `bin/test` can use the same API as `bin/rails test`.
36
47
 
37
- Fixes #24617.
48
+ *Yuji Yaginuma*
38
49
 
39
- *Andrew White*
50
+ * Make `static_index` part of the `config.public_file_server` config and
51
+ call it `public_file_server.index_name`.
40
52
 
41
- * Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
53
+ *Yuki Nishijima*
42
54
 
43
- Fixes Issue #22742
55
+ * Deprecate `serve_static_files` in favor of `public_file_server.enabled`.
44
56
 
45
- *Tawan Sierek*
57
+ Unifies the static asset options under `public_file_server`.
46
58
 
47
- * Run `before_configuration` callbacks as soon as application constant
48
- inherits from `Rails::Application`.
59
+ To upgrade, replace occurrences of:
49
60
 
50
- Fixes #19880.
61
+ ```
62
+ config.serve_static_files = # false or true
63
+ ```
51
64
 
52
- *Yuji Yaginuma*
65
+ in your environment files, with:
53
66
 
67
+ ```
68
+ config.public_file_server.enabled = # false or true
69
+ ```
54
70
 
55
- ## Rails 4.2.7 (July 12, 2016) ##
71
+ *Kasper Timm Hansen*
56
72
 
57
- * Do not run `bundle install` when generating a new plugin.
73
+ * Deprecate `config.static_cache_control` in favor of
74
+ `config.public_file_server.headers`.
58
75
 
59
- Since bundler 1.12.0, the gemspec is validated so the `bundle install`
60
- command will fail just after the gem is created causing confusion to the
61
- users. This change was a bug fix to correctly validate gemspecs.
76
+ To upgrade, replace occurrences of:
62
77
 
63
- *Rafael Mendonça França*
78
+ ```
79
+ config.static_cache_control = 'public, max-age=60'
80
+ ```
64
81
 
82
+ in your environment files, with:
65
83
 
66
- ## Rails 4.2.6 (March 07, 2016) ##
84
+ ```
85
+ config.public_file_server.headers = {
86
+ 'Cache-Control' => 'public, max-age=60'
87
+ }
88
+ ```
67
89
 
68
- * No changes.
90
+ `config.public_file_server.headers` can set arbitrary headers, sent along when
91
+ a response is delivered.
69
92
 
93
+ *Yuki Nishijima*
70
94
 
71
- ## Rails 4.2.5.2 (February 26, 2016) ##
95
+ * Route generator should be idempotent
96
+ running generators several times no longer require you to cleanup routes.rb
72
97
 
73
- * No changes.
98
+ *Thiago Pinto*
74
99
 
100
+ * Allow passing an environment to `config_for`.
75
101
 
76
- ## Rails 4.2.5.1 (January 25, 2016) ##
102
+ *Simon Eskildsen*
77
103
 
78
- * No changes.
104
+ * Allow rake:stats to account for rake tasks in lib/tasks
79
105
 
106
+ *Kevin Deisz*
80
107
 
81
- ## Rails 4.2.5 (November 12, 2015) ##
108
+ * Added javascript to update the URL on mailer previews with the currently
109
+ selected email format. Reloading the page now keeps you on your selected
110
+ format rather than going back to the default html version.
82
111
 
83
- * Fix displaying mailer previews on non local requests when config
84
- `action_mailer.show_previews` is set
112
+ *James Kerr*
85
113
 
86
- *Wojciech Wnętrzak*
114
+ * Add fail fast to `bin/rails test`
87
115
 
116
+ Adding `--fail-fast` or `-f` when running tests will interrupt the run on
117
+ the first failure:
88
118
 
89
- ## Rails 4.2.4 (August 24, 2015) ##
119
+ ```
120
+ # Running:
90
121
 
91
- * Fix STATS_DIRECTORIES already defined warning when running rake from within
92
- the top level directory of an engine that has a test app.
122
+ ................................................S......E
93
123
 
94
- Fixes #20510
124
+ ArgumentError: Wups! Bet you didn't expect this!
125
+ test/models/bunny_test.rb:19:in `block in <class:BunnyTest>'
95
126
 
96
- *Ersin Akinci*
127
+ bin/rails test test/models/bunny_test.rb:18
97
128
 
98
- * Fix `NoMethodError` when generating a scaffold inside a full engine.
129
+ ....................................F
99
130
 
100
- *Yuji Yaginuma*
131
+ This failed
101
132
 
133
+ bin/rails test test/models/bunny_test.rb:14
102
134
 
103
- ## Rails 4.2.3 (June 25, 2015) ##
135
+ Interrupted. Exiting...
104
136
 
105
- * `assert_file` understands paths with special characters
106
- (eg. `v0.1.4~alpha+nightly`).
107
137
 
108
- *Diego Carrion*
138
+ Finished in 0.051427s, 1808.3872 runs/s, 1769.4972 assertions/s.
109
139
 
110
- * Make generated scaffold functional tests work inside engines.
140
+ ```
111
141
 
112
- *Yuji Yaginuma*
142
+ Note that any unexpected errors don't abort the run.
113
143
 
114
- * Add support for inline images in mailer previews by using an interceptor
115
- class to convert cid: urls in image src attributes to data urls. The
116
- interceptor is not enabled by default but can be done in an initializer:
144
+ *Kasper Timm Hansen*
117
145
 
118
- # config/initializer/preview_interceptors.rb
119
- ActionMailer::Base.register_preview_interceptor(ActionMailer::InlinePreviewInterceptor)
146
+ * Add inline output to `bin/rails test`
120
147
 
121
- *Andrew White*
148
+ Any failures or errors (and skips if running in verbose mode) are output
149
+ during a test run:
122
150
 
123
- * Fix mailer previews with attachments by using the mail gem's own API to
124
- locate the first part of the correct mime type.
151
+ ```
152
+ # Running:
125
153
 
126
- Fixes #14435.
154
+ .....S..........................................F
127
155
 
128
- *Andrew White*
156
+ This failed
129
157
 
158
+ bin/rails test test/models/bunny_test.rb:14
130
159
 
131
- ## Rails 4.2.2 (June 16, 2015) ##
160
+ .................................E
132
161
 
133
- * No Changes *
162
+ ArgumentError: Wups! Bet you didn't expect this!
163
+ test/models/bunny_test.rb:19:in `block in <class:BunnyTest>'
134
164
 
165
+ bin/rails test test/models/bunny_test.rb:18
135
166
 
136
- ## Rails 4.2.1 (March 19, 2015) ##
167
+ ....................
137
168
 
138
- * Add a new-line to the end of route method generated code.
169
+ Finished in 0.069708s, 1477.6019 runs/s, 1448.9106 assertions/s.
170
+ ```
139
171
 
140
- We need to add a `\n`, because we cannot have two routes
141
- in the same line.
172
+ Output can be deferred to after a run with the `--defer-output` option.
142
173
 
143
- *arthurnn*
174
+ *Kasper Timm Hansen*
144
175
 
145
- * Force generated routes to be inserted into routes.rb
176
+ * Fix displaying mailer previews on non local requests when config
177
+ `action_mailer.show_previews` is set
146
178
 
147
- *Andrew White*
179
+ *Wojciech Wnętrzak*
148
180
 
149
- * Don't remove all line endings from routes.rb when revoking scaffold.
181
+ * `rails server` will now honour the `PORT` environment variable
150
182
 
151
- Fixes #15913.
183
+ *David Cornu*
152
184
 
153
- *Andrew White*
185
+ * Plugins generated using `rails plugin new` are now generated with the
186
+ version number set to 0.1.0.
154
187
 
155
- * Fix scaffold generator with `--helper=false` option.
188
+ *Daniel Morris*
156
189
 
157
- *Rafael Mendonça França*
190
+ * `I18n.load_path` is now reloaded under development so there's no need to
191
+ restart the server to make new locale files available. Also, I18n will no
192
+ longer raise for deleted locale files.
158
193
 
194
+ *Kir Shatrov*
159
195
 
160
- ## Rails 4.2.0 (December 20, 2014) ##
196
+ * Add `bin/update` script to update development environment automatically.
161
197
 
162
- * Deprecate `config.serve_static_assets` in favor of `config.serve_static_files`
163
- to clarify that the option is unrelated to the asset pipeline.
198
+ *Mehmet Emin İNAÇ*
164
199
 
165
- *Godfrey Chan*
200
+ * Fix STATS_DIRECTORIES already defined warning when running rake from within
201
+ the top level directory of an engine that has a test app.
166
202
 
167
- * `config.serve_static_files` can now be set from an environment variable in
168
- production mode. The feature remains off by default, but can be enabled by
169
- setting `RAILS_SERVE_STATIC_FILES` to a non-empty string at boot time.
203
+ Fixes #20510
170
204
 
171
- *Richard Schneeman*, *Godfrey Chan*
205
+ *Ersin Akinci*
172
206
 
173
- * Generated migrations add the appropriate foreign key constraints to
174
- references.
207
+ * Make enabling or disabling caching in development mode possible with
208
+ rake dev:cache.
175
209
 
176
- *Derek Prior*
210
+ Running rake dev:cache will create or remove tmp/caching-dev.txt. When this
211
+ file exists config.action_controller.perform_caching will be set to true in
212
+ config/environments/development.rb.
177
213
 
178
- * Deprecate different default for `log_level` in production.
214
+ Additionally, a server can be started with either --dev-caching or
215
+ --no-dev-caching included to toggle caching on startup.
179
216
 
180
- *Godfrey Chan*, *Matthew Draper*
217
+ *Jussi Mertanen*, *Chuck Callebs*
181
218
 
182
- * Generated `.gitignore` excludes the whole `log/` directory, not only
183
- `*.log` files.
219
+ * Add a `--api` option in order to generate plugins that can be added
220
+ inside an API application.
184
221
 
185
- *ShunsukeAida*
222
+ *Robin Dupret*
186
223
 
187
- * `Rails::Paths::Path.unshift` now has the same interface as `Array.unshift`.
224
+ * Fix `NoMethodError` when generating a scaffold inside a full engine.
188
225
 
189
- *Igor Kapkov*
226
+ *Yuji Yaginuma*
190
227
 
191
- * Make `rake test` run all tests in test folder.
228
+ * Adding support for passing a block to the `add_source` action of a custom generator
192
229
 
193
- Deprecate `rake test:all` and replace `rake test:all:db` with `rake test:db`
230
+ *Mike Dalton*, *Hirofumi Wakasugi*
194
231
 
195
- *David Geukers*
232
+ * `assert_file` understands paths with special characters
233
+ (eg. `v0.1.4~alpha+nightly`).
196
234
 
197
- * `secret_token` is now saved in `Rails.application.secrets.secret_token`
198
- and it falls back to the value of `config.secret_token` when it is not
199
- present in `config/secrets.yml`.
235
+ *Diego Carrion*
200
236
 
201
- *Benjamin Fleischer*
237
+ * Remove ContentLength middleware from the defaults. If you want it, just
238
+ add it as a middleware in your config.
202
239
 
203
- * Remove `--skip-action-view` option from `Rails::Generators::AppBase`.
240
+ *Egg McMuffin*
204
241
 
205
- Fixes #17023.
242
+ * Make it possible to customize the executable inside rerun snippets.
206
243
 
207
- *Dan Olson*
244
+ *Yves Senn*
208
245
 
209
- * Specify dummy app's db migrate path in plugin's test_helper.rb.
246
+ * Add support for API only apps.
247
+ Middleware stack was slimmed down and it has only the needed
248
+ middleware for API apps & generators generates the right files,
249
+ folders and configurations.
210
250
 
211
- Fixes #16877.
251
+ *Santiago Pastorino & Jorge Bejar*
212
252
 
213
- *Yukio Mizuta*
253
+ * Make generated scaffold functional tests work inside engines.
214
254
 
215
- * Inject `Rack::Lock` if `config.eager_load` is false.
255
+ *Yuji Yaginuma*
216
256
 
217
- Fixes #15089.
257
+ * Generator a `.keep` file in the `tmp` folder by default as many scripts
258
+ assume the existence of this folder and most would fail if it is absent.
218
259
 
219
- *Xavier Noria*
260
+ See #20299.
220
261
 
221
- * Change the path of dummy app location in plugin's test_helper.rb for cases
222
- you specify dummy_path option.
262
+ *Yoong Kang Lim*, *Sunny Juneja*
223
263
 
224
- *Yukio Mizuta*
264
+ * `config.static_index` configures directory `index.html` filename
225
265
 
226
- * Fix a bug in the `gem` method for Rails templates when non-String options
227
- are used.
266
+ Set `config.static_index` to serve a static directory index file not named
267
+ `index`. E.g. to serve `main.html` instead of `index.html` for directory
268
+ requests, set `config.static_index` to `"main"`.
228
269
 
229
- Fixes #16709.
270
+ *Eliot Sykes*
230
271
 
231
- *Yves Senn*
272
+ * `bin/setup` uses built-in rake tasks (`log:clear`, `tmp:clear`).
232
273
 
233
- * The [web-console](https://github.com/rails/web-console) gem is now
234
- installed by default for new applications. It can help you debug
235
- development exceptions by spawning an interactive console in its cause
236
- binding.
274
+ *Mohnish Thallavajhula*
237
275
 
238
- *Ryan Dao*, *Genadi Samokovarov*, *Guillermo Iguaran*
276
+ * Fix mailer previews with attachments by using the mail gem's own API to
277
+ locate the first part of the correct mime type.
239
278
 
240
- * Add a `required` option to the model generator for associations
279
+ Fixes #14435.
241
280
 
242
- *Sean Griffin*
281
+ *Andrew White*
243
282
 
244
- * Add `after_bundle` callbacks in Rails templates. Useful for allowing the
245
- generated binstubs to be added to version control.
283
+ * Remove sqlite support from `rails dbconsole`.
246
284
 
247
- Fixes #16292.
285
+ *Andrew White*
248
286
 
249
- *Stefan Kanev*
287
+ * Rename `railties/bin` to `railties/exe` to match the new Bundler executables
288
+ convention.
250
289
 
251
- * Pull in the custom configuration concept from dhh/custom_configuration, which allows you to
252
- configure your own code through the Rails configuration object with custom configuration:
290
+ *Islam Wazery*
253
291
 
254
- # config/environments/production.rb
255
- config.x.payment_processing.schedule = :daily
256
- config.x.payment_processing.retries = 3
257
- config.x.super_debugger = true
292
+ * Print `bundle install` output in `rails new` as soon as it's available.
258
293
 
259
- These configuration points are then available through the configuration object:
294
+ Running `rails new` will now print the output of `bundle install` as
295
+ it is available, instead of waiting until all gems finish installing.
260
296
 
261
- Rails.configuration.x.payment_processing.schedule # => :daily
262
- Rails.configuration.x.payment_processing.retries # => 3
263
- Rails.configuration.x.super_debugger # => true
297
+ *Max Holder*
264
298
 
265
- *DHH*
299
+ * Respect `pluralize_table_names` when generating fixture file.
266
300
 
267
- * Scaffold generator `_form` partial adds `class="field"` for password
268
- confirmation fields.
301
+ Fixes #19519.
269
302
 
270
- *noinkling*
303
+ *Yuji Yaginuma*
271
304
 
272
- * Add `Rails::Application.config_for` to load a configuration for the current
273
- environment.
305
+ * Add a new-line to the end of route method generated code.
274
306
 
275
- # config/exception_notification.yml:
276
- production:
277
- url: http://127.0.0.1:8080
278
- namespace: my_app_production
279
- development:
280
- url: http://localhost:3001
281
- namespace: my_app_development
307
+ We need to add a `\n`, because we cannot have two routes
308
+ in the same line.
282
309
 
283
- # config/production.rb
284
- Rails.application.configure do
285
- config.middleware.use ExceptionNotifier, config_for(:exception_notification)
286
- end
310
+ *arthurnn*
287
311
 
288
- *Rafael Mendonça França*, *DHH*
312
+ * Add `rake initializers`.
289
313
 
290
- * Deprecate `Rails::Rack::LogTailer` without replacement.
314
+ This task prints out all defined initializers in the order they are invoked
315
+ by Rails. This is helpful for debugging issues related to the initialization
316
+ process.
291
317
 
292
- *Rafael Mendonça França*
318
+ *Naoto Kaneko*
293
319
 
294
- * Add `--skip-turbolinks` option to the app generator.
320
+ * Created rake restart task. Restarts your Rails app by touching the
321
+ `tmp/restart.txt`.
295
322
 
296
- *Rafael Mendonça França*
323
+ Fixes #18876.
297
324
 
298
- * Invalid `bin/rails generate` commands will now show spelling suggestions.
325
+ *Hyonjee Joo*
299
326
 
300
- *Richard Schneeman*
327
+ * Add `config/initializers/active_record_belongs_to_required_by_default.rb`.
301
328
 
302
- * Add `bin/setup` script to bootstrap an application.
329
+ Newly generated Rails apps have a new initializer called
330
+ `active_record_belongs_to_required_by_default.rb` which sets the value of
331
+ the configuration option `config.active_record.belongs_to_required_by_default`
332
+ to `true` when ActiveRecord is not skipped.
303
333
 
304
- *Yves Senn*
334
+ As a result, new Rails apps require `belongs_to` association on model
335
+ to be valid.
336
+
337
+ This initializer is *not* added when running `rake rails:update`, so
338
+ old apps ported to Rails 5 will work without any change.
305
339
 
306
- * Replace double quotes with single quotes while adding an entry into Gemfile.
340
+ *Josef Šimánek*
307
341
 
308
- *Alexander Belaev*
342
+ * `delete` operations in configurations are run last in order to eliminate
343
+ 'No such middleware' errors when `insert_before` or `insert_after` are added
344
+ after the `delete` operation for the middleware being deleted.
309
345
 
310
- * Default `config.assets.digest` to `true` in development.
346
+ Fixes #16433.
311
347
 
312
- *Dan Kang*
348
+ *Guo Xiang Tan*
313
349
 
314
- * Load database configuration from the first `database.yml` available in paths.
350
+ * Newly generated applications get a `README.md` in Markdown.
315
351
 
316
- *Pier-Olivier Thibault*
352
+ *Xavier Noria*
317
353
 
318
- * Reading name and email from git for plugin gemspec.
354
+ * Remove the documentation tasks `doc:app`, `doc:rails`, and `doc:guides`.
319
355
 
320
- Fixes #9589.
356
+ *Xavier Noria*
321
357
 
322
- *Arun Agrawal*, *Abd ar-Rahman Hamidi*, *Roman Shmatov*
358
+ * Force generated routes to be inserted into `config/routes.rb`.
323
359
 
324
- * Fix `console` and `generators` blocks defined at different environments.
360
+ *Andrew White*
325
361
 
326
- Fixes #14748.
362
+ * Don't remove all line endings from `config/routes.rb` when revoking scaffold.
327
363
 
328
- *Rafael Mendonça França*
364
+ Fixes #15913.
365
+
366
+ *Andrew White*
329
367
 
330
- * Move configuration of asset precompile list and version to an initializer.
368
+ * Rename `--skip-test-unit` option to `--skip-test` in app generator
331
369
 
332
- *Matthew Draper*
370
+ *Melanie Gilman*
333
371
 
334
- * Remove sqlite3 lines from `.gitignore` if the application is not using sqlite3.
372
+ * Add the `method_source` gem to the default Gemfile for apps.
335
373
 
336
- *Dmitrii Golub*
374
+ *Sean Griffin*
337
375
 
338
- * Add public API to register new extensions for `rake notes`.
376
+ * Drop old test locations from `rake stats`:
339
377
 
340
- Example:
378
+ - test/functional
379
+ - test/unit
341
380
 
342
- config.annotations.register_extensions("scss", "sass") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
381
+ *Ravil Bayramgalin*
343
382
 
344
- *Roberto Miranda*
383
+ * Update `rake stats` to correctly count declarative tests
384
+ as methods in `_test.rb` files.
345
385
 
346
- * Removed unnecessary `rails application` command.
386
+ *Ravil Bayramgalin*
347
387
 
348
- *Arun Agrawal*
388
+ * Remove deprecated `test:all` and `test:all:db` tasks.
349
389
 
350
- * Make the `rails:template` rake task load the application's initializers.
390
+ *Rafael Mendonça França*
351
391
 
352
- Fixes #12133.
392
+ * Remove deprecated `Rails::Rack::LogTailer`.
353
393
 
354
- *Robin Dupret*
394
+ *Rafael Mendonça França*
395
+
396
+ * Remove deprecated `RAILS_CACHE` constant.
397
+
398
+ *Rafael Mendonça França*
399
+
400
+ * Remove deprecated `serve_static_assets` configuration.
401
+
402
+ *Rafael Mendonça França*
403
+
404
+ * Use local variables in `_form.html.erb` partial generated by scaffold.
405
+
406
+ *Andrew Kozlov*
407
+
408
+ * Add `config/initializers/callback_terminator.rb`.
409
+
410
+ Newly generated Rails apps have a new initializer called
411
+ `callback_terminator.rb` which sets the value of the configuration option
412
+ `ActiveSupport.halt_callback_chains_on_return_false` to `false`.
355
413
 
356
- * Introduce `Rails.gem_version` as a convenience method to return
357
- `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform
358
- version comparison.
414
+ As a result, new Rails apps do not halt Active Record and Active Model
415
+ callback chains when a callback returns `false`; only when they are
416
+ explicitly halted with `throw(:abort)`.
359
417
 
360
- Example:
418
+ The terminator is *not* added when running `rake rails:update`, so returning
419
+ `false` will still work on old apps ported to Rails 5, displaying a
420
+ deprecation warning to prompt users to update their code to the new syntax.
361
421
 
362
- Rails.version #=> "4.1.2"
363
- Rails.gem_version #=> #<Gem::Version "4.1.2">
422
+ *claudiob*
364
423
 
365
- Rails.version > "4.1.10" #=> false
366
- Rails.gem_version > Gem::Version.new("4.1.10") #=> true
367
- Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true
424
+ * Generated fixtures won't use the id when generated with references attributes.
368
425
 
369
- *Prem Sichanugrist*
426
+ *Pablo Olmos de Aguilera Corradini*
370
427
 
371
- * Avoid namespacing routes inside engines.
428
+ * Add `--skip-action-mailer` option to the app generator.
372
429
 
373
- Mountable engines are namespaced by default so the generated routes
374
- were too while they should not.
430
+ *claudiob*
375
431
 
376
- Fixes #14079.
432
+ * Autoload any second level directories called `app/*/concerns`.
377
433
 
378
- *Yves Senn*, *Carlos Antonio da Silva*, *Robin Dupret*
434
+ *Alex Robbin*
379
435
 
380
- Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/railties/CHANGELOG.md) for previous changes.
436
+ Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/railties/CHANGELOG.md) for previous changes.