barbeque_client 0.10.2 → 0.11.0

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
2
  SHA256:
3
- metadata.gz: 43a52df019df7de3093aed43d346b386aadbc1339ceedb30d6338e743c6a5ea7
4
- data.tar.gz: 3be9396e711b3b56e6c8bffcf95bf5a658a17455ce3966dc41a7f2e820710fb1
3
+ metadata.gz: 557a7c3259618c30ac7083bce756ac09d2356ecf77ed9865e00c9ee863f9b090
4
+ data.tar.gz: 8925fb26013c4d01118b76ac3c1c88820e7702a1d57dc6b9e2dc46c671c262d2
5
5
  SHA512:
6
- metadata.gz: 3538e4be2f11c66b0f1c01ec06fd859c6e1bd0421d2f025c790ea444f3ea0dc402955213e9d23b33a9fa25e02337f0555c10e66bb70260abc96b593e84767b91
7
- data.tar.gz: 4c28b6626a49392f16cb2761a3339a7ffdf8018a34b88d368814680ed8fc43857e6ca042a2c8c4d45f4323888783708ef988a3bec56cbc47e6413d60b1c3e50a
6
+ metadata.gz: 410555f5d40cfbdfbdb88d6543414284bdb004b543ef7f8dd30fecff1c3ab3b117da48b4066033402607e62ef6b7ede27bddedf37bb7f6c96ff1960cf277a71a
7
+ data.tar.gz: a01f9b36efbf2ab7383d292096075d94f0f65a97a2e92dfc8a4bd37ebc0671198716e83a54a1b824d390809f435ceabfb24ea7e2407a6186c69a4e641d67e528
@@ -0,0 +1,24 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby:
14
+ - '3.1'
15
+ - '3.2'
16
+ - '3.3'
17
+ name: Run test with Ruby ${{ matrix.ruby }}
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby }}
23
+ bundler-cache: true
24
+ - run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.11.0 (2025-01-16)
2
+ - Update BarbequeAdapter for Rails 7.2 compatibility
3
+ - Drop support for Ruby 2.6, 2.7, and 3.0
4
+
1
5
  ## v0.10.2 (2019-11-21)
2
6
  - Use 'running' instead of 'working' in mock API responses
3
7
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # BarbequeClient [![Build Status](https://travis-ci.org/cookpad/barbeque_client.svg?branch=master)](https://travis-ci.org/cookpad/barbeque_client)
1
+ # BarbequeClient [![Build Status](https://github.com/cookpad/barbeque_client/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/cookpad/barbeque_client/actions/workflows/ci.yml)
2
2
 
3
3
  Barbeque client for Ruby.
4
4
 
@@ -20,10 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'garage_client'
23
- spec.add_development_dependency 'bundler', '~> 1.11'
23
+ spec.add_dependency 'activejob', '>= 7.2'
24
+ spec.add_dependency 'railties', '>= 7.2'
25
+ spec.add_development_dependency 'bundler'
24
26
  spec.add_development_dependency 'pry'
25
- spec.add_development_dependency 'rails', '~> 5.1'
26
- spec.add_development_dependency 'rake', '~> 10.0'
27
- spec.add_development_dependency 'rspec', '~> 3.0'
27
+ spec.add_development_dependency 'rails', '>= 7.2'
28
+ spec.add_development_dependency 'rake'
28
29
  spec.add_development_dependency 'rspec-rails'
29
30
  end
@@ -1,36 +1,24 @@
1
1
  module ActiveJob
2
2
  module QueueAdapters
3
- class BarbequeAdapter
4
- # Interface for ActiveJob 5.0
3
+ class BarbequeAdapter < ActiveJob::QueueAdapters::AbstractAdapter
5
4
  def enqueue(job)
6
- BarbequeAdapter.enqueue(job)
5
+ execution = BarbequeClient.enqueue(
6
+ job: job.class.to_s,
7
+ message: ActiveJob::Arguments.serialize(job.arguments),
8
+ queue: job.queue_name,
9
+ )
10
+ job.job_id = execution.message_id
7
11
  end
8
12
 
9
13
  def enqueue_at(job, timestamp)
10
- BarbequeAdapter.enqueue_at(job, timestamp)
11
- end
12
-
13
- class << self
14
- # Interface for ActiveJob 4.2
15
- def enqueue(job)
16
- execution = BarbequeClient.enqueue(
17
- job: job.class.to_s,
18
- message: ActiveJob::Arguments.serialize(job.arguments),
19
- queue: job.queue_name,
20
- )
21
- job.job_id = execution.message_id
22
- end
23
-
24
- def enqueue_at(job, timestamp)
25
- delay_seconds = (timestamp - Time.now.to_f).round
26
- execution = BarbequeClient.enqueue(
27
- job: job.class.to_s,
28
- message: ActiveJob::Arguments.serialize(job.arguments),
29
- queue: job.queue_name,
30
- delay_seconds: delay_seconds,
31
- )
32
- job.job_id = execution.message_id
33
- end
14
+ delay_seconds = (timestamp - Time.now.to_f).round
15
+ execution = BarbequeClient.enqueue(
16
+ job: job.class.to_s,
17
+ message: ActiveJob::Arguments.serialize(job.arguments),
18
+ queue: job.queue_name,
19
+ delay_seconds: delay_seconds,
20
+ )
21
+ job.job_id = execution.message_id
34
22
  end
35
23
  end
36
24
  end
@@ -1,3 +1,3 @@
1
1
  module BarbequeClient
2
- VERSION = '0.10.2'
2
+ VERSION = '0.11.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barbeque_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2025-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: garage_client
@@ -25,21 +25,35 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: activejob
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.11'
34
- type: :development
33
+ version: '7.2'
34
+ type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.11'
40
+ version: '7.2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: pry
42
+ name: railties
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '7.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '7.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - ">="
@@ -53,47 +67,47 @@ dependencies:
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: rails
70
+ name: pry
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: '5.1'
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: '5.1'
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
- name: rake
84
+ name: rails
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - "~>"
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
- version: '10.0'
89
+ version: '7.2'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - "~>"
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
- version: '10.0'
96
+ version: '7.2'
83
97
  - !ruby/object:Gem::Dependency
84
- name: rspec
98
+ name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - "~>"
101
+ - - ">="
88
102
  - !ruby/object:Gem::Version
89
- version: '3.0'
103
+ version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - "~>"
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
- version: '3.0'
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rspec-rails
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -115,9 +129,9 @@ executables: []
115
129
  extensions: []
116
130
  extra_rdoc_files: []
117
131
  files:
132
+ - ".github/workflows/ci.yml"
118
133
  - ".gitignore"
119
134
  - ".rspec"
120
- - ".travis.yml"
121
135
  - CHANGELOG.md
122
136
  - Gemfile
123
137
  - LICENSE.txt
@@ -141,7 +155,7 @@ homepage: https://github.com/cookpad/barbeque_client
141
155
  licenses:
142
156
  - MIT
143
157
  metadata: {}
144
- post_install_message:
158
+ post_install_message:
145
159
  rdoc_options: []
146
160
  require_paths:
147
161
  - lib
@@ -156,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
170
  - !ruby/object:Gem::Version
157
171
  version: '0'
158
172
  requirements: []
159
- rubygems_version: 3.0.3
160
- signing_key:
173
+ rubygems_version: 3.5.19
174
+ signing_key:
161
175
  specification_version: 4
162
176
  summary: Barbeque client for Ruby
163
177
  test_files: []
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- branches:
4
- only:
5
- - master
6
- rvm:
7
- - ruby-head
8
- - 2.4.0
9
- - 2.3.1
10
- - 2.2.5
11
- script:
12
- - bundle exec rake
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head