sqewer 6.0.4 → 6.0.5

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
  SHA1:
3
- metadata.gz: 6c01fe984f9f8a0f14ac243acbeb97518a6f8565
4
- data.tar.gz: 1680b7c37647421ae21f65e1b6216abb6268908f
3
+ metadata.gz: 767a22e397deea673d08fa54d539b187a0063c79
4
+ data.tar.gz: ac6fb77bc19292447dde3c6e0a609dd31faa78fd
5
5
  SHA512:
6
- metadata.gz: c72f623b84f949fbf2f07c730db64190264c97725dc7b92a589b3c4f49df5be0735f0a9bc2ff7102a26ad4d265bc89d76a8a9458fe5ce6c304d288c7c10819d2
7
- data.tar.gz: f70f886f23800c51bdcdaf3e8a169038082bfad097c2dc2b1f5e79bde4e483bdd4c2034e65f0dd9de90229a35f3b56fa24232f39a51dd66030fc360eed965064
6
+ metadata.gz: '027792d46b88babaa41e0429387b68754f0341e24b5846c15c8c3edab024ec4874e905bc55ecf438ed63f84fb1ddba75f047186e4299d5308853a008c3f8d941'
7
+ data.tar.gz: 6095e328ffc6c58cb3c0c480ca4c2cb3388ae1f94b1100f4533348001815c1e0635e8f8fd2bf01b760924326f33d6efbe92704766043101798854edbadbeeb16
data/.travis.yml CHANGED
@@ -1,9 +1,21 @@
1
+ gemfile:
2
+ - gemfiles/Gemfile.rails-4.2.x
3
+ - gemfiles/Gemfile.rails-5.0.x
4
+ - gemfiles/Gemfile.rails-5.1.x
1
5
  rvm:
2
- - 2.2.2
3
- - 2.3.3
4
- - 2.4.1
5
- sudo: false
6
+ - 2.3.7
7
+ - 2.4.5
8
+ - 2.5.1
6
9
  cache: bundler
10
+ sudo: false
7
11
  env:
8
12
  global:
9
13
  - AWS_REGION=eu-central-1
14
+ matrix:
15
+ exclude:
16
+ - rvm: 2.3.7
17
+ gemfile: gemfiles/Gemfile.rails-5.0.x
18
+ - rvm: 2.3.7
19
+ gemfile: gemfiles/Gemfile.rails-5.1.x
20
+ - rvm: 2.5.1
21
+ gemfile: gemfiles/Gemfile.rails-4.2.x
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 6.0.5
2
+ - Limit ActiveJob compatibility to 4.2 and later, and add Travis test
3
+ setup for multiple Ruby versions and Rails versions up to and including 5.1
4
+
1
5
  ### 6.0.4
2
6
  - If running on an AWS EC2 instance and retrieving AWS credentials from the instance metadata, Sqewer will now retry up to five times if the instance metadata are not available. This fixes intermittent `Aws::Errors::MissingCredentialsError` exceptions.
3
7
 
@@ -0,0 +1,8 @@
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', "~> 4.2"
8
+ gem 'activerecord', "~> 4.2"
@@ -0,0 +1,8 @@
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", "< 5.1"
8
+ gem 'activerecord', "~> 5", "< 5.1"
@@ -0,0 +1,8 @@
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.1", "< 5.2"
8
+ gem 'activerecord', "~> 5.1", "< 5.2"
@@ -8,12 +8,14 @@ module ActiveJob
8
8
  prepend PerformWithKeywords
9
9
  end
10
10
  end
11
+
11
12
  module QueueAdapters
12
13
  # Handle Rails ActiveJob through sqewer.
13
14
  # Set it up like so:
14
15
  #
15
16
  # Rails.application.config.active_job.queue_adapter = :sqewer
16
17
  class SqewerAdapter
18
+
17
19
  # Works as a Job for sqewer, and wraps an ActiveJob Worker which responds to perform()
18
20
  class Performable
19
21
 
@@ -67,20 +69,18 @@ module ActiveJob
67
69
 
68
70
  end
