mqtt-sub_handler 0.0.3 → 0.0.4

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: aeda8a3940aba680c0036a48c9dc32d1ccaeeb43
4
- data.tar.gz: 46e68dda437bada4ed2a64580c626c2a8cff4c02
3
+ metadata.gz: b8bedfaba639af0313ac3e07e014ea2b481b870c
4
+ data.tar.gz: 5b1347d9c8111108728f0a2a2b83c8e35d7db7de
5
5
  SHA512:
6
- metadata.gz: 99f60c62b4cdd8459e1ce224d201ed22ab05c6348a4e8b10a31aa807d773c4de72312a60a428e8e3509287c592a979f6a82f62d8718ba23850faf87cc3860c9f
7
- data.tar.gz: 394da076be046efaa6baf9d1b326f49b1954a88f4ecceba3f8791440f5767975844843e7b64f408679a9be861fb6934d27aa18629c6462f2830da2dd905488e4
6
+ metadata.gz: 1a319b293a833d5821f26705c666ca113308a3de252284ff22a44346e621bd84bbbb4f5dc7fb8ca7d948188a9302487c64388dbcda0fa4087ab2e7bd2d0ae943
7
+ data.tar.gz: e022767bde84d460fff1fc3375335c43084944ff1f8bf4349e5a9ce80c73b8d405b39ea298d2226b27e8245e366dce014b88c5594f08d8288d73e79eaf51184a
@@ -58,11 +58,12 @@ module MQTT
58
58
 
59
59
  def offer(topicList, data)
60
60
  return if data == @value;
61
+ oldValue = @value;
62
+ @value = data;
61
63
 
62
64
  @callbackList.each do |cb|
63
- cb.call(data, @value);
65
+ cb.call(data, oldValue);
64
66
  end
65
- @value = data;
66
67
  end
67
68
 
68
69
  def attach(callback)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mqtt-sub_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xasin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-17 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mqtt
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 2.6.14
58
+ rubygems_version: 2.6.14.1
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Asynchronous, topic-based MQTT gem