pusher 0.3.4 → 0.3.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.5
@@ -32,7 +32,8 @@ module Pusher
32
32
  private
33
33
 
34
34
  def handle_error(e)
35
- self.logger.error(e.backtrace.join("\n"))
35
+ Pusher.logger.error("#{e.message} (#{e.class})")
36
+ Pusher.logger.debug(e.backtrace.join("\n"))
36
37
  end
37
38
  end
38
39
  end
data/pusher.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pusher}
8
- s.version = "0.3.4"
8
+ s.version = "0.3.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["New Bamboo"]
12
- s.date = %q{2010-04-14}
12
+ s.date = %q{2010-04-15}
13
13
  s.description = %q{Wrapper for pusherapp.com REST api}
14
14
  s.email = %q{support@pusherapp.com}
15
15
  s.extra_rdoc_files = [
data/spec/pusher_spec.rb CHANGED
@@ -20,6 +20,7 @@ describe Pusher do
20
20
  logger.should_receive(:debug).with('foo')
21
21
  Pusher.logger = logger
22
22
  Pusher.logger.debug('foo')
23
+ Pusher.logger = nil
23
24
  end
24
25
 
25
26
  it 'should raise exception if key and secret are missing' do
@@ -83,6 +84,13 @@ describe Pusher do
83
84
  :last_name => 'App'
84
85
  })
85
86
  end
87
+
88
+ it "should log failure if exception raised" do
89
+ @http.should_receive(:post).and_raise("Fail")
90
+ Pusher.logger.should_receive(:error).with("Fail (RuntimeError)")
91
+ Pusher.logger.should_receive(:debug) #backtrace
92
+ Pusher['test_channel'].trigger('new_event', 'Some data')
93
+ end
86
94
  end
87
95
  end
88
96
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - New Bamboo
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-14 00:00:00 +01:00
17
+ date: 2010-04-15 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency