提交 6c08d480 编写于 作者: M Matthew Draper

Start Rails 5.2 development

上级 88b16843
......@@ -7,6 +7,8 @@ end
gemspec
gem "arel", github: "rails/arel"
# We need a newish Rake since Active Job sets its test tasks' descriptions.
gem "rake", ">= 11.1"
......
......@@ -23,61 +23,67 @@ GIT
event_emitter
websocket
GIT
remote: https://github.com/rails/arel.git
revision: 437aa3a4bb8ad4f3f4eba299dbb1112852f9c7ac
specs:
arel (8.0.0)
PATH
remote: .
specs:
actioncable (5.1.0.beta1)
actionpack (= 5.1.0.beta1)
actioncable (5.2.0.alpha)
actionpack (= 5.2.0.alpha)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.0.beta1)
actionpack (= 5.1.0.beta1)
actionview (= 5.1.0.beta1)
activejob (= 5.1.0.beta1)
actionmailer (5.2.0.alpha)
actionpack (= 5.2.0.alpha)
actionview (= 5.2.0.alpha)
activejob (= 5.2.0.alpha)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.1.0.beta1)
actionview (= 5.1.0.beta1)
activesupport (= 5.1.0.beta1)
actionpack (5.2.0.alpha)
actionview (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.0.beta1)
activesupport (= 5.1.0.beta1)
actionview (5.2.0.alpha)
activesupport (= 5.2.0.alpha)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.0.beta1)
activesupport (= 5.1.0.beta1)
activejob (5.2.0.alpha)
activesupport (= 5.2.0.alpha)
globalid (>= 0.3.6)
activemodel (5.1.0.beta1)
activesupport (= 5.1.0.beta1)
activerecord (5.1.0.beta1)
activemodel (= 5.1.0.beta1)
activesupport (= 5.1.0.beta1)
activemodel (5.2.0.alpha)
activesupport (= 5.2.0.alpha)
activerecord (5.2.0.alpha)
activemodel (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
arel (~> 8.0)
activesupport (5.1.0.beta1)
activesupport (5.2.0.alpha)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
rails (5.1.0.beta1)
actioncable (= 5.1.0.beta1)
actionmailer (= 5.1.0.beta1)
actionpack (= 5.1.0.beta1)
actionview (= 5.1.0.beta1)
activejob (= 5.1.0.beta1)
activemodel (= 5.1.0.beta1)
activerecord (= 5.1.0.beta1)
activesupport (= 5.1.0.beta1)
rails (5.2.0.alpha)
actioncable (= 5.2.0.alpha)
actionmailer (= 5.2.0.alpha)
actionpack (= 5.2.0.alpha)
actionview (= 5.2.0.alpha)
activejob (= 5.2.0.alpha)
activemodel (= 5.2.0.alpha)
activerecord (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
bundler (>= 1.3.0, < 2.0)
railties (= 5.1.0.beta1)
railties (= 5.2.0.alpha)
sprockets-rails (>= 2.0.0)
railties (5.1.0.beta1)
actionpack (= 5.1.0.beta1)
activesupport (= 5.1.0.beta1)
railties (5.2.0.alpha)
actionpack (= 5.2.0.alpha)
activesupport (= 5.2.0.alpha)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
......@@ -88,7 +94,6 @@ GEM
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
amq-protocol (2.1.0)
arel (8.0.0)
ast (2.3.0)
backburner (1.3.1)
beaneater (~> 1.0)
......@@ -159,7 +164,7 @@ GEM
http_parser.rb (>= 0.6.0)
em-socksify (0.3.1)
eventmachine (>= 1.0.0.beta.4)
erubi (1.4.0)
erubi (1.6.0)
erubis (2.7.0)
event_emitter (0.2.5)
eventmachine (1.2.1)
......@@ -371,6 +376,7 @@ DEPENDENCIES
activerecord-jdbcmysql-adapter (>= 1.3.0)
activerecord-jdbcpostgresql-adapter (>= 1.3.0)
activerecord-jdbcsqlite3-adapter (>= 1.3.0)
arel!
backburner
bcrypt (~> 3.1.11)
benchmark-ips
......@@ -427,4 +433,4 @@ DEPENDENCIES
websocket-client-simple!
BUNDLED WITH
1.14.4
1.14.5
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Redis subscription adapters now support `channel_prefix` option in `cable.yml`
Avoids channel name collisions when multiple apps use the same Redis server.
*Chad Ingram*
* Permit same-origin connections by default.
Added new option `config.action_cable.allow_same_origin_as_host = false`
to disable this behaviour.
*Dávid Halász*, *Matthew Draper*
* Prevent race where the client could receive and act upon a
subscription confirmation before the channel's `subscribed` method
completed.
Fixes #25381.
*Vladimir Dementyev*
* Buffer now writes to WebSocket connections, to avoid blocking threads
that could be doing more useful things.
*Matthew Draper*, *Tinco Andringa*
* Protect against concurrent writes to a WebSocket connection from
multiple threads; the underlying OS write is not always threadsafe.
*Tinco Andringa*
* Add `ActiveSupport::Notifications` hook to `Broadcaster#broadcast`.
*Matthew Wear*
* Close hijacked socket when connection is shut down.
Fixes #25613.
*Tinco Andringa*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actioncable/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actioncable/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
{
"name": "actioncable",
"version": "5.1.0-beta1",
"version": "5.2.0-alpha",
"description": "WebSocket framework for Ruby on Rails.",
"main": "lib/assets/compiled/action_cable.js",
"files": [
......
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Add `:args` to `process.action_mailer` event.
*Yuji Yaginuma*
* Add parameterized invocation of mailers as a way to share before filters and defaults between actions.
See `ActionMailer::Parameterized` for a full example of the benefit.
*DHH*
* Allow lambdas to be used as lazy defaults in addition to procs.
*DHH*
* Mime type: allow to custom content type when setting body in headers
and attachments.
Example:
def test_emails
attachments["invoice.pdf"] = "This is test File content"
mail(body: "Hello there", content_type: "text/html")
end
*Minh Quy*
* Exception handling: use `rescue_from` to handle exceptions raised by
mailer actions, by message delivery, and by deferred delivery jobs.
*Jeremy Daer*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionmailer/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actionmailer/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
* Fix `NameError` raised in `ActionController::Renderer#with_defaults`
*Hiroyuki Ishii*
* Added `#reverse_merge` and `#reverse_merge!` methods to `ActionController::Parameters`
*Edouard Chin*, *Mitsutaka Mimura*
* Fix malformed URLS when using `ApplicationController.renderer`
The Rack environment variable `rack.url_scheme` was not being set so `scheme` was
returning `nil`. This caused URLs to be malformed with the default settings.
Fix this by setting `rack.url_scheme` when the environment is normalized.
Fixes #28151.
*George Vrettos*
* Commit flash changes when using a redirect route.
Fixes #27992.
*Andrew White*
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Prefer `remove_method` over `undef_method` when reloading routes
When `undef_method` is used it prevents access to other implementations of that
url helper in the ancestor chain so use `remove_method` instead to restore access.
*Andrew White*
* Add the `resolve` method to the routing DSL
This new method allows customization of the polymorphic mapping of models:
``` ruby
resource :basket
resolve("Basket") { [:basket] }
```
``` erb
<%= form_for @basket do |form| %>
<!-- basket form -->
<% end %>
```
This generates the correct singular URL for the form instead of the default
resources member url, e.g. `/basket` vs. `/basket/:id`.
Fixes #1769.
*Andrew White*
* Add the `direct` method to the routing DSL
This new method allows creation of custom url helpers, e.g:
``` ruby
direct(:apple) { "http://www.apple.com" }
>> apple_url
=> "http://www.apple.com"
```
This has the advantage of being available everywhere url helpers are available
unlike custom url helpers defined in helper modules, etc.
*Andrew White*
* Add `ActionDispatch::SystemTestCase` to Action Pack
Adds Capybara integration directly into Rails through Action Pack!
See PR [#26703](https://github.com/rails/rails/pull/26703)
*Eileen M. Uchitelle*
* Remove deprecated `.to_prepare`, `.to_cleanup`, `.prepare!` and `.cleanup!` from `ActionDispatch::Reloader`.
*Rafael Mendonça França*
* Remove deprecated `ActionDispatch::Callbacks.to_prepare` and `ActionDispatch::Callbacks.to_cleanup`.
*Rafael Mendonça França*
* Remove deprecated `ActionController::Metal.call`.
*Rafael Mendonça França*
* Remove deprecated `ActionController::Metal#env`.
*Rafael Mendonça França*
* Make `with_routing` test helper work when testing controllers inheriting from `ActionController::API`
*Julia López*
* Use accept header in integration tests with `as: :json`
Instead of appending the `format` to the request path, Rails will figure
out the format from the header instead.
This allows devs to use `:as` on routes that don't have a format.
Fixes #27144.
*Kasper Timm Hansen*
* Reset a new session directly after its creation in `ActionDispatch::IntegrationTest#open_session`.
Fixes #22742.
*Tawan Sierek*
* Fixes incorrect output from `rails routes` when using singular resources.
Fixes #26606.
*Erick Reyna*
* Fixes multiple calls to `logger.fatal` instead of a single call,
for every line in an exception backtrace, when printing trace
from `DebugExceptions` middleware.
Fixes #26134.
*Vipul A M*
* Add support for arbitrary hashes in strong parameters:
```ruby
params.permit(preferences: {})
```
*Xavier Noria*
* Add `ActionController::Parameters#merge!`, which behaves the same as `Hash#merge!`.
*Yuji Yaginuma*
* Allow keys not found in `RACK_KEY_TRANSLATION` for setting the environment when rendering
arbitrary templates.
*Sammy Larbi*
* Remove deprecated support to non-keyword arguments in `ActionDispatch::IntegrationTest#process`,
`#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head`.
*Rafael Mendonça França*
* Remove deprecated `ActionDispatch::IntegrationTest#*_via_redirect`.
*Rafael Mendonça França*
* Remove deprecated `ActionDispatch::IntegrationTest#xml_http_request`.
*Rafael Mendonça França*
* Remove deprecated support for passing `:path` and route path as strings in `ActionDispatch::Routing::Mapper#match`.
*Rafael Mendonça França*
* Remove deprecated support for passing path as `nil` in `ActionDispatch::Routing::Mapper#match`.
*Rafael Mendonça França*
* Remove deprecated `cache_control` argument from `ActionDispatch::Static#initialize`.
*Rafael Mendonça França*
* Remove deprecated support to passing strings or symbols to the middleware stack.
*Rafael Mendonça França*
* Change HSTS subdomain to true.
*Rafael Mendonça França*
* Remove deprecated `host` and `port` ssl options.
*Rafael Mendonça França*
* Remove deprecated `const_error` argument in
`ActionDispatch::Session::SessionRestoreError#initialize`.
*Rafael Mendonça França*
* Remove deprecated `#original_exception` in `ActionDispatch::Session::SessionRestoreError`.
*Rafael Mendonça França*
* Deprecate `ActionDispatch::ParamsParser::ParseError` in favor of
`ActionDispatch::Http::Parameters::ParseError`.
*Rafael Mendonça França*
* Remove deprecated `ActionDispatch::ParamsParser`.
*Rafael Mendonça França*
* Remove deprecated `original_exception` and `message` arguments in
`ActionDispatch::ParamsParser::ParseError#initialize`.
*Rafael Mendonça França*
* Remove deprecated `#original_exception` in `ActionDispatch::ParamsParser::ParseError`.
*Rafael Mendonça França*
* Remove deprecated access to mime types through constants.
*Rafael Mendonça França*
* Remove deprecated support to non-keyword arguments in `ActionController::TestCase#process`,
`#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head`.
*Rafael Mendonça França*
* Remove deprecated `xml_http_request` and `xhr` methods in `ActionController::TestCase`.
*Rafael Mendonça França*
* Remove deprecated methods in `ActionController::Parameters`.
*Rafael Mendonça França*
* Remove deprecated support to comparing a `ActionController::Parameters`
with a `Hash`.
*Rafael Mendonça França*
* Remove deprecated support to `:text` in `render`.
*Rafael Mendonça França*
* Remove deprecated support to `:nothing` in `render`.
*Rafael Mendonça França*
* Remove deprecated support to `:back` in `redirect_to`.
*Rafael Mendonça França*
* Remove deprecated support to passing status as option `head`.
*Rafael Mendonça França*
* Remove deprecated support to passing original exception to `ActionController::BadRequest`
and the `ActionController::BadRequest#original_exception` method.
*Rafael Mendonça França*
* Remove deprecated methods `skip_action_callback`, `skip_filter`, `before_filter`,
`prepend_before_filter`, `skip_before_filter`, `append_before_filter`, `around_filter`
`prepend_around_filter`, `skip_around_filter`, `append_around_filter`, `after_filter`,
`prepend_after_filter`, `skip_after_filter` and `append_after_filter`.
*Rafael Mendonça França*
* Show an "unmatched constraints" error when params fail to match constraints
on a matched route, rather than a "missing keys" error.
Fixes #26470.
*Chris Carter*
* Fix adding implicitly rendered template digests to ETags.
Fixes a case when modifying an implicitly rendered template for a
controller action using `fresh_when` or `stale?` would not result in a new
`ETag` value.
*Javan Makhmali*
* Make `fixture_file_upload` work in integration tests.
*Yuji Yaginuma*
* Add `to_param` to `ActionController::Parameters` deprecations.
In the future `ActionController::Parameters` are discouraged from being used
in URLs without explicit whitelisting. Go through `to_h` to use `to_param`.
*Kir Shatrov*
* Fix nested multiple roots
The PR #20940 enabled the use of multiple roots with different constraints
at the top level but unfortunately didn't work when those roots were inside
a namespace and also broke the use of root inside a namespace after a top
level root was defined because the check for the existence of the named route
used the global :root name and not the namespaced name.
This is fixed by using the name_for_action method to expand the :root name to
the full namespaced name. We can pass nil for the second argument as we're not
dealing with resource definitions so don't need to handle the cases for edit
and new routes.
Fixes #26148.
*Ryo Hashimoto*, *Andrew White*
* Include the content of the flash in the auto-generated etag. This solves the following problem:
1. POST /messages
2. redirect_to messages_url, notice: 'Message was created'
3. GET /messages/1
4. GET /messages
Step 4 would before still include the flash message, even though it's no longer relevant,
because the etag cache was recorded with the flash in place and didn't change when it was gone.
*DHH*
* SSL: Changes redirect behavior for all non-GET and non-HEAD requests
(like POST/PUT/PATCH etc) to `http://` resources to redirect to `https://`
with a [307 status code](http://tools.ietf.org/html/rfc7231#section-6.4.7) instead of [301 status code](http://tools.ietf.org/html/rfc7231#section-6.4.2).
307 status code instructs the HTTP clients to preserve the original
request method while redirecting. It has been part of HTTP RFC since
1999 and is implemented/recognized by most (if not all) user agents.
# Before
POST http://example.com/articles (i.e. ArticlesContoller#create)
redirects to
GET https://example.com/articles (i.e. ArticlesContoller#index)
# After
POST http://example.com/articles (i.e. ArticlesContoller#create)
redirects to
POST https://example.com/articles (i.e. ArticlesContoller#create)
*Chirag Singhal*
* Add `:as` option to `ActionController:TestCase#process` and related methods.
Specifying `as: mime_type` allows the `CONTENT_TYPE` header to be specified
in controller tests without manually doing this through `@request.headers['CONTENT_TYPE']`.
*Everest Stefan Munro-Zeisberger*
* Show cache hits and misses when rendering partials.
Partials using the `cache` helper will show whether a render hit or missed
the cache:
```
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
This removes the need for the old fragment cache logging:
```
Read fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/d0bdf2974e1ef6d31685c3b392ad0b74 (0.6ms)
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Write fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/3b4e249ac9d168c617e32e84b99218b5 (1.1ms)
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
Though that full output can be reenabled with
`config.action_controller.enable_fragment_cache_logging = true`.
*Stan Lo*
* Don't override the `Accept` header in integration tests when called with `xhr: true`.
Fixes #25859.
*David Chen*
* Fix `defaults` option for root route.
A regression from some refactoring for the 5.0 release, this change
fixes the use of `defaults` (default parameters) in the `root` routing method.
*Chris Arcand*
* Check `request.path_parameters` encoding at the point they're set.
Check for any non-UTF8 characters in path parameters at the point they're
set in `env`. Previously they were checked for when used to get a controller
class, but this meant routes that went directly to a Rack app, or skipped
controller instantiation for some other reason, had to defend against
non-UTF8 characters themselves.
*Grey Baker*
* Don't raise `ActionController::UnknownHttpMethod` from `ActionDispatch::Static`.
Pass `Rack::Request` objects to `ActionDispatch::FileHandler` to avoid it
raising `ActionController::UnknownHttpMethod`. If an unknown method is
passed, it should pass exception higher in the stack instead, once we've had a
chance to define exception handling behaviour.
*Grey Baker*
* Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`.
Updated `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespace
for `ParameterTypeError` and `InvalidParameterError` errors.
*Grey Baker*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionpack/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actionpack/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
* Remove the option `encode_special_chars` misnomer from `strip_tags`
As of rails-html-sanitizer v1.0.3, the sanitizer will ignore the
`encode_special_chars` option.
Fixes #28060.
*Andrew Hood*
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Change the ERB handler from Erubis to Erubi.
Erubi is an Erubis fork that's svelte, simple, and currently maintained.
Plus it supports `--enable-frozen-string-literal` in Ruby 2.3+.
Compatibility: Drops support for `<%===` tags for debug output.
These were an unused, undocumented side effect of the Erubis
implementation.
Deprecation: The Erubis handler will be removed in Rails 5.2, for the
handful of folks using it directly.
*Jeremy Evans*
* Allow render locals to be assigned to instance variables in a view.
Fixes #27480.
*Andrew White*
* Add `check_parameters` option to `current_page?` which makes it more strict.
*Maksym Pugach*
* Return correct object name in form helper method after `fields_for`.
Fixes #26931.
*Yuji Yaginuma*
* Use `ActionView::Resolver.caching?` (`config.action_view.cache_template_loading`)
to enable template recompilation.
Before it was enabled by `consider_all_requests_local`, which caused
recompilation in tests.
*Max Melentiev*
* Add `form_with` to unify `form_tag` and `form_for` usage.
Used like `form_tag` (where just the open tag is output):
```erb
<%= form_with scope: :post, url: super_special_posts_path %>
```
Used like `form_for`:
```erb
<%= form_with model: @post do |form| %>
<%= form.text_field :title %>
<% end %>
```
*Kasper Timm Hansen*, *Marek Kirejczyk*
* Add `fields` form helper method.
```erb
<%= fields :comment, model: @comment do |fields| %>
<%= fields.text_field :title %>
<% end %>
```
Can also be used within form helpers such as `form_with`.
*Kasper Timm Hansen*
* Removed deprecated `#original_exception` in `ActionView::Template::Error`.
*Rafael Mendonça França*
* Render now accepts any keys for locals, including reserved keywords.
Only locals with valid variable names get set directly. Others
will still be available in `local_assigns`.
Example of render with reserved keywords:
```erb
<%= render "example", class: "text-center", message: "Hello world!" %>
<!-- _example.html.erb: -->
<%= tag.div class: local_assigns[:class] do %>
<p><%= message %></p>
<% end %>
```
*Peter Schilling*, *Matthew Draper*
* Add `:skip_pipeline` option to several asset tag helpers
`javascript_include_tag`, `stylesheet_link_tag`, `favicon_link_tag`,
`image_tag` and `audio_tag` now accept a `:skip_pipeline` option which can
be set to true to bypass the asset pipeline and serve the assets from the
public folder.
*Richard Schneeman*
* Add `:poster_skip_pipeline` option to the `video_tag` helper
`video_tag` now accepts a `:poster_skip_pipeline` option which can be used
in combination with the `:poster` option to bypass the asset pipeline and
serve the poster image for the video from the public folder.
*Richard Schneeman*
* Show cache hits and misses when rendering partials.
Partials using the `cache` helper will show whether a render hit or missed
the cache:
```
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
This removes the need for the old fragment cache logging:
```
Read fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/d0bdf2974e1ef6d31685c3b392ad0b74 (0.6ms)
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
Write fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/3b4e249ac9d168c617e32e84b99218b5 (1.1ms)
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
```
Though that full output can be reenabled with
`config.action_controller.enable_fragment_cache_logging = true`.
*Stan Lo*
* Changed partial rendering with a collection to allow collections which
implement `to_a`.
Extracting the collection option had an optimization to avoid unnecessary
queries of ActiveRecord Relations by calling `#to_ary` on the given
collection. Instances of `Enumerator` or `Enumerable` are valid
collections, but they do not implement `#to_ary`. By changing this to
`#to_a`, they will now be extracted and rendered as expected.
*Steven Harman*
* New syntax for tag helpers. Avoid positional parameters and support HTML5 by default.
Example usage of tag helpers before:
```ruby
tag(:br, nil, true)
content_tag(:div, content_tag(:p, "Hello world!"), class: "strong")
<%= content_tag :div, class: "strong" do -%>
Hello world!
<% end -%>
```
Example usage of tag helpers after:
```ruby
tag.br
tag.div tag.p("Hello world!"), class: "strong"
<%= tag.div class: "strong" do %>
Hello world!
<% end %>
```
*Marek Kirejczyk*, *Kasper Timm Hansen*
* Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields.
As a new specification of the HTML 5 the text field type `datetime` will no longer exist
and it is recommended to use `datetime-local`.
Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
*Herminio Torres*
* Raw template handler (which is also the default template handler in Rails 5) now outputs
HTML-safe strings.
In Rails 5 the default template handler was changed to the raw template handler. Because
the ERB template handler escaped strings by default this broke some applications that
expected plain JS or HTML files to be rendered unescaped. This fixes the issue caused
by changing the default handler by changing the Raw template handler to output HTML-safe
strings.
*Eileen M. Uchitelle*
* `select_tag`'s `include_blank` option for generation for blank option tag, now adds an empty space label,
when the value as well as content for option tag are empty, so that we conform with html specification.
Ref: https://www.w3.org/TR/html5/forms.html#the-option-element.
Generation of option before:
```html
<option value=""></option>
```
Generation of option after:
```html
<option value="" label=" "></option>
```
*Vipul A M*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionview/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actionview/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
{
"name": "rails-ujs",
"version": "5.1.0-beta1",
"version": "5.2.0-alpha",
"description": "Ruby on Rails unobtrusive scripting adapter",
"main": "lib/assets/compiled/rails-ujs.js",
"files": [
......
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Correctly set test adapter when configure the queue adapter on a per job.
Fixes #26360.
*Yuji Yaginuma*
* Removed deprecated support to passing the adapter class to `.queue_adapter`.
*Rafael Mendonça França*
* Removed deprecated `#original_exception` in `ActiveJob::DeserializationError`.
*Rafael Mendonça França*
* Added instance variable `@queue` to JobWrapper.
This will fix issues in [resque-scheduler](https://github.com/resque/resque-scheduler) `#job_to_hash` method,
so we can use `#enqueue_delayed_selection`, `#remove_delayed` method in resque-scheduler smoothly.
*mu29*
* Yield the job instance so you have access to things like `job.arguments` on the custom logic after retries fail.
*DHH*
* Added declarative exception handling via `ActiveJob::Base.retry_on` and `ActiveJob::Base.discard_on`.
Examples:
class RemoteServiceJob < ActiveJob::Base
retry_on CustomAppException # defaults to 3s wait, 5 attempts
retry_on AnotherCustomAppException, wait: ->(executions) { executions * 2 }
retry_on ActiveRecord::Deadlocked, wait: 5.seconds, attempts: 3
retry_on Net::OpenTimeout, wait: :exponentially_longer, attempts: 10
discard_on ActiveJob::DeserializationError
def perform(*args)
# Might raise CustomAppException or AnotherCustomAppException for something domain specific
# Might raise ActiveRecord::Deadlocked when a local db deadlock is detected
# Might raise Net::OpenTimeout when the remote service is down
end
end
*DHH*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activejob/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activejob/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Remove deprecated behavior that halts callbacks when the return is false.
*Rafael Mendonça França*
* Remove unused `ActiveModel::TestCase` class.
*Yuji Yaginuma*
* Moved DecimalWithoutScale, Text, and UnsignedInteger from Active Model to Active Record
*Iain Beeston*
* Allow indifferent access in `ActiveModel::Errors`.
`#include?`, `#has_key?`, `#key?`, `#delete` and `#full_messages_for`.
*Kenichi Kamiya*
* Removed deprecated `:tokenizer` in the length validator.
*Rafael Mendonça França*
* Removed deprecated methods in `ActiveModel::Errors`.
`#get`, `#set`, `[]=`, `add_on_empty` and `add_on_blank`.
*Rafael Mendonça França*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activemodel/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activemodel/CHANGELOG.md) for previous changes.
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
此差异已折叠。
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
......@@ -11,7 +11,10 @@ def self.find(version)
const_get(name)
end
V5_1 = Current
V5_2 = Current
class V5_1 < V5_2
end
class V5_0 < V5_1
module TableDefinition
......
* Fixed bug in `DateAndTime::Compatibility#to_time` that caused it to
raise `RuntimeError: can't modify frozen Time` when called on any frozen `Time`.
Properly pass through the frozen `Time` or `ActiveSupport::TimeWithZone` object
when calling `#to_time`.
*Kevin McPhillips* & *Andrew White*
* Remove implicit coercion deprecation of durations
In #28204 we deprecated implicit conversion of durations to a numeric which
represented the number of seconds in the duration because of unwanted side
effects with calculations on durations and dates. This unfortunately had
the side effect of forcing a explicit cast when configuring third-party
libraries like expiration in Redis, e.g:
redis.expire("foo", 5.minutes)
To work around this we've removed the deprecation and added a private class
that wraps the numeric and can perform calculation involving durations and
ensure that they remain a duration irrespective of the order of operations.
*Andrew White*
* Update `titleize` regex to allow apostrophes
In 4b685aa the regex in `titleize` was updated to not match apostrophes to
better reflect the nature of the transformation. Unfortunately, this had the
side effect of breaking capitalization on the first word of a sub-string, e.g:
>> "This was 'fake news'".titleize
=> "This Was 'fake News'"
This is fixed by extending the look-behind to also check for a word
character on the other side of the apostrophe.
Fixes #28312.
*Andrew White*
* Add `rfc3339` aliases to `xmlschema` for `Time` and `ActiveSupport::TimeWithZone`
For naming consistency when using the RFC 3339 profile of ISO 8601 in applications.
*Andrew White*
* Add `Time.rfc3339` parsing method
`Time.xmlschema` and consequently its alias `iso8601` accepts timestamps
without a offset in contravention of the RFC 3339 standard. This method
enforces that constraint and raises an `ArgumentError` if it doesn't.
*Andrew White*
* Add `ActiveSupport::TimeZone.rfc3339` parsing method
Previously, there was no way to get a RFC 3339 timestamp into a specific
timezone without either using `parse` or chaining methods. The new method
allows parsing directly into the timezone, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.rfc3339("1999-12-31T14:00:00Z")
=> Fri, 31 Dec 1999 14:00:00 HST -10:00
This new method has stricter semantics than the current `parse` method,
and will raise an `ArgumentError` instead of returning nil, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.rfc3339("foobar")
ArgumentError: invalid date
>> Time.zone.parse("foobar")
=> nil
It will also raise an `ArgumentError` when either the time or offset
components are missing, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.rfc3339("1999-12-31")
ArgumentError: invalid date
>> Time.zone.rfc3339("1999-12-31T14:00:00")
ArgumentError: invalid date
*Andrew White*
* Add `ActiveSupport::TimeZone.iso8601` parsing method
Previously, there was no way to get a ISO 8601 timestamp into a specific
timezone without either using `parse` or chaining methods. The new method
allows parsing directly into the timezone, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.iso8601("1999-12-31T14:00:00Z")
=> Fri, 31 Dec 1999 14:00:00 HST -10:00
If the timestamp is a ISO 8601 date (YYYY-MM-DD), then the time is set
to midnight, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.iso8601("1999-12-31")
=> Fri, 31 Dec 1999 00:00:00 HST -10:00
This new method has stricter semantics than the current `parse` method,
and will raise an `ArgumentError` instead of returning nil, e.g:
>> Time.zone = "Hawaii"
=> "Hawaii"
>> Time.zone.iso8601("foobar")
ArgumentError: invalid date
>> Time.zone.parse("foobar")
=> nil
*Andrew White*
* Deprecate implicit coercion of `ActiveSupport::Duration`
Currently `ActiveSupport::Duration` implicitly converts to a seconds
value when used in a calculation except for the explicit examples of
addition and subtraction where the duration is the receiver, e.g:
>> 2 * 1.day
=> 172800
This results in lots of confusion especially when using durations
with dates because adding/subtracting a value from a date treats
integers as a day and not a second, e.g:
>> Date.today
=> Wed, 01 Mar 2017
>> Date.today + 2 * 1.day
=> Mon, 10 Apr 2490
To fix this we're implementing `coerce` so that we can provide a
deprecation warning with the intent of removing the implicit coercion
in Rails 5.2, e.g:
>> 2 * 1.day
DEPRECATION WARNING: Implicit coercion of ActiveSupport::Duration
to a Numeric is deprecated and will raise a TypeError in Rails 5.2.
=> 172800
In Rails 5.2 it will raise `TypeError`, e.g:
>> 2 * 1.day
TypeError: ActiveSupport::Duration can't be coerced into Integer
This is the same behavior as with other types in Ruby, e.g:
>> 2 * "foo"
TypeError: String can't be coerced into Integer
>> "foo" * 2
=> "foofoo"
As part of this deprecation add `*` and `/` methods to `AS::Duration`
so that calculations that keep the duration as the receiver work
correctly whether the final receiver is a `Date` or `Time`, e.g:
>> Date.today
=> Wed, 01 Mar 2017
>> Date.today + 1.day * 2
=> Fri, 03 Mar 2017
Fixes #27457.
*Andrew White*
* Update `DateTime#change` to support `:usec` and `:nsec` options.
Adding support for these options now allows us to update the `DateTime#end_of`
methods to match the equivalent `Time#end_of` methods, e.g:
datetime = DateTime.now.end_of_day
datetime.nsec == 999999999 # => true
Fixes #21424.
*Dan Moore*, *Andrew White*
* Add `ActiveSupport::Duration#before` and `#after` as aliases for `#until` and `#since`
These read more like English and require less mental gymnastics to read and write.
Before:
2.weeks.since(customer_start_date)
5.days.until(today)
After:
2.weeks.after(customer_start_date)
5.days.before(today)
*Nick Johnstone*
* Soft-deprecated the top-level `HashWithIndifferentAccess` constant.
`ActiveSupport::HashWithIndifferentAccess` should be used instead.
Fixes #28157.
*Robin Dupret*
* In Core Extensions, make `MarshalWithAutoloading#load` pass through the second, optional
argument for `Marshal#load( source [, proc] )`. This way we don't have to do
`Marshal.method(:load).super_method.call(source, proc)` just to be able to pass a proc.
*Jeff Latz*
* `ActiveSupport::Gzip.decompress` now checks checksum and length in footer.
*Dylan Thacker-Smith*
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Cache `ActiveSupport::TimeWithZone#to_datetime` before freezing.
*Adam Rice*
* Deprecate `ActiveSupport.halt_callback_chains_on_return_false`.
*Rafael Mendonça França*
* Remove deprecated behavior that halts callbacks when the return is false.
*Rafael Mendonça França*
* Deprecate passing string to `:if` and `:unless` conditional options
on `set_callback` and `skip_callback`.
*Ryuta Kamizono*
* Raise `ArgumentError` when passing string to define callback.
*Ryuta Kamizono*
* Updated Unicode version to 9.0.0
Now we can handle new emojis such like "👩‍👩‍👧‍👦" ("\u{1F469}\u{200D}\u{1F469}\u{200D}\u{1F467}\u{200D}\u{1F466}").
version 8.0.0
"👩‍👩‍👧‍👦".mb_chars.grapheme_length # => 4
"👩‍👩‍👧‍👦".mb_chars.reverse # => "👦👧‍👩‍👩‍"
version 9.0.0
"👩‍👩‍👧‍👦".mb_chars.grapheme_length # => 1
"👩‍👩‍👧‍👦".mb_chars.reverse # => "👩‍👩‍👧‍👦"
*Fumiaki MATSUSHIMA*
* Changed `ActiveSupport::Inflector#transliterate` to raise `ArgumentError` when it receives
anything except a string.
*Kevin McPhillips*
* Fixed bugs that `StringInquirer#respond_to_missing?` and
`ArrayInquirer#respond_to_missing?` do not fallback to `super`.
*Akira Matsuda*
* Fix inconsistent results when parsing large durations and constructing durations from code
ActiveSupport::Duration.parse('P3Y') == 3.years # It should be true
Duration parsing made independent from any moment of time:
Fixed length in seconds is assigned to each duration part during parsing.
Changed duration of months and years in seconds to more accurate and logical:
1. The value of 365.2425 days in Gregorian year is more accurate
as it accounts for every 400th non-leap year.
2. Month's length is bound to year's duration, which makes
sensible comparisons like `12.months == 1.year` to be `true`
and nonsensical ones like `30.days == 1.month` to be `false`.
Calculations on times and dates with durations shouldn't be affected as
duration's numeric value isn't used in calculations, only parts are used.
Methods on `Numeric` like `2.days` now use these predefined durations
to avoid duplication of duration constants through the codebase and
eliminate creation of intermediate durations.
*Andrey Novikov*, *Andrew White*
* Change return value of `Rational#duplicable?`, `ComplexClass#duplicable?`
to false.
*utilum*
* Change return value of `NilClass#duplicable?`, `FalseClass#duplicable?`,
`TrueClass#duplicable?`, `Symbol#duplicable?` and `Numeric#duplicable?`
to true with Ruby 2.4+. These classes can dup with Ruby 2.4+.
*Yuji Yaginuma*
* Remove deprecated class `ActiveSupport::Concurrency::Latch`.
*Andrew White*
* Remove deprecated separator argument from `parameterize`.
*Andrew White*
* Remove deprecated method `Numeric#to_formatted_s`.
*Andrew White*
* Remove deprecated method `alias_method_chain`.
*Andrew White*
* Remove deprecated constant `MissingSourceFile`.
*Andrew White*
* Remove deprecated methods `Module.qualified_const_defined?`,
`Module.qualified_const_get` and `Module.qualified_const_set`.
*Andrew White*
* Remove deprecated `:prefix` option from `number_to_human_size`.
*Andrew White*
* Remove deprecated method `ActiveSupport::HashWithIndifferentAccess.new_from_hash_copying_default`.
*Andrew White*
* Remove deprecated file `active_support/core_ext/time/marshal.rb`.
*Andrew White*
* Remove deprecated file `active_support/core_ext/struct.rb`.
*Andrew White*
* Remove deprecated file `active_support/core_ext/module/method_transplanting.rb`.
*Andrew White*
* Remove deprecated method `Module.local_constants`.
*Andrew White*
* Remove deprecated file `active_support/core_ext/kernel/debugger.rb`.
*Andrew White*
* Remove deprecated method `ActiveSupport::Cache::Store#namespaced_key`.
*Andrew White*
* Remove deprecated method `ActiveSupport::Cache::Strategy::LocalCache::LocalStore#set_cache_value`.
*Andrew White*
* Remove deprecated method `ActiveSupport::Cache::MemCacheStore#escape_key`.
*Andrew White*
* Remove deprecated method `ActiveSupport::Cache::FileStore#key_file_path`.
*Andrew White*
* Ensure duration parsing is consistent across DST changes.
Previously `ActiveSupport::Duration.parse` used `Time.current` and
`Time#advance` to calculate the number of seconds in the duration
from an arbitrary collection of parts. However as `advance` tries to
be consistent across DST boundaries this meant that either the
duration was shorter or longer depending on the time of year.
This was fixed by using an absolute reference point in UTC which
isn't subject to DST transitions. An arbitrary date of Jan 1st, 2000
was chosen for no other reason that it seemed appropriate.
Additionally, duration parsing should now be marginally faster as we
are no longer creating instances of `ActiveSupport::TimeWithZone`
every time we parse a duration string.
Fixes #26941.
*Andrew White*
* Use `Hash#compact` and `Hash#compact!` from Ruby 2.4. Old Ruby versions
will continue to get these methods from Active Support as before.
*Prathamesh Sonpatki*
* Fix `ActiveSupport::TimeZone#strptime`.
Support for timestamps in format of seconds (%s) and milliseconds (%Q).
Fixes #26840.
*Lev Denisov*
* Fix `DateAndTime::Calculations#copy_time_to`. Copy `nsec` instead of `usec`.
Jumping forward or backward between weeks now preserves nanosecond digits.
*Josua Schmid*
* Fix `ActiveSupport::TimeWithZone#in` across DST boundaries.
Previously calls to `in` were being sent to the non-DST aware
method `Time#since` via `method_missing`. It is now aliased to
the DST aware `ActiveSupport::TimeWithZone#+` which handles
transitions across DST boundaries, e.g:
Time.zone = "US/Eastern"
t = Time.zone.local(2016,11,6,1)
# => Sun, 06 Nov 2016 01:00:00 EDT -05:00
t.in(1.hour)
# => Sun, 06 Nov 2016 01:00:00 EST -05:00
Fixes #26580.
*Thomas Balthazar*
* Remove unused parameter `options = nil` for `#clear` of
`ActiveSupport::Cache::Strategy::LocalCache::LocalStore` and
`ActiveSupport::Cache::Strategy::LocalCache`.
*Yosuke Kabuto*
* Fix `thread_mattr_accessor` subclass no longer overwrites parent.
Assigning a value to a subclass using `thread_mattr_accessor` no
longer changes the value of the parent class. This brings the
behavior inline with the documentation.
Given:
class Account
thread_mattr_accessor :user
end
class Customer < Account
end
Account.user = "DHH"
Customer.user = "Rafael"
Before:
Account.user # => "Rafael"
After:
Account.user # => "DHH"
*Shinichi Maeshima*
* Since weeks are no longer converted to days, add `:weeks` to the list of
parts that `ActiveSupport::TimeWithZone` will recognize as possibly being
of variable duration to take account of DST transitions.
Fixes #26039.
*Andrew White*
* Defines `Regexp.match?` for Ruby versions prior to 2.4. The predicate
has the same interface, but it does not have the performance boost. Its
purpose is to be able to write 2.4 compatible code.
*Xavier Noria*
* Allow `MessageEncryptor` to take advantage of authenticated encryption modes.
AEAD modes like `aes-256-gcm` provide both confidentiality and data
authenticity, eliminating the need to use `MessageVerifier` to check if the
encrypted data has been tampered with. This speeds up encryption/decryption
and results in shorter cipher text.
*Bart de Water*
* Introduce `assert_changes` and `assert_no_changes`.
`assert_changes` is a more general `assert_difference` that works with any
value.
assert_changes 'Error.current', from: nil, to: 'ERR' do
expected_bad_operation
end
Can be called with strings, to be evaluated in the binding (context) of
the block given to the assertion, or a lambda.
assert_changes -> { Error.current }, from: nil, to: 'ERR' do
expected_bad_operation
end
The `from` and `to` arguments are compared with the case operator (`===`).
assert_changes 'Error.current', from: nil, to: Error do
expected_bad_operation
end
This is pretty useful, if you need to loosely compare a value. For example,
you need to test a token has been generated and it has that many random
characters.
user = User.start_registration
assert_changes 'user.token', to: /\w{32}/ do
user.finish_registration
end
*Genadi Samokovarov*
* Fix `ActiveSupport::TimeZone#strptime`. Now raises `ArgumentError` when the
given time doesn't match the format. The error is the same as the one given
by Ruby's `Date.strptime`. Previously it raised
`NoMethodError: undefined method empty? for nil:NilClass.` due to a bug.
Fixes #25701.
*John Gesimondo*
* `travel/travel_to` travel time helpers, now raise on nested calls,
as this can lead to confusing time stubbing.
Instead of:
travel_to 2.days.from_now do
# 2 days from today
travel_to 3.days.from_now do
# 5 days from today
end
end
preferred way to achieve above is:
travel 2.days do
# 2 days from today
end
travel 5.days do
# 5 days from today
end
*Vipul A M*
* Support parsing JSON time in ISO8601 local time strings in
`ActiveSupport::JSON.decode` when `parse_json_times` is enabled.
Strings in the format of `YYYY-MM-DD hh:mm:ss` (without a `Z` at
the end) will be parsed in the local timezone (`Time.zone`). In
addition, date strings (`YYYY-MM-DD`) are now parsed into `Date`
objects.
*Grzegorz Witek*
* Fixed `ActiveSupport::Logger.broadcast` so that calls to `#silence` now
properly delegate to all loggers. Silencing now properly suppresses logging
to both the log and the console.
*Kevin McPhillips*
* Remove deprecated arguments in `assert_nothing_raised`.
*Rafel Mendonça França*
* `Date.to_s` doesn't produce too many spaces. For example, `to_s(:short)`
will now produce `01 Feb` instead of ` 1 Feb`.
Fixes #25251.
*Sean Griffin*
* Introduce `Module#delegate_missing_to`.
When building a decorator, a common pattern emerges:
class Partition
def initialize(first_event)
@events = [ first_event ]
end
def people
if @events.first.detail.people.any?
@events.collect { |e| Array(e.detail.people) }.flatten.uniq
else
@events.collect(&:creator).uniq
end
end
private
def respond_to_missing?(name, include_private = false)
@events.respond_to?(name, include_private)
end
def method_missing(method, *args, &block)
@events.send(method, *args, &block)
end
end
With `Module#delegate_missing_to`, the above is condensed to:
class Partition
delegate_missing_to :@events
def initialize(first_event)
@events = [ first_event ]
end
def people
if @events.first.detail.people.any?
@events.collect { |e| Array(e.detail.people) }.flatten.uniq
else
@events.collect(&:creator).uniq
end
end
end
*Genadi Samokovarov*, *DHH*
* Rescuable: If a handler doesn't match the exception, check for handlers
matching the exception's cause.
*Jeremy Daer*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activesupport/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/activesupport/CHANGELOG.md) for previous changes.
......@@ -32,7 +32,7 @@ class Deprecation
# and the second is a library name
#
# ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
def initialize(deprecation_horizon = "5.2", gem_name = "Rails")
def initialize(deprecation_horizon = "5.3", gem_name = "Rails")
self.gem_name = gem_name
self.deprecation_horizon = deprecation_horizon
# By default, warnings are not silenced and debugging is off.
......
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.1.0.beta1 (February 23, 2017) ##
* No changes.
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/guides/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/guides/CHANGELOG.md) for previous changes.
......@@ -8,6 +8,7 @@
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
end
require "action_controller/railtie"
......
......@@ -8,6 +8,7 @@
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
end
require "active_job"
......
......@@ -8,6 +8,7 @@
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
gem "sqlite3"
end
......
......@@ -8,6 +8,7 @@
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
gem "sqlite3"
end
......
......@@ -8,6 +8,7 @@
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
end
require "active_support"
......
* Add `app:update` task to engines.
*Yuji Yaginuma*
* Avoid running system tests by default with the `bin/rails test`
and `bin/rake test` commands since they may be expensive.
Fixes #28286.
*Robin Dupret*
* Improve encryption for encrypted secrets.
Switch to aes-128-gcm authenticated encryption. Also generate a random
initialization vector for each encryption so the same input and key can
generate different encrypted data.
Double the encryption key entropy by properly extracting the underlying
bytes from the hexadecimal seed key.
NOTE: Since the encryption mechanism has been switched, you need to run
this script to upgrade:
https://gist.github.com/kaspth/bc37989c2f39a5642112f28b1d93f343
*Stephen Touset*
## Rails 5.1.0.beta1 (February 23, 2017) ##
* Add encrypted secrets in `config/secrets.yml.enc`.
Allow storing production secrets straight in the revision control system by
encrypting them.
Use `bin/rails secrets:setup` to opt-in by generating `config/secrets.yml.enc`
for the secrets themselves and `config/secrets.yml.key` for the encryption key.
Edit secrets with `bin/rails secrets:edit`.
See `bin/rails secrets:setup --help` for more.
*Kasper Timm Hansen*
* Fix running multiple tests in one `rake` command
e.g. `bin/rake test:models test:controllers`
*Dominic Cleal*
* Add option to configure Ruby's warning behaviour to test runner.
*Yuji Yaginuma*
* Initialize git repo when generating new app, if option `--skip-git`
is not provided.
*Dino Maric*
* Install Byebug gem as default in Windows (mingw and x64_mingw) platform.
*Junichi Ito*
* Make every Rails command work within engines.
*Sean Collins*, *Yuji Yaginuma*
* Don't generate HTML/ERB templates for scaffold controller with `--api` flag.
Fixes #27591.
*Prathamesh Sonpatki*
* Make `Rails.env` fall back to `development` when `RAILS_ENV` and `RACK_ENV` is an empty string.
*Daniel Deng*
* Remove deprecated `CONTROLLER` environment variable for `routes` task.
*Rafael Mendonça França*
* Remove deprecated tasks: `rails:update`, `rails:template`, `rails:template:copy`,
`rails:update:configs` and `rails:update:bin`.
*Rafael Mendonça França*
* Remove deprecated file `rails/rack/debugger`.
*Rafael Mendonça França*
* Remove deprecated `config.serve_static_files`.
*Rafael Mendonça França*
* Remove deprecated `config.static_cache_control`.
*Rafael Mendonça França*
* The `log:clear` task clear all environments log files by default.
*Yuji Yaginuma*
* Add Webpack support in new apps via the --webpack option, which will delegate to the rails/webpacker gem.
To generate a new app that has Webpack dependencies configured and binstubs for webpack and webpack-watcher:
`rails new myapp --webpack`
To generate a new app that has Webpack + React configured and an example intalled:
`rails new myapp --webpack=react`
*DHH*
* Add Yarn support in new apps with a yarn binstub and package.json. Skippable via --skip-yarn option.
*Liceth Ovalles*, *Guillermo Iguaran*, *DHH*
* Removed jquery-rails from default stack, instead rails-ujs that is shipped
with Action View is included as default UJS adapter.
*Guillermo Iguaran*
* The config file `secrets.yml` is now loaded in with all keys as symbols.
This allows secrets files to contain more complex information without all
child keys being strings while parent keys are symbols.
*Isaac Sloan*
* Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
*Tsukuru Tanimichi*
* Add `--skip-coffee` option to `rails new`
*Seunghwan Oh*
* Allow the use of listen's 3.1.x branch
*Esteban Santana Santana*
* Run `Minitest.after_run` hooks when running `rails test`.
*Michael Grosser*
* Run `before_configuration` callbacks as soon as application constant
inherits from `Rails::Application`.
Fixes #19880.
*Yuji Yaginuma*
* A generated app should not include Uglifier with `--skip-javascript` option.
*Ben Pickles*
* Set session store to cookie store internally and remove the initializer from
the generated app.
*Prathamesh Sonpatki*
* Set the server host using the `HOST` environment variable.
*mahnunchik*
* Add public API to register new folders for `rake notes`:
config.annotations.register_directories('spec', 'features')
*John Meehan*
* Display name of the class defining the initializer along with the initializer
name in the output of `rails initializers`.
Before:
disable_dependency_loading
After:
DemoApp::Application.disable_dependency_loading
*ta1kt0me*
* Do not run `bundle install` when generating a new plugin.
Since bundler 1.12.0, the gemspec is validated so the `bundle install`
command will fail just after the gem is created causing confusion to the
users. This change was a bug fix to correctly validate gemspecs.
*Rafael Mendonça França*
* Default `config.assets.quiet = true` in the development environment. Suppress
logging of assets requests by default.
*Kevin McPhillips*
* Added a shared section to `config/secrets.yml` that will be loaded for all environments.
*DHH*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/railties/CHANGELOG.md) for previous changes.
Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/railties/CHANGELOG.md) for previous changes.
......@@ -78,6 +78,9 @@ def load_defaults(target_version)
assets.unknown_asset_fallback = false
end
when "5.2"
load_defaults "5.1"
else
raise "Unknown version #{target_version.to_s.inspect}"
end
......
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
......@@ -246,6 +246,7 @@ def version
def rails_gemfile_entry
dev_edge_common = [
GemfileEntry.github("arel", "rails/arel"),
]
if options.dev?
[
......
......@@ -6,9 +6,9 @@ def self.gem_version
module VERSION
MAJOR = 5
MINOR = 1
MINOR = 2
TINY = 0
PRE = "beta1"
PRE = "alpha"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册