motion-pusher 0.0.2 → 0.0.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 +4 -4
- data/README.md +6 -1
- data/lib/motion-pusher/motion-pusher-client.rb +5 -0
- data/lib/motion-pusher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05df5b5ce41e1ce229ac9426bd116a2b1b9d7ae3
|
|
4
|
+
data.tar.gz: ab4dad2e03bb63c55805a1d14d9f7820f5e098e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7786f88029d8344b75db4275e89ec173ccf761573246a94ce795e78450e342768adb0ff6c6b613bc3dfa56f5832b5d7fac6c21662fa396239c7d8a2dd9f0750b
|
|
7
|
+
data.tar.gz: f55639e3cfd0244b281fcf9ee2f707a3704654f5e859df5f94ab4ccb09414a66785a01fac99cb802d0bcd047e6aae6c099d94aafc275367fbc5fe7e6637378dd
|
data/README.md
CHANGED
|
@@ -36,7 +36,12 @@ And create your first connection
|
|
|
36
36
|
def initialize
|
|
37
37
|
self.client = MotionPusherClient.new(self)
|
|
38
38
|
client.connect
|
|
39
|
-
client.subscribe_to('cool-public-channel')
|
|
39
|
+
channel = client.subscribe_to('cool-public-channel')
|
|
40
|
+
|
|
41
|
+
channel.bindToEventNamed('new-message', handleWithBlock: -> (channel_event) {
|
|
42
|
+
puts channel_event.data['message']
|
|
43
|
+
})
|
|
44
|
+
|
|
40
45
|
end
|
|
41
46
|
end
|
|
42
47
|
|
|
@@ -19,6 +19,11 @@ class MotionPusherClient
|
|
|
19
19
|
client.subscribeToPrivateChannelNamed(channel)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def unsubscribe_from(channel)
|
|
23
|
+
channel = self.client.channelNamed(channel) if channel.is_a? String
|
|
24
|
+
channel.unsubscribe
|
|
25
|
+
end
|
|
26
|
+
|
|
22
27
|
def config
|
|
23
28
|
@config ||= NSBundle.mainBundle.objectForInfoDictionaryKey('MotionPusher')
|
|
24
29
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: motion-pusher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Larrabee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: motion-cocoapods
|