| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes railties ApplicationTests failures in Ruby 2.7.
Rake 12.3.2 includes a [Fix for test fails caused by 2.6 warnings](https://github.com/ruby/rake/pull/297). Upadting prevents failures of:
- `RakeTests::RakeMigrationsTest#test_migration_status_when_schema_migrations_table_is_not_present`
- `RakeDbsTest#test_db:structure:dump_does_not_dump_schema_information_when_no_migrations_are_used`
- `BinSetupTest#test_bin_setup_output`
See [failures log](https://gist.githubusercontent.com/utilum/30e081cc38b5d90e18be8cede6385b10/raw/2b89e568977d4f1fe010726a9a561c10e59c8df8/tests.log).
ruby 2.7.0dev (2019-04-18 trunk 67602) [x86_64-linux]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Performance cops will be extracted from RuboCop to RuboCop Performance
when next RuboCop 0.68 will be released.
https://github.com/rubocop-hq/rubocop/issues/5977
RuboCop 0.67 is its transition period.
Since rails/rails repository uses Performance cops, This PR added
rubocop-performance gem to Gemfile.
And this PR fixes some offenses using the following auto-correct.
```console
% bundle exec rubocop -a
Offenses:
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:212:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator =
> should be surrounded by a single space.
"primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" }
^^
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:239:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator => should be
surrounded by a single space.
"primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" }
^^
actionview/test/template/resolver_shared_tests.rb:1:1: C: [Corrected]
Style/FrozenStringLiteralComment: Missing magic comment #
frozen_string_literal: true.
module ResolverSharedTests
^
actionview/test/template/resolver_shared_tests.rb:10:33: C: [Corrected]
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in
default value assignment.
def with_file(filename, source="File at #{filename}")
^
actionview/test/template/resolver_shared_tests.rb:106:5: C: [Corrected]
Rails/RefuteMethods: Prefer assert_not_same over refute_same.
refute_same a, b
^^^^^^^^^^^
2760 files inspected, 5 offenses detected, 5 offenses corrected
```
|
|
|
|
|
|
|
|
| |
The original message from Zeitwerk is "can't reload, please call
loader.enable_reloading before setup (Zeitwerk::Error)", which is not
very informative for Rails programmers.
Rails should err with a message worded in terms of its interface.
|
| |
|
| |
|
|
|
|
|
|
| |
startercc
https://github.com/sporkmonger/addressable/pull/270
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regression for fixture loading
d8d6bd5 makes fixture loading to bulk statements by using
`execute_batch` for sqlite3 adapter. But `execute_batch` is slower and
it caused the performance regression for fixture loading.
In sqlite3 1.4.0, it have new batch method `execute_batch2`. I've
confirmed `execute_batch2` is extremely faster than `execute_batch`.
So I think it is worth to upgrade sqlite3 to 1.4.0 to use that method.
Before:
```
% ARCONN=sqlite3 bundle exec ruby -w -Itest test/cases/associations/eager_test.rb -n test_eager_loading_too_may_ids
Using sqlite3
Run options: -n test_eager_loading_too_may_ids --seed 35790
# Running:
.
Finished in 202.437406s, 0.0049 runs/s, 0.0049 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
ARCONN=sqlite3 bundle exec ruby -w -Itest -n test_eager_loading_too_may_ids 142.57s user 60.83s system 98% cpu 3:27.08 total
```
After:
```
% ARCONN=sqlite3 bundle exec ruby -w -Itest test/cases/associations/eager_test.rb -n test_eager_loading_too_may_ids
Using sqlite3
Run options: -n test_eager_loading_too_may_ids --seed 16649
# Running:
.
Finished in 8.471032s, 0.1180 runs/s, 0.1180 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
ARCONN=sqlite3 bundle exec ruby -w -Itest -n test_eager_loading_too_may_ids 10.71s user 1.36s system 95% cpu 12.672 total
```
|
| |
|
|\
| |
| | |
Bump RuboCop to 0.66.0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
### Summary
RuboCop 0.66.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.66.0
And rubocop-0-66 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.84.0
RuboCop 0.66.0 fixed the false negative to indentation for
modifier. And this PR applied the auto-correction fixed by it.
https://github.com/rubocop-hq/rubocop/pull/6792
In addtion, this PR is also updating the following 4 gems that
RuboCop depends on.
- Update Psych gem ... https://github.com/rubocop-hq/rubocop/pull/6766
- Update Parser gem to 2.6.2.0 that supports Ruby 2.5.5 and 2.6.2 ...
https://github.com/whitequark/parser/blob/v2.6.2.0/CHANGELOG.md#changelog
- Remove powerpack gem ... https://github.com/rubocop-hq/rubocop/pull/6806
- Update unicode-display_width gem ... https://github.com/rubocop-hq/rubocop/pull/6813
|
| |
| |
| |
| | |
Was just pushed.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
Since https://github.com/puma/puma/pull/1700, the default host is
correctly used. So `localhost` is used instead of `0.0.0.0`.
As a result, the log output on restart is changed, and the restart test
fails on Puma 3.12.1.
https://travis-ci.org/rails/rails/jobs/509239592#L2303-L2305
Specify binding explicitly to avoid being affected by Puma changes.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
racc 1.4.15 includes fixes for compiling with Ruby 2.7 since
[ruby/ruby@3d1c86a](https://github.com/ruby/ruby/commit/3d1c86a).
Before:
```
ruby -v
ruby 2.7.0dev (2019-03-07 trunk 67189) [x86_64-linux]
bundle install
...
Fetching racc 1.4.14
Installing racc 1.4.14 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc
/home/u/.rbenv/versions/2.7.0-dev/bin/ruby -I
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/2.7.0 -r
./siteconf20190307-14242-16jzp6c.rb extconf.rb
checking for rb_ary_subseq()... yes
creating Makefile
current directory:
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc
make "DESTDIR=" clean
current directory:
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14/ext/racc
make "DESTDIR="
make: *** No rule to make target
'/home/u/.rbenv/versions/2.7.0-dev/include/ruby-2.7.0/defines.h', needed
by
'cparse.o'. Stop.
make failed, exit code 2
Gem files will remain installed in
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/racc-1.4.14
for
inspection.
Results logged to
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0-static/racc-1.4.14/gem_make.out
An error occurred while installing racc (1.4.14), and Bundler cannot
continue.
Make sure that `gem install racc -v '1.4.14' --source
'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
racc
```
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rails.autoloader and Rails.once_autoloader was just tentative API good
enough for a first patch. Rails.autoloader is singular and does not
convey in its name that there is another autoloader. That might be
confusing, for example if you set a logger and miss traces. On the other
hand, the name `once_autoloader` is very close to being horrible.
Rails.autoloaders.main and Rails.autoloaders.once read better for my
taste, and have a nice symmetry. Also, both "main" and "once" are four
letters long, short and same length.
They are tagged as "rails.main" and "rails.once", respectively.
References #35235.
|
|
|
|
|
| |
Zeitwerk is a strong dependency, planned to replace AS::Dependencies. A
line in the generated Gemfile does not convey this as much.
|
| |
|
|
|
|
| |
Follow up to #35154.
|
|
|
|
| |
3.5.2 (September 07, 2017) is a little older.
|
|\
| |
| | |
Update Sneakers to the latest version
|
| |
| |
| |
| |
| | |
Sneakers 2.11.0 has a more recent Bunny dependency which squashes some
Ruby 2.6 warnings tickled by ActiveJob tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a minor update to the named methods for the following:
- s/desired_capabilities/capabilities
- s/driver_options/capabilities
Since they are all the same thing we should keep the name the same
throughout the feature.
Updated docs to match / be a little bit clearer
Also updated the Gemfile for selenium-webdriver.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* There is currently no way to define specific browser capabilities since our SystemTest driver override the `option` key [Ref](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/driver.rb#L35)
This option key is used internally by selenium to add custom capabilities on the browser.
Depending on the Browser, some option are allowed to be passed inside a hash, the driver takes care of setting whatever you passed on the driver option. An example [here](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/driver.rb#L35) where you are allowed to pass args such as `--no-sandbox` etc
However this behavior was only meant for backward compatibility and as you can see it's deprecated.
The non-deprecated behavior is to create a `<Driver>::Option` object containing all the capabilities we want. This is what we [currently do](https://github.com/rails/rails/blob/a07d0680787ced3c04b362fa7a238c918211ac70/actionpack/lib/action_dispatch/system_testing/browser.rb#L34-L36) when chrome or firefox are in headless mode.
This PR allows to pass a block when calling `driven_by`, the block will be pased a `<Driver>::Option` instance. You can modify this object the way you want by adding any capabilities. The option object will be then passed to selenium.
```ruby
driven_by :selenium, using: :chrome do |driver_option|
driver_option.add_argument('--no-sandbox')
driver_option.add_emulation(device: 'iphone 4')
end
```
|
|
|
|
|
|
|
| |
It has been moved to the a fork as part of https://github.com/rails/rails/pull/31671 .
That was since to that time a required PR was not yet merged.
Now the queue_classic master branch is compatible to recent pg versions,
so that there's no need to keep using a fork.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
### Summary
RuboCop 0.63.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.63.0
And rubocop-0-63 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.83.0
Currently, RuboCop version specified for Gemfile.lock (0.61) and
Code Climate (0.60) are different.
- https://github.com/rails/rails/blob/v6.0.0.beta1/Gemfile.lock#L407
- https://github.com/rails/rails/blob/v6.0.0.beta1/.codeclimate.yml#L26
This PR matches these versions to 0.63.
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|