promiscuous 0.23 → 0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Promiscuous
2
2
  ===========
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/crowdtap/promiscuous.png?branch=master)](https://secure.travis-ci.org/crowdtap/promiscuous)
4
+ [![Build Status](https://travis-ci.org/crowdtap/promiscuous.png?branch=travis)](https://travis-ci.org/crowdtap/promiscuous)
5
5
 
6
6
  Promiscuous is designed to facilitate designing a
7
7
  [service-oriented architecture](http://en.wikipedia.org/wiki/Service-oriented_architecture)
data/lib/promiscuous.rb CHANGED
@@ -13,7 +13,7 @@ module Promiscuous
13
13
  Config.configure(&block)
14
14
  end
15
15
 
16
- [:info, :error, :warn, :fatal].each do |level|
16
+ [:debug, :info, :error, :warn, :fatal].each do |level|
17
17
  define_method(level) do |msg|
18
18
  Promiscuous::Config.logger.__send__(level, "[promiscuous] #{msg}")
19
19
  end
@@ -16,7 +16,7 @@ module Promiscuous::AMQP:: Bunny
16
16
  end
17
17
 
18
18
  def self.publish(options={})
19
- Promiscuous.info "[publish] (#{options[:exchange_name]}) #{options[:key]} -> #{options[:payload]}"
19
+ Promiscuous.debug "[publish] (#{options[:exchange_name]}) #{options[:key]} -> #{options[:payload]}"
20
20
  exchange(options[:exchange_name]).
21
21
  publish(options[:payload], :key => options[:key], :persistent => true)
22
22
  end
@@ -66,7 +66,7 @@ module Promiscuous::AMQP::RubyAMQP
66
66
  queue = self.channel.queue(queue_name, Promiscuous::Config.queue_options)
67
67
  bindings.each do |binding|
68
68
  queue.bind(exchange(options[:exchange_name]), :routing_key => binding)
69
- Promiscuous.info "[bind] #{queue_name} -> #{binding}"
69
+ Promiscuous.debug "[bind] #{queue_name} -> #{binding}"
70
70
  end
71
71
  block.call(queue) if block
72
72
  end
@@ -78,7 +78,7 @@ module Promiscuous::AMQP::RubyAMQP
78
78
  raise Promiscuous::Error::Connection.new 'Not connected'
79
79
  end
80
80
 
81
- Promiscuous.info "[publish] #{info_msg}"
81
+ Promiscuous.debug "[publish] #{info_msg}"
82
82
  exchange(options[:exchange_name]).
83
83
  publish(options[:payload], :routing_key => options[:key], :persistent => true)
84
84
  end
@@ -16,11 +16,4 @@ module Promiscuous::Config
16
16
 
17
17
  Promiscuous::AMQP.connect
18
18
  end
19
-
20
- # TODO backward compatibility. to be removed.
21
- def self.error_handler=(value)
22
- ActiveSupport::Deprecation.behavior = :stderr
23
- ActiveSupport::Deprecation.warn "'error_handler' is deprecated, please use 'error_notifier'", caller
24
- self.error_notifier = value
25
- end
26
19
  end
@@ -25,7 +25,7 @@ class Promiscuous::Subscriber::Worker
25
25
  # Note: This code always runs on the root Fiber,
26
26
  # so ordering is always preserved
27
27
 
28
- Promiscuous.info "[receive] #{payload}"
28
+ Promiscuous.debug "[receive] #{payload}"
29
29
  parsed_payload = JSON.parse(payload)
30
30
  queue = parsed_payload['__amqp__']
31
31
 
@@ -1,3 +1,3 @@
1
1
  module Promiscuous
2
- VERSION = '0.23'
2
+ VERSION = '0.24'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promiscuous
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.23'
4
+ version: '0.24'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-06 00:00:00.000000000 Z
13
+ date: 2013-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -117,9 +117,9 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - lib/promiscuous/amqp/bunny.rb
121
120
  - lib/promiscuous/amqp/null.rb
122
121
  - lib/promiscuous/amqp/ruby_amqp.rb
122
+ - lib/promiscuous/amqp/bunny.rb
123
123
  - lib/promiscuous/common/lint/base.rb
124
124
  - lib/promiscuous/common/class_helpers.rb
125
125
  - lib/promiscuous/common/options.rb
@@ -165,9 +165,9 @@ files:
165
165
  - lib/promiscuous/subscriber/model.rb
166
166
  - lib/promiscuous/subscriber/base.rb
167
167
  - lib/promiscuous/subscriber/class.rb
168
- - lib/promiscuous/subscriber/worker.rb
169
168
  - lib/promiscuous/subscriber/mongoid.rb
170
169
  - lib/promiscuous/subscriber/lint.rb
170
+ - lib/promiscuous/subscriber/worker.rb
171
171
  - lib/promiscuous/error/connection.rb
172
172
  - lib/promiscuous/error/publisher.rb
173
173
  - lib/promiscuous/error/subscriber.rb