motion-pusher 0.0.2 → 0.0.3

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: e7e1f408b0db48f3e18f02c23bf3fdf6509b403a
4
- data.tar.gz: e7023e524d38cbffd9c88376253ecbdd29e7cb06
3
+ metadata.gz: 05df5b5ce41e1ce229ac9426bd116a2b1b9d7ae3
4
+ data.tar.gz: ab4dad2e03bb63c55805a1d14d9f7820f5e098e7
5
5
  SHA512:
6
- metadata.gz: 45a040d589fbfc178ba35bc92c8f09d0a85719aabc0cb2a19c15f50f7f7a23df7a2974bf46b790fffc12d132f3a5e1deb028ba93f0710ccaf890d4390c2ad90f
7
- data.tar.gz: d3c87dc53f217c68585b88aea01c142a853e3c2539b506dd76ae82fc3c2271b6638f098bdd9f5323ab696afdefd9f22d3f0c15d330ca55b60288ffbbaecef9a7
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
@@ -1,3 +1,3 @@
1
1
  module MotionPusher
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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.2
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-24 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-cocoapods