Commit Graph

429 Commits

Author SHA1 Message Date
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
George Claghorn
a5b2fff64c Import Action Mailbox 2018-12-25 21:32:35 -05:00
Ryuta Kamizono
28dacff5ed Eliminate "warning: assigned but unused variable - testEof"
https://github.com/ammar/regexp_parser/pull/57

```
% be ruby -w -Itest test/controller/filters_test.rb
/Users/kamipo/src/github.com/rails/rails/vendor/bundle/ruby/2.5.0/gems/addressable-2.5.2/lib/addressable/idna/pure.rb:154: warning: assigned but unused variable - startercc
/Users/kamipo/src/github.com/rails/rails/vendor/bundle/ruby/2.5.0/gems/regexp_parser-1.2.0/lib/regexp_parser/scanner.rb:1146: warning: assigned but unused variable - testEof
Run options: --seed 32647

# Running:

...................................................

Finished in 0.291176s, 175.1518 runs/s, 343.4349 assertions/s.
51 runs, 100 assertions, 0 failures, 0 errors, 0 skips
```
2018-12-19 06:03:25 +09:00
Vinicius Stock
3b7a4d3d75
Upgrade Rubocop to 0.61.1 and fix offenses 2018-12-10 19:22:56 -02:00
David Rodríguez
f173ec77fc Abort early if generator command fails (#34420)
* No need to go through ruby

* Abort early if a generator command fails

* Reuse `rails_command` method

* Bump thor minimum dependency to 0.20.3

* Add some minimal docs

* Add a changelog entry

* Restore original logging
2018-12-07 15:01:32 +09:00
George Claghorn
148110e70c Extract ActionMailbox::PostfixRelayer 2018-11-25 15:36:08 -05:00
Rafael Mendonça França
059d4202de Make sure we are using a working version of thor locally 2018-11-09 22:00:58 -05:00
Rafael Mendonça França
96d77ef87a bundle update 2018-11-09 17:21:08 -05:00
Rafael Mendonça França
fa2cb55fda Upgrade thor to 0.20.1 2018-11-09 17:20:45 -05:00
yuuji.yaginuma
b8b93f5c9b Use the same version of Rubocop as Code Climate
Related to: #34406
2018-11-09 08:12:36 +09:00
George Claghorn
ebe3d0aaab Add a Rake task for piping to the Postfix ingress 2018-10-19 16:32:38 -04:00
George Claghorn
f33ccec86c Merge branch 'master' into ingresses 2018-10-18 17:39:04 -04:00
George Claghorn
5a8939447b Bump mail to shush mismatched indentation warnings 2018-10-17 12:48:30 -04:00
yuuji.yaginuma
4a51cbba58 Bump mail to 2.7.1 2018-10-14 08:33:40 +09:00
George Claghorn
6b7eac5c51 Accept inbound emails from a variety of ingresses 2018-10-11 12:51:13 -04:00
Gannon McGibbon
2e53c2b130 Add test retries for railties 2018-10-11 10:43:29 -04:00
George Claghorn
96a4528560 Test against Rails master 2018-10-08 21:03:40 -04:00
Javan Makhmali
b1f69fa126 Test against Rails master 2018-10-08 16:47:48 -04:00
Greg Molnar
84744b4c0d update nokogiri 2018-10-05 12:24:20 -07:00
yuuji.yaginuma
cab17ffe4e Remove unnecessary coffee-rails
Since we no longer use coffeescript in the generated files by
4838c1716a0340137d858fab49bf460e23be5a4b, this is no longer necessary.
2018-10-02 10:45:29 +09:00
David Heinemeier Hansson
2dfec5ec85 Use released version of Rails 5.2.0 as the dependency 2018-10-01 17:04:46 -07:00
David Heinemeier Hansson
4838c1716a
Make Webpacker the default JavaScript compiler for Rails 6 (#33079)
* Use Webpacker by default on new apps

* Stop including coffee-rails by default

* Drop using a js_compressor by default

* Drop extra test for coffeescript inclusion by default

* Stick with skip_javascript to signify skipping webpack

* Don't install a JS runtime by default any more

* app/javascript will be the new default directory for JS

* Make it clear that this is just for configuring the default Webpack framework setup now

* Start using the Webpack tag in the default layout

* Irrelevant test

* jQuery is long gone

* Stop having asset pipeline compile default application.js

* Add rails-ujs by default to the Webpack setup

* Add Active Storage JavaScript to application.js pack by default

* Consistent quoting

* Add Turbolinks to default pack

* Add Action Cable to default pack

Need some work on how to set the global consumer that channels will
work with. @javan?

* Require all channels by default and use a separate consumer stub

* Channel generator now targets Webpack style

* Update task docs to match new generator style

* Use uniform import style

* Drop the JS assets generator

It was barely helpful as it was. It’s no longer helpful in a Webpacked
world. Sayonara!

* Add app/javascript to the stats directories

* Simpler import style

Which match the other imports.

* Address test failures from dropping JS compilation (and compression)

* webpacker-default: Modify `AssetsGeneratorTest`

Before:

```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 46201

F

Failure:
AssetsGeneratorTest#test_assets [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:12]:
Expected file "app/assets/javascripts/posts.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:10

.

Finished in 0.031343s, 63.8101 runs/s, 95.7152 assertions/s.
2 runs, 3 assertions, 1 failures, 0 errors, 0 skips
```

After:

```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 43571

..

Finished in 0.030370s, 65.8545 runs/s, 65.8545 assertions/s.
2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
```

* webpacker-default: Modify `ChannelGeneratorTest`

Before:

```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 8986

.F

Failure:
ChannelGeneratorTest#test_channel_with_multiple_actions_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:43]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:34

.F

Failure:
ChannelGeneratorTest#test_channel_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:29]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:22

E

Error:
ChannelGeneratorTest#test_cable_js_is_created_if_not_present_already:
Errno::ENOENT: No such file or directory @ apply2files - /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/fixtures/tmp/app/assets/javascripts/cable.js

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:60

F

Failure:
ChannelGeneratorTest#test_channel_suffix_is_not_duplicated [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:87]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:80

F

Failure:
ChannelGeneratorTest#test_channel_on_revoke [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:77]:
Expected file "app/assets/javascripts/cable.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:68

Finished in 0.064384s, 108.7227 runs/s, 481.4861 assertions/s.
7 runs, 31 assertions, 4 failures, 1 errors, 0 skips
```

After:

```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 44857

.......

Finished in 0.060243s, 116.1961 runs/s, 697.1764 assertions/s.
7 runs, 42 assertions, 0 failures, 0 errors, 0 skips
```

* Fix shared generator tests.

* webpacker-default: Modify `ControllerGeneratorTest`

The JS assets generator was dropped. ref. 46215b1794

* Revert "Simpler import style". It's currently failing with an error of "TypeError: undefined is not an object (evaluating '__WEBPACK_IMPORTED_MODULE_2_activestorage___default.a.start')". Waiting for @javan to have a look.

This reverts commit 5d3ebb71059f635d3756cbda4ab9752027e09256.

* require webpacker in test app

* Add webpacker without making the build hang/timeout. (#33640)

* use yarn workspaces to allow for installing unreleased packages and only generate js/bootsnap when required

* no longer need to have webpacker in env templates as webpacker moved this config to yml file

* Fix rubocop violation

* Got the test passing for the running scaffold

* update expected lines of code

* update middleware tests to account for webpacker

* disable js in plugins be default to get the tests passing (#34009)

* clear codeclimate report issues

* Anything newer than currently released is good

* Use Webpacker development version during development of Rails

* Edge should get development webpacker as well

* Add changelog entry for Webpacker change
2018-09-30 22:31:21 -07:00
David Heinemeier Hansson
8a0a103495 ActionMailroom -> ActionMailbox
We didn't end up using the mailroom metaphor directly, so let's stick with a more conventional naming strategy.
2018-09-28 12:19:43 -07:00
utilum
bf8afe7a0f Update backburner to the latest version
version 1.5.0 includes to warning fixes that show on tests:
cd9670146b
4dfa22bda1
2018-09-28 13:14:14 +02:00
utilum
9951e69614 update mini_magick to the latest version
v 4.9.2 avoids some warnings that show in our tests.

Although Gemfile.lock currently specifies 4.8.0, the CI already runs 4.9.2
so 4.8.0 warnings do not show in our CI logs.
2018-09-24 09:50:44 +02:00
David Heinemeier Hansson
a6146d2e89 First end-to-end rickety test 2018-09-17 22:15:27 -07:00
David Heinemeier Hansson
03b1841007 Add dummy app for testing 2018-09-17 17:48:32 -07:00
yuuji.yaginuma
a569a27fc7 Bump chromedriver-helper to 2.0 2018-09-16 09:18:12 +09:00
yuuji.yaginuma
d7445bc56f Unlock pg verson
Get a warning about `async_exec`, but it seems that build has passed
through the fix of be48d118ee.
2018-09-15 16:07:03 +09:00