invoker 1.2.0 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a011067582381c326c0336b90527418663f120c
4
- data.tar.gz: 9f460abe90192e73f05d1bf65aa6420f51744f49
3
+ metadata.gz: 5f28eeccfb582c4482a8b93fc177fc4625977f02
4
+ data.tar.gz: c9a2af72538ea3f50f416a47f9d53a834c2c9f1c
5
5
  SHA512:
6
- metadata.gz: db67b1cb15a417511292aca216b298de317d9dda92a85537e69f5e877c697a3e313efdf5461dda0661bcad553f6efee19cf0a2af7b94aec8d8bc6825057a1720
7
- data.tar.gz: 82eefa017bd91c908eaba440372a22894f2768c0d95fdead183eabcfcbcf09ffd9b5b695b79b38d67cb69e199ae94ca092c0bc742b8be5080c783565f54eb5cb
6
+ metadata.gz: 2c73710c5ef6e9d72c94dc61640558c6a38fa506cc00e0bebc5652222c64ad277538af4e3bebcfe32ca4cd0c6a6829e850d60b144a8d0ca50e808c5f6a644d8e
7
+ data.tar.gz: d38fd49ddab433bda1d37a25b5011fbecf1724b6c80c21d343b5c5f76a7f69b28d9ae1944186f49e8cc2e74fe44c92c241c8eab475f455105c74a602a7ad981f
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  invoker.ini
2
2
  config/
3
3
  *.gem
4
- Gemfile.lock
5
4
  pkg/
6
5
  *.ini
7
6
  tags
@@ -13,3 +12,5 @@ coverage
13
12
  invoker_profile/
14
13
  *.pid
15
14
  .ruby-version
15
+ Gemfile.lock
16
+ .overcommit.yml
data/Gemfile CHANGED
@@ -1,9 +1,8 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
-
5
- gem 'pry'
6
- gem "rubydns", git: "https://github.com/ioquatix/rubydns.git"
7
-
8
- gem 'coveralls', require: false
9
- gem "simplecov", require: false
4
+ group :development do
5
+ gem 'pry'
6
+ gem 'coveralls', require: false
7
+ gem "simplecov", require: false
8
+ end
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency("em-proxy", "~> 0.1")
34
34
  s.add_dependency("rubydns", "~> 0.7")
35
35
  s.add_dependency("uuid", "~> 2.3")
36
- s.add_dependency("facter", "~> 2.0")
36
+ s.add_dependency("facter", "~> 2.2")
37
37
  s.add_dependency("http-parser-lite", "~> 0.6")
38
38
  s.add_dependency("dotenv", "~> 0.9")
39
39
  s.add_development_dependency("rspec", "~> 3.0")
@@ -22,6 +22,7 @@ require "invoker/power/setup"
22
22
  require "invoker/power/setup/linux_setup"
23
23
  require "invoker/power/setup/osx_setup"
24
24
  require "invoker/power/powerup"
25
+ require "invoker/power/pf_migrate"
25
26
  require "invoker/errors"
26
27
  require "invoker/parsers/procfile"
27
28
  require "invoker/parsers/config"
@@ -40,6 +40,7 @@ module Invoker
40
40
  Invoker.daemonize = options[:daemon]
41
41
  Invoker.load_invoker_config(file, port)
42
42
  warn_about_terminal_notifier
43
+ warn_about_old_configuration
43
44
  pinger = Invoker::CLI::Pinger.new(unix_socket)
44
45
  abort("Invoker is already running".color(:red)) if pinger.invoker_running?
45
46
  Invoker.commander.start_manager
@@ -117,6 +118,12 @@ module Invoker
117
118
  end
118
119
  end
119
120
  end
121
+
122
+ def warn_about_old_configuration
123
+ Invoker::Power::PfMigrate.new.tap do |pf_migrator|
124
+ pf_migrator.migrate
125
+ end
126
+ end
120
127
  end
