sqewer 8.1.0 → 9.0.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: 2e5fc06a5281d8f654c015e190e1c2a7ac67a2fda1ccb2d1b14efbb8ecc30452
4
- data.tar.gz: 570bb873fc72efb58bc93d8ccda578fc3ee0005105f2cc49e86383115e9657c5
3
+ metadata.gz: a77289a915370519a947d35eca6c37eaca54fd319a1bb47cf9ab6889d509a3d0
4
+ data.tar.gz: dfb8c88266e50af819c66c93c56fffebb14f675f6e6f8ec4c8869f1e2a7a6edb
5
5
  SHA512:
6
- metadata.gz: 6efd7484bc5acf361314b09d0d5525fb9396b285df5fd5ee8e65e0d7dc53c0735f97273210f9adf9495f2a013e58f8a071c0d221303787499e6bf7b63ecc87cd
7
- data.tar.gz: 37b8754720c2e9b327ebc5f3df5ac320fc9291f0e6447dcb68881fec861c69ed2917154c0dda57e48e6f120dd9ee60dbccbcf43b183319928b70917e836bc990
6
+ metadata.gz: 89cf6418255c49a5ddb83d27bcf8e8bca8c017dc15cad9e6fd77a41cb44b795400f474667b72bc3c6849792dabbd6742be07bc90c4fa441659166749a8b55fbd
7
+ data.tar.gz: 71e0f5ee37e30ee4729179da5c29eb231c527b9f7e7415ae11ae2109e6ac2ef7e6ecaeebf38c14f1de70a9fb9892570c1f6abb531fcf340fe74a1ea079dce698
@@ -9,14 +9,12 @@ jobs:
9
9
  strategy:
10
10
  matrix:
11
11
  ruby:
12
+ - 3.2
12
13
  - 3.1
13
14
  - 3.0
14
- - 2.7
15
- - 2.6
16
15
  gemfile:
17
- - gemfiles/Gemfile.rails-5.0.x
18
- - gemfiles/Gemfile.rails-5.1.x
19
- - gemfiles/Gemfile.rails-6.0.x
16
+ - gemfiles/Gemfile.rails-6.1.x
17
+ - gemfiles/Gemfile.rails-7.0.x
20
18
  env:
21
19
  SQS_QUEUE_URL: 'sqlite3://tmp/sqewer.sqlite3'
22
20
  AWS_REGION: 'eu-central-1'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 9.0.0
2
+ - Add support for Ruby 3.2 and Rails 7
3
+ - Remove support for Ruby 2.6, 2.7 and Rails 5 and 6.0
4
+
1
5
  ### 8.1.0
2
6
  - dropped dependency on `ks` gem
3
7
  - added rails6 and ruby3/3.1 to test matrix
data/README.md CHANGED
@@ -48,7 +48,7 @@ The messages will only be deleted from SQS once the job execution completes with
48
48
 
49
49
  ## Requirements
50
50
 
51
- Ruby 2.6+, version 2 of the AWS SDK. You can also run Sqewer backed by a SQLite database file, which can be handy for development situations.
51
+ Ruby 3+, version 2 of the AWS SDK. You can also run Sqewer backed by a SQLite database file, which can be handy for development situations.
52
52
 
53
53
  ## Job storage
54
54
 
@@ -415,4 +415,3 @@ the Ruby standard library alone.
415
415
  ## Copyright
416
416
 
417
417
  Copyright (c) 2016 WeTransfer. See LICENSE.txt for further details.
418
-
@@ -4,5 +4,5 @@ source "http://rubygems.org"
4
4
  gemspec path: __dir__ + '/..'
5
5
 
6
6
  gem 'sqlite3', "~> 1.3", ">= 1.3.6"
7
- gem 'activejob', "~> 5.1.0"
8
- gem 'activerecord', "~> 5.1.0"
7
+ gem 'activejob', "~> 6.1.0"
8
+ gem 'activerecord', "~> 6.1.0"
@@ -4,5 +4,5 @@ source "http://rubygems.org"
4
4
  gemspec path: __dir__ + '/..'
5
5
 
6
6
  gem 'sqlite3', "~> 1.3", ">= 1.3.6"
7
- gem 'activejob', "~> 6.0.0"
8
- gem 'activerecord', "~> 6.0.0"
7
+ gem 'activejob', "~> 7.0.0"
8
+ gem 'activerecord', "~> 7.0.0"
@@ -1,14 +1,6 @@
1
1
  # ActiveJob docs: http://edgeguides.rubyonrails.org/active_job_basics.html
2
2
  # Example adapters ref: https://github.com/rails/rails/tree/master/activejob/lib/active_job/queue_adapters
3
3
  module ActiveJob
4
- # Only prepend the module with keyword argument acceptance when the version is 4
5
- # ActiveJob 5.x supports kwargs out of the box
6
- if ActiveJob::VERSION::MAJOR <= 4
7
- module Execution
8
- prepend PerformWithKeywords
9
- end
10
- end
11
-
12
4
  module QueueAdapters
13
5
  # Handle Rails ActiveJob through sqewer.
14
6
  # Set it up like so:
@@ -56,48 +48,32 @@ module ActiveJob
56
48
  Base.execute(job)
57
49
  end
58
50
  end
59
-
51
+
60
52
  private
61
-
53
+
62
54
  def with_active_record_connection_from_pool
63
55
  ActiveRecord::Base.connection_pool.with_connection { yield }
64
56
  end
65
-
57
+
66
58
  def active_record_defined_and_connected?
67
59
  defined?(ActiveRecord) && ActiveRecord::Base.connected?
68
60
  end
69
-
61
+
70
62
  end
71
63
 
72
- def self.enqueue(active_job) #:nodoc:
64
+ def enqueue(*args)
73
65
  wrapped_job = Performable.from_active_job(active_job)
74
66
 
75
67
  Sqewer.submit!(wrapped_job)
76
68
  end
77
69
 
78
- def self.enqueue_at(active_job, timestamp) #:nodoc:
70
+ def enqueue_at(*args)
79
71
  wrapped_job = Performable.from_active_job(active_job)
80
72
 
81
73
  delta_t = (timestamp - Time.now.to_i).to_i
82
74
 
83
75
  Sqewer.submit!(wrapped_job, delay_seconds: delta_t)
84
76
  end
85
-
86
- # ActiveJob in Rails 4 resolves the symbol value you give it
87
- # and then tries to call enqueue_* methods directly on what
88
- # got resolved. In Rails 5, first Rails will call .new on
89
- # what it resolved from the symbol and _then_ call enqueue
90
- # and enqueue_at on that what has gotten resolved. This means
91
- # that we have to expose these methods _both_ as class methods
92
- # and as instance methods.
93
- # This can be removed when we stop supporting Rails 4.
94
- def enqueue_at(*args)
95
- self.class.enqueue_at(*args)
96
- end
97
-
98
- def enqueue(*args)
99
- self.class.enqueue(*args)
100
- end
101
77
  end
102
78
  end
103
79
  end
@@ -1,3 +1,3 @@
1
1
  module Sqewer
2
- VERSION = '8.1.0'
2
+ VERSION = '9.0.0'
3
3
  end
data/sqewer.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{Process jobs from SQS}
13
13
  spec.description = %q{A full-featured library for all them SQS worker needs}
14
14
  spec.homepage = "https://github.com/WeTransfer/sqewer"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
18
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
8
8
  - Andrei Horak
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-09 00:00:00.000000000 Z
12
+ date: 2023-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk-sqs
@@ -260,9 +260,8 @@ files:
260
260
  - bin/sqewer
261
261
  - bin/sqewer_rails
262
262
  - example.env
263
- - gemfiles/Gemfile.rails-5.0.x
264
- - gemfiles/Gemfile.rails-5.1.x
265
- - gemfiles/Gemfile.rails-6.0.x
263
+ - gemfiles/Gemfile.rails-6.1.x
264
+ - gemfiles/Gemfile.rails-7.0.x
266
265
  - lib/sqewer.rb
267
266
  - lib/sqewer/atomic_counter.rb
268
267
  - lib/sqewer/cli.rb
@@ -288,7 +287,7 @@ homepage: https://github.com/WeTransfer/sqewer
288
287
  licenses: []
289
288
  metadata:
290
289
  allowed_push_host: https://rubygems.org
291
- post_install_message:
290
+ post_install_message:
292
291
  rdoc_options: []
293
292
  require_paths:
294
293
  - lib
@@ -296,15 +295,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
295
  requirements:
297
296
  - - ">="
298
297
  - !ruby/object:Gem::Version
299
- version: 2.6.0
298
+ version: 3.0.0
300
299
  required_rubygems_version: !ruby/object:Gem::Requirement
301
300
  requirements:
302
301
  - - ">="
303
302
  - !ruby/object:Gem::Version
304
303
  version: '0'
305
304
  requirements: []
306
- rubygems_version: 3.0.3.1
307
- signing_key:
305
+ rubygems_version: 3.4.10
306
+ signing_key:
308
307
  specification_version: 4
309
308
  summary: Process jobs from SQS
310
309
  test_files: []
@@ -1,8 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Gemspec as base dependency set
4
- gemspec path: __dir__ + '/..'
5
-
6
- gem 'sqlite3', '~> 1.3.6'
7
- gem 'activejob', "~> 5.0.0"
8
- gem 'activerecord', "~> 5.0.0"