akaer 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/akaer +6 -6
- data/lib/akaer/version.rb +1 -1
- data/spec/akaer/application_spec.rb +6 -6
- metadata +134 -125
data/bin/akaer
CHANGED
@@ -12,14 +12,14 @@ Mamertes.App do
|
|
12
12
|
description "A small utility to add aliases to network interfaces."
|
13
13
|
version Akaer::Version::STRING
|
14
14
|
|
15
|
-
option "configuration", [], {:help => "The configuration file to use. Default is \"~/.akaer_config\".", :default => "~/.akaer_config"}
|
16
|
-
option "interface", [], {:help => "The default interface to manage. Default is \"lo0\".", :default => "lo0"}
|
15
|
+
option "configuration", [], {:type => String, :help => "The configuration file to use. Default is \"~/.akaer_config\".", :default => "~/.akaer_config", :meta => "FILE"}
|
16
|
+
option "interface", [], {:type => String, :help => "The default interface to manage. Default is \"lo0\".", :default => "lo0"}
|
17
17
|
option "addresses", [], {:type => Array, :help => "The default list of aliases to add. Overrides sequential list"}
|
18
|
-
option "start-address", [], {:help => "The starting address for sequential aliases. Default is \"10.0.0.1\".", :default => "10.0.0.1", :meta => "ADDRESS"}
|
18
|
+
option "start-address", [], {:type => String, :help => "The starting address for sequential aliases. Default is \"10.0.0.1\".", :default => "10.0.0.1", :meta => "ADDRESS"}
|
19
19
|
option "aliases", [:S], {:type => Integer, :help => "The number of aliases to add. Default is 5.", :default => 5}
|
20
|
-
option "add-command", [:A], {:help => "The command to run for adding an alias. Default is \"sudo ifconfig @INTERFACE@ alias @ALIAS@\".", :default => "sudo ifconfig @INTERFACE@ alias @ALIAS@", :meta => "COMMAND"}
|
21
|
-
option "remove-command", [:R], {:help => "The command to run for removing an alias. Default is \"sudo ifconfig @INTERFACE@ -alias @ALIAS@\".", :default => "sudo ifconfig @INTERFACE@ -alias @ALIAS@", :meta => "COMMAND"}
|
22
|
-
option "log-file", [], {:help => "The default log file. Default is standard output.", :default => "STDOUT", :meta => "FILE"}
|
20
|
+
option "add-command", [:A], {:type => String, :help => "The command to run for adding an alias. Default is \"sudo ifconfig @INTERFACE@ alias @ALIAS@\".", :default => "sudo ifconfig @INTERFACE@ alias @ALIAS@", :meta => "COMMAND"}
|
21
|
+
option "remove-command", [:R], {:type => String, :help => "The command to run for removing an alias. Default is \"sudo ifconfig @INTERFACE@ -alias @ALIAS@\".", :default => "sudo ifconfig @INTERFACE@ -alias @ALIAS@", :meta => "COMMAND"}
|
22
|
+
option "log-file", [], {:type => String, :help => "The default log file. Default is standard output.", :default => "STDOUT", :meta => "FILE"}
|
23
23
|
option "log-level", [:L], {:type => Integer, :help => "The default log level. Valid values are from 0 to 5 where 0 means \"all messages\". Default is 1.", :default => 1, :meta => "LEVEL"}
|
24
24
|
option "dry-run", [:n], {:help => "Only show which modifications will be done."}
|
25
25
|
option "quiet", [], {:help => "Do not show any message."}
|
data/lib/akaer/version.rb
CHANGED
@@ -9,14 +9,14 @@ require "spec_helper"
|
|
9
9
|
describe Akaer::Application do
|
10
10
|
def create_application(overrides)
|
11
11
|
mamertes_app = Mamertes::App(:run => false) do
|
12
|
-
option "configuration", [], {:default => overrides["configuration"] || "~/.akaer_config"}
|
13
|
-
option "interface", [], {:default => overrides["interface"] || "lo0"}
|
12
|
+
option "configuration", [], {:type => String, :default => overrides["configuration"] || "~/.akaer_config"}
|
13
|
+
option "interface", [], {:type => String, :default => overrides["interface"] || "lo0"}
|
14
14
|
option "addresses", [], {:type => Array, :default => overrides["addresses"] || []}
|
15
|
-
option "start-address", [], {:default => overrides["start-address"] || "10.0.0.1"}
|
15
|
+
option "start-address", [], {:type => String, :default => overrides["start-address"] || "10.0.0.1"}
|
16
16
|
option "aliases", [:S], {:type => Integer, :default => overrides["aliases"] || 5}
|
17
|
-
option "add-command", [:A], {:default => overrides["add-command"] || "sudo ifconfig @INTERFACE@ alias @ALIAS@"}
|
18
|
-
option "remove-command", [:R], {:default => overrides["remove-command"] || "sudo ifconfig @INTERFACE@ -alias @ALIAS@"}
|
19
|
-
option "log-file", [], {:default => overrides["log-file"] || "STDOUT"}
|
17
|
+
option "add-command", [:A], {:type => String, :default => overrides["add-command"] || "sudo ifconfig @INTERFACE@ alias @ALIAS@"}
|
18
|
+
option "remove-command", [:R], {:type => String, :default => overrides["remove-command"] || "sudo ifconfig @INTERFACE@ -alias @ALIAS@"}
|
19
|
+
option "log-file", [], {:type => String, :default => overrides["log-file"] || "STDOUT"}
|
20
20
|
option "log-level", [:L], {:type => Integer, :default => overrides["log-level"] || 1}
|
21
21
|
option "dry-run", [:n], {:default => overrides["dry-run"] || false}
|
22
22
|
option "quiet", [], {:default => overrides["quiet"] || false}
|
metadata
CHANGED
@@ -1,152 +1,158 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: akaer
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 5
|
9
|
+
- 2
|
10
|
+
version: 1.5.2
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Shogun
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
17
|
+
|
18
|
+
date: 2012-08-22 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
none: false
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
hash: 19
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 1
|
30
|
+
- 0
|
21
31
|
version: 1.1.0
|
22
|
-
type: :runtime
|
23
32
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
version: 1.1.0
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
+
type: :runtime
|
34
|
+
name: mamertes
|
35
|
+
requirement: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
33
38
|
none: false
|
34
|
-
requirements:
|
39
|
+
requirements:
|
35
40
|
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 35
|
43
|
+
segments:
|
44
|
+
- 2
|
45
|
+
- 11
|
46
|
+
- 0
|
37
47
|
version: 2.11.0
|
38
|
-
type: :development
|
39
48
|
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 2.11.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: rake
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.9.0
|
54
49
|
type: :development
|
55
|
-
|
56
|
-
|
50
|
+
name: rspec
|
51
|
+
requirement: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
57
54
|
none: false
|
58
|
-
requirements:
|
55
|
+
requirements:
|
59
56
|
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 59
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
- 9
|
62
|
+
- 0
|
61
63
|
version: 0.9.0
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: simplecov
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 0.6.0
|
70
|
-
type: :development
|
71
64
|
prerelease: false
|
72
|
-
|
65
|
+
type: :development
|
66
|
+
name: rake
|
67
|
+
requirement: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
73
70
|
none: false
|
74
|
-
requirements:
|
71
|
+
requirements:
|
75
72
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 7
|
75
|
+
segments:
|
76
|
+
- 0
|
77
|
+
- 6
|
78
|
+
- 0
|
77
79
|
version: 0.6.0
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: pry
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :development
|
87
80
|
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: yard
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 0.8.0
|
102
81
|
type: :development
|
82
|
+
name: simplecov
|
83
|
+
requirement: *id004
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
103
94
|
prerelease: false
|
104
|
-
|
95
|
+
type: :development
|
96
|
+
name: pry
|
97
|
+
requirement: *id005
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
105
100
|
none: false
|
106
|
-
requirements:
|
101
|
+
requirements:
|
107
102
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
hash: 63
|
105
|
+
segments:
|
106
|
+
- 0
|
107
|
+
- 8
|
108
|
+
- 0
|
109
109
|
version: 0.8.0
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: redcarpet
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 2.1.0
|
118
|
-
type: :development
|
119
110
|
prerelease: false
|
120
|
-
|
111
|
+
type: :development
|
112
|
+
name: yard
|
113
|
+
requirement: *id006
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
121
116
|
none: false
|
122
|
-
requirements:
|
117
|
+
requirements:
|
123
118
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
hash: 11
|
121
|
+
segments:
|
122
|
+
- 2
|
123
|
+
- 1
|
124
|
+
- 0
|
125
125
|
version: 2.1.0
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: github-markup
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
|
-
requirements:
|
131
|
-
- - ~>
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: 0.7.0
|
134
|
-
type: :development
|
135
126
|
prerelease: false
|
136
|
-
|
127
|
+
type: :development
|
128
|
+
name: redcarpet
|
129
|
+
requirement: *id007
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
137
132
|
none: false
|
138
|
-
requirements:
|
133
|
+
requirements:
|
139
134
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
hash: 3
|
137
|
+
segments:
|
138
|
+
- 0
|
139
|
+
- 7
|
140
|
+
- 0
|
141
141
|
version: 0.7.0
|
142
|
+
prerelease: false
|
143
|
+
type: :development
|
144
|
+
name: github-markup
|
145
|
+
requirement: *id008
|
142
146
|
description: A small utility to add aliases to network interfaces.
|
143
|
-
email:
|
147
|
+
email:
|
144
148
|
- shogun_panda@me.com
|
145
|
-
executables:
|
149
|
+
executables:
|
146
150
|
- akaer
|
147
151
|
extensions: []
|
152
|
+
|
148
153
|
extra_rdoc_files: []
|
149
|
-
|
154
|
+
|
155
|
+
files:
|
150
156
|
- .gitignore
|
151
157
|
- .travis.yml
|
152
158
|
- .yardopts
|
@@ -188,35 +194,38 @@ files:
|
|
188
194
|
- spec/spec_helper.rb
|
189
195
|
homepage: http://github.com/ShogunPanda/akaer
|
190
196
|
licenses: []
|
197
|
+
|
191
198
|
post_install_message:
|
192
199
|
rdoc_options: []
|
193
|
-
|
200
|
+
|
201
|
+
require_paths:
|
194
202
|
- lib
|
195
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
196
204
|
none: false
|
197
|
-
requirements:
|
198
|
-
- -
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
|
201
|
-
segments:
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
hash: 3
|
209
|
+
segments:
|
202
210
|
- 0
|
203
|
-
|
204
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
|
+
version: "0"
|
212
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
213
|
none: false
|
206
|
-
requirements:
|
207
|
-
- -
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
|
210
|
-
segments:
|
214
|
+
requirements:
|
215
|
+
- - ">="
|
216
|
+
- !ruby/object:Gem::Version
|
217
|
+
hash: 3
|
218
|
+
segments:
|
211
219
|
- 0
|
212
|
-
|
220
|
+
version: "0"
|
213
221
|
requirements: []
|
222
|
+
|
214
223
|
rubyforge_project: akaer
|
215
224
|
rubygems_version: 1.8.24
|
216
225
|
signing_key:
|
217
226
|
specification_version: 3
|
218
227
|
summary: A small utility to add aliases to network interfaces.
|
219
|
-
test_files:
|
228
|
+
test_files:
|
220
229
|
- spec/akaer/application_spec.rb
|
221
230
|
- spec/akaer/configuration_spec.rb
|
222
231
|
- spec/coverage_helper.rb
|