awful 0.0.114 → 0.0.115
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/sqs.rb +13 -0
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60737c44fa29e1e3f4135a484490d791a15a9168
|
4
|
+
data.tar.gz: 7cf16a835b527bd4e0d25e5328338f3d7cb1a195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065a5457b3f0997f630e1c9f54881bff4dbdfd47e1170e1be3f97d9209a566b4f5f09d5f03a3665d4a5de4f3a42bc9426bab807b3d3ce5e5b515de809474f88c
|
7
|
+
data.tar.gz: 9c35151db31a683d19bee5b7ac13c7a9a4fd505aa46707ef4eb6fd8eb0ffd454759f606b05f8408d3552f15c7b9547deb8f538a7469c5c044d9259996065b4cd
|
data/lib/awful/sqs.rb
CHANGED
@@ -74,5 +74,18 @@ module Awful
|
|
74
74
|
def send(name, msg)
|
75
75
|
sqs.send_message(queue_url: queue_url(name), message_body: msg)
|
76
76
|
end
|
77
|
+
|
78
|
+
desc 'receive NAME_OR_URL', 'receive message from queue'
|
79
|
+
method_option :number, aliases: '-n', type: :numeric, default: 1, desc: 'max messages to receive'
|
80
|
+
def receive(name)
|
81
|
+
sqs.receive_message(queue_url: queue_url(name), max_number_of_messages: options[:number]).messages.tap do |messages|
|
82
|
+
puts messages.map(&:body)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
desc 'purge NAME_OR_URL', 'delete messages in queue'
|
87
|
+
def purge(name)
|
88
|
+
sqs.purge_queue(queue_url: queue_url(name))
|
89
|
+
end
|
77
90
|
end
|
78
91
|
end
|
data/lib/awful/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.115
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ric Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|