vagrant-hostsupdater 0.0.9 → 0.0.10

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
- SHA512:
3
- data.tar.gz: eeaf787fa373caeac2ec91a79bcfbf440f10e2b9e3a3f484f7167b3615748ec569cd8ec2d011457517abb387edec17f2ea1463fd863e12ee6af0d402133bce20
4
- metadata.gz: b78576f818d0b6be0554a4f3193e5a69be693d5d6faa984f1721eda82dca385ee41fd8e83a6c76b328af76eb382168aa64528abf2ce460a14e220f84fb76ecde
5
2
  SHA1:
6
- data.tar.gz: 549469fc86d2ef0b46ff2e0cefc5f3d4312e1a7f
7
- metadata.gz: 3db0cc1bd1ace793714da5c5a08da09f39a574e4
3
+ metadata.gz: 7786283817858be33965f444c422ceaeb6097d73
4
+ data.tar.gz: cbe83dac92dd7f302dcda5424f286a555778eda0
5
+ SHA512:
6
+ metadata.gz: 5be6275c2952dcea2287c75484e22a1c2a0283ac6b8a94a6b613f70f10e78390dd4cc15da87d06d4e05ee31b74ebb56790d931d81285579b7cca2333d0a67a55
7
+ data.tar.gz: 4a5019227644d438edd005b99070c3b41892bec301ea2bb1abcbb63e6c7bb3bf36bb1fc93b19ff3af45dd58a0bedcc50e51ab18a7aa10193d15b9f0d57f2e2ef
data/README.md CHANGED
@@ -11,6 +11,9 @@ By setting the remove\_on\_suspend option, you can have them removed on **suspen
11
11
 
12
12
  ## Versions
13
13
 
14
+ ### 0.0.10
15
+ * bugfix: wrong path on Windows systems (Thanks to Im0rtality)
16
+
14
17
  ### 0.0.9
15
18
  * bugfix: now not trying to remove anything if no machine id is given
16
19
 
@@ -24,7 +24,7 @@ module VagrantPlugins
24
24
  def addHostEntries()
25
25
  ips = getIps
26
26
  hostnames = getHostnames
27
- file = File.open("/etc/hosts", "rb")
27
+ file = File.open(@@hosts_path, "rb")
28
28
  hostsContents = file.read
29
29
  uuid = @machine.id
30
30
  name = @machine.name
@@ -70,7 +70,7 @@ module VagrantPlugins
70
70
 
71
71
  def addToHosts(entries)
72
72
  return if entries.length == 0
73
- content = entries.join("\n")
73
+ content = "\n" + entries.join("\n").strip
74
74
  if !File.writable?(@@hosts_path)
75
75
  sudo(%Q(sh -c 'echo "#{content}" >> #@@hosts_path'))
76
76
  else
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostsUpdater
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hostsupdater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Falk K\xC3\xBChnel"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-06-18 00:00:00 Z
12
+ date: 2013-07-24 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  prerelease: false