Commit Graph

640 Commits

Author SHA1 Message Date
Damir Zekić
637616153c Upgrade que to 1.3.1
The point of this commit is to ensure no deprecation warnings related to
`job_options` show up when running ActiveJob integration tests.
2022-03-21 13:27:59 +01:00
Xavier Noria
b7ae3cba6d Load with Zeitwerk 2022-03-05 08:19:49 +01:00
Yasuo Honda
c689263e2b Bump jsbindling-rails and cssbundling-rails
When both jsbundling-rails v1.0.1 and cssbundling-rails v1.1.0
are used at the same time, thor shows the prompt to replace `bin/dev` or
not.

jsbundling-rails v1.0.2 addresses this issue.
https://github.com/rails/jsbundling-rails/releases/tag/v1.0.2
https://github.com/rails/jsbundling-rails/pull/95
2022-03-01 15:18:59 +09:00
Edouard CHIN
7253cac513 Bump Nokogiri to 1.13.3, previous version don't support Ruby 3.1:
- I was trying to work on Rails using Ruby 3.1 but the locked
  bundler dependencies didn't resolve. The previously locked
  version of Nokogiri (v1.12.5) has a constraint on Ruby
  `[">= 2.5".freeze, "< 3.1.dev".freeze]`.

  Things works correctly on CI now because the Gemfile.lock get
  deleted ed61405b4b/Dockerfile (L134)

  Bumping to 1.13.3 as that's what CI uses anyway
2022-02-28 20:00:22 +01:00
Matthew Draper
e0edc1aa1d Switch from fork to queue_classic beta release 2022-02-27 22:55:41 +10:30
Ghouse Mohamed
715f117ac9 Bumps rubocop version to 1.25.1 2022-02-23 21:18:33 +05:30
Petrik
569d4ed196 Upgrade to sdoc 2.3.1
Fixes the following error in Firefox/Linux:

    Ctrl-C broken (Uncaught TypeError: $.browser is undefined)
2022-02-14 19:36:22 +01:00
Yasuo Honda
65f350e176 Released version of rbtree 0.4.5 supports Ruby 3.2.0dev
https://github.com/mame/rbtree is mirror of rbtree gem
and rbtree 0.4.5 has been released to support Ruby 3.2.0dev.
https://rubygems.org/gems/rbtree/versions/0.4.5

Related to https://github.com/rails/rails/pull/44152
2022-02-07 13:00:58 +09:00
Hartley McGuire
f83f5c81af fix Que integration tests for Active Job
Replace Que.* settings that were removed in Que 1.0 with options passed
to Que::Locker. The Locker class creates its own thread for managing
work distribution, so the Thread created in the QueJobsManager was also
removed.
2022-01-27 16:24:16 -05:00
Yasuo Honda
cc86e13fc9 Use released version of pg 1.3
pg 1.3.0 which supports Ruby 3.2.0dev has been released.
https://rubygems.org/gems/pg/versions/1.3.0

Follow up #44007
2022-01-25 21:15:48 +09:00
Azzen Abidi
3f13828392
[ci skip] Added a note about Github Codespaces' warning (#44148)
* Added a note about Github Codespaces warning

Related discussion: https://discuss.rubyonrails.org/t/issues-with-github-codespaces-setup-to-contribute-to-rails/79731

* updated docs to omit Codespace's warning 

