shoryuken-later 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.travis.yml +10 -0
- data/Gemfile +2 -0
- data/README.md +3 -0
- data/Rakefile +1 -1
- data/lib/shoryuken/later.rb +1 -1
- data/lib/shoryuken/later/poller.rb +1 -1
- data/lib/shoryuken/later/version.rb +1 -1
- data/shoryuken-later.gemspec +1 -1
- data/spec/shoryuken/later/poller_spec.rb +1 -1
- data/spec/shoryuken/worker_spec.rb +1 -1
- data/spec/spec_helper.rb +6 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZjkwMTgzNmQ5MmUzZDBhMjUyODNhMDlmZGU5N2U4NWU3MGRlNzZkNzA2M2I0
|
10
|
-
M2YwYTY2ZjdjNTNiMGRkMzZkZDcwY2FmZTI0NjlkOTRiNjEwNTViMGM0YzA1
|
11
|
-
NmI3YjU0NWMyMmRlOTFhZDA4YzJkNzZlZThjZTM5YjRiMDMyODI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Nzk0ZTJkMzAyMzgwNzVmMGMxYTRjYTczNzM5NWE4NzVhZTBhODUxYzBjMzM3
|
14
|
-
ZDU5MzBhZmE0ZWNlMjEzNmY2ZThmNDBhODE5MmIyZDQwZmZjNzJmYWEzNzAw
|
15
|
-
MTM2Yjk1N2Y0OWU3M2JmOGUxODkwMTI5ODFlN2MxMDNkZmM0Mjc=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a3633601571fecc136188b340ccf8cfd8c60ec9c
|
4
|
+
data.tar.gz: 3a09b616be92231564d41ffb3fe71bcdb4c12672
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 39f9f557c4daa96dcedb8a89c5c59149b756dfc6b4cbb61ea0b4add42161d565a7837980ce5bf44f61f91769c68ecc0d0012841c374087919b1a6073b3e2ccf8
|
7
|
+
data.tar.gz: d161fb2d1b039e327374f01f6faa3610c8a38a23e97428a7044a1e5bcae95ecc40fb96e34b6eafc315a4554171d15518bb23b298c574847749da7e8755a8623f
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
A scheduling plugin for [Shoryuken](https://github.com/phstc/shoryuken) that uses [Dynamo DB](https://aws.amazon.com/dynamodb/)
|
4
4
|
to delay messages arbitrarily far into the future.
|
5
5
|
|
6
|
+
[![Build Status](https://travis-ci.org/joekhoobyar/shoryuken-later.svg)](https://travis-ci.org/joekhoobyar/shoryuken-later)
|
7
|
+
[![Code Climate](https://codeclimate.com/github/joekhoobyar/shoryuken-later/badges/gpa.svg)](https://codeclimate.com/github/joekhoobyar/shoryuken-later)
|
8
|
+
|
6
9
|
## Features
|
7
10
|
|
8
11
|
### Supports distributed architectures
|
data/Rakefile
CHANGED
data/lib/shoryuken/later.rb
CHANGED
@@ -61,7 +61,7 @@ module Shoryuken
|
|
61
61
|
|
62
62
|
# Conditionally delete an item prior to enqueuing it, ensuring only one actor may enqueue it.
|
63
63
|
begin client.delete_item table_name, item
|
64
|
-
rescue
|
64
|
+
rescue Aws::DynamoDB::Errors::ConditionalCheckFailedException => e
|
65
65
|
# Item was already deleted, so it does not need to be queued.
|
66
66
|
return
|
67
67
|
end
|
data/shoryuken-later.gemspec
CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "timers", "~> 4.0.1"
|
31
31
|
spec.add_dependency "aws-sdk-core", "2.0.21"
|
32
32
|
spec.add_dependency "aws-sdk-resources", "2.0.21.pre"
|
33
|
-
spec.add_dependency "shoryuken", "
|
33
|
+
spec.add_dependency "shoryuken", "~> 1.0.0"
|
34
34
|
end
|
@@ -52,7 +52,7 @@ describe Shoryuken::Later::Poller do
|
|
52
52
|
|
53
53
|
it 'does not enqueue a message if the item could not be deleted' do
|
54
54
|
expect(TestWorker).not_to receive(:perform_in)
|
55
|
-
expect(Shoryuken::Later::Client).to receive(:delete_item).with(table, ddb_item){ raise
|
55
|
+
expect(Shoryuken::Later::Client).to receive(:delete_item).with(table, ddb_item){ raise Aws::DynamoDB::Errors::ConditionalCheckFailedException.new(nil,nil) }
|
56
56
|
|
57
57
|
subject.send(:process_item, ddb_item)
|
58
58
|
end
|
@@ -12,7 +12,7 @@ describe 'Shoryuken::Worker' do
|
|
12
12
|
|
13
13
|
describe '.perform_later' do
|
14
14
|
it 'delays a message for up to 15 minutes in the future' do
|
15
|
-
expect(sqs_queue).to receive(:send_message).with('message',
|
15
|
+
expect(sqs_queue).to receive(:send_message).with({ message_body: 'message', message_attributes: msg_attrs, delay_seconds: 15 * 60 })
|
16
16
|
|
17
17
|
TestWorker.perform_later(15 * 60, 'message')
|
18
18
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
require 'bundler/setup'
|
2
2
|
Bundler.setup
|
3
3
|
|
4
|
+
if ENV['CODECLIMATE_REPO_TOKEN']
|
5
|
+
require 'codeclimate-test-reporter'
|
6
|
+
CodeClimate::TestReporter.start
|
7
|
+
end
|
8
|
+
|
4
9
|
require 'shoryuken-later'
|
5
10
|
require 'json'
|
6
11
|
|
@@ -11,7 +16,7 @@ $options = {}
|
|
11
16
|
if File.exists? options_file
|
12
17
|
$options = YAML.load(File.read(options_file)).deep_symbolize_keys
|
13
18
|
|
14
|
-
|
19
|
+
Aws.config = $options[:aws]
|
15
20
|
end
|
16
21
|
|
17
22
|
Shoryuken.logger.level = Logger::UNKNOWN
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoryuken-later
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Khoobyar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.3.5
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.3.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -62,14 +62,14 @@ dependencies:
|
|
62
62
|
name: pry-byebug
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - '>='
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
@@ -118,18 +118,18 @@ dependencies:
|
|
118
118
|
name: shoryuken
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - ~>
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.0
|
123
|
+
version: 1.0.0
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - ~>
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.0
|
131
|
-
description:
|
132
|
-
|
130
|
+
version: 1.0.0
|
131
|
+
description: "\n This gem provides a scheduling plugin (using Dynamo DB) for Shoryuken,
|
132
|
+
as well as an ActiveJob adapter\n "
|
133
133
|
email:
|
134
134
|
- joe@khoobyar.name
|
135
135
|
executables:
|
@@ -138,6 +138,7 @@ extensions: []
|
|
138
138
|
extra_rdoc_files: []
|
139
139
|
files:
|
140
140
|
- .gitignore
|
141
|
+
- .travis.yml
|
141
142
|
- Gemfile
|
142
143
|
- LICENSE
|
143
144
|
- README.md
|
@@ -166,17 +167,17 @@ require_paths:
|
|
166
167
|
- lib
|
167
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
168
169
|
requirements:
|
169
|
-
- -
|
170
|
+
- - '>='
|
170
171
|
- !ruby/object:Gem::Version
|
171
172
|
version: 2.0.0
|
172
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
174
|
requirements:
|
174
|
-
- -
|
175
|
+
- - '>='
|
175
176
|
- !ruby/object:Gem::Version
|
176
177
|
version: '0'
|
177
178
|
requirements: []
|
178
179
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
180
|
+
rubygems_version: 2.4.5
|
180
181
|
signing_key:
|
181
182
|
specification_version: 4
|
182
183
|
summary: A scheduling plugin (using Dynamo DB) for Shoryuken
|