da_funk 3.2.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/RELEASE_NOTES.md +6 -0
- data/lib/da_funk/connection_management.rb +15 -0
- data/lib/da_funk/payment_channel.rb +1 -19
- data/lib/da_funk/version.rb +1 -1
- data/lib/device/network.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c452e3101a2c8ae40cd60a9b27a1c55c2b1e7fab
|
4
|
+
data.tar.gz: 5093a4afe56432c4d93bd217a479d6961893bad7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 888af27fe3acd3e2d711a7cf6a147b16e9b13def9ef3bcaa2047466c3a4e700da6c0245cdd81ddd25442ea0116f02fa80c315e12f497858fa710293f5cd9e54f
|
7
|
+
data.tar.gz: 1b92d0282ac7bb0757a01d0a224e4bf180e75e459adc129ee3f90c4612bf6ba4d6f242efc1ed0b28b92ceb025ea10045781c87f8da637e744b5067c49a1baf03
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
da_funk (3.
|
4
|
+
da_funk (3.3.0)
|
5
5
|
archive-zip (~> 0.5)
|
6
6
|
bundler
|
7
7
|
cloudwalk_handshake
|
@@ -18,9 +18,9 @@ GEM
|
|
18
18
|
cloudwalk (1.14.1)
|
19
19
|
bundler
|
20
20
|
rake
|
21
|
-
cloudwalk_handshake (1.2.
|
21
|
+
cloudwalk_handshake (1.2.3)
|
22
22
|
funky-simplehttp (~> 0.6)
|
23
|
-
funky-emv (0.23.
|
23
|
+
funky-emv (0.23.3)
|
24
24
|
funky-tlv (~> 0.2)
|
25
25
|
funky-simplehttp (0.6.0)
|
26
26
|
funky-tlv (0.2.3)
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
parallel (1.17.0)
|
30
30
|
parser (2.6.2.1)
|
31
31
|
ast (~> 2.4.0)
|
32
|
-
posxml_parser (2.
|
32
|
+
posxml_parser (2.18.0)
|
33
33
|
funky-emv (~> 0.3)
|
34
34
|
psych (3.1.0)
|
35
35
|
psych (3.1.0-x64-mingw32)
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# DaFunk
|
2
2
|
|
3
|
+
### 3.3.0 - 2019-05-07
|
4
|
+
|
5
|
+
- Remove communication errors from PaymentChannel;
|
6
|
+
- Remove unnecessary MAC address log;
|
7
|
+
- Implement ConnectionManager.check (from PaymentChannel).
|
8
|
+
|
3
9
|
### 3.2.1 - 2019-04-11
|
4
10
|
|
5
11
|
- Fix Dir removal on Application.delete.
|
@@ -6,11 +6,26 @@ module DaFunk
|
|
6
6
|
self.drops = 0
|
7
7
|
DEFAULT_DROP_LIMIT = 2
|
8
8
|
|
9
|
+
def self.check
|
10
|
+
if Device::Network.connected?
|
11
|
+
if primary_try?
|
12
|
+
:primary_communication
|
13
|
+
end
|
14
|
+
else
|
15
|
+
if fallback?
|
16
|
+
:fallback_communication
|
17
|
+
else
|
18
|
+
:attach_registration_fail
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
9
23
|
def self.fallback?
|
10
24
|
if ! Device::Network.connected? && self.fallback_valid? && self.conn_automatic_management? &&
|
11
25
|
Device::Setting.media_primary == Device::Setting.media
|
12
26
|
self.drops += 1
|
13
27
|
if self.drops >= self.conn_fallback_drops_limit
|
28
|
+
self.drops = 0
|
14
29
|
return true
|
15
30
|
end
|
16
31
|
end
|
@@ -42,16 +42,6 @@ module DaFunk
|
|
42
42
|
@client
|
43
43
|
end
|
44
44
|
|
45
|
-
def self.error
|
46
|
-
if self.configured?
|
47
|
-
if ConnectionManagement.fallback?
|
48
|
-
:fallback_communication
|
49
|
-
elsif ConnectionManagement.conn_automatic_management?
|
50
|
-
:attach_registration_fail
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
45
|
def self.payment_channel_limit?
|
56
46
|
DaFunk::ParamsDat.exists? && DaFunk::ParamsDat.file["payment_channel_check_limit"] == "1"
|
57
47
|
end
|
@@ -86,11 +76,7 @@ module DaFunk
|
|
86
76
|
if message = @client.check || @client.handshake?
|
87
77
|
self.print_info(I18n.t(:attach_connected), display_message)
|
88
78
|
message
|
89
|
-
else
|
90
|
-
self.error
|
91
79
|
end
|
92
|
-
else
|
93
|
-
self.error
|
94
80
|
end
|
95
81
|
end
|
96
82
|
else
|
@@ -198,12 +184,8 @@ module DaFunk
|
|
198
184
|
|
199
185
|
def check
|
200
186
|
if Device::Network.connected? && self.connected? && self.handshake?
|
201
|
-
|
202
|
-
end
|
203
|
-
if message.nil? && ConnectionManagement.primary_try?
|
204
|
-
return :primary_communication
|
187
|
+
self.read
|
205
188
|
end
|
206
|
-
message
|
207
189
|
end
|
208
190
|
|
209
191
|
private
|
data/lib/da_funk/version.rb
CHANGED
data/lib/device/network.rb
CHANGED
@@ -116,7 +116,6 @@ class Device
|
|
116
116
|
# Device::Network.mac_address(Device::Network::MEDIA_GPRS)
|
117
117
|
# # => "AA:BB:CC:DD:EE:FF"
|
118
118
|
def self.mac_address(media = nil)
|
119
|
-
ContextLog.info "mac_address"
|
120
119
|
unless media
|
121
120
|
self.adapter.mac_address(media2klass(Device::Setting.media))
|
122
121
|
else
|
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.
|
4
|
+
version: 3.3.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-
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|