activejob-cancel 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d2bba860770d4be5139149e0069cbb365c89759a
4
- data.tar.gz: f5c3be4e786cef71c20449657dd3b8033ff0d44f
2
+ SHA256:
3
+ metadata.gz: f81d11a74b8a9d2f1bfda80748cab75db80f75b244c454a5223581d875fadb64
4
+ data.tar.gz: a0850dcd4a2222471e5d2ec302bb9300612d8acde7ec925d62e9740d397e7d98
5
5
  SHA512:
6
- metadata.gz: db5990d551d0e973b8646b898d2c4a924d3b6724a0ded9eb7ab40b6ccb6d28baa8e994ce10926e73564ceba40b0c9ea6d342b877f36e1cb951852b9a2d88e0a0
7
- data.tar.gz: 50024aa15719cc7e313186bbbc734eadbfee1b90297febc889ed68f6c583cae5af18059a05515f1b68756fd7ab1c0d9edfdf459ae0620fb44f86aac32055fad4
6
+ metadata.gz: b24713bfee0841e68cb9e63a4c65c3b9a1e72962aed41eb2380ce7063d4d30a29873b8d3c8b12d3da0e2915850ae313fd7ec40164fab8d4a326a67f0baeef639
7
+ data.tar.gz: b740c1f3e5862c6e4ee6a0fcf7a77f01c81c7f6af6ece88a4de1cb8b887a2c5add245cd9b52824e6497cccea9bba79d76c4d4816a5fba1a7521a55ea12e85dd4
@@ -0,0 +1,46 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.gemfile }}
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby: [ "2.7", "2.3" ]
12
+ gemfile: [ "active_job_60.gemfile", "active_job_52.gemfile", "active_job_51.gemfile", "active_job_50.gemfile", "active_job_42.gemfile" ]
13
+ exclude:
14
+ - ruby: "2.3"
15
+ gemfile: "active_job_60.gemfile"
16
+ - ruby: "2.7"
17
+ gemfile: "active_job_42.gemfile"
18
+ - ruby: "2.6"
19
+ gemfile: "active_job_42.gemfile"
20
+
21
+ services:
22
+ redis:
23
+ image: redis
24
+ ports:
25
+ - 6379:6379
26
+ # Wait for starting Redis
27
+ options: >-
28
+ --health-cmd "redis-cli ping"
29
+ --health-interval 10s
30
+ --health-timeout 5s
31
+ --health-retries 5
32
+
33
+ env:
34
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile}}
35
+
36
+ steps:
37
+ - uses: actions/checkout@v2
38
+ - uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby }}
41
+ - name: Install dependencies
42
+ run: |
43
+ gem install bundler --no-document
44
+ bundle install
45
+ - name: Run test
46
+ run: bundle exec rake
@@ -2,6 +2,10 @@
2
2
 
3
3
  Nothing
4
4
 
5
+ ## 0.3.1
6
+
7
+ * Fix `NoMethodError` when using the cancel methods with the default queue name
8
+
5
9
  ## 0.3.0
6
10
 
7
11
  * Add support for Active Job `TestAdapter` #19 [Hermann Mayer]
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_dependency 'activejob', '>= 4.2.0'
21
21
  spec.add_dependency 'activesupport', '>= 4.2.0'
22
- spec.add_development_dependency "bundler", "~> 1.11"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "minitest", "~> 5.0"
22
+ spec.add_development_dependency "bundler"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "minitest"
25
25
  spec.add_development_dependency "sidekiq"
26
26
  spec.add_development_dependency "activerecord", '>= 4.2.0'
27
27
  spec.add_development_dependency "delayed_job"
@@ -7,7 +7,7 @@ gem 'delayed_job'
7
7
  gem 'delayed_job_active_record'
8
8
  gem 'resque'
9
9
  gem 'resque-scheduler'
10
- gem 'sqlite3'
10
+ gem 'sqlite3', '~> 1.3.6'
11
11
  gem 'activesupport', '~> 4.2.0'
12
12
  gem 'activejob', '~> 4.2.0'
13
13
  gem 'activerecord', '~> 4.2.0'
@@ -7,7 +7,7 @@ gem 'delayed_job'
7
7
  gem 'delayed_job_active_record'
8
8
  gem 'resque'
9
9
  gem 'resque-scheduler'
10
- gem 'sqlite3'
11
- gem 'activesupport', '5.0.1'
12
- gem 'activejob', '5.0.1'
13
- gem 'activerecord', '5.0.1'
10
+ gem 'sqlite3', '~> 1.3.6'
11
+ gem 'activesupport', '~> 5.0.0'
12
+ gem 'activejob', '~> 5.0.0'
13
+ gem 'activerecord', '~> 5.0.0'
@@ -7,7 +7,7 @@ gem 'delayed_job'
7
7
  gem 'delayed_job_active_record', '>= 4.1.2'
8
8
  gem 'resque'
9
9
  gem 'resque-scheduler'
10
- gem 'sqlite3'
11
- gem 'activesupport', '5.1.0'
12
- gem 'activejob', '5.1.0'
13
- gem 'activerecord', '5.1.0'
10
+ gem 'sqlite3', '~> 1.3.6'
11
+ gem 'activesupport', '~> 5.1.0'
12
+ gem 'activejob', '~> 5.1.0'
13
+ gem 'activerecord', '~> 5.1.0'
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'coveralls', require: false
4
+ gem 'rake'
5
+ gem 'sidekiq'
6
+ gem 'delayed_job'
7
+ gem 'delayed_job_active_record', '>= 4.1.2'
8
+ gem 'resque'
9
+ gem 'resque-scheduler'
10
+ gem 'sqlite3', '~> 1.3.6'
11
+ gem 'activesupport', '~> 5.2.0'
12
+ gem 'activejob', '~> 5.2.0'
13
+ gem 'activerecord', '~> 5.2.0'
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'coveralls', require: false
4
+ gem 'rake'
5
+ gem 'sidekiq'
6
+ gem 'delayed_job'
7
+ gem 'delayed_job_active_record', '>= 4.1.2'
8
+ gem 'resque'
9
+ gem 'resque-scheduler'
10
+ gem 'sqlite3'
11
+ gem 'activesupport', '~> 6.0.0'
12
+ gem 'activejob', '~> 6.0.0'
13
+ gem 'activerecord', '~> 6.0.0'
@@ -21,7 +21,7 @@ module ActiveJob
21
21
  module ClassMethods
22
22
  def cancel(job_id)
23
23
  if can_cancel?
24
- cancel_adapter_class.new.cancel(job_id, self.queue_name)
24
+ cancel_adapter_class.new.cancel(job_id, self.new.queue_name)
25
25
  else
26
26
  raise NotImplementedError, 'This queueing backend does not support cancel.'
27
27
  end
@@ -29,7 +29,7 @@ module ActiveJob
29
29
 
30
30
  def cancel_by(opts)
31
31
  if can_cancel?
32
- cancel_adapter_class.new.cancel_by(opts, self.queue_name)
32
+ cancel_adapter_class.new.cancel_by(opts, self.new.queue_name)
33
33
  else
34
34
  raise NotImplementedError, 'This queueing backend does not support cancel_by.'
35
35
  end
@@ -7,8 +7,8 @@ module ActiveJob
7
7
  # on a persisted id to fulfill the canceling of any given job id.
8
8
  class TestAdapter
9
9
  def initialize
10
- if Gem::Requirement.new('~> 5.0').satisfied_by? ActiveJob.version
11
- require 'active_job/cancel/queue_adapters/test_adapter/rails_5'
10
+ if Gem::Requirement.new('>= 5.0').satisfied_by? ActiveJob.version
11
+ require 'active_job/cancel/queue_adapters/test_adapter/rails'
12
12
  elsif Gem::Requirement.new('~> 4.2').satisfied_by? ActiveJob.version
13
13
  require 'active_job/cancel/queue_adapters/test_adapter/rails_4'
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveJob
2
2
  module Cancel
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activejob-cancel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Yaginuma
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-16 00:00:00.000000000 Z
11
+ date: 2020-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -42,44 +42,44 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.11'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.11'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '5.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '5.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sidekiq
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -199,8 +199,8 @@ executables: []
199
199
  extensions: []
200
200
  extra_rdoc_files: []
201
201
  files:
202
+ - ".github/workflows/ci.yml"
202
203
  - ".gitignore"
203
- - ".travis.yml"
204
204
  - CHANGELOG.md
205
205
  - CODE_OF_CONDUCT.md
206
206
  - Gemfile
@@ -213,6 +213,8 @@ files:
213
213
  - gemfiles/active_job_42.gemfile
214
214
  - gemfiles/active_job_50.gemfile
215
215
  - gemfiles/active_job_51.gemfile
216
+ - gemfiles/active_job_52.gemfile
217
+ - gemfiles/active_job_60.gemfile
216
218
  - gemfiles/active_job_master.gemfile
217
219
  - lib/active_job/cancel.rb
218
220
  - lib/active_job/cancel/queue_adapters.rb
@@ -220,8 +222,8 @@ files:
220
222
  - lib/active_job/cancel/queue_adapters/resque_adapter.rb
221
223
  - lib/active_job/cancel/queue_adapters/sidekiq_adapter.rb
222
224
  - lib/active_job/cancel/queue_adapters/test_adapter.rb
225
+ - lib/active_job/cancel/queue_adapters/test_adapter/rails.rb
223
226
  - lib/active_job/cancel/queue_adapters/test_adapter/rails_4.rb
224
- - lib/active_job/cancel/queue_adapters/test_adapter/rails_5.rb
225
227
  - lib/active_job/cancel/version.rb
226
228
  - lib/activejob/cancel.rb
227
229
  homepage: https://github.com/y-yagi/activejob-cancel
@@ -243,8 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
245
  - !ruby/object:Gem::Version
244
246
  version: '0'
245
247
  requirements: []
246
- rubyforge_project:
247
- rubygems_version: 2.6.13
248
+ rubygems_version: 3.1.2
248
249
  signing_key:
249
250
  specification_version: 4
250
251
  summary: activejob-cancel provides cancel method to Active Job
@@ -1,20 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.7
4
- - 2.3.4
5
- - 2.4.1
6
-
7
- gemfile:
8
- - gemfiles/active_job_42.gemfile
9
- - gemfiles/active_job_50.gemfile
10
- - gemfiles/active_job_51.gemfile
11
- - gemfiles/active_job_master.gemfile
12
-
13
- before_install: gem install bundler
14
-
15
- matrix:
16
- allow_failures:
17
- - gemfile: gemfiles/active_job_master.gemfile
18
-
19
- services:
20
- - redis