bmo 0.8.2 → 0.8.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d609b4d26395f9bfda12fb143c998bab3488ca0b
4
- data.tar.gz: 5d9c2545c5437cded63ebe1649f665561fd46549
3
+ metadata.gz: 40d5a73374684ddba44fd18a613e3a9a484b84c3
4
+ data.tar.gz: 86dd43fc7701bc02f5f759bcb72707bc240d9168
5
5
  SHA512:
6
- metadata.gz: 1abfaa97370cdfc108360ed3084743c53296198bf2d584a46ba16747b427a95187a81decd198ba8c2d52a10b0f6c6d50233eb1e79f39355b1d989b4c03901dc0
7
- data.tar.gz: d43b396920e000f54ffce756fae5e68ab8a4c0bfc98cd7f3843a13d66581f898e547cd1a5111766300e7eec0f4329ae345cebe0f82fef02dd9a6fc23ef54d2b5
6
+ metadata.gz: 1479b240e45270424cc9ddf7074f68d400648af5a2e7a1bf42bef7dfb8022ceb3c82394e49525f4c3938534a5f050bcf182685fccd14ee91e6db566bccf1d691
7
+ data.tar.gz: 46b1fcd4de4ed3d8972db59839c4e8995e30eb7b2d69680b95ecc61ff8202521abddb545cd8116d59d4933b37cf005c4bae98ea6bf4c00c558bfc5e9b18a3ecf
data/Gemfile.lock CHANGED
@@ -26,7 +26,7 @@ GIT
26
26
  PATH
27
27
  remote: .
28
28
  specs:
29
- bmo (0.8.2)
29
+ bmo (0.9.0)
30
30
  equalizer (~> 0.0.0)
31
31
  faraday (~> 0.8.0)
32
32
 
@@ -53,9 +53,12 @@ GEM
53
53
  builder (3.1.4)
54
54
  celluloid (0.15.2)
55
55
  timers (~> 1.1.0)
56
+ celluloid-io (0.15.0)
57
+ celluloid (>= 0.15.0)
58
+ nio4r (>= 0.5.0)
56
59
  coderay (1.1.0)
57
60
  columnize (0.3.6)
58
- coolline (0.4.2)
61
+ coolline (0.4.3)
59
62
  coveralls (0.7.0)
60
63
  multi_json (~> 1.3)
61
64
  rest-client
@@ -63,18 +66,18 @@ GEM
63
66
  term-ansicolor
64
67
  thor
65
68
  debug_inspector (0.0.2)
66
- debugger (1.6.3)
69
+ debugger (1.6.5)
67
70
  columnize (>= 0.3.1)
68
71
  debugger-linecache (~> 1.2.0)
69
- debugger-ruby_core_source (~> 1.2.4)
72
+ debugger-ruby_core_source (~> 1.3.1)
70
73
  debugger-linecache (1.2.0)
71
- debugger-ruby_core_source (1.2.4)
74
+ debugger-ruby_core_source (1.3.1)
72
75
  diff-lcs (1.2.5)
73
76
  diffy (3.0.1)
74
- docile (1.1.1)
75
- equalizer (0.0.8)
77
+ docile (1.1.3)
78
+ equalizer (0.0.9)
76
79
  erubis (2.7.0)
77
- faraday (0.8.8)
80
+ faraday (0.8.9)
78
81
  multipart-post (~> 1.2.0)
79
82
  ffi (1.9.3)
80
83
  flay (2.4.0)
@@ -91,7 +94,7 @@ GEM
91
94
  diff-lcs (~> 1.1)
92
95
  mime-types (~> 1.15)
93
96
  posix-spawn (~> 0.3.6)
94
- guard (2.2.4)
97
+ guard (2.4.0)
95
98
  formatador (>= 0.2.4)
96
99
  listen (~> 2.1)
97
100
  lumberjack (~> 1.0)
@@ -100,13 +103,13 @@ GEM
100
103
  guard-bundler (2.0.0)
101
104
  bundler (~> 1.0)
102
105
  guard (~> 2.2)
103
- guard-rspec (4.2.0)
104
- guard (>= 2.1.1)
106
+ guard-rspec (4.2.6)
107
+ guard (~> 2.1)
105
108
  rspec (>= 2.14, < 4.0)
106
109
  guard-rubocop (1.0.1)
107
110
  guard (~> 2.0)
108
111
  rubocop (~> 0.10)
109
- haml (4.0.4)
112
+ haml (4.0.5)
110
113
  tilt
111
114
  hirb (0.7.1)
112
115
  i18n (0.6.9)
@@ -122,22 +125,25 @@ GEM
122
125
  pry-remote (>= 0.1.7)
123
126
  pry-stack_explorer (~> 0.4.9)
124
127
  railties (>= 3.0, < 5.0)