69
71
 
70
- class << self
71
- def enqueue(active_job) #:nodoc:
72
- wrapped_job = Performable.from_active_job(active_job)
72
+ def enqueue(active_job) #:nodoc:
73
+ wrapped_job = Performable.from_active_job(active_job)
73
74
 
74
- Sqewer.submit!(wrapped_job)
75
- end
75
+ Sqewer.submit!(wrapped_job)
76
+ end
76
77
 
77
- def enqueue_at(active_job, timestamp) #:nodoc:
78
- wrapped_job = Performable.from_active_job(active_job)
78
+ def enqueue_at(active_job, timestamp) #:nodoc:
79
+ wrapped_job = Performable.from_active_job(active_job)
79
80
 
80
- delta_t = (timestamp - Time.now.to_i).to_i
81
+ delta_t = (timestamp - Time.now.to_i).to_i
81
82
 
82
- Sqewer.submit!(wrapped_job, delay_seconds: delta_t)
83
- end
83
+ Sqewer.submit!(wrapped_job, delay_seconds: delta_t)
84
84
  end
85
85
  end
86
86
  end
@@ -1,3 +1,3 @@
1
1
  module Sqewer
2
- VERSION = '6.0.4'
2
+ VERSION = '6.0.5'
3
3
  end
data/sqewer.gemspec CHANGED
@@ -29,18 +29,22 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_runtime_dependency "aws-sdk-sqs", "1.3.0"
32
+ spec.add_runtime_dependency "aws-sdk-sqs", "~> 1"
33
33
  spec.add_runtime_dependency "rack"
34
34
  spec.add_runtime_dependency "very_tiny_state_machine"
35
35
  spec.add_runtime_dependency "ks"
36
36
  spec.add_runtime_dependency "retriable"
37
37
 
38
- spec.add_development_dependency "bundler", "~> 1"
38
+ spec.add_development_dependency "bundler"
39
39
  spec.add_development_dependency "rake", "~> 12.3"
40
40
  spec.add_development_dependency "rspec", "~> 3.0"
41
- spec.add_development_dependency "activejob", "~> 4.2.6"
41
+
42
+ # The Rails deps can be relaxed, they are specified more exactly in the gemfiles/
43
+ # for testing against a specific Rails version
44
+ spec.add_development_dependency "activerecord", ">= 4.2"
45
+ spec.add_development_dependency "activejob", ">= 4.2"
46
+
42
47
  spec.add_development_dependency "rspec-wait"
43
- spec.add_development_dependency "activerecord", "~> 4.2"
44
48
  spec.add_development_dependency "sqlite3"
45
49
  spec.add_development_dependency "dotenv"
46
50
  spec.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.4
4
+ version: 6.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2019-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-sqs
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.0
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3.0
26
+ version: '1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -123,47 +123,47 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: activejob
126
+ name: activerecord
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 4.2.6
131
+ version: '4.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 4.2.6
138
+ version: '4.2'
139
139
  - !ruby/object:Gem::Dependency
140
- name: rspec-wait
140
+ name: activejob
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '4.2'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '4.2'
153
153
  - !ruby/object:Gem::Dependency
154
- name: activerecord
154
+ name: rspec-wait
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: '4.2'
159
+ version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: '4.2'
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: sqlite3
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -226,6 +226,9 @@ files:
226
226
  - bin/sqewer
227
227
  - bin/sqewer_rails
228
228
  - example.env
229
+ - gemfiles/Gemfile.rails-4.2.x
230
+ - gemfiles/Gemfile.rails-5.0.x
231
+ - gemfiles/Gemfile.rails-5.1.x
229
232
  - lib/sqewer.rb
230
233
  - lib/sqewer/atomic_counter.rb
231
234
  - lib/sqewer/cli.rb
@@ -267,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
270
  version: '0'
268
271
  requirements: []
269
272
  rubyforge_project:
270
- rubygems_version: 2.4.5
273
+ rubygems_version: 2.6.11
271
274
  signing_key:
272
275
  specification_version: 4
273
276
  summary: Process jobs from SQS