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 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
@@ -1,8 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
3
  - 1.9.3
6
- script: bundle exec rake spec:coverage
4
+ - 2.0.0
5
+ - jruby-19mode
6
+ - rbx-19mode
7
+ script: bundle exec rake spec
8
+ gemfile: .travis-gemfile
7
9
  notifications:
8
- email: false
10
+ email: false
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) 2012 and above Shogun <shogun_panda@me.com>.
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
  [![Build Status](https://secure.travis-ci.org/ShogunPanda/akaer.png?branch=master)](http://travis-ci.org/ShogunPanda/akaer)
4
4
  [![Dependency Status](https://gemnasium.com/ShogunPanda/akaer.png?travis)](https://gemnasium.com/ShogunPanda/akaer)
5
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/ShogunPanda/akaer)
5
+ [![Code Climate](https://codeclimate.com/github/ShogunPanda/akaer.png)](https://codeclimate.com/github/ShogunPanda/akaer)
6
6
 
7
7
  A small utility to add aliases to network interfaces.
8
8
 
9
- http://github.com/ShogunPanda/akaer
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) 2012 and above Shogun <[shogun_panda@me.com](mailto:shogun_panda@me.com)>.
65
- Licensed under the MIT license, which can be found at [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php).
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) 2012 and above Shogun <shogun_panda@me.com>.
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) 2012 and above Shogun <shogun_panda@me.com>.
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://github.com/ShogunPanda/akaer"
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.add_dependency("mamertes", "~> 1.2.0")
24
+ gem.required_ruby_version = ">= 1.9.3"
25
25
 
26
- gem.add_development_dependency("rspec", "~> 2.11.0")
27
- gem.add_development_dependency("rake", "~> 0.9.0")
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) 2012 and above Shogun <shogun_panda@me.com>.
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 "A small utility to add aliases to network interfaces."
14
+ description localizer.application_description
13
15
  version Akaer::Version::STRING
14
16
 
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
- option "addresses", [], {:type => Array, :help => "The default list of aliases to add. Overrides sequential list"}
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
- option "aliases", [:S], {:type => Integer, :help => "The number of aliases to add. Default is 5.", :default => 5}
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
- 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
- option "dry-run", [:n], {:help => "Only show which modifications will be done."}
25
- option "quiet", [], {:help => "Do not show any message."}
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 "Adds aliases."
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 "Removes aliases."
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 "Installs the application to autolaunch."
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 "Uninstalls the application from autolaunch."
45
+ description localizer.application_command_uninstall
44
46
  action { |command| Akaer::Application.instance(command).action_uninstall() }
45
47
  end
46
48