da_funk 3.9.0 → 3.10.0

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: 6c320eb9211f0fc06dcb381ba75d7fcdaba89d7e
4
- data.tar.gz: ff34f839f0afc322b862906febd45e129794eaee
3
+ metadata.gz: 59e7847769b09af85140f7f55b98de9d85b7635f
4
+ data.tar.gz: d2ecbbee3123cbb88e9e87a5e8387e93b4a0908b
5
5
  SHA512:
6
- metadata.gz: 6b1bc034f2987486057a0f8b0d6bcabe7c9edc19037b38d6cd8a62c120be151a971d1fed1539845c91258455b30a270b6f94e00920913a9569094c40b6390478
7
- data.tar.gz: 537f48540589a3dd0f3a8d86a2af52def6fc603e6974a794e6403b4e4446f14d41abd9981e910c6b48313f268224ad3f35b4649edbd51b800a788b1655fd161f
6
+ metadata.gz: 523597cffdb33f4ecf7a1102ad8a6a9254eb10bc013335dadc9f45543cc38bdb3f4a25a1b236f75ce242e9335dd322ab55311bece1798f509493a0b5648eb7fd
7
+ data.tar.gz: dc805e11363b1a3c2718bc047d4c22fc1e34d0438340fe69d273e69b0214a8215427bb0398c2dd6731755f8bd82652c57d47c4b9566faaa4453d9caa7b2c91a0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (3.9.0)
4
+ da_funk (3.10.0)
5
5
  archive-zip (~> 0.5)
6
6
  bundler
7
7
  cloudwalk_handshake
@@ -18,22 +18,22 @@ GEM
18
18
  cloudwalk (1.14.3)
19
19
  bundler
20
20
  rake
21
- cloudwalk_handshake (1.4.2)
21
+ cloudwalk_handshake (1.5.0)
22
22
  funky-simplehttp (~> 0.6)
23
- funky-emv (1.1.0)
23
+ funky-emv (1.2.1)
24
24
  funky-tlv (~> 0.2)
25
25
  funky-simplehttp (0.6.0)
26
26
  funky-tlv (0.2.3)
27
27
  io-like (0.3.0)
28
- jaro_winkler (1.5.2)
28
+ jaro_winkler (1.5.3)
29
29
  parallel (1.17.0)
30
30
  parser (2.6.3.0)
31
31
  ast (~> 2.4.0)
32
- posxml_parser (2.20.0)
32
+ posxml_parser (2.22.0)
33
33
  funky-emv (~> 1)
34
34
  rainbow (3.0.0)
35
35
  rake (12.3.2)
36
- rubocop (0.71.0)
36
+ rubocop (0.72.0)
37
37
  jaro_winkler (~> 1.5.1)
38
38
  parallel (~> 1.10)
39
39
  parser (>= 2.6)
@@ -42,7 +42,7 @@ GEM
42
42
  unicode-display_width (>= 1.4.0, < 1.7)
43
43
  ruby-progressbar (1.10.1)
44
44
  unicode-display_width (1.6.0)
45
- yard (0.9.19)
45
+ yard (0.9.20)
46
46
 
47
47
  PLATFORMS
48
48
  ruby
@@ -1,5 +1,12 @@
1
1
  # DaFunk
2
2
 
3
+ ### 3.10.0 - 2019-07-08
4
+
5
+ - Do not raise load error when cloudwalk_handshake doesn’t exists;
6
+ - Support to app set on PaymentChannel;
7
+ - Set PaymentChannel application on Device::System::klass=;
8
+ - Support CwHttpEvent on PaymentChannel.
9
+
3
10
  ### 3.9.0 - 2019-06-18
4
11
 
5
12
  - Support to uncompress main application and reboot after it.
@@ -3,7 +3,7 @@ module DaFunk
3
3
  DEFAULT_HEARBEAT = "180"
4
4
 
5
5
  class << self
6
- attr_accessor :client
6
+ attr_accessor :client, :app
7
7
  end
8
8
 
9
9
  attr_accessor :handshake_response, :handshake_request, :client, :host, :port
@@ -18,6 +18,17 @@ module DaFunk
18
18
  Device::Setting.logical_number
19
19
  end
20
20
 
21
+ def self.app=(application)
22
+ @app = application
23
+ # if Context::CommunicationChannel send application name thought threads
24
+ if @client == Context::CommunicationChannel
25
+ @client.app = application
26
+ else
27
+ Device::System.klass = application
28
+ end
29
+ @app
30
+ end
31
+
21
32
  def self.handshake_message
22
33
  {
23
34
  "token" => DaFunk::ParamsDat.file["access_token"],
@@ -151,7 +162,11 @@ module DaFunk
151
162
  end
152
163
 
153
164
  def write(value)
154
- @client.write(value)
165
+ if Object.const_defined?(:CwHttpEvent) && value.is_a?(CwHttpEvent)
166
+ @client.write(value.message)
167
+ else
168
+ @client.write(value)
169
+ end
155
170
  end
156
171
 
157
172
  def read
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="3.9.0"
2
+ VERSION="3.10.0"
3
3
  end
4
4
 
@@ -57,6 +57,11 @@ class Device
57
57
  adapter.reboot
58
58
  end
59
59
 
60
+ def self.klass=(application_name)
61
+ DaFunk::PaymentChannel.app = klass
62
+ @klass=application_name
63
+ end
64
+
60
65
  def self.app
61
66
  self.klass.to_s.downcase
62
67
  end
@@ -22,6 +22,10 @@ class CommandLinePlatform
22
22
  require 'posxml_parser'
23
23
  require 'cloudwalk_handshake'
24
24
  CloudwalkHandshake.configure!
25
+ rescue LoadError => e
26
+ unless e.message.include?('cloudwalk_handshake')
27
+ raise e
28
+ end
25
29
  end
26
30
 
27
31
  def self.set_system_values
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.9.0
4
+ version: 3.10.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-06-19 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake