motion-firebase 2.0.14 → 2.1.0

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: 6b64d014fb4ea9562f6db2cddc02d031630da000
4
- data.tar.gz: 0c7d997132fee6155e375229534bd72468825e13
3
+ metadata.gz: 3691ef599b9fdad62c09eb244c65e94ab633c610
4
+ data.tar.gz: cf699742ced08989afc9757f0d00c500b4b1070f
5
5
  SHA512:
6
- metadata.gz: 6b8c67ccd1d005a4548a85af51d3c3904464f13e701e23c935161e4d600ba956471114f9cf20d474d77f220cfa5e96890fc9978ce7a18275552025833501e462
7
- data.tar.gz: 0dc0dd8e5cf908a797e280b5324b84ab86178d5ebc76233b1729e68655bce6502cb950c005c9caa9e7e5a1bf30f2cffe51c33dfeac76341c4c9abe9443289f4a
6
+ metadata.gz: a06ad4faba724a00bf90147a7b8de55847615de8b5dc5e9c8db3d51e5f80e16e7ef08ea2e8edceb200ce14f2664c89155ebb83842a80bb459a41dc55075fd223
7
+ data.tar.gz: 130b95aa9976e104bb3a10db1542cf9fe8f3408074044f89502acb53bcbb655176d93a815bc989c8619f95436a5ecc8d38675e4083e856cb920127d8438613fd
data/README.md CHANGED
@@ -122,10 +122,11 @@ SDK
122
122
  ```ruby
123
123
  firebase.online!
124
124
  firebase.offline!
125
- firebase.on_disconnect(value)
125
+ firebase.connected_state # returns a Firebase ref that changes value depending on connectivity
126
+ firebase.on_disconnect(value) # set the ref to `value` when disconnected
126
127
  firebase.on_disconnect(value) { |error| 'completion block' }
127
- firebase.on_disconnect(value, priority:priority)
128
- firebase.on_disconnect(value, priority:priority) { |error| 'completion block' }
128
+ firebase.on_disconnect(value, priority: priority)
129
+ firebase.on_disconnect(value, priority: priority) { |error| 'completion block' }
129
130
  firebase.on_disconnect(nil)
130
131
  firebase.on_disconnect(nil) { |error| 'completion block' }
131
132
  firebase.on_disconnect({ child: values })
@@ -156,6 +157,7 @@ SDK
156
157
  end
157
158
  # be a good citizen and turn off the listener later!
158
159
  firebase.off(handle)
160
+ ```
159
161
 
160
162
  ##### Transactions
161
163
 
@@ -53,7 +53,11 @@ class Firebase
53
53
  end
54
54
 
55
55
  def auth_state
56
- self.root[".info/authenticated"]
56
+ self.root['.info/authenticated']
57
+ end
58
+
59
+ def connected_state
60
+ self.root['.info/connected']
57
61
  end
58
62
 
59
63
  def offline!
@@ -1,5 +1,5 @@
1
1
  module Motion
2
2
  module Firebase
3
- Version = '2.0.14'
3
+ Version = '2.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-firebase
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray