Commit Graph

457 Commits

Author SHA1 Message Date
utilum
6dd484deef bundle update resque-scheduler to latest version
Resque 2.0 includes grammar fixes for warnings tickled by our tests. Updating resque-scheduler also requires and updates resque to version 2.0.

```
$ ruby -v
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-linux]
```
2019-05-08 18:05:44 +02:00
Prathamesh Sonpatki
fa0ce5c790
Bump bootsnap to a version with disables iseq_cache for Ruby 2.5
- Refs https://github.com/Shopify/bootsnap/pull/257
2019-04-26 12:55:28 +05:30
Rafael Mendonça França
9834be6565
Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
Xavier Noria
1b2efe5a11 upgrades Zeitwerk to 2.1.4
This commit more or less undoes 9b5401f, restores autoloaded? not to
touch the descendants tracker, and autoloaded_constants because it is
documented in the guide.
2019-04-23 01:18:21 +02:00
utilum
57476be712 Update Rake to the latest version
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](2b89e56897/tests.log).

ruby 2.7.0dev (2019-04-18 trunk 67602) [x86_64-linux]
2019-04-18 12:13:26 +02:00
Koichi ITO
c6379fd27f Bump RuboCop to 0.67.2
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
```
2019-04-16 17:58:24 +09:00
Xavier Noria
7b6b10542d improves the reloading disabled error message
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.
2019-04-11 23:10:13 +02:00
Xavier Noria
9b5401fcc9 depend on Zeitwerk 2.1.0 2019-04-09 11:06:44 +02:00
Xavier Noria
57c7cbb162 depend on Zeitwerk 2 2019-04-07 13:05:26 +02:00
Ryuta Kamizono
bbd8dd9cca Bump addressable to 2.6.0 to fix warning: assigned but unused variable - startercc
https://github.com/sporkmonger/addressable/pull/270
2019-04-05 11:00:21 +09:00
Fumiaki MATSUSHIMA
61c4be4777 Output junit format test report 2019-04-04 14:34:46 +09:00
Ryuta Kamizono
0908184e4c Use execute_batch2 rather than execute_batch to fix performance 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
```
2019-04-04 03:27:46 +09:00
George Claghorn
11d66a8e4c Specify Active Storage's dependency on Active Job 2019-03-30 10:03:19 -04:00
Ryuta Kamizono
bde5f3bfc6
Merge pull request #35761 from koic/bump_rubocop_to_0_66_0
Bump RuboCop to 0.66.0
2019-03-27 08:38:57 +09:00
Koichi ITO
1e1adadb41 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
2019-03-27 07:57:43 +09:00
Xavier Noria
c0f29ab75e includes bootsnap 1.4.2-java in Gemfile.lock
Was just pushed.
2019-03-26 21:32:17 +01:00
Xavier Noria
379d7e8bfa bumps Zeitwerk and Bootsnap 2019-03-26 20:30:18 +01:00
Guillermo Iguaran
2512f24ef4 Use webdrivers instead of chromedriver-helper for AV UJS tests 2019-03-24 16:05:30 -05:00
Xavier Noria
3acf5f71f0 Depend on Zeitwerk 1.4.2 2019-03-23 14:42:24 +01:00
yuuji.yaginuma
efb706daad Fix server restart test on Puma 3.12.1
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.
2019-03-22 07:49:38 +09:00
Xavier Noria
3d0850bfb8 depend on Zeitwerk 1.4.0 2019-03-19 13:07:31 +01:00
Xavier Noria
85984e5031 bumps Zeitwerk 2019-03-14 14:42:12 -07:00
Rafael Mendonça França
a783e41712
Fix gemfile.lock 2019-03-13 14:17:35 -04:00
Xavier Noria
96242410a8 bump Zeitwerk to 1.3.3 2019-03-11 16:11:35 -07:00
Sharang Dashputre
c2de1f79ab Don't lock the webpacker gem by its patch version 2019-03-09 05:29:36 +05:30
Sharang Dashputre
8eaffa1945 Use the latest stable release of webpacker 2019-03-09 00:14:17 +05:30
utilum
bfd8e4f709 Update racc to latest version
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
```
2019-03-07 12:30:59 +01:00
Xavier Noria
71e23d33ae Bump Zeitwerk 2019-03-06 12:08:08 -08:00
Rafael Mendonça França
5e6e505083
Preparing for 6.0.0.beta2 release 2019-02-25 17:45:04 -05:00
Xavier Noria
24092b7115 Upgrade Zeitwerk to 1.3.1 2019-02-23 05:16:03 -08:00
Xavier Noria
159b9c40db bump Zeitwerk 2019-02-21 14:27:32 -08:00
Xavier Noria
07346c4b35 upgrades Zeitwerk to 1.2.0 2019-02-17 10:10:05 -08:00
Xavier Noria
870377915a Replace autoloader accessors with Rails.autoloaders.{main,once}
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.
2019-02-14 22:34:16 -08:00
Xavier Noria
c36b6c8d38 Let Zeitwerk be a dependency of Active Support
Zeitwerk is a strong dependency, planned to replace AS::Dependencies. A
line in the generated Gemfile does not convey this as much.
2019-02-13 12:27:53 -08:00
Xavier Noria
821d6c694c Zeitwerk integration 2019-02-12 02:28:04 -08:00
yuuji.yaginuma
116a519d30 Update Gemfile.lock to reflect sqlite3 update
Follow up to #35154.
2019-02-05 08:44:57 +09:00
Ryuta Kamizono
1cfa913948 Relax version locking of the selenium-webdriver
3.5.2 (September 07, 2017) is a little older.
2019-01-30 17:27:37 +09:00
Ryuta Kamizono
bf42e1506b
Merge pull request #35092 from utilum/update_sneakers_to_latest_version
Update Sneakers to the latest version
2019-01-30 14:19:05 +09:00
utilum
6f4fba43bd 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.
2019-01-29 23:52:54 +01:00
Eileen Uchitelle
1a4f613072 Rename methods and update docs
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.
2019-01-29 11:55:30 -05:00
Edouard CHIN
01a26e581f Implement a way to add browser capabilities:
* There is currently no way to define specific browser capabilities since our SystemTest driver override the `option` key [Ref](a07d068078/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](a07d068078/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](a07d068078/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
  ```
2019-01-29 08:50:29 -05:00
Lars Kanis
be838262e1 Switch queue_classic back to origin repository
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.
2019-01-25 20:01:47 +01:00
Koichi ITO
43a9f4f7ca Bump RuboCop to 0.63.0
### 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.
2019-01-19 18:52:09 +09:00
Rafael Mendonça França
5a0230c67f
Preparing for 6.0.0.beta1 release 2019-01-18 15:42:12 -05:00
Rafael Mendonça França
3219e4aef1
Use released webpacker 2019-01-17 17:21:09 -05:00
George Claghorn
0decd2ddc4 Import Action Text 2019-01-04 22:22:49 -05:00
George Claghorn
ec83d56214 Bump Nokogiri for sparklemotion/nokogiri@bf41ba0 2018-12-31 20:33:26 -05:00
George Claghorn
f2a5c1a541 Fix adding a rich_text_area to a form with no model 2018-12-31 12:16:21 -05:00
George Claghorn
dce22ba477 Bump Nokogiri for Ruby 2.6 compatibility 2018-12-31 11:59:09 -05:00
Matthew Draper
a796b993ad Switch to released rb-inotify 0.10.0
It contains guard/rb-inotify#79, which is what we were waiting for.
2018-12-31 00:38:05 +10:30