apnotic 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52c487725927cc9b79c090d0634bce9dd0e96c36
4
- data.tar.gz: e648e0c236840ad9225390158e6ee4e29e2ea21e
3
+ metadata.gz: 3e07860f9233dc0f123731853e0a42d899497109
4
+ data.tar.gz: 6f484d9d537511e2d7a5cd0a8ef75e58dfa87514
5
5
  SHA512:
6
- metadata.gz: 621e9091d1d87837d1d19c9570d42428f9c455d6e73e17276700bbb37f5d7945da120e4c85c4014876ddeb4aee98b74fbf31985f6c8bd0662e1515c0bcc0d7eb
7
- data.tar.gz: 65ee144d6642318eb65cac3d1b0424f93f468e22d586ba855e474853d959ff8365dbd60ba8787f5dfe3fe72176150be4b2d99e3c6bac1981e181d381b37cc5d9
6
+ metadata.gz: 7acc4f79fb3fa12b3ebb98c2cecafb5cb17d12ce70fb649a2a20d0736d5c2cab7068d6ab466f23c03aaa5ba64c2b4a7502090c5f09b73c07c62ec78e5373a697
7
+ data.tar.gz: d1930a1051eff9affaf1ad619d55165cf92e92689892a0d2e41453d75bad9f714eeeeb18be612f519433b285368d8272f9f37bb8c9bbbc4921f49ca7444fa6d9
data/README.md CHANGED
@@ -290,6 +290,7 @@ Apnotic::ConnectionPool.development(connection_options, connection_pool_options)
290
290
  end
291
291
  ```
292
292
 
293
+ > Since `1.4.0.` you are required to pass in a block when defining an `Apnotic::ConnectionPool`. This is to enforce a proper implementation of the library. You can read more [here](https://github.com/ostinelli/apnotic/issues/69).
293
294
 
294
295
  ### `Apnotic::Notification`
295
296
  To create a notification for a specific device token:
@@ -6,6 +6,8 @@ module Apnotic
6
6
 
7
7
  class << self
8
8
  def new(options={}, pool_options={})
9
+ raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given?
10
+
9
11
  ::ConnectionPool.new(pool_options) do
10
12
  connection = Apnotic::Connection.new(options)
11
13
  yield(connection)
@@ -14,6 +16,8 @@ module Apnotic
14
16
  end
15
17
 
16
18
  def development(options={}, pool_options={})
19
+ raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given?
20
+
17
21
  ::ConnectionPool.new(pool_options) do
18
22
  connection = Apnotic::Connection.development(options)
19
23
  yield(connection)
@@ -1,3 +1,3 @@
1
1
  module Apnotic
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apnotic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Ostinelli