motion-wiretap 1.1.4 → 1.1.5

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: c00742f3bdb9d4cd330e42f101a484650651a0ee
4
- data.tar.gz: e2e14fb9ec9bf951cc51d2b3cae3722ebea63d31
3
+ metadata.gz: 8a0ba74d89d7665f5da90026f2547c5a6b76ca5f
4
+ data.tar.gz: aad024532ba78acde032d7b77f9beabdd37e1212
5
5
  SHA512:
6
- metadata.gz: 9f04ca6c2feb0c9f8c6d95ac969294d4c1b371907775451392c85e2c0fdecc63b1d755c0ea565027456e09226e4a4c1183a9d863f23202401df9ff72756f3891
7
- data.tar.gz: 2cc1e685b0732dd594da91d3aeac89e25614bc78e7f4fbafaffca2255744c382cd69b019122e2873c4f44cface5e9ddb460a0e72a2dc3090694352cc845a1a81
6
+ metadata.gz: d534884d01c3d1f90ebcb09550007cdfb1fab5351162c2e6e5d43d2aa1ede4e87f533a8ac822f74cef120ea2f6fea0ef612e439a818cb70e1cd664c73a6d04f5
7
+ data.tar.gz: aef50be40d464e1642d8da25eebfc3fa1046180e870b5a750ed67d8db1ddb90efb77fae5281df137d1cac0ac03149e00ee920d628fe0c382195d21c5d87691aa
data/README.md CHANGED
@@ -88,7 +88,7 @@ Motion.wiretap(@login_button, :enabled).bind_to(
88
88
  - Jobs (event stream, completion)
89
89
  - UIView Gestures
90
90
  - UIControl events
91
- - NSNotificationCenter (needs specs)
91
+ - NSNotificationCenter
92
92
 
93
93
  ### Key-Value Observation
94
94
 
@@ -33,17 +33,9 @@ module MotionWiretap
33
33
  # signal.next(1, 5) # works great, @added will be 6
34
34
  # signal.next([1, 5]) # this works, too, because of how args are assigned to blocks in ruby
35
35
  # signal.next(1) # a will be 1 and b will be nil (error!)
36
- def next(value, *values)
37
- if values.length > 0
38
- raise "don't do that please" if values.include? SINGLETON
39
- value = [value].concat values
40
- @value = value
41
- trigger_changed(*value)
42
- else
43
- raise "don't do that please" if value == SINGLETON
44
- @value = value
45
- trigger_changed(@value)
46
- end
36
+ def next(*values)
37
+ raise "don't do that please" if values.include? SINGLETON
38
+ trigger_changed(*values)
47
39
  end
48
40
 
49
41
  def complete
@@ -445,11 +445,11 @@ module MotionWiretap
445
445
  class WiretapNotification < Wiretap
446
446
 
447
447
  def initialize(notification, object, block)
448
+ super(&block)
448
449
  @notification = notification
449
450
  @object = object
450
451
 
451
452
  NSNotificationCenter.defaultCenter.addObserver(self, selector: 'notify:', name: @notification, object: @object)
452
- listen(&block) if block
453
453
  end
454
454
 
455
455
  def notify(notification)
@@ -1,3 +1,3 @@
1
1
  module MotionWiretap
2
- VERSION = '1.1.4'
2
+ VERSION = '1.1.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-wiretap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-04-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  ReactiveCocoa is an amazing system, and RubyMotion could benefit from the