125
- listen (2.4.0)
128
+ json (1.8.1)
129
+ listen (2.5.0)
126
130
  celluloid (>= 0.15.2)
131
+ celluloid-io (>= 0.15.0)
127
132
  rb-fsevent (>= 0.9.3)
128
133
  rb-inotify (>= 0.9)
129
134
  lumberjack (1.0.4)
130
135
  method_source (0.8.2)
131
136
  mime-types (1.25.1)
132
137
  minitest (4.7.5)
133
- multi_json (1.8.2)
138
+ multi_json (1.8.4)
134
139
  multipart-post (1.2.0)
135
- parser (2.0.0)
140
+ nio4r (1.0.0)
141
+ parser (2.1.4)
136
142
  ast (~> 1.1)
137
143
  slop (~> 3.4, >= 3.4.5)
138
144
  posix-spawn (0.3.8)
139
145
  powerpack (0.0.9)
140
- pry (0.9.12.4)
146
+ pry (0.9.12.6)
141
147
  coderay (~> 1.0)
142
148
  method_source (~> 0.8)
143
149
  slop (~> 3.4)
@@ -153,7 +159,7 @@ GEM
153
159
  pry (>= 0.9.8)
154
160
  pry-rails (0.3.2)
155
161
  pry (>= 0.9.10)
156
- pry-remote (0.1.7)
162
+ pry-remote (0.1.8)
157
163
  pry (~> 0.9)
158
164
  slop (~> 3.0)
159
165
  pry-stack_explorer (0.4.9.1)
@@ -167,13 +173,13 @@ GEM
167
173
  activesupport (= 4.0.2)
168
174
  rake (>= 0.8.7)
169
175
  thor (>= 0.18.1, < 2.0)
170
- rainbow (1.1.4)
171
- rake (10.1.0)
172
- rb-fsevent (0.9.3)
173
- rb-inotify (0.9.2)
176
+ rainbow (2.0.0)
177
+ rake (10.1.1)
178
+ rb-fsevent (0.9.4)
179
+ rb-inotify (0.9.3)
174
180
  ffi (>= 0.5.0)
175
- reek (1.3.4)
176
- ruby2ruby (~> 2.0.2)
181
+ reek (1.3.6)
182
+ ruby2ruby (~> 2.0.7)
177
183
  ruby_parser (~> 3.2)
178
184
  sexp_processor
179
185
  rest-client (1.6.7)
@@ -183,34 +189,35 @@ GEM
183
189
  rspec-expectations (~> 2.14.0)
184
190
  rspec-mocks (~> 2.14.0)
185
191
  rspec-core (2.14.7)
186
- rspec-expectations (2.14.4)
192
+ rspec-expectations (2.14.5)
187
193
  diff-lcs (>= 1.1.3, < 2.0)
188
- rspec-mocks (2.14.4)
189
- rubocop (0.15.0)
190
- parser (~> 2.0)
194
+ rspec-mocks (2.14.5)
195
+ rubocop (0.18.1)
196
+ json (>= 1.7.7, < 2)
197
+ parser (~> 2.1.3)
191
198
  powerpack (~> 0.0.6)
192
- rainbow (>= 1.1.4)
193
- ruby2ruby (2.0.6)
199
+ rainbow (>= 1.99.1, < 3.0)
200
+ ruby2ruby (2.0.7)
194
201
  ruby_parser (~> 3.1)
195
202
  sexp_processor (~> 4.0)
196
- ruby_parser (3.2.2)
203
+ ruby_parser (3.4.0)
197
204
  sexp_processor (~> 4.1)
198
- sexp_processor (4.4.0)
205
+ sexp_processor (4.4.1)
199
206
  simplecov (0.8.2)
200
207
  docile (~> 1.1.0)
201
208
  multi_json
202
209
  simplecov-html (~> 0.8.0)
203
210
  simplecov-html (0.8.0)
204
211
  slop (3.4.7)
205
- term-ansicolor (1.2.2)
206
- tins (~> 0.8)
212
+ term-ansicolor (1.3.0)
213
+ tins (~> 1.0)
207
214
  terminal-notifier-guard (1.5.3)
208
215
  thor (0.18.1)
209
216
  thread_safe (0.1.3)
210
217
  atomic
211
218
  tilt (2.0.0)
212
219
  timers (1.1.0)
213
- tins (0.13.1)
220
+ tins (1.0.0)
214
221
  tzinfo (0.3.38)
215
222
  yard (0.8.7.3)
216
223
 
data/README.md CHANGED
@@ -9,13 +9,19 @@
9
9
 
10
10
  # BMO (Beemo)
11
11
 
