wifi-wand 2.9.0 → 2.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/RELEASE_NOTES.md +9 -0
- data/lib/wifi-wand/command_line_interface.rb +3 -3
- data/lib/wifi-wand/models/base_model.rb +4 -4
- data/lib/wifi-wand/models/mac_os_model.rb +1 -1
- data/lib/wifi-wand/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 301b4e83a32c377d251c8cdef985299c26220e4c7322ba72fe43488aa050b94e
|
4
|
+
data.tar.gz: 1880892a4a794728a932ca5e42830ca546c46ce55403d0cf3b2059d92381c707
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8aede3fee3958093e2c5cca0dbf8c01118d79cb2cca7cac815d83aa69f1c45a51f6fb94846cf0ec9bbbf6e5a88e29dd3644af1f5a51d3ad7d191a3c07238134
|
7
|
+
data.tar.gz: 6a7ed65e40957546032570d54e36db58157885de5bc4e11723e4564e7b4d0040ec433876c8a5b5c67943130be5293ae6ad2c159cabf82147464e7abb9338fcb3
|
data/README.md
CHANGED
@@ -28,7 +28,9 @@ output at the time of this writing:
|
|
28
28
|
```
|
29
29
|
$ wifi-wand -h
|
30
30
|
|
31
|
-
|
31
|
+
Syntax is: exe/wifi-wand [options] command [command_options]
|
32
|
+
|
33
|
+
Command Line Switches: [wifi-wand version 2.10.0 at https://github.com/keithrbennett/wifiwand]
|
32
34
|
|
33
35
|
-o {i,j,k,p,y} - outputs data in inspect, JSON, pretty JSON, puts, or YAML format when not in shell mode
|
34
36
|
-p wifi_port_name - override automatic detection of port name with this name
|
@@ -42,6 +44,7 @@ ci - connected to Internet (not just wifi on)?
|
|
42
44
|
co[nnect] network-name - turns wifi on, connects to network-name
|
43
45
|
cy[cle] - turns wifi off, then on, preserving network selection
|
44
46
|
d[isconnect] - disconnects from current network, does not turn off wifi
|
47
|
+
f[orget] network-name - removes network-name(s) from the preferred networks list
|
45
48
|
h[elp] - prints this help
|
46
49
|
i[nfo] - a hash of wifi-related information
|
47
50
|
l[s_avail_nets] - details about available networks
|
@@ -52,7 +55,6 @@ of[f] - turns wifi off
|
|
52
55
|
pa[ssword] network-name - password for preferred network-name
|
53
56
|
pr[ef_nets] - preferred (not necessarily available) networks
|
54
57
|
q[uit] - exits this program (interactive shell mode only) (see also 'x')
|
55
|
-
r[m_pref_nets] network-name - removes network-name(s) from the preferred networks list
|
56
58
|
ro[pen] - open resource ('ipl' (IP Location), 'ipw' (What is My IP), 'spe' (Speed Test), 'this' (wifi-wand home page))
|
57
59
|
t[ill] - returns when the desired Internet connection state is true. Options:
|
58
60
|
1) 'on'/:on, 'off'/:off, 'conn'/:conn, or 'disc'/:disc
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## v2.10.1
|
2
|
+
|
3
|
+
* Fix egregious bug; the 'a' command did not work if `airport` was not in the path; I should have been using the AIRPORT_CMD constant but hard coded `airport` instead.
|
4
|
+
|
5
|
+
## v2.10.0
|
6
|
+
|
7
|
+
* Rename rm[_pref_nets] command to f[orget].
|
8
|
+
|
9
|
+
|
1
10
|
## v2.9.0
|
2
11
|
|
3
12
|
* Add duration of command to verbose output.
|
@@ -64,6 +64,7 @@ ci - connected to Internet (not just wifi on)?
|
|
64
64
|
co[nnect] network-name - turns wifi on, connects to network-name
|
65
65
|
cy[cle] - turns wifi off, then on, preserving network selection
|
66
66
|
d[isconnect] - disconnects from current network, does not turn off wifi
|
67
|
+
f[orget] name1 [..name_n] - removes network-name(s) from the preferred networks list
|
67
68
|
h[elp] - prints this help
|
68
69
|
i[nfo] - a hash of wifi-related information
|
69
70
|
l[s_avail_nets] - details about available networks
|
@@ -74,7 +75,6 @@ of[f] - turns wifi off
|
|
74
75
|
pa[ssword] network-name - password for preferred network-name
|
75
76
|
pr[ef_nets] - preferred (not necessarily available) networks
|
76
77
|
q[uit] - exits this program (interactive shell mode only) (see also 'x')
|
77
|
-
r[m_pref_nets] network-name - removes network-name(s) from the preferred networks list
|
78
78
|
ro[pen] - open resource (#{OPEN_RESOURCES.help_string})
|
79
79
|
t[ill] - returns when the desired Internet connection state is true. Options:
|
80
80
|
1) 'on'/:on, 'off'/:off, 'conn'/:conn, or 'disc'/:disc
|
@@ -409,7 +409,7 @@ When in interactive shell mode:
|
|
409
409
|
end
|
410
410
|
|
411
411
|
|
412
|
-
def
|
412
|
+
def cmd_f(*options)
|
413
413
|
removed_networks = model.remove_preferred_networks(*options)
|
414
414
|
if interactive_mode
|
415
415
|
removed_networks
|
@@ -448,6 +448,7 @@ When in interactive shell mode:
|
|
448
448
|
Command.new('co', 'connect', -> (*options) { cmd_co(*options) }),
|
449
449
|
Command.new('cy', 'cycle', -> (*_options) { cmd_cy }),
|
450
450
|
Command.new('d', 'disconnect', -> (*_options) { cmd_d }),
|
451
|
+
Command.new('f', 'forget', -> (*options) { cmd_f(*options) }),
|
451
452
|
Command.new('h', 'help', -> (*_options) { cmd_h }),
|
452
453
|
Command.new('i', 'info', -> (*_options) { cmd_i }),
|
453
454
|
Command.new('l', 'ls_avail_nets', -> (*_options) { cmd_l }),
|
@@ -459,7 +460,6 @@ When in interactive shell mode:
|
|
459
460
|
Command.new('pa', 'password', -> (*options) { cmd_pa(*options) }),
|
460
461
|
Command.new('pr', 'pref_nets', -> (*_options) { cmd_pr }),
|
461
462
|
Command.new('q', 'quit', -> (*_options) { cmd_q }),
|
462
|
-
Command.new('r', 'rm_pref_nets', -> (*options) { cmd_r(*options) }),
|
463
463
|
Command.new('t', 'till', -> (*options) { cmd_t(*options) }),
|
464
464
|
Command.new('w', 'wifi_on', -> (*_options) { cmd_w }),
|
465
465
|
Command.new('x', 'xit', -> (*_options) { cmd_x })
|
@@ -155,12 +155,12 @@ class BaseModel
|
|
155
155
|
actual_network_name = connected_network_name
|
156
156
|
unless actual_network_name == network_name
|
157
157
|
message = %Q{Expected to connect to "#{network_name}" but }
|
158
|
-
if actual_network_name
|
159
|
-
message <<
|
158
|
+
if actual_network_name.nil? || actual_network_name.empty?
|
159
|
+
message << "unable to connect to any network."
|
160
160
|
else
|
161
|
-
message <<
|
161
|
+
message << %Q{connected to "#{connected_network_name}" instead.}
|
162
162
|
end
|
163
|
-
message << (password ? "provide the correct password?" : "need to provide a password?")
|
163
|
+
message << ' Did you ' << (password ? "provide the correct password?" : "need to provide a password?")
|
164
164
|
raise message
|
165
165
|
end
|
166
166
|
nil
|
@@ -98,7 +98,7 @@ class MacOsModel < BaseModel
|
|
98
98
|
def available_network_names
|
99
99
|
|
100
100
|
# awk command below kindly provided by @nohillside at https://apple.stackexchange.com/questions/320323/how-to-programmatically-get-available-wifi-networks-without-airport-utility.
|
101
|
-
command = %
|
101
|
+
command = %Q{#{AIRPORT_CMD} -s -x | awk '{ if (catch == 1) { print; catch=0 } } /SSID_STR/ { catch=1 }'}
|
102
102
|
stop_condition = ->(response) { ! [nil, ''].include?(response) }
|
103
103
|
|
104
104
|
output = try_os_command_until(command, stop_condition)
|
data/lib/wifi-wand/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wifi-wand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Bennett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|