da_funk 0.20.0 → 0.21.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
  SHA1:
3
- metadata.gz: 79a6ce8ee653044cad480d6cf6c40de2d71228ce
4
- data.tar.gz: 1fa0a15b786f84c8efee101429b50394795bf655
3
+ metadata.gz: adef8fa70692a70841ef0f3a5ef761ad6d3647ed
4
+ data.tar.gz: ce46517ca6d0a4de8764a0e22f12fc33661862a3
5
5
  SHA512:
6
- metadata.gz: cb77cd4e34fedf1206d87baf66e86f008354f67a4142292e2983ec874bec5b1ebe6516eb202133ed1f3bab8793e962f7af182e8fa981f961d448fab07bf8ed07
7
- data.tar.gz: 9e5e0450441d75f6a31137079ab355209dfd258689e3693c0e96397d88d7ac0943cf0a3f5bc9ba85bc918d58b9d785a6cd45564a6b9c9a1b62071a5cea2154a4
6
+ metadata.gz: 6e0f063e26f422281c5c186061ff304193917be9d8538c0d76b9f4f5f6728d212e068fb9d0ef34e24ca51c1957042d3bb7187752876a9123e5fb6c1c2ae41944
7
+ data.tar.gz: 834d3522cb37a0834145146a1e2cba4adc4aae225bc729b73c7c64d8ec68c80a922fa37c7fb8f621aec79cc5d6882ff8b66b49d864240e573fc1b0a78c78fc4a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- da_funk (0.20.0)
4
+ da_funk (0.21.0)
5
5
  archive-zip (~> 0.5)
6
6
  bundler (~> 1.7)
7
7
  cloudwalk_handshake (~> 0.6)
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # DaFunk
2
2
 
3
+ ### 0.21.0 - 2017-11-03
4
+
5
+ - Implement custom Device::Setting.attach_gprs_timeout.
6
+ - Adopt custom GPRS timeout on Network.attach.
7
+ - Adopt temporary processing returns at Device::Network.attach.
8
+
3
9
  ### 0.20.0 - 2017-10-31
4
10
 
5
11
  - Adopt connection_management 1 as default.
@@ -1,4 +1,4 @@
1
1
  module DaFunk
2
- VERSION="0.20.0"
2
+ VERSION="0.21.0"
3
3
  end
4
4
 
@@ -144,6 +144,10 @@ class Device
144
144
  ret
145
145
  end
146
146
 
147
+ def self.attach_timeout
148
+ Device::Setting.attach_gprs_timeout || Device::IO.timeout
149
+ end
150
+
147
151
  def self.attach(options = nil)
148
152
  Device::Network.connected?
149
153
  if self.code != SUCCESS
@@ -151,10 +155,12 @@ class Device
151
155
  self.code = Device::Network.connect
152
156
  Device::Network.connected? if self.code != SUCCESS
153
157
 
154
- hash = try_user(Device::IO.timeout, options) do |process|
158
+ hash = try_user(self.attach_timeout, options) do |process|
155
159
  Device::Network.connected?
156
160
  process[:ret] = self.code
157
- process[:ret] == PROCESSING # if true keep trying
161
+ # TODO develop an interface to keep waiting communication module dial
162
+ # based on platform returns
163
+ process[:ret] == PROCESSING || process[:ret] == 2 || process[:ret] == -3307 # if true keep trying
158
164
  end
159
165
  self.code = hash[:ret]
160
166
 
@@ -114,6 +114,11 @@ class Device
114
114
  def self.tcp_recv_timeout
115
115
  Device::ParamsDat.file["tcp_recv_timeout"] || method_missing(:tcp_recv_timeout)
116
116
  end
117
+
118
+ def self.attach_gprs_timeout
119
+ value = (Device::ParamsDat.file["attach_gprs_timeout"] || method_missing(:attach_gprs_timeout))
120
+ value.to_s.empty? ? value : value.to_s.to_i
121
+ end
117
122
  end
118
123
  end
119
124
 
data/out/da_funk.mrb CHANGED
Binary file
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: 0.20.0
4
+ version: 0.21.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: 2017-10-31 00:00:00.000000000 Z
11
+ date: 2017-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake