akaer 1.5.8 → 2.0.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/.travis-gemfile +13 -0
- data/.travis.yml +6 -4
- data/Gemfile +12 -1
- data/README.md +7 -4
- data/Rakefile +2 -9
- data/akaer.gemspec +5 -10
- data/bin/akaer +19 -17
- data/doc/Akaer/Application.html +1186 -860
- data/doc/Akaer/ApplicationMethods/General.html +365 -0
- data/doc/Akaer/ApplicationMethods/System.html +456 -0
- data/doc/Akaer/{Errors.html → ApplicationMethods.html} +21 -11
- data/doc/Akaer/Configuration.html +3 -3
- data/doc/Akaer/Version.html +6 -6
- data/doc/Akaer.html +6 -6
- data/doc/_index.html +41 -4
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +53 -42
- data/doc/frames.html +1 -1
- data/doc/index.html +53 -42
- data/doc/method_list.html +30 -22
- data/doc/top-level-namespace.html +3 -3
- data/lib/akaer/application.rb +323 -199
- data/lib/akaer/configuration.rb +13 -13
- data/lib/akaer/version.rb +4 -4
- data/lib/akaer.rb +2 -1
- data/locales/en.yml +52 -0
- data/locales/it.yml +52 -0
- data/spec/akaer/application_spec.rb +25 -25
- data/spec/akaer/configuration_spec.rb +3 -3
- data/spec/coverage_helper.rb +6 -9
- data/spec/spec_helper.rb +1 -2
- metadata +18 -115
- data/doc/Akaer/Errors/InvalidConfiguration.html +0 -123
- data/doc/Akaer/Logger.html +0 -596
- data/doc/Fixnum.html +0 -200
data/.travis-gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# This file is part of the akaer gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
|
+
#
|
6
|
+
|
7
|
+
source "http://rubygems.org"
|
8
|
+
|
9
|
+
gemspec
|
10
|
+
|
11
|
+
# Testing
|
12
|
+
gem "rspec", "~> 2.12.0"
|
13
|
+
gem "rake", "~> 10.0.3"
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,9 +1,20 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
|
-
# This file is part of the akaer gem. Copyright (C)
|
3
|
+
# This file is part of the akaer gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
5
|
#
|
6
6
|
|
7
7
|
source "http://rubygems.org"
|
8
8
|
|
9
9
|
gemspec
|
10
|
+
|
11
|
+
# Testing
|
12
|
+
gem "rspec", "~> 2.12.0"
|
13
|
+
gem "rake", "~> 10.0.3"
|
14
|
+
|
15
|
+
# Documentation
|
16
|
+
gem "simplecov", ">= 0.7.1"
|
17
|
+
gem "pry", ">= 0"
|
18
|
+
gem "yard", ">= 0.8.4"
|
19
|
+
gem "kramdown", ">= 0.14.2"
|
20
|
+
gem "github-markup", ">= 0.7.5"
|
data/README.md
CHANGED
@@ -2,11 +2,13 @@
|
|
2
2
|
|
3
3
|
[](http://travis-ci.org/ShogunPanda/akaer)
|
4
4
|
[](https://gemnasium.com/ShogunPanda/akaer)
|
5
|
-
[](https://codeclimate.com/github/ShogunPanda/akaer)
|
6
6
|
|
7
7
|
A small utility to add aliases to network interfaces.
|
8
8
|
|
9
|
-
http://
|
9
|
+
http://sw.cow.tc/akaer
|
10
|
+
|
11
|
+
http://rdoc.info/gems/akaer
|
10
12
|
|
11
13
|
## Description
|
12
14
|
|
@@ -61,5 +63,6 @@ The file is a plain Ruby file with a single `config` object that supports the fo
|
|
61
63
|
|
62
64
|
## Copyright
|
63
65
|
|
64
|
-
Copyright (C)
|
65
|
-
|
66
|
+
Copyright (C) 2013 and above Shogun (shogun_panda@me.com).
|
67
|
+
|
68
|
+
Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
|
-
# This file is part of the akaer gem. Copyright (C)
|
3
|
+
# This file is part of the akaer gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
5
|
#
|
6
6
|
|
@@ -8,11 +8,4 @@ require "bundler/gem_tasks"
|
|
8
8
|
require "rspec/core/rake_task"
|
9
9
|
|
10
10
|
RSpec::Core::RakeTask.new("spec")
|
11
|
-
|
12
|
-
namespace :spec do
|
13
|
-
desc "Run all specs with coverage"
|
14
|
-
task :coverage do
|
15
|
-
ENV["AKAER_COVERAGE"] = "TRUE"
|
16
|
-
Rake::Task["spec"].invoke
|
17
|
-
end
|
18
|
-
end
|
11
|
+
RSpec::Core::RakeTask.new("spec:coverage") { |t| t.ruby_opts = "-r./spec/coverage_helper" }
|
data/akaer.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
#
|
3
|
-
# This file is part of the akaer gem. Copyright (C)
|
3
|
+
# This file is part of the akaer gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
4
4
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
5
|
#
|
6
6
|
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.version = Akaer::Version::STRING
|
12
12
|
gem.authors = ["Shogun"]
|
13
13
|
gem.email = ["shogun_panda@me.com"]
|
14
|
-
gem.homepage = "http://
|
14
|
+
gem.homepage = "http://sw.cow.tc/akaer"
|
15
15
|
gem.summary = %q{A small utility to add aliases to network interfaces.}
|
16
16
|
gem.description = %q{A small utility to add aliases to network interfaces.}
|
17
17
|
|
@@ -21,13 +21,8 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
22
|
gem.require_paths = ["lib"]
|
23
23
|
|
24
|
-
gem.
|
24
|
+
gem.required_ruby_version = ">= 1.9.3"
|
25
25
|
|
26
|
-
gem.
|
27
|
-
gem.
|
28
|
-
gem.add_development_dependency("simplecov", "~> 0.7.0")
|
29
|
-
gem.add_development_dependency("pry", ">= 0")
|
30
|
-
gem.add_development_dependency("yard", "~> 0.8.0")
|
31
|
-
gem.add_development_dependency("redcarpet", "~> 2.2.2")
|
32
|
-
gem.add_development_dependency("github-markup", "~> 0.7.0")
|
26
|
+
gem.add_dependency("mamertes", "~> 2.0.6")
|
27
|
+
gem.add_dependency("mustache", "~> 0.99.4")
|
33
28
|
end
|
data/bin/akaer
CHANGED
@@ -1,46 +1,48 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
3
|
#
|
4
|
-
# This file is part of the akaer gem. Copyright (C)
|
4
|
+
# This file is part of the akaer gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
5
5
|
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
6
6
|
|
7
7
|
require "rubygems"
|
8
8
|
require "akaer"
|
9
9
|
|
10
10
|
Mamertes.App do
|
11
|
+
localizer = Lazier::Localizer.new(:akaer, ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../locales/")).i18n
|
12
|
+
|
11
13
|
name "Akaer"
|
12
|
-
description
|
14
|
+
description localizer.application_description
|
13
15
|
version Akaer::Version::STRING
|
14
16
|
|
15
|
-
option
|
16
|
-
option
|
17
|
-
option
|
18
|
-
option "start-address"
|
19
|
-
option
|
20
|
-
option "add-command"
|
21
|
-
option "remove-command"
|
22
|
-
option "log-file"
|
23
|
-
option "log-level"
|
24
|
-
option "dry-run"
|
25
|
-
option
|
17
|
+
option :configuration, [], {type: String, help: localizer.application_help_configuration, default: "~/.akaer_config", meta: localizer.application_meta_file}
|
18
|
+
option :interface, [], {type: String, help: localizer.application_help_interface, default: "lo0", meta: localizer.application_meta_interface}
|
19
|
+
option :addresses, [], {type: Array, help: localizer.application_help_addresses, meta: localizer.application_meta_addresses}
|
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
|
+
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}
|
24
|
+
option :log_file, [:l, "log-file"], {type: String, help: localizer.application_help_log_file, default: "STDOUT", meta: localizer.application_meta_file}
|
25
|
+
option :log_level, [:L, "log-level"], {type: Integer, help: localizer.application_help_log_level, default: 1, meta: localizer.application_meta_level}
|
26
|
+
option :dry_run, [:n, "dry-run"], {help: localizer.application_help_dry_run}
|
27
|
+
option :quiet, [], {help: localizer.application_help_quiet}
|
26
28
|
|
27
29
|
command :add do
|
28
|
-
description
|
30
|
+
description localizer.application_command_add
|
29
31
|
action { |command| Akaer::Application.instance(command).action_add() }
|
30
32
|
end
|
31
33
|
|
32
34
|
command :remove do
|
33
|
-
description
|
35
|
+
description localizer.application_command_remove
|
34
36
|
action { |command| Akaer::Application.instance(command).action_remove() }
|
35
37
|
end
|
36
38
|
|
37
39
|
command :install do
|
38
|
-
description
|
40
|
+
description localizer.application_command_install
|
39
41
|
action { |command| Akaer::Application.instance(command).action_install() }
|
40
42
|
end
|
41
43
|
|
42
44
|
command :uninstall do
|
43
|
-
description
|
45
|
+
description localizer.application_command_uninstall
|
44
46
|
action { |command| Akaer::Application.instance(command).action_uninstall() }
|
45
47
|
end
|
46
48
|
|