Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/collectiveidea/master' into for…
Browse files Browse the repository at this point in the history
…king-launcher
  • Loading branch information
johnnyshields committed Apr 18, 2022
2 parents 6ab0d17 + 11e0212 commit dfa5561
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 54 deletions.
88 changes: 46 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,72 @@ on:
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || false }}
strategy:
fail-fast: false
matrix:
ruby:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- 'jruby'
ruby: ['2.7', '3.0', '3.1', jruby-head, ruby-head]
rails_version:
- '6.0'
- '6.1'
- '6.0.0'
- '6.1.0'
- '7.0.0'
- 'edge'
include:
# Older Rails
- ruby: '2.2'
rails_version: '3.2'
- ruby: '2.1'
rails_version: '4.1'
- ruby: '2.4'
rails_version: '4.2'
- ruby: '2.4'
rails_version: '5.0'
- ruby: '2.5'
rails_version: '5.1'
- ruby: '2.5'
rails_version: '5.2'
- ruby: 'jruby'
rails_version: '5.2'
# Experimental
- ruby: 'ruby-head'
rails_version: '6.1'
experimental: true
- ruby: 'jruby-head'
rails_version: '6.1'
experimental: true
- ruby: '2.7'
rails_version: 'edge'
experimental: true
- ruby: '3.0'
rails_version: 'edge'
experimental: true
- ruby: 'jruby'
# Rails 5.2
- ruby: 2.6
rails_version: '5.2.0'
- ruby: 2.7
rails_version: '5.2.0'
- ruby: jruby-9.2
rails_version: '5.2.0'

# Ruby 2.6
- ruby: 2.6
rails_version: '6.0.0'
- ruby: 2.6
rails_version: '6.1.0'

# jruby-9.2
- ruby: jruby-9.2
rails_version: '6.0.0'
- ruby: jruby-9.2
rails_version: '6.1.0'

# jruby-9.3
- ruby: jruby-9.3
rails_version: '7.0.0'
- ruby: jruby-9.3
rails_version: 'edge'
experimental: true

#
# The past
#
# EOL Active Record
- ruby: 2.2
rails_version: '3.2.0'
- ruby: 2.1
rails_version: '4.1.0'
- ruby: 2.4
rails_version: '4.2.0'
- ruby: 2.4
rails_version: '5.0.0'
- ruby: 2.5
rails_version: '5.1.0'

continue-on-error: ${{ matrix.rails_version == 'edge' || endsWith(matrix.ruby, 'head') }}

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
continue-on-error: ${{ matrix.experimental || false }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
continue-on-error: ${{ matrix.experimental || false }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
run: bundle exec rspec
- name: Coveralls Parallel
continue-on-error: ${{ matrix.experimental || false }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
4.1.10 - 2022-01-17
===================
* Support for Rails 7.0. NOTE: If you are using Delayed Job independent of Rails, Active Support 7 has dropped classic dependency autoloading. You will need to add and setup zeitwerk for autoloading to continue working in ActiveSupport 7.

4.1.9 - 2020-12-09
==================
* Support for Rails 6.1
Expand Down
24 changes: 18 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,28 @@ end
platforms :jruby do
if ENV['RAILS_VERSION'] == '4.2.0'
gem 'activerecord-jdbcsqlite3-adapter', '< 50.0'
elsif ENV['RAILS_VERSION'] == 'edge' || ENV['RAILS_VERSION'] == '6.1.0.rc2'
gem 'activerecord-jdbcsqlite3-adapter', :github => 'jruby/activerecord-jdbc-adapter'
elsif ENV['RAILS_VERSION'] == '5.0.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 50.0'
elsif ENV['RAILS_VERSION'] == '5.1.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.0'
elsif ENV['RAILS_VERSION'] == '5.2.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 52.0'
elsif ENV['RAILS_VERSION'] == '6.0.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 60.0'
elsif ENV['RAILS_VERSION'] == '6.1.0'
gem 'activerecord-jdbcsqlite3-adapter', '~> 61.0'
else
gem 'activerecord-jdbcsqlite3-adapter'
end
gem 'jruby-openssl'
gem 'mime-types', ['~> 2.6', '< 2.99']

if ENV['RAILS_VERSION'] == 'edge'
gem 'railties', :github => 'rails/rails'
elsif ENV['RAILS_VERSION']
gem 'railties', "~> #{ENV['RAILS_VERSION']}"
else
gem 'railties', ['>= 3.0', '< 6.2']
gem 'railties', ['>= 3.0', '< 8.0']
end
end

Expand All @@ -43,10 +52,10 @@ group :test do
gem 'actionmailer', "~> #{ENV['RAILS_VERSION']}"
gem 'activerecord', "~> #{ENV['RAILS_VERSION']}"
else
gem 'actionmailer', ['>= 3.0', '< 6.2']
gem 'activerecord', ['>= 3.0', '< 6.2']
gem 'actionmailer', ['>= 3.0', '< 8.0']
gem 'activerecord', ['>= 3.0', '< 8.0']
end

gem 'net-smtp' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
gem 'rspec', '>= 3'
gem 'simplecov', :require => false
if /\A2.[12]/ =~ RUBY_VERSION
Expand All @@ -55,6 +64,9 @@ group :test do
else
gem 'simplecov-lcov', :require => false
end
if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] >= '6.0.0'
gem 'zeitwerk', :require => false
end
end

group :rubocop do
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**If you're viewing this at https://github.com/collectiveidea/delayed_job,
you're reading the documentation for the master branch.
[View documentation for the latest release
(4.1.9).](https://github.com/collectiveidea/delayed_job/tree/v4.1.9)**
(4.1.10).](https://github.com/collectiveidea/delayed_job/tree/v4.1.10)**

# Delayed Job

Expand Down
4 changes: 2 additions & 2 deletions delayed_job.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-

Gem::Specification.new do |spec|
spec.add_dependency 'activesupport', ['>= 3.0', '< 6.2']
spec.add_dependency 'activesupport', ['>= 3.0', '< 8.0']
spec.authors = ['Brandon Keepers', 'Brian Ryckbost', 'Chris Gaffney', 'David Genord II', 'Erik Michaels-Ober', 'Matt Griffin', 'Steve Richert', 'Tobias Lütke']
spec.description = 'Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.'
spec.email = ['brian@collectiveidea.com']
Expand All @@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']
spec.summary = 'Database-backed asynchronous priority queue system -- Extracted from Shopify'
spec.test_files = Dir.glob('spec/**/*')
spec.version = '4.1.9'
spec.version = '4.1.10'
spec.metadata = {
'changelog_uri' => 'https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md',
'bug_tracker_uri' => 'https://github.com/collectiveidea/delayed_job/issues',
Expand Down
17 changes: 15 additions & 2 deletions spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,21 @@ def self.root

Delayed::Worker.backend = :test

# Add this directory so the ActiveSupport autoloading works
ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)
if ActiveSupport::VERSION::MAJOR < 7
require 'active_support/dependencies'

# Add this directory so the ActiveSupport autoloading works
ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)
else
# Rails 7 dropped classic dependency auto-loading. This does a basic
# zeitwerk setup to test against zeitwerk directly as the Rails zeitwerk
# setup is intertwined in the application boot process.
require 'zeitwerk'

loader = Zeitwerk::Loader.new
loader.push_dir File.dirname(__FILE__)
loader.setup
end

# Used to test interactions between DJ and an ORM
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => ':memory:'
Expand Down
2 changes: 1 addition & 1 deletion spec/yaml_ext_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it 'autoloads the class of an anonymous struct' do
expect do
yaml = "--- !ruby/struct\nn: 1\n"
object = YAML.load(yaml)
object = load_with_delayed_visitor(yaml)
expect(object).to be_kind_of(Struct)
expect(object.n).to eq(1)
end.not_to raise_error
Expand Down

0 comments on commit dfa5561

Please sign in to comment.