wifi-wand 2.6.0 → 2.7.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 +4 -4
- data/README.md +1 -1
- data/RELEASE_NOTES.md +9 -0
- data/lib/wifi-wand.rb +6 -1
- data/lib/wifi-wand/command_line_interface.rb +8 -3
- data/lib/wifi-wand/models/base_model.rb +4 -4
- data/lib/wifi-wand/os/imaginary_os.rb +3 -0
- 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: a9019eb4d32759d13110c74b96015eced6ee71a3536c1b9690da24d3a54e812d
|
4
|
+
data.tar.gz: b5e805734cf53495aaeab2e1c67c7bb8104af0759980e2836d14c115dd15e5be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87872063dd2b7d1093a9340263ca742f2006d337dd43c6f2d30a4e12ba9985c3315b6072c9eb2d234f2b75e9b523d8f688a95f890e2feb7e567e4be7904a6bc7
|
7
|
+
data.tar.gz: 9e84a5e8a3a69d425e6c7982571daf3f497e43b845cb5fc663b6c59227af2fda116e6196ad555df0b91b2cca9ed15086c8146052ac4c4e0613b3680ab21ca3de
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ output at the time of this writing:
|
|
28
28
|
```
|
29
29
|
$ wifi-wand -h
|
30
30
|
|
31
|
-
Command Line Switches: [wifi-wand version 2.
|
31
|
+
Command Line Switches: [wifi-wand version 2.7.0 at https://github.com/keithrbennett/wifiwand]
|
32
32
|
|
33
33
|
-o {i,j,k,p,y} - outputs data in inspect, JSON, pretty JSON, puts, or YAML format when not in shell mode
|
34
34
|
-p wifi_port_name - override automatic detection of port name with this name
|
data/RELEASE_NOTES.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## v2.7.0
|
2
|
+
|
3
|
+
* Fix models not being loadable after requiring the gem.
|
4
|
+
* Add message suggesting to gem install awesome_print to help text if not installed.
|
5
|
+
* Add Github project page URL to help text.
|
6
|
+
* Rename 'wifion' to 'wifi_on'.
|
7
|
+
* Change order of verbose output and error raising in run_os_commmand.
|
8
|
+
|
9
|
+
|
1
10
|
## v2.6.0
|
2
11
|
|
3
12
|
* Add support for getting and setting DNS nameservers with 'na'/'nameservers' command.
|
data/lib/wifi-wand.rb
CHANGED
@@ -1,3 +1,8 @@
|
|
1
1
|
require_relative 'wifi-wand/version'
|
2
2
|
|
3
|
-
require_relative 'wifi-wand/main' # recursively requires the other files
|
3
|
+
require_relative 'wifi-wand/main' # recursively requires the other files
|
4
|
+
#
|
5
|
+
# When additional operating systems are added, we will need to modify this
|
6
|
+
# to load only the model appropriate for the environment:
|
7
|
+
|
8
|
+
require_relative 'wifi-wand/models/mac_os_model'
|
@@ -50,7 +50,7 @@ class CommandLineInterface
|
|
50
50
|
|
51
51
|
# Help text to be used when requested by 'h' command, in case of unrecognized or nonexistent command, etc.
|
52
52
|
HELP_TEXT = "
|
53
|
-
Command Line Switches: [wifi-wand version #{WifiWand::VERSION}]
|
53
|
+
Command Line Switches: [wifi-wand version #{WifiWand::VERSION} at https://github.com/keithrbennett/wifiwand]
|
54
54
|
|
55
55
|
-o {i,j,k,p,y} - outputs data in inspect, JSON, pretty JSON, puts, or YAML format when not in shell mode
|
56
56
|
-p wifi_port_name - override automatic detection of port name with this name
|
@@ -97,6 +97,11 @@ When in interactive shell mode:
|
|
97
97
|
verbose: options.verbose,
|
98
98
|
wifi_port: options.wifi_port
|
99
99
|
})
|
100
|
+
|
101
|
+
unless awesome_print_available?
|
102
|
+
HELP_TEXT << "For nicer output, `gem install awesome_print`.\n\n"
|
103
|
+
end
|
104
|
+
|
100
105
|
@model = current_os.create_model(model_options)
|
101
106
|
@interactive_mode = !!(options.interactive_mode)
|
102
107
|
run_shell if @interactive_mode
|
@@ -371,6 +376,7 @@ When in interactive shell mode:
|
|
371
376
|
end
|
372
377
|
end
|
373
378
|
|
379
|
+
|
374
380
|
def cmd_pa(network)
|
375
381
|
password = model.preferred_network_password(network)
|
376
382
|
|
@@ -460,7 +466,7 @@ When in interactive shell mode:
|
|
460
466
|
Command.new('q', 'quit', -> (*_options) { cmd_q }),
|
461
467
|
Command.new('r', 'rm_pref_nets', -> (*options) { cmd_r(*options) }),
|
462
468
|
Command.new('t', 'till', -> (*options) { cmd_t(*options) }),
|
463
|
-
Command.new('w', '
|
469
|
+
Command.new('w', 'wifi_on', -> (*_options) { cmd_w }),
|
464
470
|
Command.new('x', 'xit', -> (*_options) { cmd_x })
|
465
471
|
]
|
466
472
|
end
|
@@ -483,7 +489,6 @@ When in interactive shell mode:
|
|
483
489
|
end
|
484
490
|
|
485
491
|
|
486
|
-
|
487
492
|
def post_processor
|
488
493
|
options.post_processor
|
489
494
|
end
|
@@ -40,15 +40,15 @@ class BaseModel
|
|
40
40
|
|
41
41
|
output = `#{command} 2>&1` # join stderr with stdout
|
42
42
|
|
43
|
-
if $?.exitstatus != 0 && raise_on_error
|
44
|
-
raise OsCommandError.new($?.exitstatus, command, output)
|
45
|
-
end
|
46
|
-
|
47
43
|
if @verbose_mode
|
48
44
|
puts "\n\n#{'-' * 79}\nCommand: #{command}\n\n"
|
49
45
|
puts "#{output}#{'-' * 79}\n\n"
|
50
46
|
end
|
51
47
|
|
48
|
+
if $?.exitstatus != 0 && raise_on_error
|
49
|
+
raise OsCommandError.new($?.exitstatus, command, output)
|
50
|
+
end
|
51
|
+
|
52
52
|
output
|
53
53
|
end
|
54
54
|
|
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.7.0
|
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-03-
|
11
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|