akaer 2.0.0 → 2.1.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.
data/Gemfile CHANGED
@@ -9,12 +9,12 @@ source "http://rubygems.org"
9
9
  gemspec
10
10
 
11
11
  # Testing
12
- gem "rspec", "~> 2.12.0"
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.4"
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
- [![Build Status](https://secure.travis-ci.org/ShogunPanda/akaer.png?branch=master)](http://travis-ci.org/ShogunPanda/akaer)
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 @INTERFACE@ alias @ALIAS@` by default.
48
- * `remove_command`: The command to run for removing an alias. `sudo ifconfig @INTERFACE@ -alias @ALIAS@` by default.
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
@@ -23,6 +23,6 @@ Gem::Specification.new do |gem|
23
23
 
24
24
  gem.required_ruby_version = ">= 1.9.3"
25
25
 
26
- gem.add_dependency("mamertes", "~> 2.0.6")
26
+ gem.add_dependency("mamertes", "~> 2.1.0")
27
27
  gem.add_dependency("mustache", "~> 0.99.4")
28
28
  end
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 @INTERFACE@ alias @ALIAS@", 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 @ALIAS@", meta: localizer.application_meta_command}
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(ARGV)
50
+ self.commands["add"].execute([])
51
51
  end
52
52
  end