queue_classic_matchers 1.1.0 → 4.0.0.alpha1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c9c20b4638520c3bb0c5b8e9dbc64202d9fb9d59f0e29dc194a28d5d3b7020a
4
- data.tar.gz: 82a3d2dc873586ee2d857a70494fd7055ff49bf771f9ab7608608fb6e760c32f
3
+ metadata.gz: e1ce799c50c2a2a5aadd376d5a9922c05021df7e618ee5f922849aab63964089
4
+ data.tar.gz: '09980b953a28ce1ad20708fc0c5f41ac796521e81f89dbace74452f09f16e160'
5
5
  SHA512:
6
- metadata.gz: 416468f930e73965959db66ddf2cdbe06f66cca892efa20da415025650006d1d18f61082a2a5c08bea3efb0731c005cfb72b96dafa0dfa86f4e17143b30efe33
7
- data.tar.gz: 5e935730577ce891f07b48ee5d90b605824a95d412bc1d0a3ce0f118e3b6549daace6cf51ad08dc9975df4baa6bafc8200b86049c93a5e474fee9157c480cf17
6
+ metadata.gz: 0d14a6eb9bd93f76e511c8a9c88eaba700355db346b2ba7a4eef9484d2b3a14a1e3b626045aff4429e55d98abb6222bbc670882c9ef89736e9bda97841e9b44b
7
+ data.tar.gz: 8a923b8c49ca6e02ce844a0eed826c82e0fcfc4ab53305f3a0fc7a9bfddc8064f49cda4be0b901578e482ea96e958cc2f7abc76c1f741f7dd8c8cbb5f0379f9d
data/.circleci/config.yml CHANGED
@@ -1,10 +1,16 @@
1
- version: 2
1
+ version: 2.1
2
2
 
3
3
  jobs:
4
4
  test:
5
5
  docker:
6
6
  - image: circleci/ruby:2.5.3-node
7
+ auth:
8
+ username: $DOCKERHUB_USERNAME
9
+ password: $DOCKERHUB_TOKEN
7
10
  - image: circleci/postgres:9.6.6-alpine
11
+ auth:
12
+ username: $DOCKERHUB_USERNAME
13
+ password: $DOCKERHUB_TOKEN
8
14
  steps:
9
15
  - checkout
10
16
  - run:
@@ -16,6 +22,9 @@ jobs:
16
22
  push_to_rubygems:
17
23
  docker:
18
24
  - image: circleci/ruby:2.5.3
25
+ auth:
26
+ username: $DOCKERHUB_USERNAME
27
+ password: $DOCKERHUB_TOKEN
19
28
  steps:
20
29
  - checkout
21
30
  - run:
@@ -36,7 +45,9 @@ workflows:
36
45
  version: 2
37
46
  gem_release:
38
47
  jobs:
39
- - test
48
+ - test:
49
+ context:
50
+ - DockerHub
40
51
 
41
52
  - push_to_rubygems:
42
53
  filters:
@@ -46,3 +57,5 @@ workflows:
46
57
  tags:
47
58
  only:
48
59
  - /^v.*/
60
+ context:
61
+ - DockerHub
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
data/Gemfile CHANGED
@@ -5,4 +5,4 @@ gemspec
5
5
 
6
6
  gem 'rspec'
7
7
  # TODO: release qc plus
8
- gem 'queue_classic_plus', github: 'rainforestapp/queue_classic_plus', tag: 'v4.0.0-alpha2'
8
+ gem 'queue_classic_plus', github: 'rainforestapp/queue_classic_plus', tag: 'v4.0.0-alpha5'
data/README.md CHANGED
@@ -4,7 +4,7 @@ Test helpers and RSpec matchers to [QueueClassicPlus](https://github.com/rainfor
4
4
 
5
5
  ## Compatibility
6
6
 
7
- This version of the matchers are compatible with queue_classic 3.1+ which includes built-in scheduling. See other branches for other compatible versions.
7
+ This version of the matchers are compatible with queue_classic 4 which includes built-in scheduling. See other branches for other compatible versions.
8
8
 
9
9
  ## Installation
10
10
 
@@ -9,7 +9,7 @@ module QueueClassicMatchers
9
9
  module QueueClassicMatchers::QueueClassicRspec
10
10
  def self.find_by_args(queue_name, method, args)
11
11
  q = 'SELECT * FROM queue_classic_jobs WHERE q_name = $1 AND method = $2 AND args::text = $3'
12
- result = QC.default_conn_adapter.execute q, queue_name, method, JSON.dump(args)
12
+ result = QC.default_conn_adapter.execute q, queue_name, method, JSON.dump(serialized(args))
13
13
  result = [result] unless Array === result
14
14
  result.compact
15
15
  end
@@ -17,6 +17,14 @@ module QueueClassicMatchers
17
17
  def self.reset!
18
18
  QC.default_conn_adapter.execute 'DELETE FROM queue_classic_jobs'
19
19
  end
20
+
21
+ def self.serialized(args)
22
+ if defined?(QueueClassicPlus) && defined?(Rails)
23
+ ActiveJob::Arguments.serialize(args)
24
+ else
25
+ args
26
+ end
27
+ end
20
28
  end
21
29
 
22
30
  if defined?(QueueClassicPlus)
@@ -1,3 +1,3 @@
1
1
  module QueueClassicMatchers
2
- VERSION = '1.1.0'
2
+ VERSION = '4.0.0.alpha1'
3
3
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_dependency 'queue_classic', '>= 3.1.0'
19
+ spec.add_dependency 'queue_classic', '4.0.0.pre.alpha1'
20
20
  spec.add_development_dependency 'activerecord'
21
21
  spec.add_development_dependency 'bundler'
22
22
  spec.add_development_dependency 'pg'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_classic_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 4.0.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Mathieu
@@ -11,22 +11,22 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-07-16 00:00:00.000000000 Z
14
+ date: 2021-07-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: queue_classic
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - ">="
20
+ - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 3.1.0
22
+ version: 4.0.0.pre.alpha1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.1.0
29
+ version: 4.0.0.pre.alpha1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: activerecord
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -104,6 +104,7 @@ extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
106
  - ".circleci/config.yml"
107
+ - ".github/dependabot.yml"
107
108
  - ".gitignore"
108
109
  - ".rspec"
109
110
  - Gemfile
@@ -132,9 +133,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
133
  version: '0'
133
134
  required_rubygems_version: !ruby/object:Gem::Requirement
134
135
  requirements:
135
- - - ">="
136
+ - - ">"
136
137
  - !ruby/object:Gem::Version
137
- version: '0'
138
+ version: 1.3.1
138
139
  requirements: []
139
140
  rubygems_version: 3.0.3
140
141
  signing_key: