| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Enable JRuby testing for Active Job
|
| | |
|
|/
|
|
| |
All tests pass for me locally.
|
|\
| |
| |
| |
| | |
maxboisvert/use_named_parameters_in_assert_enqueued_with
Use named parameters instead of `assert_valid_keys` in active_job/test_helper
|
| | |
|
|\ \
| | |
| | | |
Run tests by Ruby 2.2.6 and 2.3.2
|
| |/ |
|
|\ \
| |/
|/| |
Enable JRuby testing for Action Mailer
|
|/
|
|
|
|
|
|
| |
All tests passing locally for me:
```
195 runs, 441 assertions, 0 failures, 0 errors, 0 skips
```
|
|
|
|
|
|
| |
The relation method `update_all` allows you to pass a SQL fragment. The
functionality is already mentioned in the prose but the examples section
does not cover it.
|
|\
| |
| | |
Fix testing isolation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AS::Testing::Isolation has two ways to isolate the process:
forking and subprocessing. The second way is used on JRuby and other
platforms that don't support forking.
The way how subprocessing works is that we prepare a command to run a
new process:
```
/opt/rubies/2.3.0/bin/ruby -I{skipped_load_path} test/initializable_test.rb '' -nInitializableTests::Basic#test_Initializer_provides_context's_class_name
```
As you see, there's unescaped quote at the end of the line.
It leads to:
```
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
```
This fixes tests on MRI + NO_FORK variable and on JRuby :tada:
|
|\ \
| | |
| | | |
Support AC::Parameters for PG HStore
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As reported via #26904, there is a regression in how values for
Postgres' HStore column type are being processed, beginning in Rails 5.
Currently, the way that Active Record checks whether or not values need
to be serialized and put into the correct storage format is whether or
not it is a `Hash` object. Since `ActionController::Parameters` no
longer inherits from `Hash` in Rails 5, this conditional now returns
false. To remedy this, we are now checking to see whether the `value`
parameters being passed in responds to a certain method, and then
calling the `serialize` method, except this time with a real Hash
object. Keeping things DRY!
Fixes #26904.
|
|\ \
| |/
|/| |
Refactor `NullRelation#calculate`
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```ruby
def calculate(operation, _column_name)
if [:count, :sum].include? operation
group_values.any? ? Hash.new : 0
elsif [:average, :minimum, :maximum].include?(operation) && group_values.any?
Hash.new
else
nil
end
end
```
After:
```ruby
def calculate(operation, _column_name)
case operation
when :count, :sum
group_values.any? ? Hash.new : 0
when :average, :minimum, :maximum
group_values.any? ? Hash.new : nil
end
end
```
|
|
|
|
|
| |
Without this, bundler tries to bundle json 1.8 on Ruby 2.4 in some cases
https://travis-ci.org/rails/rails/jobs/175874852
|
|\
| |
| | |
remove `alias_method_chain` from guide [ci skip]
|
| |
| |
| |
| | |
Follow up to 7c848e6dd493ff236d33a0410a92f4c3e5cc3c7f
|
|\ \
| |/
|/| |
remove duplicated changelog entry [ci skip]
|
|/ |
|
|\
| |
| | |
Fix small typo in Layouts and Rendering guide.
|
| |
| |
| | |
Changed "same way they do" to "same way they are".
|
|/ |
|
|\
| |
| | |
Remove Active Support deprecations
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
ttanimichi/add-skip-sprockets-to-passthrough-options
Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`.
```
% rails plugin new my_engine -S --full --skip-gemspec
% cd my_engine
% bin/rails test
rails aborted!
NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x007f83aa1e6100>
```
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This reverts commit bad3a120f1690f393d8f6204b3ceee60f0ce707b, reversing
changes made to 2384317465ccb1dfca456a2b7798714b99f32711.
Reason: Adding a new option in the API for something that can be done
with a `#presence` check could do.
|
|\ \
| | |
| | |
| | | |
Don't error on an empty CONTENT_TYPE
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit prevents a possible issue wherein an empty CONTENT_TYPE
header is sent in a request to a Rails application, and then `request.content_mime_type`
would return `nil`. This is because the `has_content_type?` guard method
was not properly checking the validity of a request's content type; it
was only checking to see whether or not the header existed, not whether
it had a value stored inside.
Relatedly, after an internal discussion, it was determined that the
`has_content_type?` method is not meant to be part of the public API,
and is therefore changed to a `:nodoc:` method in this commit.
The test for this behavior is a little bit ugly, for two reasons. One is
that it was difficult to determine where to place the test... I figured
the best place would be with the rest of the ParamsWrapper stuff, since
that's where the original issue was. Also, we have to do some fancy
footwork in calling `dispatch` on the test's controller manually... this
is because `ActionController::TestCase` will throw an error if you try
and pass in a nil content type, which is exactly what we are trying to
test here... Because of that, we have to manually call in to the
controller, and bypass the `post` request helper.
Fixes #26912.
This is a regression in behavior between Rails versions 4.2.x and 5.0.x,
which was introduced via [this commit](https://github.com/rails/rails/commit/a9f28600e901b11a9222e34bfae8642bfb753186).
|