- 14 7月, 2016 1 次提交
-
-
由 Grey Baker 提交于
The `ActionDispatch::Static` middleware is used low down in the stack to serve static assets before doing much processing. Since it's called from so low in the stack, we don't have access to the request ID at this point, and generally won't have any exception handling defined (by default `ShowExceptions` is added to the stack quite a bit higher and relies on logging and request ID). Before https://github.com/rails/rails/commit/8f27d6036a2ddc3cb7a7ad98afa2666ec163c2c3 this middleware would ignore unknown HTTP methods, and an exception about these would be raised higher in the stack. After that commit, however, that exception will be raised here. If we want to keep `ActionDispatch::Static` so low in the stack (I think we do) we should suppress the `ActionController::UnknownHttpMethod` exception here, and instead let it be raised higher up the stack, once we've had a chance to define exception handling behaviour. This PR updates `ActionDispatch::Static` so it passes `Rack::Request` objects to `ActionDispatch::FileHandler`, which won't raise an `ActionController::UnknownHttpMethod` error. If an unknown method is passed, it should exception higher in the stack instead, once we've had a chance to define exception handling behaviour.`
-
- 13 7月, 2016 7 次提交
-
-
由 Matthew Draper 提交于
Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`
-
由 Guillermo Iguaran 提交于
Give importance to rails command [ci skip]
-
由 Santosh Wadghule 提交于
-
由 Vipul A M 提交于
Correct link for model generator field types
-
由 Josh Justice 提交于
The most complete list of field types appears in the `SchemaStatements` docs rather than the `TableDefinition` docs. The change to link to `SchemaStatements` means that the explanation for the `index` parameter is no longer available on the linked-to page. A brief explanation of the `index` parameter is added directly in the guide to make up for this.
-
由 Rafael França 提交于
Wrap module around lazy load hooks
-
由 Rafael Mendonça França 提交于
This test was added to protect the test suite from our mistakes but now it is failing because bundler does add duplicated libs in the load path by design (if the repository has more than one gem)
-
- 12 7月, 2016 16 次提交
-
-
由 Grey Baker 提交于
Rack [recently](https://github.com/rack/rack/commit/7e7a3890449b5cf5b86929c79373506e5f1909fb) moved the namespace of its `ParameterTypeError` and `InvalidParameterError` errors. Whilst an alias for the old name was added, the logic in `ActionDispatch::ExceptionWrapper` was still broken by this change, since it relies on the class name. This PR updates `ActionDispatch::ExceptionWrapper` to handle the Rack 2.0 namespaced errors correctly. We no longer need to worry about the old names, since Rails specifies Rack ~> 2.0.
-
由 Akira Matsuda 提交于
-
由 Vipul A M 提交于
[ci skip] Update redirecting links in guides
-
由 kei-s 提交于
-
由 Xavier Noria 提交于
Speed up RDoc generation when it's already been done once
-
由 Rafael França 提交于
rails -> Rails [ci skip]
-
由 Santosh Wadghule 提交于
-
由 Rafael França 提交于
Raise ArgumentError for bad strptime arguments
-
由 John Gesimondo 提交于
-
由 mrageh 提交于
Fix for issue https://github.com/rails/rails/issues/25784 Prior to this commit the lazy_load_hooks.rb file contained important lazy load hooks. Since [7c90d91c](https://github.com/rails/rails/commit/7c90d91c3c43bdbba25d38589aed0e2940af3bc8) the [documentation](http://api.rubyonrails.org/files/activesupport/lib/active_support/lazy_load_hooks_rb.html) did not display the comments in this file as the docs for load hooks. This commit wraps the code within this file in a module so we can display the documentation for `ActiveSupport` load hooks. By extending `ActiveSupport` with this module, all the methods within it should still be accessible through `ActiveSupport`.
-
由 Matthew Draper 提交于
Remove duplicate test and fix a typo in the test
-
由 Prathamesh Sonpatki 提交于
- Tests for dup'ing params was separately added in a separate file in https://github.com/rails/rails/pull/25735.
-
由 Matthew Draper 提交于
Stop changes to a dupped `ActionController::Parameters` mutating the original
-
由 Paul Sadauskas 提交于
The current implementation serializes zero-length durations incorrectly (it serializes as `"-P"`), and cannot un-serialize itself: ``` [1] pry(main)> ActiveSupport::Duration.parse(0.minutes.iso8601) ActiveSupport::Duration::ISO8601Parser::ParsingError: Invalid ISO 8601 duration: "-P" is empty duration from /Users/rando/.gem/ruby/2.3.1/gems/activesupport-5.0.0/lib/active_support/duration/iso8601_parser.rb:96:in `raise_parsing_error' ``` Postgres empty intervals are serialized as `"PT0S"`, which is also parseable by the Duration deserializer, so I've modified the `ISO8601Serializer` to do the same. Additionally, the `#normalize` function returned a negative sign if `parts` was blank (all zero). Even though this fix does not rely on the sign, I've gone ahead and corrected that, too, in case a future refactoring of `#serialize` uses it.
-
由 Rafael França 提交于
Fix Active Record test failure
-
由 Ryuta Kamizono 提交于
Caused at a45363a2.
-
- 11 7月, 2016 8 次提交
-
-
由 Sean Griffin 提交于
[ci skip] add class level documentation to ActiveModel::Type::Boolean
-
由 Sean Griffin 提交于
When `group` is used in combination with any calculation method, the resulting hash uses the grouping expression as the key. Currently we're incorrectly always favoring the type reported by the query, instead of the type known by the class. This causes differing behavior depending on whether the adaptor actually gives proper types with the query or not. After this change, the behavior will be the same on all adaptors -- we see if we know the type from the class, fall back to the type from the query, and finally fall back to the identity type. Fixes #25595
-
由 David Elliott 提交于
add documentation of the behaviors of type coercion at the class level
-
由 Robin Dupret 提交于
Only include files that contain changes since the last generation of the API documentation. Thus, only modified files are re-generated instead of the whole API. The `created.rid` file won't contain the whole list of files anymore if we generate several times the API but we don't really care about it, only the generation date and time is important. It is possible to fall back to the previous behavior by defining the ALL environment variable running the `rake rdoc` task.
-
由 प्रथमेश Sonpatki 提交于
Update class_attribute docs
-
由 John Gesimondo 提交于
-
由 Guillermo Iguaran 提交于
Add tests for 1xx, 204 and 304 responses to response_test.rb
-
由 Guillermo Iguaran 提交于
remove unnecessary send
-
- 10 7月, 2016 5 次提交
-
-
由 Vijay Dev 提交于
-
由 yuuji.yaginuma 提交于
`class_variable_get` is public from Ruby 1.9. Ref: http://ruby-doc.org/core-2.2.0/Module.html#method-i-class_variable_get
-
由 Rafael França 提交于
Cleanup CHANGELOGs [ci skip]
-
由 Rafael França 提交于
Fix AJ tests on ruby 2.4 being caused since classes are unified for Integer
-
由 Vipul A M 提交于
Fix AJ tests on ruby 2.4 being causes since classes are unified for Integer, and we create test name nased on arg class. Append ar as well to the test name
-
- 09 7月, 2016 3 次提交
-
-
由 Prathamesh Sonpatki 提交于
- Cleanup Active Record CHANGELOG. - Add missing CHANGELOG for https://github.com/rails/rails/pull/25688. - Clarify that assets requests logging is suppressed.
-
由 Masaru Nomura 提交于
In response_test.rb, we haven't had a test to make sure that 1) these responses don't have a message-body as described in RFC7231[1] 2) 1xx and 204 responses must not have a Content-Length header field as described in RFC7230-section3.3.2[2] [1] https://tools.ietf.org/html/rfc7231 [2] https://tools.ietf.org/html/rfc7230#section-3.3.2 Even though our implementation doesn't allow users to send a Content-Length header field in a 304 response, sending the header field is valid as mentioned in RFC7230-section3.3.2[2]. So I've decided not to test whether or not a 304 response has the header. The citation from the section is as follows; ``` A server MAY send a Content-Length header field in a 304 (Not Modified) response to a conditional GET request (Section 4.1 of [RFC7232]); a server MUST NOT send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a 200 (OK) response to the same request. ```
-
由 Matthew Draper 提交于
fix to_param to maximize content
-