rapns 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/rapns/daemon/logger.rb +1 -1
- data/lib/rapns/version.rb +1 -1
- data/spec/rapns/daemon/logger_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -103,4 +103,10 @@ rapns will not attempt to deliver the notification again.
|
|
103
103
|
|
104
104
|
Not implemented yet!
|
105
105
|
|
106
|
+
## Contributing to rapns
|
106
107
|
|
108
|
+
Fork as usual and go crazy!
|
109
|
+
|
110
|
+
When running specs, please note that the ActiveRecord adapter can be changed by setting the `ADAPTER` environment variable. For example: `ADAPTER=postgresql rake`.
|
111
|
+
|
112
|
+
Available adapters for testing are 'mysql', 'mysql2' and 'postgresql'.
|
data/lib/rapns/daemon/logger.rb
CHANGED
@@ -5,7 +5,7 @@ module Rapns
|
|
5
5
|
@options = options
|
6
6
|
log_path = File.join(Rails.root, 'log', 'rapns.log')
|
7
7
|
@logger = ActiveSupport::BufferedLogger.new(log_path, Rails.logger.level)
|
8
|
-
@logger.auto_flushing = Rails.logger.auto_flushing
|
8
|
+
@logger.auto_flushing = Rails.logger.respond_to?(:auto_flushing) ? Rails.logger.auto_flushing : true
|
9
9
|
end
|
10
10
|
|
11
11
|
def info(msg)
|
data/lib/rapns/version.rb
CHANGED
@@ -100,4 +100,11 @@ describe Rapns::Daemon::Logger do
|
|
100
100
|
Airbrake.should_not_receive(:notify)
|
101
101
|
logger.error("string error message")
|
102
102
|
end
|
103
|
+
|
104
|
+
it 'defaults auto_flushing to true if the Rails logger does not respond to auto_flushing' do
|
105
|
+
rails_logger = mock(:info => nil, :error => nil, :level => 0)
|
106
|
+
Rails.logger = rails_logger
|
107
|
+
logger = Rapns::Daemon::Logger.new({})
|
108
|
+
@buffered_logger.auto_flushing.should be_true
|
109
|
+
end
|
103
110
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rapns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-19 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: Easy to use library for Apple's Push Notification Service with Rails
|
15
15
|
3
|