queuel 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.travis.yml +1 -1
- data/Gemfile.lock +12 -1
- data/lib/queuel/iron_mq/queue.rb +6 -1
- data/lib/queuel/sns/engine.rb +28 -0
- data/lib/queuel/sns/queue.rb +19 -0
- data/lib/queuel/sqs/engine.rb +28 -0
- data/lib/queuel/sqs/message.rb +30 -0
- data/lib/queuel/sqs/poller.rb +24 -0
- data/lib/queuel/sqs/queue.rb +22 -0
- data/lib/queuel/version.rb +1 -1
- data/lib/queuel.rb +12 -0
- data/queuel.gemspec +1 -0
- data/spec/lib/queuel/sns/engine_spec.rb +20 -0
- data/spec/lib/queuel/sns/queue_spec.rb +18 -0
- data/spec/lib/queuel/sqs/engine_spec.rb +20 -0
- data/spec/lib/queuel/sqs/message_spec.rb +97 -0
- data/spec/lib/queuel/sqs/poller_spec.rb +22 -0
- data/spec/lib/queuel/sqs/queue_spec.rb +11 -0
- data/spec/support/poller_shared_example.rb +4 -1
- data/spec/support/queue_shared_example.rb +4 -2
- metadata +37 -50
- data/.rvmrc +0 -46
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjMyOTIyZmM5Y2MxZmNjMDdhM2IzMDhiZWNjYWQ2ODMzYzg4ZjliNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZjI2NDZjOTNiYWNhMWQ3NmJkZTY4YjdkMDEzOGE0YTM5MWIxMjU3Yw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDRkNjQzZjkwNWJmYWZmYWEzNjRkNjJiMzdiYjEwMzI4MGYyMmVkNmQ2YzI4
|
10
|
+
ODA4ZjJhNjY3MzJkYjY2Yzg0MGJjNGQ5NzUwOTI5ZTE5ZDY5ZWM0NTNmZDgx
|
11
|
+
MGQ0ZjQzYjk3NDk5NzJiZDJhNzg5YmEyODgxOGM3ZTI4OWE5OGU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YWJmYzBiODZkMTcwMzY2MTM2OGEyNWRkNWI2MGJhY2YyNjZkMTYxMGMwNjk5
|
14
|
+
NzZiYWYzYTM0YTI1N2Y2ZGZkOThmMTUwZjJlYWE1YTc3YmJmOGMwMmMyZmZi
|
15
|
+
MzQ4NWJjNGIyNjljMWE2NGQ1NjhiNjllZTMyOTdjYmE4MTExODg=
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
queuel (0.
|
4
|
+
queuel (0.3.0)
|
5
5
|
mono_logger
|
6
6
|
multi_json
|
7
7
|
thread
|
@@ -9,6 +9,10 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
+
aws-sdk (1.31.3)
|
13
|
+
json (~> 1.4)
|
14
|
+
nokogiri (>= 1.4.4)
|
15
|
+
uuidtools (~> 2.1)
|
12
16
|
cane (2.5.2)
|
13
17
|
parallel
|
14
18
|
coderay (1.0.9)
|
@@ -54,8 +58,13 @@ GEM
|
|
54
58
|
lumberjack (1.0.3)
|
55
59
|
method_source (0.8.1)
|
56
60
|
mime-types (1.23)
|
61
|
+
mini_portile (0.5.2)
|
57
62
|
mono_logger (1.1.0)
|
58
63
|
multi_json (1.7.3)
|
64
|
+
nokogiri (1.6.1)
|
65
|
+
mini_portile (~> 0.5.0)
|
66
|
+
nokogiri (1.6.1-java)
|
67
|
+
mini_portile (~> 0.5.0)
|
59
68
|
parallel (0.6.5)
|
60
69
|
pry (0.9.12.2)
|
61
70
|
coderay (~> 1.0.5)
|
@@ -97,12 +106,14 @@ GEM
|
|
97
106
|
thread (0.0.8)
|
98
107
|
typhoeus (0.6.3)
|
99
108
|
ethon (~> 0.5.11)
|
109
|
+
uuidtools (2.1.4)
|
100
110
|
|
101
111
|
PLATFORMS
|
102
112
|
java
|
103
113
|
ruby
|
104
114
|
|
105
115
|
DEPENDENCIES
|
116
|
+
aws-sdk
|
106
117
|
bundler (~> 1.3)
|
107
118
|
cane
|
108
119
|
coveralls
|
data/lib/queuel/iron_mq/queue.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'queuel/iron_mq/poller'
|
2
2
|
require 'queuel/base/queue'
|
3
3
|
require 'forwardable'
|
4
|
+
require 'securerandom'
|
4
5
|
module Queuel
|
5
6
|
module IronMq
|
6
7
|
class Queue < Base::Queue
|
@@ -18,12 +19,16 @@ module Queuel
|
|
18
19
|
|
19
20
|
private
|
20
21
|
def pop_bare_message(options = {})
|
21
|
-
queue_connection.get options
|
22
|
+
queue_connection.get options.merge(default_get_message_options)
|
22
23
|
end
|
23
24
|
|
24
25
|
def queue_connection
|
25
26
|
@queue_connection ||= client.queue(name)
|
26
27
|
end
|
28
|
+
|
29
|
+
def default_get_message_options
|
30
|
+
{ c: SecureRandom.hex }
|
31
|
+
end
|
27
32
|
end
|
28
33
|
end
|
29
34
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "forwardable"
|
2
|
+
module Queuel
|
3
|
+
module SNS
|
4
|
+
class Engine < Base::Engine
|
5
|
+
extend Forwardable
|
6
|
+
def_delegators :Queuel, :logger
|
7
|
+
|
8
|
+
AWSSDKMissingError = Class.new(StandardError)
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def client_klass
|
13
|
+
if defined?(::AWS::SNS)
|
14
|
+
::AWS::SNS
|
15
|
+
else
|
16
|
+
begin
|
17
|
+
logger.info "Loading AWS SDK..."
|
18
|
+
require 'aws-sdk'
|
19
|
+
::AWS::SNS
|
20
|
+
rescue LoadError
|
21
|
+
logger.error "Couldn't find aws_sdk gem"
|
22
|
+
raise(AWSSDKMissingError)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'queuel/base/queue'
|
2
|
+
require 'forwardable'
|
3
|
+
module Queuel
|
4
|
+
module SNS
|
5
|
+
class Queue < Base::Queue
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
def push(message, options = {})
|
9
|
+
queue_connection.publish build_push_message(message, options)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def queue_connection
|
15
|
+
@queue_connection ||= client.topics[name]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "forwardable"
|
2
|
+
module Queuel
|
3
|
+
module SQS
|
4
|
+
class Engine < Base::Engine
|
5
|
+
extend Forwardable
|
6
|
+
def_delegators :Queuel, :logger
|
7
|
+
|
8
|
+
AWSSDKMissingError = Class.new(StandardError)
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def client_klass
|
13
|
+
if defined?(::AWS::SQS)
|
14
|
+
::AWS::SQS
|
15
|
+
else
|
16
|
+
begin
|
17
|
+
logger.info "Loading AWS SDK..."
|
18
|
+
require 'aws-sdk'
|
19
|
+
::AWS::SQS
|
20
|
+
rescue LoadError
|
21
|
+
logger.error "Couldn't find aws_sdk gem"
|
22
|
+
raise(AWSSDKMissingError)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Queuel
|
2
|
+
module SQS
|
3
|
+
class Message < Base::Message
|
4
|
+
def raw_body
|
5
|
+
@raw_body ||
|
6
|
+
(message_object && raw_body_with_sns_check) ||
|
7
|
+
encoded_body
|
8
|
+
end
|
9
|
+
|
10
|
+
def delete
|
11
|
+
message_object.delete
|
12
|
+
end
|
13
|
+
|
14
|
+
[:id, :queue].each do |delegate|
|
15
|
+
define_method(delegate) do
|
16
|
+
instance_variable_get("@#{delegate}") || message_object && message_object.public_send(delegate)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def raw_body_with_sns_check
|
21
|
+
begin
|
22
|
+
message_object.as_sns_message.body
|
23
|
+
rescue ::JSON::ParserError
|
24
|
+
message_object.body
|
25
|
+
end
|
26
|
+
end
|
27
|
+
private :raw_body_with_sns_check
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Queuel
|
2
|
+
module SQS
|
3
|
+
class Poller < Base::Poller
|
4
|
+
# Public: poll
|
5
|
+
private
|
6
|
+
|
7
|
+
def built_options
|
8
|
+
options.merge default_options # intentional direction, force defaults
|
9
|
+
end
|
10
|
+
|
11
|
+
def default_options
|
12
|
+
{ n: 1 }
|
13
|
+
end
|
14
|
+
|
15
|
+
def peek_options
|
16
|
+
{ n: self.workers }
|
17
|
+
end
|
18
|
+
|
19
|
+
def queue_size
|
20
|
+
queue.approximate_number_of_messages
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'queuel/base/queue'
|
2
|
+
require 'forwardable'
|
3
|
+
module Queuel
|
4
|
+
module SQS
|
5
|
+
class Queue < Base::Queue
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
def push(message, options = {})
|
9
|
+
queue_connection.send_message build_push_message(message, options)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
def pop_bare_message(options = {})
|
14
|
+
queue_connection.receive_message options
|
15
|
+
end
|
16
|
+
|
17
|
+
def queue_connection
|
18
|
+
@queue_connection ||= client.queues.named(name)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/queuel/version.rb
CHANGED
data/lib/queuel.rb
CHANGED
@@ -20,6 +20,14 @@ require "queuel/iron_mq/queue"
|
|
20
20
|
require "queuel/iron_mq/message"
|
21
21
|
require "queuel/iron_mq/poller"
|
22
22
|
|
23
|
+
require "queuel/sqs/engine"
|
24
|
+
require "queuel/sqs/queue"
|
25
|
+
require "queuel/sqs/message"
|
26
|
+
require "queuel/sqs/poller"
|
27
|
+
|
28
|
+
require "queuel/sns/engine"
|
29
|
+
require "queuel/sns/queue"
|
30
|
+
|
23
31
|
require "queuel/client"
|
24
32
|
|
25
33
|
module Queuel
|
@@ -83,6 +91,10 @@ module Queuel
|
|
83
91
|
const: "IronMq",
|
84
92
|
message: "Using IronMQ"
|
85
93
|
},
|
94
|
+
sqs: {
|
95
|
+
const: "SQS",
|
96
|
+
message: "Using Amazon SQS"
|
97
|
+
},
|
86
98
|
null: {
|
87
99
|
const: "Null",
|
88
100
|
message: "Using Null Engine, for compatability."
|
data/queuel.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "simplecov"
|
25
25
|
spec.add_development_dependency "iron_mq"
|
26
26
|
spec.add_development_dependency "typhoeus"
|
27
|
+
spec.add_development_dependency "aws-sdk"
|
27
28
|
spec.add_development_dependency "guard-bundler"
|
28
29
|
spec.add_development_dependency "guard-rspec"
|
29
30
|
spec.add_development_dependency "guard-cane"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Queuel
|
3
|
+
module SNS
|
4
|
+
describe Engine do
|
5
|
+
it_should_behave_like "an engine"
|
6
|
+
|
7
|
+
describe "getting SNS client" do
|
8
|
+
its(:client_klass) { should == ::AWS::SNS }
|
9
|
+
|
10
|
+
describe "undefined" do
|
11
|
+
before do
|
12
|
+
subject.stub defined?: false
|
13
|
+
end
|
14
|
+
|
15
|
+
its(:client_klass) { should == ::AWS::SNS }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Queuel
|
3
|
+
module SNS
|
4
|
+
describe Queue do
|
5
|
+
let(:queue_object_with_message) { double "QueueObject", get: message, peek: [message] }
|
6
|
+
let(:queue_object_with_nil_message) { double "QueueObject", get: nil, peek: nil }
|
7
|
+
let(:message) { double "Message", body: "uhuh" }
|
8
|
+
let(:client) { double "ClientObject" }
|
9
|
+
let(:name) { "venues queue" }
|
10
|
+
|
11
|
+
subject do
|
12
|
+
described_class.new client, name
|
13
|
+
end
|
14
|
+
|
15
|
+
it { should respond_to :push }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Queuel
|
3
|
+
module SQS
|
4
|
+
describe Engine do
|
5
|
+
it_should_behave_like "an engine"
|
6
|
+
|
7
|
+
describe "getting SQS client" do
|
8
|
+
its(:client_klass) { should == ::AWS::SQS }
|
9
|
+
|
10
|
+
describe "undefined" do
|
11
|
+
before do
|
12
|
+
subject.stub defined?: false
|
13
|
+
end
|
14
|
+
|
15
|
+
its(:client_klass) { should == ::AWS::SQS }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
module Queuel
|
4
|
+
module SQS
|
5
|
+
describe Message do
|
6
|
+
it_should_behave_like "a message"
|
7
|
+
describe "initialization with SQS Object" do
|
8
|
+
let(:queue_double) { double "Queue" }
|
9
|
+
let(:body) { "body" }
|
10
|
+
let(:message_object) { double "SQSMessage", id: 1, body: body, queue: queue_double }
|
11
|
+
subject { described_class.new(message_object) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
subject.stub decode_body?: false
|
15
|
+
message_object.stub(:as_sns_message).and_raise ::JSON::ParserError
|
16
|
+
end
|
17
|
+
|
18
|
+
its(:id) { should == 1 }
|
19
|
+
its(:body) { should == "body" }
|
20
|
+
its(:queue) { should == queue_double }
|
21
|
+
|
22
|
+
describe "with json" do
|
23
|
+
let(:body) { '{"username":"jon"}' }
|
24
|
+
before do
|
25
|
+
subject.stub decode_body?: true
|
26
|
+
end
|
27
|
+
|
28
|
+
its(:body) { should == { username: "jon" } }
|
29
|
+
its(:raw_body) { should == body }
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "with valid SNS message" do
|
33
|
+
let(:sns_body) { "Hello From SNS"}
|
34
|
+
before do
|
35
|
+
message_object.stub(:as_sns_message).and_return double("SNSMessage", body: sns_body)
|
36
|
+
end
|
37
|
+
its(:raw_body) { should == sns_body }
|
38
|
+
its(:raw_body) { should_not == message_object.body}
|
39
|
+
|
40
|
+
describe "that is json" do
|
41
|
+
let(:sns_body) { '{"username":"jon"}' }
|
42
|
+
before do
|
43
|
+
subject.stub decode_body?: true
|
44
|
+
message_object.stub(:as_sns_message).and_return double("SNSMessage", body: sns_body)
|
45
|
+
end
|
46
|
+
|
47
|
+
its(:body) { should == { username: "jon" } }
|
48
|
+
its(:raw_body) { should == sns_body }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe "using message for encoding" do
|
54
|
+
subject { described_class.new }
|
55
|
+
|
56
|
+
describe "setting the body" do
|
57
|
+
let(:hash_json) { { username: "jon" } }
|
58
|
+
let(:string_json) { '{"username":"jon"}' }
|
59
|
+
|
60
|
+
before do
|
61
|
+
subject.body = body
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "valid json hash" do
|
65
|
+
let(:body) { hash_json }
|
66
|
+
|
67
|
+
its(:body) { should == hash_json }
|
68
|
+
its(:raw_body) { should == string_json }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "setting the raw body" do
|
73
|
+
let(:hash_json) { { username: "jon" } }
|
74
|
+
let(:string_json) { '{"username":"jon"}' }
|
75
|
+
|
76
|
+
before do
|
77
|
+
subject.raw_body = raw_body
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "valid json string" do
|
81
|
+
let(:raw_body) { string_json }
|
82
|
+
|
83
|
+
its(:body) { should == hash_json }
|
84
|
+
its(:raw_body) { should == raw_body }
|
85
|
+
end
|
86
|
+
|
87
|
+
describe "valid json hash" do
|
88
|
+
let(:raw_body) { hash_json }
|
89
|
+
|
90
|
+
its(:body) { should == hash_json }
|
91
|
+
its(:raw_body) { should == raw_body }
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Queuel
|
3
|
+
module SQS
|
4
|
+
describe Poller do
|
5
|
+
describe "canned behavior" do
|
6
|
+
it_should_behave_like "a poller"
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "specific to Iron MQ" do
|
10
|
+
let(:queue) { double "Queue" }
|
11
|
+
let(:options) { {} }
|
12
|
+
let(:block) { double "Callable" }
|
13
|
+
subject { described_class.new queue, block, options }
|
14
|
+
|
15
|
+
describe "its options" do
|
16
|
+
its(:built_options) { should == { n: 1 } }
|
17
|
+
its(:default_options) { should == { n: 1 } }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Queuel
|
3
|
+
module IronMq
|
4
|
+
describe Queue do
|
5
|
+
let(:queue_object_with_message) { double "QueueObject", get: message, peek: [message] }
|
6
|
+
let(:queue_object_with_nil_message) { double "QueueObject", get: nil, peek: nil }
|
7
|
+
|
8
|
+
it_should_behave_like "a queue"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
shared_examples "a poller" do
|
2
2
|
let(:message) { double "message" }
|
3
|
-
let(:queue) { double "Queue", peek: [] }
|
3
|
+
let(:queue) { double "Queue", peek: [], approximate_number_of_messages: 0 }
|
4
4
|
let(:block) { lambda{ |m| true } }
|
5
5
|
let(:thread_count) { 1 }
|
6
6
|
let(:options) { {} }
|
@@ -24,6 +24,7 @@ shared_examples "a poller" do
|
|
24
24
|
let(:thread_count) { 1 }
|
25
25
|
before do
|
26
26
|
queue.stub(:peek).and_return *([message] * magnitude), nil
|
27
|
+
queue.stub(:approximate_number_of_messages).and_return *([message] * magnitude).map{|m| m.size}, 0
|
27
28
|
end
|
28
29
|
|
29
30
|
it "can poll" do
|
@@ -37,6 +38,7 @@ shared_examples "a poller" do
|
|
37
38
|
let(:thread_count) { 3 }
|
38
39
|
before do
|
39
40
|
queue.stub(:peek).and_return *([message, message, message] * (magnitude/3)), nil
|
41
|
+
queue.stub(:approximate_number_of_messages).and_return *([message, message, message] * (magnitude/3)).map{|m| m.size}, 0
|
40
42
|
end
|
41
43
|
|
42
44
|
it "can poll" do
|
@@ -52,6 +54,7 @@ shared_examples "a poller" do
|
|
52
54
|
before do
|
53
55
|
subject.stub quit_on_empty?: true
|
54
56
|
queue.stub(:peek).and_return [message], nil
|
57
|
+
queue.stub(:approximate_number_of_messages).and_return 1, 0
|
55
58
|
subject.stub(:pop_new_message).and_return(message, nil)
|
56
59
|
end
|
57
60
|
|
@@ -29,16 +29,17 @@ shared_examples "a queue" do
|
|
29
29
|
before do
|
30
30
|
not_for_null do
|
31
31
|
client.stub queue: queue_object_with_message
|
32
|
+
client.stub named: queue_object_with_message
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
35
36
|
it "should simply return a message" do
|
36
37
|
not_for_null do
|
37
|
-
subject.pop.should be_a Queuel::
|
38
|
+
subject.pop.should be_a Queuel::Base::Message
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
41
|
-
it "should delete after
|
42
|
+
it "should delete after block" do
|
42
43
|
not_for_null do
|
43
44
|
message.should_receive(:delete)
|
44
45
|
subject.pop { |m| m }
|
@@ -51,6 +52,7 @@ shared_examples "a queue" do
|
|
51
52
|
before do
|
52
53
|
not_for_null do
|
53
54
|
client.stub queue: queue_object_with_nil_message
|
55
|
+
client.stub named: queue_object_with_message
|
54
56
|
end
|
55
57
|
end
|
56
58
|
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jon Phenow
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-10 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: simplecov
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: iron_mq
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: typhoeus
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ! '>='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,20 @@ dependencies:
|
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: aws-sdk
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
107
|
requirements:
|
107
108
|
- - ! '>='
|
108
109
|
- !ruby/object:Gem::Version
|
@@ -110,7 +111,6 @@ dependencies:
|
|
110
111
|
- !ruby/object:Gem::Dependency
|
111
112
|
name: guard-bundler
|
112
113
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
@@ -118,7 +118,6 @@ dependencies:
|
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
121
|
requirements:
|
123
122
|
- - ! '>='
|
124
123
|
- !ruby/object:Gem::Version
|
@@ -126,7 +125,6 @@ dependencies:
|
|
126
125
|
- !ruby/object:Gem::Dependency
|
127
126
|
name: guard-rspec
|
128
127
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
128
|
requirements:
|
131
129
|
- - ! '>='
|
132
130
|
- !ruby/object:Gem::Version
|
@@ -134,7 +132,6 @@ dependencies:
|
|
134
132
|
type: :development
|
135
133
|
prerelease: false
|
136
134
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
135
|
requirements:
|
139
136
|
- - ! '>='
|
140
137
|
- !ruby/object:Gem::Version
|
@@ -142,7 +139,6 @@ dependencies:
|
|
142
139
|
- !ruby/object:Gem::Dependency
|
143
140
|
name: guard-cane
|
144
141
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
142
|
requirements:
|
147
143
|
- - ! '>='
|
148
144
|
- !ruby/object:Gem::Version
|
@@ -150,7 +146,6 @@ dependencies:
|
|
150
146
|
type: :development
|
151
147
|
prerelease: false
|
152
148
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
149
|
requirements:
|
155
150
|
- - ! '>='
|
156
151
|
- !ruby/object:Gem::Version
|
@@ -158,7 +153,6 @@ dependencies:
|
|
158
153
|
- !ruby/object:Gem::Dependency
|
159
154
|
name: rb-inotify
|
160
155
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
156
|
requirements:
|
163
157
|
- - ! '>='
|
164
158
|
- !ruby/object:Gem::Version
|
@@ -166,7 +160,6 @@ dependencies:
|
|
166
160
|
type: :development
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
163
|
requirements:
|
171
164
|
- - ! '>='
|
172
165
|
- !ruby/object:Gem::Version
|
@@ -174,7 +167,6 @@ dependencies:
|
|
174
167
|
- !ruby/object:Gem::Dependency
|
175
168
|
name: rb-fsevent
|
176
169
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
170
|
requirements:
|
179
171
|
- - ! '>='
|
180
172
|
- !ruby/object:Gem::Version
|
@@ -182,7 +174,6 @@ dependencies:
|
|
182
174
|
type: :development
|
183
175
|
prerelease: false
|
184
176
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
177
|
requirements:
|
187
178
|
- - ! '>='
|
188
179
|
- !ruby/object:Gem::Version
|
@@ -190,7 +181,6 @@ dependencies:
|
|
190
181
|
- !ruby/object:Gem::Dependency
|
191
182
|
name: rb-fchange
|
192
183
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
184
|
requirements:
|
195
185
|
- - ! '>='
|
196
186
|
- !ruby/object:Gem::Version
|
@@ -198,7 +188,6 @@ dependencies:
|
|
198
188
|
type: :development
|
199
189
|
prerelease: false
|
200
190
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
191
|
requirements:
|
203
192
|
- - ! '>='
|
204
193
|
- !ruby/object:Gem::Version
|
@@ -206,7 +195,6 @@ dependencies:
|
|
206
195
|
- !ruby/object:Gem::Dependency
|
207
196
|
name: cane
|
208
197
|
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
198
|
requirements:
|
211
199
|
- - ! '>='
|
212
200
|
- !ruby/object:Gem::Version
|
@@ -214,7 +202,6 @@ dependencies:
|
|
214
202
|
type: :development
|
215
203
|
prerelease: false
|
216
204
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
205
|
requirements:
|
219
206
|
- - ! '>='
|
220
207
|
- !ruby/object:Gem::Version
|
@@ -222,7 +209,6 @@ dependencies:
|
|
222
209
|
- !ruby/object:Gem::Dependency
|
223
210
|
name: json
|
224
211
|
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
212
|
requirements:
|
227
213
|
- - ~>
|
228
214
|
- !ruby/object:Gem::Version
|
@@ -230,7 +216,6 @@ dependencies:
|
|
230
216
|
type: :development
|
231
217
|
prerelease: false
|
232
218
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
219
|
requirements:
|
235
220
|
- - ~>
|
236
221
|
- !ruby/object:Gem::Version
|
@@ -238,7 +223,6 @@ dependencies:
|
|
238
223
|
- !ruby/object:Gem::Dependency
|
239
224
|
name: coveralls
|
240
225
|
requirement: !ruby/object:Gem::Requirement
|
241
|
-
none: false
|
242
226
|
requirements:
|
243
227
|
- - ! '>='
|
244
228
|
- !ruby/object:Gem::Version
|
@@ -246,7 +230,6 @@ dependencies:
|
|
246
230
|
type: :development
|
247
231
|
prerelease: false
|
248
232
|
version_requirements: !ruby/object:Gem::Requirement
|
249
|
-
none: false
|
250
233
|
requirements:
|
251
234
|
- - ! '>='
|
252
235
|
- !ruby/object:Gem::Version
|
@@ -254,7 +237,6 @@ dependencies:
|
|
254
237
|
- !ruby/object:Gem::Dependency
|
255
238
|
name: thread
|
256
239
|
requirement: !ruby/object:Gem::Requirement
|
257
|
-
none: false
|
258
240
|
requirements:
|
259
241
|
- - ! '>='
|
260
242
|
- !ruby/object:Gem::Version
|
@@ -262,7 +244,6 @@ dependencies:
|
|
262
244
|
type: :runtime
|
263
245
|
prerelease: false
|
264
246
|
version_requirements: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
247
|
requirements:
|
267
248
|
- - ! '>='
|
268
249
|
- !ruby/object:Gem::Version
|
@@ -270,7 +251,6 @@ dependencies:
|
|
270
251
|
- !ruby/object:Gem::Dependency
|
271
252
|
name: mono_logger
|
272
253
|
requirement: !ruby/object:Gem::Requirement
|
273
|
-
none: false
|
274
254
|
requirements:
|
275
255
|
- - ! '>='
|
276
256
|
- !ruby/object:Gem::Version
|
@@ -278,7 +258,6 @@ dependencies:
|
|
278
258
|
type: :runtime
|
279
259
|
prerelease: false
|
280
260
|
version_requirements: !ruby/object:Gem::Requirement
|
281
|
-
none: false
|
282
261
|
requirements:
|
283
262
|
- - ! '>='
|
284
263
|
- !ruby/object:Gem::Version
|
@@ -286,7 +265,6 @@ dependencies:
|
|
286
265
|
- !ruby/object:Gem::Dependency
|
287
266
|
name: multi_json
|
288
267
|
requirement: !ruby/object:Gem::Requirement
|
289
|
-
none: false
|
290
268
|
requirements:
|
291
269
|
- - ! '>='
|
292
270
|
- !ruby/object:Gem::Version
|
@@ -294,7 +272,6 @@ dependencies:
|
|
294
272
|
type: :runtime
|
295
273
|
prerelease: false
|
296
274
|
version_requirements: !ruby/object:Gem::Requirement
|
297
|
-
none: false
|
298
275
|
requirements:
|
299
276
|
- - ! '>='
|
300
277
|
- !ruby/object:Gem::Version
|
@@ -313,7 +290,6 @@ files:
|
|
313
290
|
- .rspec
|
314
291
|
- .ruby-gemset
|
315
292
|
- .ruby-version
|
316
|
-
- .rvmrc
|
317
293
|
- .travis.yml
|
318
294
|
- Gemfile
|
319
295
|
- Gemfile.lock
|
@@ -339,6 +315,12 @@ files:
|
|
339
315
|
- lib/queuel/null/poller.rb
|
340
316
|
- lib/queuel/null/queue.rb
|
341
317
|
- lib/queuel/serialization/json.rb
|
318
|
+
- lib/queuel/sns/engine.rb
|
319
|
+
- lib/queuel/sns/queue.rb
|
320
|
+
- lib/queuel/sqs/engine.rb
|
321
|
+
- lib/queuel/sqs/message.rb
|
322
|
+
- lib/queuel/sqs/poller.rb
|
323
|
+
- lib/queuel/sqs/queue.rb
|
342
324
|
- lib/queuel/version.rb
|
343
325
|
- queuel.gemspec
|
344
326
|
- spec/lib/queuel/base/queue_spec.rb
|
@@ -353,6 +335,12 @@ files:
|
|
353
335
|
- spec/lib/queuel/null/poller_spec.rb
|
354
336
|
- spec/lib/queuel/null/queue_spec.rb
|
355
337
|
- spec/lib/queuel/serialization/json_spec.rb
|
338
|
+
- spec/lib/queuel/sns/engine_spec.rb
|
339
|
+
- spec/lib/queuel/sns/queue_spec.rb
|
340
|
+
- spec/lib/queuel/sqs/engine_spec.rb
|
341
|
+
- spec/lib/queuel/sqs/message_spec.rb
|
342
|
+
- spec/lib/queuel/sqs/poller_spec.rb
|
343
|
+
- spec/lib/queuel/sqs/queue_spec.rb
|
356
344
|
- spec/lib/queuel_spec.rb
|
357
345
|
- spec/spec_helper.rb
|
358
346
|
- spec/support/engine_shared_example.rb
|
@@ -363,33 +351,26 @@ files:
|
|
363
351
|
homepage: ''
|
364
352
|
licenses:
|
365
353
|
- MIT
|
354
|
+
metadata: {}
|
366
355
|
post_install_message:
|
367
356
|
rdoc_options: []
|
368
357
|
require_paths:
|
369
358
|
- lib
|
370
359
|
required_ruby_version: !ruby/object:Gem::Requirement
|
371
|
-
none: false
|
372
360
|
requirements:
|
373
361
|
- - ! '>='
|
374
362
|
- !ruby/object:Gem::Version
|
375
363
|
version: '0'
|
376
|
-
segments:
|
377
|
-
- 0
|
378
|
-
hash: 3833538676296984811
|
379
364
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
380
|
-
none: false
|
381
365
|
requirements:
|
382
366
|
- - ! '>='
|
383
367
|
- !ruby/object:Gem::Version
|
384
368
|
version: '0'
|
385
|
-
segments:
|
386
|
-
- 0
|
387
|
-
hash: 3833538676296984811
|
388
369
|
requirements: []
|
389
370
|
rubyforge_project:
|
390
|
-
rubygems_version:
|
371
|
+
rubygems_version: 2.0.14
|
391
372
|
signing_key:
|
392
|
-
specification_version:
|
373
|
+
specification_version: 4
|
393
374
|
summary: Light Queue wrapper tool
|
394
375
|
test_files:
|
395
376
|
- spec/lib/queuel/base/queue_spec.rb
|
@@ -404,6 +385,12 @@ test_files:
|
|
404
385
|
- spec/lib/queuel/null/poller_spec.rb
|
405
386
|
- spec/lib/queuel/null/queue_spec.rb
|
406
387
|
- spec/lib/queuel/serialization/json_spec.rb
|
388
|
+
- spec/lib/queuel/sns/engine_spec.rb
|
389
|
+
- spec/lib/queuel/sns/queue_spec.rb
|
390
|
+
- spec/lib/queuel/sqs/engine_spec.rb
|
391
|
+
- spec/lib/queuel/sqs/message_spec.rb
|
392
|
+
- spec/lib/queuel/sqs/poller_spec.rb
|
393
|
+
- spec/lib/queuel/sqs/queue_spec.rb
|
407
394
|
- spec/lib/queuel_spec.rb
|
408
395
|
- spec/spec_helper.rb
|
409
396
|
- spec/support/engine_shared_example.rb
|
data/.rvmrc
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
4
|
-
# development environment upon cd'ing into the directory
|
5
|
-
|
6
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
7
|
-
# Only full ruby name is supported here, for short names use:
|
8
|
-
# echo "rvm use 1.9.3" > .rvmrc
|
9
|
-
environment_id="ruby-1.9.3-p392@queuel"
|
10
|
-
|
11
|
-
# Uncomment the following lines if you want to verify rvm version per project
|
12
|
-
# rvmrc_rvm_version="1.20.4 (stable)" # 1.10.1 seams as a safe start
|
13
|
-
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
14
|
-
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
15
|
-
# return 1
|
16
|
-
# }
|
17
|
-
|
18
|
-
# First we attempt to load the desired environment directly from the environment
|
19
|
-
# file. This is very fast and efficient compared to running through the entire
|
20
|
-
# CLI and selector. If you want feedback on which environment was used then
|
21
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
22
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
23
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
24
|
-
then
|
25
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
26
|
-
for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"*
|
27
|
-
do
|
28
|
-
if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]]
|
29
|
-
then \. "${__hook}" || true
|
30
|
-
fi
|
31
|
-
done
|
32
|
-
unset __hook
|
33
|
-
if (( ${rvm_use_flag:=1} >= 2 )) # display only when forced
|
34
|
-
then
|
35
|
-
if [[ $- == *i* ]] # check for interactive shells
|
36
|
-
then echo "Using: \E[32m$GEM_HOME\E[0m" # show the user the ruby and gemset they are using in green
|
37
|
-
else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
|
38
|
-
fi
|
39
|
-
fi
|
40
|
-
else
|
41
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
42
|
-
rvm --create "$environment_id" || {
|
43
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
44
|
-
return 1
|
45
|
-
}
|
46
|
-
fi
|