| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | | |
Use https with weblog URI
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Remove unused `assert_like` from `Arel::Test`
|
| | | |
| | | |
| | | |
| | | |
| | | | |
It had been added at https://github.com/rails/arel/commit/05b5bb12270b32e094c1c879273e0978dabe5b3b
and removed at https://github.com/rails/arel/commit/db1bb4e9a728a437d16f8bdb48c3b772c3e4edb0
|
|/ / / |
|
| | |
| | |
| | |
| | | |
`require 'rubygems'` is already required in Ruby 1.9 or later.
|
|\ \ \
| | | |
| | | | |
Allow a belonging to object to be created from a new record
|
| | | |
| | | |
| | | |
| | | | |
If a 'has one' object is created from a new record, an ActiveRecord::RecordNotSaved error is raised but this behavior was also applied to the reverse scenario.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Ensure that do not accidentally remove an index of different
definitions.
|
|\ \ \ \
| | | | |
| | | | | |
Partly revert #32289 to provide Rails' custom fallback in case did_you_mean is not available
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`DidYouMean::SpellChecker` is not defined.
`did_you_mean` is bundled in Ruby but can be uninstalled, and is not always
available, sometimes even on our CI:
https://travis-ci.org/rails/rails/jobs/372638523#L2405
https://travis-ci.org/rails/rails/jobs/372638523#L2416
https://travis-ci.org/rails/rails/jobs/372638523#L2427
...
|
|\ \ \ \
| | | | |
| | | | | |
Fix typo in ActiveRecord test method name
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When a job was just deserialized `arguments` is `nil` and the serialized
arguments are in the `@serialized_arguments` variable. If we try to
serialize this job again the arguments are going to be `nil` instead of
what was serialized.
The test we had was not checking this case because it was deserializing
the job in the same object that had the arguments.
To fix this, when the `@serialized_arguments` are present we return it
instead of the result of the `arguments` serialized.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
It will cause "undefined method `test_order' for ActiveSupport:Module
(NoMethodError)".
https://travis-ci.org/rails/rails/jobs/373472604#L1208
|
|\ \ \
| |_|/
|/| | |
Make `Arel::Test` subclass of `ActiveSupport::TestCase`
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
not `Minitest::Test` to address `CustomCops/RefuteNot` and `CustomCops/AssertNot` offenses
for Arel test cases
Also including `ActiveSupport::Testing::Assertions` to `Arel::Spec`
and add test/unit backwards compatibility methods
Fixes #32720
|
|\ \
| | |
| | | |
Reset CONTENT_LENGTH between test requests
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a POST request is followed by a GET request in a controller test, the
`rack.input` and `RAW_POST_DATA` headers from the first request will be
reset but the `CONTENT_LENGTH` header will leak, leading the request
object in the second request to incorrectly believe it has a body.
|
|\ \ \
| |/ /
|/| | |
Add quotes to code in rdoc comment in ActionController [ci skip]
|
|/ /
| |
| |
| | |
The example code is meant to be a string.
|
|\ \
| | |
| | | |
Document rails new <app> storage folder
|
| | |
| | |
| | |
| | |
| | | |
[ci skip] Active Storage now adds a storage folder to newly generated
rails applications.
|
|\ \ \
| |/ /
|/| | |
Fix an oxford comma
|
|/ /
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Fix test: threads being nil in ensure
|
| | |
| | |
| | |
| | | |
when connection_pool is not installed.
|
|\ \ \
| |/ /
|/| | |
Remove reference to Tokaido
|
|/ / |
|
|\ \
| | |
| | | |
Fix url_helper examples in testing guide [ci skip]
|
|/ / |
|
| |
| |
| |
| | |
References #32703.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This improves the performance for the most ordinalized numbers (1st,
2nd, 3rd, etc).
```
require "benchmark/ips"
def o1(number)
abs_number = number.to_i.abs
if (11..13).include?(abs_number % 100)
"th"
else
case abs_number % 10
when 1; "st"
when 2; "nd"
when 3; "rd"
else "th"
end
end
end
def o3(number)
case number
when 1; "st"
when 2; "nd"
when 3; "rd"
when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; "th"
else
num_modulo = number.to_i.abs % 100
if 11 <= num_modulo && num_modulo <= 13
"th"
else
case num_modulo % 10
when 1; "st"
when 2; "nd"
when 3; "rd"
else "th"
end
end
end
end
def o4(number)
case number
when 1; "st"
when 2; "nd"
when 3; "rd"
when 4, 5, 6, 7, 8, 9, 10, 11, 12, 13; "th"
else
num_modulo = number.to_i.abs % 100
num_modulo %= 10 if num_modulo > 13
case num_modulo
when 1; "st"
when 2; "nd"
when 3; "rd"
else "th"
end
end
end
puts RUBY_DESCRIPTION
Benchmark.ips do |x|
x.report("orig") { o1(1); o1(2); o1(3); o1(4); o1(11); o1(111); o1(1523) }
x.report("ord3") { o3(1); o3(2); o3(3); o3(4); o3(11); o3(111); o3(1523) }
x.report("ord4") { o4(1); o4(2); o4(3); o4(4); o4(11); o4(111); o4(1523) }
x.compare!
end
```
```
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin15]
Warming up --------------------------------------
orig 25.305k i/100ms
ord3 121.146k i/100ms
ord4 124.944k i/100ms
Calculating -------------------------------------
orig 275.496k (± 2.4%) i/s - 1.392M in 5.054720s
ord3 1.649M (± 5.0%) i/s - 8.238M in 5.009801s
ord4 1.700M (± 7.0%) i/s - 8.496M in 5.031646s
Comparison:
ord4: 1700059.6 i/s
ord3: 1649154.9 i/s - same-ish: difference falls within error
orig: 275496.3 i/s - 6.17x slower
```
Closes #25020.
[lvl0nax, Jeremy Daer, Ryuta Kamizono]
|
| |
| |
| |
| | |
Match other services, which all use a 5 MB chunk size.
|
|\ \
| | |
| | | |
Make Railties CI log for Ruby 2.6 accessible again
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Pending the next release of Thor which [fixes](https://github.com/erikhuda/thor/commit/006832ea32480618791f89bb7d9e67b22fc814b9) calls to `ERB.new`, Railties CI log for Ruby 2.6 is flooded with so many warnings it is too long for Travis to handle:
```
/home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
/home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
/home/travis/.rvm/gems/ruby-head/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:120: warning: Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.
The log length has exceeded the limit of 4 MB (this usually means that the test suite is raising the same exception over and over).
The job has been terminated
```
https://travis-ci.org/rails/rails/jobs/372623604#L10000
https://api.travis-ci.org/v3/job/372623604/log.txt
This patch forces installation of fixed Thor, and enables us to look at the the log.
|
|\ \ \
| |/ /
|/| | |
Swap assertion order
|
|/ /
| |
| |
| | |
`assert_directory("test/system")` may pass even if `assert_file("test/system/.keep")` fails.
|
| | |
|
| |
| |
| |
| |
| | |
The merging order was accidentally changed at #32447. The original
intention is force `drop_table ... if_exists: true`. #28070.
|
| |
| |
| |
| |
| | |
* Singular associations don't define `#association.nil?`
* Wrap with <tt> for each method, not the whole sentence
|
|\ \
| | |
| | | |
Don't allocate unnecessary array in translation helper
|
| | | |
|
|\ \ \
| |/ /
|/| | |
[ci skip] update ActiveStorage documentation
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- added documentation on how to download files, with example of
ActiveStorage::Downloading
- documentation about linking files outside of controller/view
- added section about DirectUpload JavaScript integration into
libraries/frameworks, as well as usage in combination with Drag and Drop
|
|\ \ \
| | | |
| | | | |
[ci skip] Fix a typo in testing.md
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Allow usage of strings as locals for partial renderer
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Use MethodCallAssertions instead of mocha expects
|