[Original answer](https://github.com/rails/rails/pull/44148#issuecomment-1015022184)

* updated gems delayed_job to 4.1.10 && delayed_job_active record to 4.1.7

[Azzen Abidi + Rafael Mendonça França]
2022-01-21 09:08:50 -05:00
Jean Boussier
18e3226c9b Point blade to the official repository 2022-01-12 14:52:41 +01:00
Jean Boussier
c2da0add54 Fork rbtree and blade to fix ruby-head CI
They both need very minor fixes.
2022-01-12 11:07:28 +01:00
Yasuo Honda
f1f3ef5f90 Use pg gem 1.3.0.rc1 to support Ruby 3.2
Ruby 3.2.0dev removed `rb_cData`, `pg` gem cannot be installed with Ruby 3.2.0dev.

Refer Rails CI build failure at:
https://buildkite.com/rails/rails/builds/83631#fbe41b47-08d3-4b4a-8f17-692da1ab1ddf

This fix has been released as `1.3.0.rc1`

Refer:
https://github.com/ged/ruby-pg/issues/413
7c738ce5e6
2022-01-06 14:53:38 +09:00
Rafael Mendonça França
b65a3054e6
Merge pull request #44083 from rails/rm-temporary-mail-fix
Temporarily add net-gems as dependencies of frameworks that use mail
2022-01-05 18:42:47 -05:00
Petrik
199b66027b Update sdoc to 2.3.0
With the migration of SDoc to a frameless layout, the URLs to assets
were made absolute instead of relative because of Turbolinks asset
tracking.  But absolute URLs fail when we have multiple versions of the
docs in subdirectories like: https://api.rubyonrails.org/v6.1/

This version of sdoc restores relative URLs by disabling the Turbolinks
asset tracking.

Fixes #44042
2022-01-05 22:55:21 +01:00
Rafael Mendonça França
5dd292f551
Temporarily add net-gems as dependencies of frameworks that use mail
In Ruby 3.1 those gems were dropped from the stdlib, so they need to be
explicitly installed. Mail should be doing this for us, but since it
cares about Ruby < 2.6, and those gems can't be installed there, they
can't add them to the gemspec without dropping support to old rubies.

Since we don't care about Ruby < 2.7, we can just require them in all
frameworks that use mail.
2022-01-05 17:42:40 +00:00
Rafael Mendonça França
55765121ad
Update development dependencies 2022-01-04 23:48:41 +00:00
Rafael Mendonça França
0afa65723a
Make sure test pass with minitest 5.15 2021-12-15 21:20:38 +00:00
Rafael Mendonça França
1d08b63e5b
Upgrade capybara to work with Ruby 3.1 and earlier 2021-12-08 21:44:11 +00:00
Rafael Mendonça França
83d85b2207
Start Rails 7.1 development 2021-12-07 15:52:30 +00:00
Rafael Mendonça França
5fa7049856
Use ActiveRecord::FixtureSet.signed_global_id defined by the globalid gem
Also make explicit that actiontext depends on the globalid gem.
2021-11-24 22:34:37 +00:00
Xavier Noria
bcb2a112c7 Relax dependency on Zeitwerk 2.5 2021-10-21 20:30:36 +02:00
Ryuta Kamizono
dd855fd0b4 Rails 7.0 requires selenium-webdriver >= 4.0.0
New Rails 7.0 generator produces a Gemfile with "selenium-webdriver",
">= 4.0.0" to support Ruby 3.0 (#43270), and latest webdrivers 5.0.0
requires selenium-webdriver ~ 4.0.

https://rubygems.org/gems/webdrivers/versions/5.0.0

It is time to drop selenium-webdriver 3.x support for Rails 7.0.
2021-10-20 22:48:05 +09:00
Xavier Noria
8f6f4407ea Depend on Zeitwerk 2.5 2021-10-20 14:21:24 +02:00
Yasuo Honda
6261c42a74 No need to specify webdrivers version to support selenium-webdriver 4.0.0
`webdrivers` 4.7.0 has been released including https://github.com/titusfortner/webdrivers/pull/218
which supports selenium-webdriver 4.0.0

Refer
https://github.com/titusfortner/webdrivers/blob/main/CHANGELOG.md#470-2021-10-14

Related to #43456
2021-10-15 08:45:31 +09:00
Rafael Mendonça França
0535f85aff
Require Dalli 3 in our test suite
The code itself still works with Dailli 2, but we are now only testing
against Dalli 3.
2021-10-14 17:49:49 +00:00
Yasuo Honda
4797c15665 Bump dalli from 2.7.11 to 3.0.1 in Gemfile.lock 2021-10-14 17:49:26 +00:00
Xavier Noria
6baa6d2ca9 Depend on Zeitwerk 2.5.0.beta6 2021-10-14 11:12:20 +02:00
Yasuo Honda
d2033eb03a Use webdriver 4.6.1 or higher to support selenium-webdriver 4.0.0
This pull request forces bundler to use webdriver 4.6.1 or higher
to workaround #43455 until titusfortner/webdrivers#218 is merged and
released.

Fix #43455
https://github.com/titusfortner/webdrivers/pull/218
2021-10-14 13:59:00 +09:00
Rafael Mendonça França
0bba05100d
Fix the development container to set the right permissions to bundler 2021-10-12 22:16:38 +00:00
David Heinemeier Hansson
fb1ab3460a
Make Sprockets more optional, offer Propshaft as alternative (#43261)
* Make Sprockets more optional, offer Propshaft as alternative

* Whups, local reference

* No longer used

* Spacing

* Need explicit sprockets-rails inclusion now

* Manually require the sprockets railtie

* Don't need these changes right now

* Kick off another build

* Fix tests

* DRY up test

* Require railtie when using sprockets

* Introduce option to skip asset pipeline

* No longer relevant

* Always have to return

* Gone

* Add helper for skip_sprockets?

* Fix guard statement

* Use latest gems

* Include propshaft

* fix tests for #43261 (#43277)

* help fix tests for #43261

skip_sprockets? should not be called on options

:skip_sprockets is no longer a value in the option hash, so
skip_sprockets? should not be called on it

move --asset-pipeline to shared generator

skip_sprockets? is defined on app_base, and used in the plugin
generator to determine whether to add the engine's assets to the dummy
sprockets manifest, so I believe it makes sense to include in both
generators

Because of this change, I also changed the shared test back to testing
against non-sprockets

add skip_sprockets to Gemfile template vars

Mocking skip_sprockets? in app_base generator

fix more generator tests

* use skip_sprockets? everywhere

* Use latest propshaft

* Update `AssetUrlHelper` docs to list both asset pipeline gems (#43328)

* Update to latest Propshaft

* Bump Propshaft again

* Ask for latest

* Use latest propshaft

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
Co-authored-by: Richard Macklin <1863540+rmacklin@users.noreply.github.com>
2021-10-09 17:03:05 +02:00
John Hawthorn
e47a49ffdf Use queue_classic branch which works on psql 14
This fixes the failing CI for ActiveJob.

This uses my fork, we can switch back when the following PR is merged:

    https://github.com/QueueClassic/queue_classic/pull/334
2021-10-04 14:38:56 -07:00
Xavier Noria
d59e729fbf Depend on Zeitwerk 2.5.0.beta5 2021-09-29 09:25:40 +02:00
Xavier Noria
e44ce53f78 Depend on Zeitwerk 2.5.0.beta4 2021-09-22 08:47:21 +02:00
Rafael Mendonça França
50d60e4f7c
Allow Marcel to be released following semver 2021-09-20 17:19:57 -04:00
David Heinemeier Hansson
780753f571 Use debug 1.1+ for the debugger + log quieting 2021-09-20 15:18:30 +02:00
Rafael Mendonça França
d177551c30
Preparing for 7.0.0.alpha2 release 2021-09-15 18:22:51 -04:00
Rafael Mendonça França
9b7be48212
Preparing for 7.0.0.alpha1 release 2021-09-15 17:55:08 -04:00
Xavier Noria
7ffe204a08 Upgrade debug to 1.0.0 2021-09-08 20:33:22 +02:00
Xavier Noria
89801b2a43 Depend on ruby/debug, replacing Byebug
ruby/debug is a new debugger that is going to ship with CRuby.

It makes sense for Rails to switch to this one because that is
where the language is heading, and because Byebug is not fully
compatible with Zeitwerk. See

    https://github.com/deivid-rodriguez/byebug/issues/564

While ruby/debug has not been heavily tested with Zeitwerk,
casual usage seems to suggest it works without issues, including
explicit namespaces, which is where Byebug and Zeitwerk conflict.

Byebug is terrific, thanks a lot for all these years. ❤️
2021-09-08 17:35:41 +02:00
David Heinemeier Hansson
83808166e6
Add --css app generator option (#43177)
* Add --css to preconfigure a CSS bundler/processor

* Simpler conditional

* Add CSS gems

* Test CSS options
2021-09-07 17:48:13 +02:00
David Heinemeier Hansson
7595c922a6
Use the combined jsbundling-rails gem instead of individual js bundler gems (#43172)
* Use the combined jsbundling-rails gem instead of individual js bundler gems

* Remove Webpacker remnants

* Replace webpacker with jsbundling-rails
2021-09-06 16:44:44 +02:00
David Heinemeier Hansson
82e4432058
Javascript generator option with choices (#43160)
* Switch to a single controller option for choosing JavaScript approach

* Remove remnants of webpacker specific work within Rails

* No longer used

* Missing space

* Raise if unknown option is passed

* Style

* Use latest versions

* Make channels setup generic to all node setups

* Make Action Text installer work with any node package manager

* Explaining variables are not useless

* Rubocop pleasing

* Don't rely on Rails.root

Tests don't like it!

* Rubocopping

* Assume importmap

* No longer relevant

* Another cop

* Style

* Correct installation notice

* Add dependencies for action cable when adding a channel

* Fix paths to be relative to generator

* Just go straight to yarn, forget about binstub

* Fix tests

* Fixup installer, only yarn once

* Test generically with run

* Style

* Fix reference and reversibility

* Style

* Fix test

* Test pinning dependencies

* Remove extra space

* Add more tests

* Use latest dependencies

* Relegated this to controllers

* Refactor ChannelGenerator + more tests

Use a uniform level of abstraction
2021-09-04 11:53:57 +02:00
Xavier Noria
174ee7bb60 Depends on Zeitwerk 2.5.0.beta3 2021-09-01 15:31:04 +02:00
David Heinemeier Hansson
d5b9618da1
Remove default reliance on Sass and CSS generators (#43110)
* No benefit to having actiontext css as scss

* Update test

* Update docs

* No more css assets to be generated

New world, new CSS frameworks, new needs.

* SCSS is becoming optional

* Remove Sass as a default-on setting

But continue to make it easy to add.

* Update docs

* No longer used

* Update tests

* Update docs

* Update docs

* No longer used

* No longer by default

* Fix tests

* Promote Tailwind CSS as an alternative to Sass

* Fix test and copy task

* Update railties/lib/rails/generators/rails/app/templates/Gemfile.tt

Co-authored-by: Kevin Newton <kddnewton@gmail.com>

Co-authored-by: Kevin Newton <kddnewton@gmail.com>
2021-08-26 13:40:25 +02:00
David Heinemeier Hansson
af7428c4ac
Replace webpack with importmapped Hotwire as default js (#42999)
* Turbolinks is being replaced with Hotwire

* Make --webpack opt-in

* Don't use specific webpacker installers any more in preparation for next Webpacker

* Update railties/lib/rails/app_updater.rb

Co-authored-by: Alex Ghiculescu <alex@tanda.co>

* Trailing whitespace

* Convert to Turbo data attribute for tracking

* Default is no webpack, no hotwire

* Swap out turbolinks references for hotwire

* Drop explicit return

* Only generate package.json if using webpack

* Only create package.json in webpack mode

* Only create app/javascript in webpack mode

* Generate correct style/js links based on js mode

* Fix tests from changed output format

Not sure why these are showing up in this PR, though.

* Rubocopping

* Stick with webpack for the test app for now

* Adjust tests

* Replace minitest-reporters with minitest-ci (#43016)

minitest-reporters is used to create junit xml reports on CI.

But when it loads before rails minitest plugin makes
`Rails::TestUnitReporter` not being added as a reporter.

minitest-ci is now only loaded at ci and does not interferes with
rails minitest plugins. And keeps junit reports workings

* Too heavy handed to actually run bundle

Just like we don't auto-migrate

* Pin js frameworks in importmap

Instead of having importmap preconfigure it.

* Match updated app/javascript path

* No need for the explaining comment

* Fixes test cases for replace webpack with importmapped Hotwire as default js (#42999)

* Fix rubocop issues

* Fix more railities test cases

* Fix plugin generator railties shared test cases

* Fix Action Text install generator asset pipeline spec

* They're modules, not files

* Let dev use the latest release as well

So we don't have to replace unexisting dev releases with latest release

* Make Webpack responsible for generating all the JS files it needs

Webpacker 6 has already moved from app/javascript to app/packs.

* Don't add rails/ujs by default any longer

All the ajax/form functionality has been superseded by Turbo. The rest lives in a weird inbetween land we need to address through other means.

* Use new importmap location

* Switch to using turbo-rails and stimulus-rails directly

The hotwire-rails gem does not offer enough value for its indirection

* Use latest Webpacker

* Prevent version resolution requests from getting swallowed

* Use ESM syntax for imports

* Move management of yarn, package.json, etc to Webpacker 6

* Update for Webpacker 6

* Move bin/setup addition to Webpacker as well

* Remove dead tests

* Bump to Webpacker 6.0.0.rc.2

* No longer relevant given the new default is no webpacker

* Rely on Webpacker 6

* No longer relevant

* No longer relevant

* Make cable channel generator work for both webpacker and importmap setups

* Fix tests

* For tests testing importmap way

* Use Webpacker 6 dummy

* RuboCopping

* One more bump to fix webpack-dev-server

* Another bump. Hopefully the last one!

* Also enough to not want turbo tracking on

* Fix tests

* Latest

* Fix tests

* Fix more tests

* Fix tests

Co-authored-by: Alex Ghiculescu <alex@tanda.co>
Co-authored-by: André Luis Leal Cardoso Junior <andrehjr@gmail.com>
Co-authored-by: Abhay Nikam <nikam.abhay1@gmail.com>
Co-authored-by: Guillermo Iguaran <guilleiguaran@gmail.com>
2021-08-26 10:39:36 +02:00
Petrik
0920b02c1d Upgrade azure-storage-blob to use at least 2.0.0
azure-storage-blob 1.1.0 supports ruby 1.9.3 to 2.5:
https://github.com/Azure/azure-storage-ruby/blob/v1.1.0-common/common/README.md

azure-storage-blob 2.0.0 supports ruby 2.3 to 2.7:
https://github.com/Azure/azure-storage-ruby/blob/v2.0.0-blob/common/README.md
2021-08-23 22:03:15 +02:00
Xavier Noria
c192feb3eb Update Gemfile.lock 2021-08-21 10:35:03 +02:00
Koichi ITO
65af100ddd Tweak unreachable assertion tests in the block of assert_raises
I found an unexpected use of assertion in the block of `assert_raise`
when I implemented https://github.com/rubocop/rubocop-minitest/pull/137.
It is expected to be asserted after an exception is raised in
`assert_raise` block, but in actually it is not asserted after an
exception is raised. Therefore, this PR removes or updates assertions
that have not been asserted after an exception has raised.

This PR will add `rubocop-minitest` and enable
`Minitest/UnreachableAssertion` cop to able similar auto-detection,
but will remove `rubocop-minitest` from this PR if you don't like it.
2021-08-17 20:33:08 +09:00