amqp_directory_broadcaster 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,3 +1,8 @@
1
1
  USAGE:
2
2
 
3
- broadcast_directory --source "~/source_dir" --broker "amqp://ganga" --exchange "my.exchange" --routing-key "my.event.name"
3
+ gem install amqp_directory_broadcaster
4
+
5
+ For help:
6
+ broadcast_directory --help
7
+
8
+ broadcast_directory --source "~/source_dir" --filter "*.message" --broker "amqp://ganga" --exchange "my.exchange" --routing-key "my.event.name"
@@ -1,3 +1,3 @@
1
1
  module AmqpDirectoryBroadcaster
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -20,6 +20,8 @@ module AmqpDirectoryBroadcaster
20
20
  opt :durable, "Whether or not the exchange is durable", :default => true
21
21
  opt :routing_key, "The routing key to use when publishing messages", :type=>String, :short => '-k'
22
22
  opt :verbose, :default => false
23
+
24
+ opt :auto_delete, "Delete the message files after sending them", :default => true
23
25
  end
24
26
  Trollop::die :exchange, "must be specified" unless opts[:exchange]
25
27
  opts
@@ -55,6 +57,8 @@ module AmqpDirectoryBroadcaster
55
57
  puts "Publishing message:#{message_text}" if options[:verbose]
56
58
  exchange.publish(message_text)
57
59
  end
60
+ puts "Deleting #{message}" if options[:verbose]
61
+ File.delete(message)
58
62
  end
59
63
  ensure
60
64
  bunny.stop
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amqp_directory_broadcaster
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Stults