Skip to content

Commit

Permalink
Fix detect_queue_adapter! for aliased adapter constants (#19)
Browse files Browse the repository at this point in the history
* Fix queue adapter name lookup
* queue_adapter_name is not supported on Rails 5.1, remove 5.1 support
* Bump to 3.1.0
  • Loading branch information
smudge authored Jun 2, 2021
1 parent 226fd64 commit 83cdeeb
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 65 deletions.
124 changes: 74 additions & 50 deletions .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
appraise 'rails-5-1' do
gem 'railties', '~> 5.1.0'
end

appraise 'rails-5-2' do
gem 'railties', '~> 5.2.0'
end
Expand Down
2 changes: 1 addition & 1 deletion coach.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ruby_version: 2.6.1
resource_class: small
cache_sequence: 4
test_gemfiles:
- gemfiles/rails_5_1.gemfile
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6_0.gemfile
- gemfiles/rails_6_1.gemfile
base_runtime_image_version: dev
7 changes: 0 additions & 7 deletions gemfiles/rails_5_1.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion journaled.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.add_dependency "activerecord"
s.add_dependency "aws-sdk-kinesis", "< 2"
s.add_dependency "json-schema"
s.add_dependency "railties", ">= 5.1", "< 7.0"
s.add_dependency "railties", ">= 5.2"
s.add_dependency "request_store"

s.add_development_dependency "appraisal", "~> 2.2.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/journaled.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def actor_uri
end

def detect_queue_adapter!
adapter = job_base_class_name.constantize.queue_adapter.class.name.split('::').last.underscore.gsub("_adapter", "")
adapter = job_base_class_name.constantize.queue_adapter_name
unless SUPPORTED_QUEUE_ADAPTERS.include?(adapter)
raise <<~MSG
Journaled has detected an unsupported ActiveJob queue adapter: `:#{adapter}`
Expand Down
2 changes: 1 addition & 1 deletion lib/journaled/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Journaled
VERSION = "3.0.0".freeze
VERSION = "3.1.0".freeze
end

0 comments on commit 83cdeeb

Please sign in to comment.