akaer 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/README.md +4 -3
- data/akaer.gemspec +1 -1
- data/bin/akaer +3 -3
- data/doc/Akaer/Application.html +103 -103
- data/doc/Akaer/ApplicationMethods/General.html +4 -4
- data/doc/Akaer/ApplicationMethods/System.html +23 -23
- data/doc/Akaer/ApplicationMethods.html +3 -3
- data/doc/Akaer/Configuration.html +4 -4
- data/doc/Akaer/Version.html +4 -4
- data/doc/Akaer.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/css/style.css +10 -0
- data/doc/file.README.html +7 -6
- data/doc/frames.html +1 -1
- data/doc/index.html +7 -6
- data/doc/top-level-namespace.html +3 -3
- data/lib/akaer/application.rb +31 -24
- data/lib/akaer/configuration.rb +5 -5
- data/lib/akaer/version.rb +1 -1
- data/locales/en.yml +2 -2
- data/locales/it.yml +2 -2
- data/spec/akaer/application_spec.rb +2 -2
- data/spec/akaer/configuration_spec.rb +2 -2
- metadata +5 -5
data/Gemfile
CHANGED
@@ -9,12 +9,12 @@ source "http://rubygems.org"
|
|
9
9
|
gemspec
|
10
10
|
|
11
11
|
# Testing
|
12
|
-
gem "rspec", "~> 2.
|
12
|
+
gem "rspec", "~> 2.13.0"
|
13
13
|
gem "rake", "~> 10.0.3"
|
14
14
|
|
15
15
|
# Documentation
|
16
16
|
gem "simplecov", ">= 0.7.1"
|
17
17
|
gem "pry", ">= 0"
|
18
|
-
gem "yard", ">= 0.8.
|
18
|
+
gem "yard", ">= 0.8.5"
|
19
19
|
gem "kramdown", ">= 0.14.2"
|
20
20
|
gem "github-markup", ">= 0.7.5"
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# akaer
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/akaer.png)](http://badge.fury.io/rb/akaer)
|
4
4
|
[![Dependency Status](https://gemnasium.com/ShogunPanda/akaer.png?travis)](https://gemnasium.com/ShogunPanda/akaer)
|
5
|
+
[![Build Status](https://secure.travis-ci.org/ShogunPanda/akaer.png?branch=master)](http://travis-ci.org/ShogunPanda/akaer)
|
5
6
|
[![Code Climate](https://codeclimate.com/github/ShogunPanda/akaer.png)](https://codeclimate.com/github/ShogunPanda/akaer)
|
6
7
|
|
7
8
|
A small utility to add aliases to network interfaces.
|
@@ -44,8 +45,8 @@ The file is a plain Ruby file with a single `config` object that supports the fo
|
|
44
45
|
* `addresses`: A specific list of aliases to manage.
|
45
46
|
* `start_address`: The address to start sequential address. `10.0.0.1` by default. Not used if `addresses` is specified.
|
46
47
|
* `aliases`: The number of sequential addresses to add. 5 by default.
|
47
|
-
* `add_command`: The command to run for adding an alias. `sudo ifconfig
|
48
|
-
* `remove_command`: The command to run for removing an alias. `sudo ifconfig
|
48
|
+
* `add_command`: The command to run for adding an alias. `sudo ifconfig {{interface}} alias {{address}}` by default.
|
49
|
+
* `remove_command`: The command to run for removing an alias. `sudo ifconfig {{interface}} -alias {{address}}` by default.
|
49
50
|
* `log_file`: The default log file. By default it logs to standard output.
|
50
51
|
* `log_level`: The default log level. Valid values are from 0 to 5 where 0 means "all messages".
|
51
52
|
* `dry_run`: Only show which modifications will be done.
|
data/akaer.gemspec
CHANGED
data/bin/akaer
CHANGED
@@ -19,8 +19,8 @@ Mamertes.App do
|
|
19
19
|
option :addresses, [], {type: Array, help: localizer.application_help_addresses, meta: localizer.application_meta_addresses}
|
20
20
|
option :start_address, [:s, "start-address"], {type: String, help: localizer.application_help_start_address, default: "10.0.0.1", meta: localizer.application_meta_address}
|
21
21
|
option :aliases, [:S], {type: Integer, help: localizer.application_help_aliases, default: 5, meta: localizer.application_meta_aliases}
|
22
|
-
option :add_command, [:A, "add-command"], {type: String, help: localizer.application_help_add_command, default: "sudo ifconfig
|
23
|
-
option :remove_command, [:R, "remove-command"], {type: String, help: localizer.application_help_remove_command, default: "sudo ifconfig
|
22
|
+
option :add_command, [:A, "add-command"], {type: String, help: localizer.application_help_add_command, default: "sudo ifconfig {{interface}} alias {{address}}", meta: localizer.application_meta_command}
|
23
|
+
option :remove_command, [:R, "remove-command"], {type: String, help: localizer.application_help_remove_command, default: "sudo ifconfig {{interface}} -alias {{address}}", meta: localizer.application_meta_command}
|
24
24
|
option :log_file, [:l, "log-file"], {type: String, help: localizer.application_help_log_file, default: "STDOUT", meta: localizer.application_meta_file}
|
25
25
|
option :log_level, [:L, "log-level"], {type: Integer, help: localizer.application_help_log_level, default: 1, meta: localizer.application_meta_level}
|
26
26
|
option :dry_run, [:n, "dry-run"], {help: localizer.application_help_dry_run}
|
@@ -47,6 +47,6 @@ Mamertes.App do
|
|
47
47
|
end
|
48
48
|
|
49
49
|
action do |command|
|
50
|
-
self.commands["add"].execute(
|
50
|
+
self.commands["add"].execute([])
|
51
51
|
end
|
52
52
|
end
|