da_funk 3.13.1 → 3.14.0

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
  SHA256:
3
- metadata.gz: c7a0e072bbb550b773038c7fff5ba2bcc46be1ff35b2df62fc1a6a4dd34f902f
4
- data.tar.gz: 8c852d4519247ffaab610ff310d04ce078ff464caa12f7fd0053d39cad98ca83
3
+ metadata.gz: d6d2be0f01d5ef7feada8cf88a8592493fcb523ea5952f481edcdcecc867af9d
4
+ data.tar.gz: 42d196ab153ae4a730be3589b68ec1d4649a7a08807c8c6c9d0099a851be6c21
5
5
  SHA512:
6
- metadata.gz: 2cadf0dc591df231c2d992e18d6f24be74ac217ec23223b5d4da7b3871eae0d74071bdfe93b34b29541eb8f4c9a5bda1107e987f5603a1ce7e800b94da59d0d1
7
- data.tar.gz: 30633f44aedf13aa7ea3de26784e63d01899ef7ca7f26651b98dffec560f4cdd532ae58d05dd190eb4bc9230f618a60c8f9a86507740e672410f80b00618f251
6
+ metadata.gz: aead5ab8b0bb1a38588cab2a0240fc0939c561071cf0b1fe4d0ed5ff8db3017225719e2114b9e51d4d308d4415401914bfdafaa789da4c7b1357720957479b76
7
+ data.tar.gz: c9a1a8e5baad4a062c235cfdff96934b37c2a8e2044ba0fc39f51763e1ae5b6fea30349fc141a7ce69d33095ab5259d1717fe4140036f78837fdbf68f394c031
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (3.13.1)
4
+ da_funk (3.14.0)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
@@ -18,7 +18,7 @@ GEM
18
18
  cloudwalk (1.14.3)
19
19
  bundler
20
20
  rake
21
- cloudwalk_handshake (1.9.0)
21
+ cloudwalk_handshake (1.10.0)
22
22
  funky-simplehttp (~> 0.6)
23
23
  funky-emv (1.2.2)
24
24
  funky-tlv (~> 0.2)
@@ -28,13 +28,13 @@ GEM
28
28
  io-like (0.3.0)
29
29
  jaro_winkler (1.5.4)
30
30
  parallel (1.19.1)
31
- parser (2.6.5.0)
31
+ parser (2.7.0.1)
32
32
  ast (~> 2.4.0)
33
33
  posxml_parser (2.25.0)
34
34
  funky-emv (~> 1)
35
35
  rainbow (3.0.0)
36
36
  rake (13.0.1)
37
- rubocop (0.77.0)
37
+ rubocop (0.78.0)
38
38
  jaro_winkler (~> 1.5.1)
39
39
  parallel (~> 1.10)
40
40
  parser (>= 2.6)
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # DaFunk
2
2
 
3
+ ### 3.14.0 - 2019-12-30
4
+
5
+ - Update cloudwalk_handshake (1.10.0);
6
+ - Load metadata after successfully attach;
7
+ - Support Device::Setting::network_init to improve network initialisation control;
8
+ - Notify all threads that modifications on network was made;
9
+
3
10
  ### 3.13.1 - 2019-12-18
4
11
 
5
12
  - Update funky-emv (1.2.2);
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="3.13.1"
2
+ VERSION="3.14.0"
3
3
  end
4
4
 
@@ -191,6 +191,7 @@ class Device
191
191
 
192
192
  def self.attach(options = nil)
193
193
  Device::Network.connected?
194
+ Context::ThreadPubSub.publish('communication_update')
194
195
  if self.code != SUCCESS
195
196
  ThreadScheduler.pausing_communication do
196
197
  self.code = Device::Network.init(*self.config)
@@ -207,6 +208,7 @@ class Device
207
208
  self.code = hash[:ret]
208
209
 
209
210
  if self.code == SUCCESS
211
+ self.load_metadata
210
212
  self.code = Device::Network.dhcp_client(20000) if (wifi? || ethernet?)
211
213
  else
212
214
  self.code = ERR_USER_CANCEL if hash[:key] == Device::IO::CANCEL
@@ -214,9 +216,16 @@ class Device
214
216
  end
215
217
  end
216
218
  end
219
+ Context::ThreadPubSub.publish('communication_update')
217
220
  self.code
218
221
  end
219
222
 
223
+ def self.load_metadata
224
+ if Object.const_defined?(:CwMetadata)
225
+ CwMetadata.load_variable if CwMetadata.respond_to?(:load_variable)
226
+ end
227
+ end
228
+
220
229
  def self.shutdown
221
230
  if self.adapter.started?
222
231
  Device::Network.disconnect
@@ -65,7 +65,8 @@ class Device
65
65
  "transaction_http_enabled" => "1",
66
66
  "transaction_http_host" => HTTP_HOST_PRODUCTION,
67
67
  "transaction_http_port" => HTTP_PORT,
68
- "emv_input_amount_idle" => "0"
68
+ "emv_input_amount_idle" => "0",
69
+ "network_init" => ""
69
70
  }
70
71
 
71
72
  class << self
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: da_funk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.1
4
+ version: 3.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake