carnivore-rabbitmq 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6c07fd460ec81e0f034ca87e8921cc1875943623
4
+ data.tar.gz: 1b189e29186deb48518d7265fbedf355f6f91901
5
+ SHA512:
6
+ metadata.gz: 5763329d492b6930d89e249d05760753625a3e8a88b3417652ccbdf565ca1f7f88a0948a9767eccd31b552a829440295679e69ecf9eb531ee6375d843525446b
7
+ data.tar.gz: bad290fb98f47b3b9116f8f131edc9ed571a7dddf42c732088a0ad5bf2355baad0e44d173147632282e5d762d647c38192c9671c586b4dd846b29d744b11e6f5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.1.4
2
+ * Move routing key set prior to queue setup
3
+ * Add `:publish_to` option to allow publish to exchange instead of queue
4
+
1
5
  # v0.1.2
2
6
  * Include option to provide routing key
3
7
  * Only start message collection if source is receiving
@@ -100,11 +100,11 @@ module Carnivore
100
100
  abort ArgumentError.new("No valid connection arguments defined (:bunny or :march_hare must be defined)")
101
101
  end
102
102
  connection.start
103
+ @routing_key = args[:routing_key]
103
104
  @channel = connection.create_channel
104
105
  @exchange = channel.topic(args[:exchange])
105
106
  @queue = channel.queue(args[:queue], :auto_delete => false).
106
107
  bind(exchange, :routing_key => routing_key)
107
- @routing_key = args.fetch(:routing_key, '_default')
108
108
  @connection
109
109
  end
110
110
 
@@ -124,7 +124,11 @@ module Carnivore
124
124
  # @param payload [Object]
125
125
  def transmit(payload, *_)
126
126
  payload = MultiJson.dump(payload) unless payload.is_a?(String)
127
- queue.publish(payload, :routing_key => routing_key)
127
+ if(args[:publish_via].to_s == 'exchange')
128
+ exchange.publish(payload, :routing_key => routing_key)
129
+ else
130
+ queue.publish(payload, :routing_key => routing_key)
131
+ end
128
132
  end
129
133
 
130
134
  # Confirm message processing
@@ -1,9 +1,6 @@
1
1
  module Carnivore
2
2
  module Rabbitmq
3
- # Custom version class
4
- class Version < Gem::Version
5
- end
6
3
  # Current version of library
7
- VERSION = Version.new('0.1.2')
4
+ VERSION = Gem::Version.new('0.1.4')
8
5
  end
9
6
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carnivore-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Roberts
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: carnivore
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.1.8
22
20
  type: :runtime
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
29
26
  version: 0.1.8
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bunny
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
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
45
40
  version: '0'
46
41
  description: Carnivore RabbitMQ source
@@ -49,38 +44,37 @@ executables: []
49
44
  extensions: []
50
45
  extra_rdoc_files: []
51
46
  files:
52
- - lib/carnivore-rabbitmq/version.rb
53
- - lib/carnivore-rabbitmq/message_collector.rb
54
- - lib/carnivore-rabbitmq/rabbitmq.rb
55
- - lib/carnivore-rabbitmq.rb
56
- - README.md
57
47
  - CHANGELOG.md
58
48
  - CONTRIBUTING.md
59
49
  - LICENSE
50
+ - README.md
51
+ - lib/carnivore-rabbitmq.rb
52
+ - lib/carnivore-rabbitmq/message_collector.rb
53
+ - lib/carnivore-rabbitmq/rabbitmq.rb
54
+ - lib/carnivore-rabbitmq/version.rb
60
55
  homepage: https://github.com/heavywater/carnivore-rabbitmq
61
56
  licenses:
62
57
  - Apache 2.0
58
+ metadata: {}
63
59
  post_install_message:
64
60
  rdoc_options: []
65
61
  require_paths:
66
62
  - lib
67
63
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
64
  requirements:
70
- - - ! '>='
65
+ - - ">="
71
66
  - !ruby/object:Gem::Version
72
67
  version: '0'
73
68
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
69
  requirements:
76
- - - ! '>='
70
+ - - ">="
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0'
79
73
  requirements: []
80
74
  rubyforge_project:
81
- rubygems_version: 1.8.24
75
+ rubygems_version: 2.2.2
82
76
  signing_key:
83
- specification_version: 3
77
+ specification_version: 4
84
78
  summary: Message processing source
85
79
  test_files: []
86
80
  has_rdoc: