barbeque_client 0.10.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +24 -0
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/barbeque_client.gemspec +5 -4
- data/lib/active_job/queue_adapters/barbeque_adapter.rb +15 -27
- data/lib/barbeque_client/runner.rb +1 -1
- data/lib/barbeque_client/version.rb +1 -1
- metadata +43 -30
- data/.travis.yml +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 557a7c3259618c30ac7083bce756ac09d2356ecf77ed9865e00c9ee863f9b090
|
4
|
+
data.tar.gz: 8925fb26013c4d01118b76ac3c1c88820e7702a1d57dc6b9e2dc46c671c262d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,10 @@
|
|
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
|
+
|
5
|
+
## v0.10.2 (2019-11-21)
|
6
|
+
- Use 'running' instead of 'working' in mock API responses
|
7
|
+
|
1
8
|
## v0.10.1 (2018-11-09)
|
2
9
|
- Add support for custom HTTP headers
|
3
10
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# BarbequeClient [![Build Status](https://
|
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
|
|
data/barbeque_client.gemspec
CHANGED
@@ -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.
|
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', '
|
26
|
-
spec.add_development_dependency 'rake'
|
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
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
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.
|
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:
|
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:
|
28
|
+
name: activejob
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
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: '
|
40
|
+
version: '7.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
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:
|
70
|
+
name: pry
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
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: '
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: rails
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
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: '
|
96
|
+
version: '7.2'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: rake
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
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: '
|
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,9 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
170
|
- !ruby/object:Gem::Version
|
157
171
|
version: '0'
|
158
172
|
requirements: []
|
159
|
-
|
160
|
-
|
161
|
-
signing_key:
|
173
|
+
rubygems_version: 3.5.19
|
174
|
+
signing_key:
|
162
175
|
specification_version: 4
|
163
176
|
summary: Barbeque client for Ruby
|
164
177
|
test_files: []
|