que-unique 1.0.0 → 1.1.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: 1d7e96d67f08d0ec40f1a4eac6d62be29e605cb28a7fcf2845ff754bfb429b07
4
- data.tar.gz: fda193e6b905f3d04fda50ad28bebfae2e62187796a00f07c0f95e609ce0b38b
3
+ metadata.gz: ea8fcf7460687578d7e50d3d3535553ba829579d61fdbe081908a8d45b31284e
4
+ data.tar.gz: 4b822366ff0088d4670a4b6aafa70ee2a9a7a56cb5a5465c68949d80bf7337d0
5
5
  SHA512:
6
- metadata.gz: 59f15b0b4662ed65c5f87d46a8543a28d328d9daedcc4ad11e0fbe852f22c406845ef0499357ca226183636d69a11ffe2456a777c087fd0832f0df5e47f8785a
7
- data.tar.gz: 951811a4795eb8593ca66b840e2bed3dd74ccf768a9beb02c135daeb6cae61a86f7bc4168bc40725b3edbf1cd5a694051d5f37bdc836e7817d418cead080a9d4
6
+ metadata.gz: 18f4717b0b0d33529aacf8bed1573517f95848a1df0f9fb5a354e381a52b2a8b48cad3bda63edb07f049a47f6647710d934737d79960fae60168f2c1c7bfa125
7
+ data.tar.gz: c039e4c58d44fae4e06a81a021202870fc0e0e2915a01fbd1945d83b46448b6c2cd186d96110ecb2a089ddbc8c2dc2d89d51169bec61dcb91ed7ba761be2a875
@@ -8,24 +8,13 @@ require_relative "constants"
8
8
  module Que
9
9
  module Unique
10
10
  module TransactionClassMethods
11
- def transaction_with_unique_que(...)
11
+ def transaction(...)
12
12
  start_que_unique_handled_transaction
13
- transaction_without_unique_que(...)
13
+ super(...)
14
14
  ensure
15
15
  end_que_unique_handled_transaction
16
16
  end
17
17
 
18
- class << self
19
- def extended(base)
20
- base.class_eval do
21
- class << self
22
- alias_method :transaction_without_unique_que, :transaction
23
- alias_method :transaction, :transaction_with_unique_que
24
- end
25
- end
26
- end
27
- end
28
-
29
18
  private
30
19
 
31
20
  def start_que_unique_handled_transaction
@@ -49,4 +38,4 @@ module Que
49
38
  end
50
39
  end
51
40
 
52
- ActiveRecord::Base.extend Que::Unique::TransactionClassMethods
41
+ ActiveRecord::ConnectionAdapters::DatabaseStatements.prepend Que::Unique::TransactionClassMethods
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Que
4
4
  module Unique
5
- VERSION = "1.0.0"
5
+ VERSION = "1.1.0"
6
6
  end
7
7
  end
data/lib/que/unique.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support/concern'
3
4
  require "que"
4
5
  require_relative "unique/version"
5
6
  require_relative "unique/constants"
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: que-unique
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bamboo Engineering
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-15 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activerecord
14
+ name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '8.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">"
28
28
  - !ruby/object:Gem::Version
29
- version: '4.0'
29
+ version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '8.0'
@@ -218,7 +218,7 @@ dependencies:
218
218
  - - ">="
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
- description:
221
+ description:
222
222
  email:
223
223
  - dev@bambooloans.com
224
224
  executables: []
@@ -237,7 +237,7 @@ metadata:
237
237
  source_code_uri: https://github.com/bambooengineering/que-unique
238
238
  changelog_uri: https://github.com/bambooengineering/que-unique/CHANGELOG.md
239
239
  rubygems_mfa_required: 'true'
240
- post_install_message:
240
+ post_install_message:
241
241
  rdoc_options: []
242
242
  require_paths:
243
243
  - lib
@@ -245,15 +245,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">="
247
247
  - !ruby/object:Gem::Version
248
- version: '2.7'
248
+ version: '3.0'
249
249
  required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  requirements:
251
251
  - - ">="
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
254
  requirements: []
255
- rubygems_version: 3.1.6
256
- signing_key:
255
+ rubygems_version: 3.3.26
256
+ signing_key:
257
257
  specification_version: 4
258
258
  summary: A gem that removes duplicates when multiple copies of a que job are enqueued.
259
259
  test_files: []