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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01a6c5c4cfaa87df52056a81a6d9e88f1bd17ee2
4
- data.tar.gz: 4e86f9c9696f9045c75859c7ebb4f7bccd48367e
3
+ metadata.gz: 60737c44fa29e1e3f4135a484490d791a15a9168
4
+ data.tar.gz: 7cf16a835b527bd4e0d25e5328338f3d7cb1a195
5
5
  SHA512:
6
- metadata.gz: ef7957611ed02f45d76b2826fa48ec87379eec54b2aa301f4b12665a0c51d112ba1ec05754d08fdb280e1abcf342c0adaa6b40534c1a42e139fc677ca360f459
7
- data.tar.gz: 472d3018fa664a200dbd50616c794f7d786242923435fe48976fb4d05a2963e6c7c4e0ef0f0acd670cb27850fdc4b756b2e6f7f98523fe23ae2ff48080803a67
6
+ metadata.gz: 065a5457b3f0997f630e1c9f54881bff4dbdfd47e1170e1be3f97d9209a566b4f5f09d5f03a3665d4a5de4f3a42bc9426bab807b3d3ce5e5b515de809474f88c
7
+ data.tar.gz: 9c35151db31a683d19bee5b7ac13c7a9a4fd505aa46707ef4eb6fd8eb0ffd454759f606b05f8408d3552f15c7b9547deb8f538a7469c5c044d9259996065b4cd
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.114'
2
+ VERSION = '0.0.115'
3
3
  end
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.114
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-05-24 00:00:00.000000000 Z
11
+ date: 2016-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler