nise-bosh-vagrant 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ module NiseBOSHVagrant
13
13
  if match = ifconfig.match(/inet ([.0-9]+) netmask 0x([0-9a-f]+) broadcast/) # BSD
14
14
  address = match[1]
15
15
  mask = match[2].unpack("a2a2a2a2").map { |block| block.hex }.join(".")
16
- gateway = `route -n get -ifscope #{kernel_device_name} 0.0.0.0 | grep gateway | awk '{print $2}'`.strip
16
+ gateway = `route -n get -ifscope #{kernel_device_name} 0.0.0.0 2>&1 | grep gateway | awk '{print $2}'`.strip
17
17
  elsif match = ifconfig.match(/inet addr:([.0-9]+) Bcast:[.0-9]+ Mask:([.0-9]+)/) # Linux
18
18
  address = match[1]
19
19
  mask = match[2]
@@ -36,6 +36,8 @@ module NiseBOSHVagrant
36
36
  end
37
37
 
38
38
  def generate_vagrantfile(output_path=@vagrantfile_path)
39
+ bridge_script_file = File.expand_path("../../../scripts/bridge_interface.sh", __FILE__)
40
+
39
41
  vagrantfile_template = File.open(File.join(File.dirname(File.expand_path(__FILE__)), '../../resources/Vagrantfile.erb'), "rb") { |f| f.read }
40
42
  template = ERB.new vagrantfile_template
41
43
  vagrantfile = template.result(binding)
@@ -1,3 +1,3 @@
1
1
  module NiseBOSHVagrant
2
- VERSION = "0.5"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
11
11
 
12
12
  <% if @bridge %>
13
13
  config.vm.network :public_network, :bridge => "<%= @bridge_if.vbox_name %>"
14
- config.vm.provision :shell, :path => "<%= File.expand_path("../scripts/bridge_interface.sh", __FILE__) %>", :args => "<%= @ip_address %> <%= @bridge_if.network_mask %> <%= @bridge_if.gateway %>"
14
+ config.vm.provision :shell, :path => "<%= bridge_script_file %>", :args => "<%= @ip_address %> <%= @bridge_if.network_mask %> <%= @bridge_if.gateway %>"
15
15
  <% else %>
16
16
  config.vm.network :private_network, ip: "<%= @ip_address %>"
17
17
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nise-bosh-vagrant
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-03 00:00:00.000000000 Z
12
+ date: 2013-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: -3310966476080707238
70
+ hash: 1049642580849157705
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements: