panthoot 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ script: bundle exec rspec spec
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
@@ -16,7 +16,7 @@ The next step is to tell Panthoot that you want to be informed whenever MailChim
16
16
 
17
17
  <pre><code>ActiveSupport::Notifications.subscribe('subscribe.panthoot') do |*args|
18
18
  event = ActiveSupport::Notifications::Event.new(*args)
19
- subscription = event.payload[:subscription]
19
+ subscription = event.payload[:subscribe]
20
20
  fired_at = event.payload[:fired_at]
21
21
 
22
22
  # use subscription data however you wish
@@ -24,6 +24,8 @@ class Panthoot::Translator
24
24
 
25
25
  def translate!
26
26
  key = LISTENER_METHODS[type]
27
+ return if key.nil?
28
+
27
29
  ActiveSupport::Notifications.instrument "#{key}.panthoot",
28
30
  key.to_sym => translated_object, :fired_at => fired_at
29
31
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
12
12
 
13
13
  gem.require_paths = ['lib']
14
- gem.version = '0.2.0'
14
+ gem.version = '0.2.1'
15
15
 
16
16
  gem.add_runtime_dependency 'hashie', '1.2.0'
17
17
 
@@ -290,3 +290,9 @@ describe 'MailChimp Webhook Notifications' do
290
290
  end
291
291
  end
292
292
  end
293
+
294
+ describe 'unknown notifications' do
295
+ it "should not complain" do
296
+ lambda { get '/panthoot/hooks' }.should_not raise_error
297
+ end
298
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panthoot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -84,6 +84,7 @@ extensions: []
84
84
  extra_rdoc_files: []
85
85
  files:
86
86
  - .gitignore
87
+ - .travis.yml
87
88
  - Gemfile
88
89
  - LICENSE
89
90
  - README.textile
@@ -123,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
124
  version: '0'
124
125
  segments:
125
126
  - 0
126
- hash: -426635896039990755
127
+ hash: -4193872794997949165
127
128
  required_rubygems_version: !ruby/object:Gem::Requirement
128
129
  none: false
129
130
  requirements:
@@ -132,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  version: '0'
133
134
  segments:
134
135
  - 0
135
- hash: -426635896039990755
136
+ hash: -4193872794997949165
136
137
  requirements: []
137
138
  rubyforge_project:
138
139
  rubygems_version: 1.8.23