da_funk 0.4.20 → 0.5.1
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 +4 -4
- data/Gemfile.lock +2 -2
- data/RELEASE_NOTES.md +8 -0
- data/lib/device/network.rb +33 -0
- data/lib/device/version.rb +1 -1
- data/lib/serfx/connection.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: 1b480b5631767e85d7cb2ccbbd975c1be1855810
|
4
|
+
data.tar.gz: 7dc71b04d56979458cd23e44a27698028df6b890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c5eba2efcb502d26c7661dd90f8318005bce47d060a4dca15c8a84c46e83e476f1d259866cb512379a7e8a049798bd6d2a194398d88024235fe51300d45a58
|
7
|
+
data.tar.gz: 37dc24ed9e61482dabd643ec97261d9f258682bdd53ab79f4e179dc8dabbb392d3870afe078cdda3814c71981d0c5a69b62d6b4a90de50508970d3e5d6aa9a62
|
data/Gemfile.lock
CHANGED
@@ -7,7 +7,7 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
da_funk (0.
|
10
|
+
da_funk (0.5.1)
|
11
11
|
bundler (~> 1.7)
|
12
12
|
cloudwalk_handshake (~> 0.4)
|
13
13
|
rake (~> 10.4)
|
@@ -16,7 +16,7 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
cloudwalk_handshake (0.4.
|
19
|
+
cloudwalk_handshake (0.4.12)
|
20
20
|
rake (10.4.2)
|
21
21
|
yard (0.8.7.6)
|
22
22
|
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# DaFunk
|
2
2
|
|
3
|
+
### 0.5.1 - 2015-12-16 - Update cloudwalk_handshake
|
4
|
+
- Update cloudwlak_handshake to version 0.4.12.
|
5
|
+
|
6
|
+
### 0.5.0 - 2015-12-14 - Wifi scan
|
7
|
+
- Add support to Wifi scan.
|
8
|
+
- Add support to check GPRS and Wifi signal.
|
9
|
+
- Fix notification socket reading.
|
10
|
+
|
3
11
|
### 0.4.20 - 2015-12-10 - Refactoring Notification
|
4
12
|
- Implement try method on helper to be use on by communication tries.
|
5
13
|
- Serfx#auth now receives the authentication key as a parameter too, so that could be called externally in a determined moment, example TOTP authentication on the right moment (after socket open, avoiding authentication problems).
|
data/lib/device/network.rb
CHANGED
@@ -77,6 +77,39 @@ class Device
|
|
77
77
|
adapter.disconnect
|
78
78
|
end
|
79
79
|
|
80
|
+
# Check signal value
|
81
|
+
#
|
82
|
+
# @return [Fixnum] Signal value between 0 and 5.
|
83
|
+
def self.signal
|
84
|
+
adapter.signal
|
85
|
+
end
|
86
|
+
|
87
|
+
# Scan for wifi aps available
|
88
|
+
#
|
89
|
+
# @return [Array] Return an array of hash values
|
90
|
+
# containing the values necessary to configure connection
|
91
|
+
#
|
92
|
+
# @example
|
93
|
+
# aps = Device::Network.scan
|
94
|
+
# # create a selection to menu method
|
95
|
+
# selection = aps.inject({}) do |selection, hash|
|
96
|
+
# selection[hash[:essid]] = hash; selection
|
97
|
+
# end
|
98
|
+
# selected = menu("Select SSID:", selection)
|
99
|
+
#
|
100
|
+
# Device::Setting.password = form("Password",
|
101
|
+
# :min => 0, :max => 127, :default => Device::Setting.password)
|
102
|
+
# Device::Setting.authentication = selected[:authentication]
|
103
|
+
# Device::Setting.essid = selected[:essid]
|
104
|
+
# Device::Setting.channel = selected[:channel]
|
105
|
+
# Device::Setting.cipher = selected[:cipher]
|
106
|
+
# Device::Setting.mode = selected[:mode]
|
107
|
+
def self.scan
|
108
|
+
if wifi?
|
109
|
+
adapter.scan if Device::Network.init(*self.config)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
80
113
|
def self.dhcp_client(timeout)
|
81
114
|
time = Time.now + (timeout.to_f / 1000.0)
|
82
115
|
ret = adapter.dhcp_client_start
|
data/lib/device/version.rb
CHANGED
data/lib/serfx/connection.rb
CHANGED
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.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Scalone
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|