121
128
  end
122
129
 
@@ -84,7 +84,7 @@ module Invoker
84
84
  OpenStruct.new(
85
85
  port: port,
86
86
  label: section["label"] || section.key,
87
- dir: section["directory"],
87
+ dir: expand_directory(section["directory"]),
88
88
  cmd: replace_port_in_command(section["command"], port)
89
89
  )
90
90
  end
@@ -92,7 +92,7 @@ module Invoker
92
92
  def make_option(section)
93
93
  OpenStruct.new(
94
94
  label: section["label"] || section.key,
95
- dir: section["directory"],
95
+ dir: expand_directory(section["directory"]),
96
96
  cmd: section["command"]
97
97
  )
98
98
  end
@@ -102,11 +102,15 @@ module Invoker
102
102
  end
103
103
 
104
104
  def check_directory(app_dir)
105
- if app_dir && !app_dir.empty? && !File.directory?(app_dir)
105
+ if app_dir && !app_dir.empty? && !File.directory?(expand_directory(app_dir))
106
106
  raise Invoker::Errors::InvalidConfig.new("Invalid directory #{app_dir}")
107
107
  end
108
108
  end
109
109
 
110
+ def expand_directory(app_dir)
111
+ File.expand_path(app_dir) if app_dir
112
+ end
113
+
110
114
  def replace_port_in_command(command, port)
111
115
  if command =~ PORT_REGEX
112
116
  command.gsub(PORT_REGEX, port.to_s)
@@ -23,6 +23,7 @@ module Invoker
23
23
  class Balancer
24
24
  attr_accessor :connection, :http_parser, :session, :protocol
25
25
  DEV_MATCH_REGEX = /([\w-]+)\.dev(\:\d+)?$/
26
+ XIP_IO_MATCH_REGEX = /([\w-]+)\.\d+\.\d+\.\d+\.\d+\.xip\.io(\:\d+)?$/
26
27
 
27
28
  def self.run(options = {})
28
29
  start_http_proxy(InvokerHttpProxy, 'http', options)
@@ -101,7 +102,7 @@ module Invoker
101
102
  end
102
103
 
103
104
  def extract_host_from_domain(host)
104
- host.match(DEV_MATCH_REGEX)
105
+ host.match(DEV_MATCH_REGEX) || host.match(XIP_IO_MATCH_REGEX)
105
106
  end
106
107
 
107
108
  private
@@ -0,0 +1,64 @@
1
+ module Invoker
2
+ module Power
3
+ # for migrating existins users to pf
4
+ class PfMigrate
5
+ def firewall_config_requires_migration?
6
+ return false if !Invoker.darwin?
7
+ # lets not migrate on osx < 10.10
8
+ return false if osx_version < Invoker::Version.new("14.0.0")
9
+ # also verify if firewall config is old
10
+ check_firewall_file?
11
+ end
12
+
13
+ def migrate
14
+ if firewall_config_requires_migration? && ask_user_for_migration
15
+ sudome
16
+ osx_setup = Invoker::Power::OsxSetup.new()
17
+ osx_setup.install_firewall(Invoker.config.http_port, Invoker.config.https_port)
18
+ drop_to_normal_user
19
+ Invoker::Logger.puts "Invoker has updated its configuration for yosemite."\
20
+ " Please restart OSX to complete the configuration process.".color(:red)
21
+ exit(-1)
22
+ end
23
+ end
24
+
25
+ def ask_user_for_migration
26
+ if not_already_root?
27
+ Invoker::Logger.puts "Invoker has detected you are running OSX 10.10 "\
28
+ " but your invoker configuration does not support it."
29
+ Invoker::Logger.puts "Invoker can update its configuration automaticaly"\
30
+ " but it will require a system reboot.".color(:red)
31
+ Invoker::CLI::Question.agree("Update Invoker configuration (y/n) :")
32
+ else
33
+ true
34
+ end
35
+ end
36
+
37
+ # http://jimeh.me/blog/2010/02/22/built-in-sudo-for-ruby-command-line-tools/
38
+ def sudome
39
+ if not_already_root?
40
+ exec("sudo #{$0} #{ARGV.join(' ')}")
41
+ end
42
+ end
43
+
44
+ def not_already_root?
45
+ ENV["USER"] != "root"
46
+ end
47
+
48
+ def drop_to_normal_user
49
+ EventMachine.set_effective_user(ENV["SUDO_USER"])
50
+ end
51
+
52
+ def osx_version
53
+ osx_kernel_version = `uname -r`.strip
54
+ Invoker::Version.new(osx_kernel_version)
55
+ end
56
+
57
+ def check_firewall_file?
58
+ return false unless File.exist?(Invoker::Power::OsxSetup::FIREWALL_PLIST_FILE)
59
+ firewall_contents = File.read(Invoker::Power::OsxSetup::FIREWALL_PLIST_FILE)
60
+ !!firewall_contents.match(/ipfw/)
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,18 @@
1
+ module Invoker
2
+ module Power
3
+ module Distro
4
+ class Arch < Base
5
+ def install_required_software
6
+ system("pacman -S --needed --noconfirm dnsmasq")
7
+ system("mkdir -p /etc/dnsmasq.d")
8
+ unless File.open("/etc/dnsmasq.conf").each_line.any? { |line| line.chomp == "conf-dir=/etc/dnsmasq.d" }
9
+ File.open("/etc/dnsmasq.conf", "a") {|f| f.write("conf-dir=/etc/dnsmasq.d") }
10
+ end
11
+ unless system("ls /usr/bin/rinetd > /dev/null 2>&1")
12
+ fail "You'll need to install rinetd from the AUR in order to continue"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -13,6 +13,9 @@ module Invoker
13
13
  when "Fedora"
14
14
  require "invoker/power/setup/distro/redhat"
15
15
  Redhat.new
16
+ when "Archlinux"
17
+ require "invoker/power/setup/distro/arch"
18
+ Arch.new
16
19
  else
17
20
  raise "Your selected distro is not supported by Invoker"
18
21
  end
@@ -32,8 +35,13 @@ module Invoker
32
35
  end
33
36
 
34
37
  def restart_services
35
- system("service rinetd restart")
36
- system("service dnsmasq restart")
38
+ if Facter[:systemctl] == "true"
39
+ system("systemctl restart rinetd")
40
+ system("systemctl restart dnsmasq")
41
+ else
42
+ system("service rinetd restart")
43
+ system("service dnsmasq restart")
44
+ end
37
45
  end
38
46
  end
39
47
  end
@@ -38,6 +38,12 @@ module Invoker
38
38
  private
39
39
 
40
40
  def initialize_distro_installer
41
+ # Create a new facter check for systemctl (in systemd)
42
+ Facter.add(:systemctl) do
43
+ setcode do
44
+ Facter::Util::Resolution.exec("[ -e /usr/bin/systemctl ] && echo 'true' || echo 'false'")
45
+ end
46
+ end
41
47
  @distro_installer = Invoker::Power::Distro::Base.distro_installer
42
48
  end
43
49
 
@@ -10,7 +10,6 @@ module Invoker
10
10
  find_open_ports
11
11
  install_resolver(port_finder.dns_port)
12
12
  install_firewall(port_finder.http_port, port_finder.https_port)
13
- flush_dns_rules
14
13
  # Before writing the config file, drop down to a normal user
15
14
  drop_to_normal_user
16
15
  create_config_file
@@ -26,16 +25,11 @@ module Invoker
26
25
  if uninstall_invoker_flag
27
26
  remove_resolver_file
28
27
  unload_firewall_rule(true)
29
- flush_dns_rules
30
28
  Invoker::Power::Config.delete
31
29
  Invoker::Logger.puts("Firewall rules were removed")
32
30
  end
33
31
  end
34
32
 
35
- def flush_dns_rules
36
- system("dscacheutil -flushcache")
37
- end
38
-
39
33
  def create_config_file
40
34
  Invoker.setup_config_location
41
35
  Invoker::Power::Config.create(
@@ -76,6 +70,7 @@ module Invoker
76
70
  end
77
71
 
78
72
  def unload_firewall_rule(remove = false)
73
+ system("pfctl -a com.apple/250.InvokerFirewall -F nat 2>/dev/null")
79
74
  system("launchctl unload -w #{FIREWALL_PLIST_FILE} 2>/dev/null")
80
75
  system("rm -rf #{FIREWALL_PLIST_FILE}") if remove
81
76
  end
@@ -115,9 +110,11 @@ port #{dns_port}
115
110
 
116
111
  # Ripped from Pow code
117
112
  def firewall_command(http_port, https_port)
118
- "ipfw add fwd 127.0.0.1,#{http_port} tcp from any to me dst-port 80 in"\
119
- "&amp;&amp; ipfw add fwd 127.0.0.1,#{https_port} tcp from any to me dst-port 443 in"\
120
- "&amp;&amp; sysctl -w net.inet.ip.forwarding=1"
113
+ rules = [
114
+ "rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port #{http_port}",
115
+ "rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port #{https_port}"
116
+ ].join("\n")
117
+ "echo \"#{rules}\" | pfctl -a 'com.apple/250.InvokerFirewall' -f - -E"
121
118
  end
122
119
 
123
120
  def setup_resolver_file
@@ -1,3 +1,47 @@
1
1
  module Invoker
2
- VERSION = "1.2.0"
2
+ class Version
3
+ include Comparable
4
+ attr_reader :major, :minor, :patch
5
+
6
+ def initialize(number)
7
+ t_major, t_minor, t_patch = number.split('.')
8
+ @major = t_major.to_i
9
+ @minor = t_minor.to_i
10
+ @patch = t_patch.to_i
11
+ end
12
+
13
+ def to_a
14
+ [major, minor, patch].compact
15
+ end
16
+
17
+ def <=>(version)
18
+ (major.to_i <=> version.major.to_i).nonzero? ||
19
+ (minor.to_i <=> version.minor.to_i).nonzero? ||
20
+ patch.to_i <=> version.patch.to_i
21
+ end
22
+
23
+ def matches?(operator, number)
24
+ version = Version.new(number)
25
+ self == version
26
+
27
+ return self == version if operator == '='
28
+ return self > version if operator == '>'
29
+ return self < version if operator == '<'
30
+ return version <= self && version.next > self if operator == '~>'
31
+ end
32
+
33
+ def next
34
+ next_splits = to_a
35
+
36
+ if next_splits.length == 1
37
+ next_splits[0] += 1
38
+ else
39
+ next_splits[-2] += 1
40
+ next_splits[-1] = 0
41
+ end
42
+
43
+ Version.new(next_splits.join('.'))
44
+ end
45
+ end
46
+ VERSION = "1.3.0"
3
47
  end
data/readme.md CHANGED
@@ -11,12 +11,15 @@ First we need to install `invoker` gem to get command line utility called `invok
11
11
 
12
12
  gem install invoker
13
13
 
14
- Currently it only works with Ruby 1.9.3 and 2.0.
14
+ Currently it only works with Ruby 1.9.3, 2.0 and 2.1.
15
15
 
16
16
  ## Manual ##
17
17
 
18
18
  Information about configuring and using Invoker can be found on - [Invoker Website](http://invoker.codemancers.com)
19
19
 
20
+ Invoker documentation is maintained via `Jekyll` and hosted on `github`. If you would like to fix an error
21
+ or update something - please submit a pull request against `gh-pages` branch of `Invoker`.
22
+
20
23
  ## Bug reports and Feature requests
21
24
 
22
25
  Please use [Github Issue Tracker](https://github.com/code-mancers/invoker/issues) for feature requests or bug reports.
@@ -24,6 +24,37 @@ command = ruby try_sleep.rb
24
24
  end
25
25
  end
26
26
 
27
+ describe "with relative directory path" do
28
+ it "should expand path in commands" do
29
+ begin
30
+ file = Tempfile.new(["config", ".ini"])
31
+
32
+ config_data =<<-EOD
33
+ [pwd_home]
34
+ directory = ~
35
+ command = pwd
36
+
37
+ [pwd_parent]
38
+ directory = ../
39
+ command = pwd
40
+ EOD
41
+ file.write(config_data)
42
+ file.close
43
+
44
+ config = Invoker::Parsers::Config.new(file.path, 9000)
45
+ command1 = config.processes.first
46
+
47
+ expect(command1.dir).to match(File.expand_path('~'))
48
+
49
+ command2 = config.processes[1]
50
+
51
+ expect(command2.dir).to match(File.expand_path('..'))
52
+ ensure
53
+ file.unlink()
54
+ end
55
+ end
56
+ end
57
+
27
58
  describe "for ports" do
28
59
  it "should replace port in commands" do
29
60
  begin
@@ -1,11 +1,11 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Invoker::Power::Balancer do
4
- context "matching domain part of incoming request" do
5
- before do
6
- @balancer = Invoker::Power::Balancer.new(mock("connection"), "http")
7
- end
4
+ before do
5
+ @balancer = Invoker::Power::Balancer.new(mock("connection"), "http")
6
+ end
8
7
 
8
+ context "matching domain part of incoming request" do
9
9
  it "should do foo.dev match" do
10
10
  match = @balancer.extract_host_from_domain("foo.dev")
11
11
  expect(match).to_not be_nil
@@ -38,4 +38,38 @@ describe Invoker::Power::Balancer do
38
38
  expect(matching_string).to eq("hello-world")
39
39
  end
40
40
  end
41
+
42
+ context "matching domain part of incoming request using xip.io" do
43
+ it "should do foo.10.0.0.1.xip.io match" do
44
+ match = @balancer.extract_host_from_domain("foo.10.0.0.1.xip.io")
45
+ expect(match).to_not be_nil
46
+
47
+ matching_string = match[1]
48
+ expect(matching_string).to eq("foo")
49
+ end
50
+
51
+ it "should match foo.10.0.0.1.xip.io:1080" do
52
+ match = @balancer.extract_host_from_domain("foo.10.0.0.1.xip.io:1080")
53
+ expect(match).to_not be_nil
54
+
55
+ matching_string = match[1]
56
+ expect(matching_string).to eq("foo")
57
+ end
58
+
59
+ it "should match emacs.bar.10.0.0.1.xip.io" do
60
+ match = @balancer.extract_host_from_domain("emacs.bar.10.0.0.1.xip.io")
61
+ expect(match).to_not be_nil
62
+
63
+ matching_string = match[1]
64
+ expect(matching_string).to eq("bar")
65
+ end
66
+
67
+ it "should match hello-world.10.0.0.1.xip.io" do
68
+ match = @balancer.extract_host_from_domain("hello-world.10.0.0.1.xip.io")
69
+ expect(match).to_not be_nil
70
+
71
+ matching_string = match[1]
72
+ expect(matching_string).to eq("hello-world")
73
+ end
74
+ end
41
75
  end
@@ -0,0 +1,80 @@
1
+ require "spec_helper"
2
+
3
+ describe Invoker::Power::PfMigrate do
4
+ before do
5
+ @old_firewall_file = Invoker::Power::OsxSetup::FIREWALL_PLIST_FILE
6
+ Invoker::Power::OsxSetup.const_set(:FIREWALL_PLIST_FILE, "/tmp/.invoker/firewall")
7
+ end
8
+
9
+ after do
10
+ Invoker::Power::OsxSetup.const_set(:FIREWALL_PLIST_FILE, @old_firewall_file)
11
+ end
12
+
13
+ let(:pf_migrator) { Invoker::Power::PfMigrate.new }
14
+
15
+ describe "#firewall_config_requires_migration?" do
16
+ context "for nonosx systems " do
17
+ it "should return false" do
18
+ Invoker.expects(:darwin?).returns(false)
19
+ expect(pf_migrator.firewall_config_requires_migration?).to eq(false)
20
+ end
21
+ end
22
+
23
+ context "for osx systems" do
24
+ before { Invoker.expects(:darwin?).returns(true) }
25
+
26
+ context "for osx < yosemite" do
27
+ it "should return false" do
28
+ pf_migrator.expects(:osx_version).returns(Invoker::Version.new("13.4.0"))
29
+ expect(pf_migrator.firewall_config_requires_migration?).to eq(false)
30
+ end
31
+ end
32
+
33
+ context "for osx > yosemite with existing ipfw rule" do
34
+ before do
35
+ write_to_firewall_file("ipfw firewall rule")
36
+ end
37
+ it "should return true" do
38
+ pf_migrator.expects(:osx_version).returns(Invoker::Version.new("14.0.0"))
39
+ expect(pf_migrator.firewall_config_requires_migration?).to eql(true)
40
+ end
41
+ end
42
+
43
+ context "for osx >= yosemite with no ipfw rule" do
44
+ before do
45
+ write_to_firewall_file("rdr pass on")
46
+ end
47
+ it "should return false" do
48
+ pf_migrator.expects(:osx_version).returns(Invoker::Version.new("14.0.0"))
49
+ expect(pf_migrator.firewall_config_requires_migration?).to eql(false)
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ describe "#migrate" do
56
+ before do
57
+ mock_config = mock()
58
+ mock_config.stubs(:http_port).returns(80)
59
+ mock_config.stubs(:https_port).returns(443)
60
+ Invoker.config = mock_config
61
+ end
62
+
63
+ it "should migrate firewall to new system" do
64
+ pf_migrator.expects(:firewall_config_requires_migration?).returns(true)
65
+ pf_migrator.expects(:ask_user_for_migration).returns(true)
66
+ pf_migrator.expects(:sudome)
67
+ pf_migrator.expects(:drop_to_normal_user)
68
+ pf_migrator.expects(:exit)
69
+
70
+ pf_migrator.migrate
71
+ expect(pf_migrator.check_firewall_file?).to eql(false)
72
+ end
73
+ end
74
+
75
+ def write_to_firewall_file(content)
76
+ File.open(Invoker::Power::OsxSetup::FIREWALL_PLIST_FILE, "w") do |fl|
77
+ fl.write(content)
78
+ end
79
+ end
80
+ end
@@ -5,7 +5,6 @@ describe Invoker::Power::OsxSetup do
5
5
  it "should create a config file with port etc" do
6
6
  setup = Invoker::Power::OsxSetup.new
7
7
  setup.expects(:install_resolver).returns(true)
8
- setup.expects(:flush_dns_rules).returns(true)
9
8
  setup.expects(:drop_to_normal_user).returns(true)
10
9
  setup.expects(:install_firewall).once
11
10
 
@@ -41,7 +40,6 @@ describe Invoker::Power::OsxSetup do
41
40
  @setup.expects(:setup_resolver_file).returns(true)
42
41
  @setup.expects(:drop_to_normal_user).returns(true)
43
42
  @setup.expects(:install_resolver).returns(true)
44
- @setup.expects(:flush_dns_rules).returns(true)
45
43
  @setup.expects(:install_firewall).once()
46
44
 
47
45
  @setup.setup_invoker
@@ -53,7 +51,6 @@ describe Invoker::Power::OsxSetup do
53
51
  @setup.expects(:setup_resolver_file).returns(false)
54
52
 
55
53
  @setup.expects(:install_resolver).never
56
- @setup.expects(:flush_dns_rules).never
57
54
  @setup.expects(:install_firewall).never
58
55
 
59
56
  @setup.setup_invoker
@@ -68,7 +65,6 @@ describe Invoker::Power::OsxSetup do
68
65
  Invoker::CLI::Question.expects(:agree).returns(true)
69
66
  setup.expects(:remove_resolver_file).once
70
67
  setup.expects(:unload_firewall_rule).with(true).once
71
- setup.expects(:flush_dns_rules).once
72
68
  Invoker::Power::Config.expects(:delete).once
73
69
 
74
70
  setup.uninstall_invoker
@@ -85,7 +81,6 @@ describe Invoker::Power::OsxSetup do
85
81
  it "should create the directory and install" do
86
82
  @setup.expects(:setup_resolver_file).returns(true)
87
83
  @setup.expects(:drop_to_normal_user).returns(true)
88
- @setup.expects(:flush_dns_rules).returns(true)
89
84
  @setup.expects(:install_firewall).once()
90
85
 
91
86
  @setup.setup_invoker
@@ -30,7 +30,7 @@ module MockSetupFile
30
30
  end
31
31
 
32
32
  def restore_invoker_config
33
- safe_remove_file(Invoker::Power::Config.config_file)
33
+ safe_remove_file("/tmp/.invoker/config")
34
34
  end
35
35
 
36
36
  def restore_osx_resolver_setup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hemant Kumar
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-10 00:00:00.000000000 Z
12
+ date: 2014-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -129,14 +129,14 @@ dependencies:
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '2.0'
132
+ version: '2.2'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '2.0'
139
+ version: '2.2'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: http-parser-lite
142
142
  requirement: !ruby/object:Gem::Requirement
@@ -262,10 +262,12 @@ files:
262
262
  - lib/invoker/power/dns.rb
263
263
  - lib/invoker/power/http_parser.rb
264
264
  - lib/invoker/power/http_response.rb
265
+ - lib/invoker/power/pf_migrate.rb
265
266
  - lib/invoker/power/port_finder.rb
266
267
  - lib/invoker/power/power.rb
267
268
  - lib/invoker/power/powerup.rb
268
269
  - lib/invoker/power/setup.rb
270
+ - lib/invoker/power/setup/distro/arch.rb
269
271
  - lib/invoker/power/setup/distro/base.rb
270
272
  - lib/invoker/power/setup/distro/redhat.rb
271
273
  - lib/invoker/power/setup/distro/ubuntu.rb
@@ -297,6 +299,7 @@ files:
297
299
  - spec/invoker/power/config_spec.rb
298
300
  - spec/invoker/power/http_parser_spec.rb
299
301
  - spec/invoker/power/http_response_spec.rb
302
+ - spec/invoker/power/pf_migrate_spec.rb
300
303
  - spec/invoker/power/port_finder_spec.rb
301
304
  - spec/invoker/power/setup/linux_setup_spec.rb
302
305
  - spec/invoker/power/setup/osx_setup_spec.rb
@@ -348,6 +351,7 @@ test_files:
348
351
  - spec/invoker/power/config_spec.rb
349
352
  - spec/invoker/power/http_parser_spec.rb
350
353
  - spec/invoker/power/http_response_spec.rb
354
+ - spec/invoker/power/pf_migrate_spec.rb
351
355
  - spec/invoker/power/port_finder_spec.rb
352
356
  - spec/invoker/power/setup/linux_setup_spec.rb
353
357
  - spec/invoker/power/setup/osx_setup_spec.rb
@@ -356,4 +360,3 @@ test_files:
356
360
  - spec/invoker/reactor_spec.rb
357
361
  - spec/spec_helper.rb
358
362
  - spec/support/mock_setup_file.rb
359
- has_rdoc: