activejob-google_cloud_tasks-http 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +31 -0
- data/.gitignore +3 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -0
- data/README.md +4 -4
- data/lib/active_job/google_cloud_tasks/http/adapter.rb +7 -1
- data/lib/active_job/google_cloud_tasks/http/inline.rb +5 -0
- data/lib/active_job/google_cloud_tasks/http/version.rb +1 -1
- metadata +5 -4
- data/.github/workflows/verify.yml +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d51fc09c046c3a0aac710f1155498a72c72018086fdd24167e4249c1b5d03f61
|
4
|
+
data.tar.gz: afd118c002dcc743118a3e1c87fbab5f064b3144ac6bc87fd0196d9551c3710c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de14461acec2013a347cc8f654adc1d4a55c4c4575a6258daa0e5ebab3e198ebd76ec2c8de34a65c18acc42065ce1eba195747cdcf668da42b0603ab39fc8a76
|
7
|
+
data.tar.gz: 50d947d1a3585ebd393b152bb9855b3b43de220591ef69871234a82292883d913c36c3c2c194518f5793bcdf4d42d4f90c690962fbc4256a503d8b7c3fc6d5da
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: Test
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
ruby_image:
|
12
|
+
- ruby:latest
|
13
|
+
- ruby:3.0
|
14
|
+
- ruby:2.7
|
15
|
+
- ruby:2.6
|
16
|
+
bundle:
|
17
|
+
- latest
|
18
|
+
- activejob-6.1
|
19
|
+
- activejob-6.0
|
20
|
+
- activejob-5.2
|
21
|
+
container:
|
22
|
+
image: ${{ matrix.ruby_image }}
|
23
|
+
steps:
|
24
|
+
- name: Checkout code
|
25
|
+
uses: actions/checkout@v2
|
26
|
+
|
27
|
+
- name: Install dependencies and run tests
|
28
|
+
run: |
|
29
|
+
bundle
|
30
|
+
bundle exec appraisal install
|
31
|
+
bundle exec appraisal "${{ matrix.bundle }}" rake spec
|
data/.gitignore
CHANGED
data/Appraisals
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
appraise 'latest' do
|
2
|
+
gem 'activejob'
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise 'activejob-6.1' do
|
6
|
+
gem 'activejob', '~> 6.1.4'
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise 'activejob-6.0' do
|
10
|
+
gem 'activejob', '~> 6.0.4'
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise 'activejob-5.2' do
|
14
|
+
gem 'activejob', '~> 5.2.6'
|
15
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 0.3.0
|
2
|
+
|
3
|
+
- [Support for enqueue_after_transaction_commit setting introduced in Rails 7.2](https://github.com/esminc/activejob-google_cloud_tasks-http/pull/14) by @bluerabbit
|
4
|
+
- [Update readme example to use new config format](https://github.com/esminc/activejob-google_cloud_tasks-http/pull/14) by @jaredlt
|
5
|
+
|
1
6
|
## 0.2.0
|
2
7
|
|
3
8
|
This version depends on google-cloud-tasks 2.0 or later. Since google-cloud-tasks 2.0 has API changes, upgrading to this version may affect to existing adapter initialization code. If you are initializing Google::Cloud::Tasks client manually, you will have to change `Google::Cloud::Tasks.new` to `Google::Cloud::Tasks.cloud_tasks` as follows:
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -75,10 +75,10 @@ unless ARGV.include?("assets:precompile") # prevents running on assets:precompil
|
|
75
75
|
project: 'my-project',
|
76
76
|
location: 'europe-west2',
|
77
77
|
url: 'https://www.example.com/jobs',
|
78
|
-
client: Google::Cloud::Tasks.cloud_tasks(
|
79
|
-
|
80
|
-
credentials
|
81
|
-
|
78
|
+
client: Google::Cloud::Tasks.cloud_tasks(version: :v2beta3) { |config|
|
79
|
+
# this will cause an error if the environment variable does not exist
|
80
|
+
config.credentials = JSON.parse(ENV["GOOGLE_CLOUD_PRODUCTION_KEYFILE"])
|
81
|
+
}
|
82
82
|
)
|
83
83
|
end
|
84
84
|
```
|
@@ -6,12 +6,18 @@ module ActiveJob
|
|
6
6
|
module GoogleCloudTasks
|
7
7
|
module HTTP
|
8
8
|
class Adapter
|
9
|
-
def initialize(project:, location:, url:, task_options: {}, client: nil)
|
9
|
+
def initialize(project:, location:, url:, task_options: {}, client: nil, enqueue_after_transaction_commit: false)
|
10
10
|
@project = project
|
11
11
|
@location = location
|
12
12
|
@url = url
|
13
13
|
@task_options = task_options
|
14
14
|
@client = client
|
15
|
+
@enqueue_after_transaction_commit = enqueue_after_transaction_commit
|
16
|
+
end
|
17
|
+
|
18
|
+
# Method expected in Rails 7.2 and later
|
19
|
+
def enqueue_after_transaction_commit?
|
20
|
+
@enqueue_after_transaction_commit
|
15
21
|
end
|
16
22
|
|
17
23
|
def enqueue(job, attributes = {})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activejob-google_cloud_tasks-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hibariya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -101,10 +101,11 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- ".github/workflows/
|
104
|
+
- ".github/workflows/ci.yml"
|
105
105
|
- ".gitignore"
|
106
106
|
- ".rspec"
|
107
107
|
- ".travis.yml"
|
108
|
+
- Appraisals
|
108
109
|
- CHANGELOG.md
|
109
110
|
- CODE_OF_CONDUCT.md
|
110
111
|
- Gemfile
|
@@ -139,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
140
|
- !ruby/object:Gem::Version
|
140
141
|
version: '0'
|
141
142
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
+
rubygems_version: 3.5.11
|
143
144
|
signing_key:
|
144
145
|
specification_version: 4
|
145
146
|
summary: ActiveJob adapter for Google Cloud Tasks HTTP targets.
|
@@ -1,18 +0,0 @@
|
|
1
|
-
name: Verify
|
2
|
-
on:
|
3
|
-
- push
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
tests:
|
7
|
-
name: Tests
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
container:
|
10
|
-
image: ruby
|
11
|
-
steps:
|
12
|
-
- name: Checkout code
|
13
|
-
uses: actions/checkout@v2
|
14
|
-
|
15
|
-
- name: Install dependencies and run tests
|
16
|
-
run: |
|
17
|
-
bundle
|
18
|
-
rake spec
|