12
- [![Build Status](https://travis-ci.org/antoinelyset/bmo.png?branch=master)](https://travis-ci.org/antoinelyset/bmo)
13
- [![Code Climate](https://codeclimate.com/github/antoinelyset/bmo.png)](https://codeclimate.com/github/antoinelyset/bmo)
14
- [![Gem Version](https://badge.fury.io/rb/bmo.png)](http://badge.fury.io/rb/bmo)
15
- [![Dependency Status](https://gemnasium.com/antoinelyset/bmo.png)](https://gemnasium.com/antoinelyset/bmo)
16
-
17
12
  BMO is a gem to Push Notifications to iOS (via APNS) and Android (via GCM)
18
13
 
14
+ | Project | BMO |
15
+ |------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
16
+ | Gem Name | bmo |
17
+ | License | [MIT](https://github.com/antoinelyset/bmo/blob/master/LICENSE) |
18
+ | Version | [![Gem Version](https://badge.fury.io/rb/bmo.png)](http://badge.fury.io/rb/bmo) |
19
+ | Dependency Status | [![Dependency Status](https://gemnasium.com/antoinelyset/bmo.png)](https://gemnasium.com/antoinelyset/bmo) |
20
+ | Continuous Integration | [![Build Status](https://secure.travis-ci.org/antoinelyset/bmo.png?branch=master)](https://travis-ci.org/antoinelyset/bmo) |
21
+ | Test Coverage | [![Coverage Status](https://coveralls.io/repos/antoinelyset/bmo/badge.png)](https://coveralls.io/r/antoinelyset/bmo) |
22
+ | Homepage | [BMO](https://github.com/antoinelyset/bmo) |
23
+ | Documentation | [Rdoc](http://rdoc.info/github/antoinelyset/bmo/frames) |
24
+
19
25
  ## Installation
20
26
 
21
27
  ```
@@ -70,7 +76,7 @@ data = {message: "Hello from BMO!"}
70
76
  BMO.send_android_notification(token, data)
71
77
  ```
72
78
 
73
- The data contennt is described here :
79
+ The data content's is described here :
74
80
 
75
81
  [http://developer.android.com/google/gcm/server.html](http://developer.android.com/google/gcm/server.html)
76
82
 
@@ -51,7 +51,7 @@ module BMO
51
51
  # @return <Array[FeedbackTuple]> A feedback tuple contains the time
52
52
  # when Apple determined that the app no longer exists on the device,
53
53
  # and a the token of device token
54
- def get_feedback
54
+ def feedback
55
55
  connection = APNS::Connection.new(@feedback_host, @feedback_port,
56
56
  @cert_path, @cert_pass)
57
57
  connection.connect do |socket|
data/lib/bmo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  # Main BMO module, version get right here
3
3
  module BMO
4
- VERSION = '0.8.2'.freeze
4
+ VERSION = '0.8.3'.freeze
5
5
  end
data/lib/bmo.rb CHANGED
@@ -33,6 +33,7 @@ module BMO
33
33
  # Chapters/ApplePushService.html
34
34
  def self.send_ios_notification(device_token, data)
35
35
  notification = APNS::Notification.new(device_token, data)
36
+ notification.validate!
36
37
  apns_client.send_notification(notification)
37
38
  end
38
39
 
@@ -40,8 +41,8 @@ module BMO
40
41
  #
41
42
  # @return [Array<FeedbackTuple>] Feedback Object containing
42
43
  # a time and a token
43
- def self.get_ios_feedback
44
- apns_client.get_feedback
44
+ def self.ios_feedback
45
+ apns_client.feedback
45
46
  end
46
47
 
47
48
  # Send android notification with the configuration of BMO
@@ -55,6 +56,7 @@ module BMO
55
56
  # @see http://developer.android.com/google/gcm/server.html]
56
57
  def self.send_android_notification(device_token, data)
57
58
  notification = GCM::Notification.new(device_token, data)
59
+ notification.validate!
58
60
  gcm_client.send_notification(notification)
59
61
  end
60
62
 
@@ -44,14 +44,14 @@ describe BMO::APNS::Notification::DeviceToken do
44
44
 
45
45
  it 'returns false if the token is not 64 chars' do
46
46
  device_token = described_class.new('a' * 63)
47
- expect { device_token.validate! }.to raise_error
48
- BMO::APNS::Notification::DeviceToken::MalformedDeviceToken
47
+ expect { device_token.validate! }.to raise_error(
48
+ BMO::APNS::Notification::DeviceToken::MalformedDeviceToken)
49
49
  end
50
50
 
51
51
  it 'returns false if the token contains a special char' do
52
52
  device_token = described_class.new(('a' * 63) + '"')
53
- expect { device_token.validate! }.to raise_error
54
- BMO::APNS::Notification::DeviceToken::MalformedDeviceToken
53
+ expect { device_token.validate! }.to raise_error(
54
+ BMO::APNS::Notification::DeviceToken::MalformedDeviceToken)
55
55
  end
56
56
  end
57
57
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Lyset
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-13 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equalizer