awful 0.0.115 → 0.0.116

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: 60737c44fa29e1e3f4135a484490d791a15a9168
4
- data.tar.gz: 7cf16a835b527bd4e0d25e5328338f3d7cb1a195
3
+ metadata.gz: b636b887fb7b3d4b6bcbbd3232b24959c95aa53e
4
+ data.tar.gz: 135f6a35f7ce58c35477cfdec3f279442bc8084a
5
5
  SHA512:
6
- metadata.gz: 065a5457b3f0997f630e1c9f54881bff4dbdfd47e1170e1be3f97d9209a566b4f5f09d5f03a3665d4a5de4f3a42bc9426bab807b3d3ce5e5b515de809474f88c
7
- data.tar.gz: 9c35151db31a683d19bee5b7ac13c7a9a4fd505aa46707ef4eb6fd8eb0ffd454759f606b05f8408d3552f15c7b9547deb8f538a7469c5c044d9259996065b4cd
6
+ metadata.gz: 082f585bd4c48bcb73a54fe386af7aca6563a28c4e5a68d6c2db7a268baa61814237c4a36cc760aa8777ec8d4f683396dab377c8deafc1b310ccd842349c30b8
7
+ data.tar.gz: 3c7ab2ba1e137eca5fabdb52b0e1f4d7a05edb069bbe0a5884f860c3ba87ecd74258669e9b68e23b26fd8251145880495f61975d47f6774d5c2f83d26ad8dc42
@@ -71,8 +71,16 @@ module Awful
71
71
  end
72
72
 
73
73
  desc 'send NAME_OR_URL MSG', 'send message to queue'
74
- def send(name, msg)
75
- sqs.send_message(queue_url: queue_url(name), message_body: msg)
74
+ def send(name, message)
75
+ sqs.send_message(queue_url: queue_url(name), message_body: message)
76
+ end
77
+
78
+ desc 'send_batch NAME_OR_URL MSGS', 'send a batch of up to 10 messages to queue'
79
+ def send_batch(name, *messages)
80
+ entries = messages.map.with_index do |m, i|
81
+ {id: i.to_s, message_body: m}
82
+ end
83
+ sqs.send_message_batch(queue_url: queue_url(name), entries: entries)
76
84
  end
77
85
 
78
86
  desc 'receive NAME_OR_URL', 'receive message from queue'
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.115'
2
+ VERSION = '0.0.116'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.115
4
+ version: 0.0.116
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister