vagrant-hosts 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61da0ab65bd568315a1c0b7c261efc118121f10c
4
- data.tar.gz: 092a7fcec7673f0c9f2272829a960aeb4d7ba4bd
3
+ metadata.gz: cbc457b5e646b7e6baa1b0f145f0cd90cb2d7357
4
+ data.tar.gz: b8603b5dd936a91bbf0498dc5c3a5f044e8ce9cb
5
5
  SHA512:
6
- metadata.gz: e108e0727baa41a4584d1647c901a2e025d0136573e0248eb12a03d64bead52e8d5d5e12dacd9e9980a782fe2af0f6b3af287fbe3327a780bf514f2b6facfd16
7
- data.tar.gz: cf0ea224e6319bc0f711c02970852d716215026da6607372df5873ebb196cdf68c1a1ab598cfcadb2b6bce90a91ac793e6604c2fc61db7cc44c25acd2dd937e5
6
+ metadata.gz: ebdb424df8db1e9825d04b730e57f67daa56d1fc2323b55f77dc9fe772f9b3d9e601e2c91c94babe00851c2dd37f9d12dc7d4571e94b36b17f6d42e86ee80828
7
+ data.tar.gz: 24aee3da5405b87174db2117b112da4ca78d91c575ad205beb9afbb67841ef91b7fc124e4a7102e39259989ad254cc5604244db9a059960066684a0589d062da
data/CHANGELOG CHANGED
@@ -1,6 +1,18 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 2.2.3
5
+ -----
6
+
7
+ 2014-09-19
8
+
9
+ This is a backwards compatible bugfix release.
10
+
11
+ * (GH-40) Revert 2.2.2 Windows host fix and replace with a mitigation that
12
+ shortens the length of the command line used to set Windows hosts.
13
+
14
+ Thanks to Ethan Brown for their work on this release.
15
+
4
16
  2.2.2
5
17
  -----
6
18
 
@@ -10,14 +10,13 @@ class VagrantHosts::Cap::SyncHosts::Windows < VagrantHosts::Cap::SyncHosts::Base
10
10
  end
11
11
 
12
12
  script = []
13
- script << '$HostsLocation = "$env:windir\\System32\\drivers\\etc\\hosts";'
13
+ script << '$HostsPath = "$env:windir\\System32\\drivers\\etc\\hosts"'
14
+ script << '$Hosts = gc $HostsPath'
14
15
 
15
- host_entries.each do |entry|
16
- script << "\$HostEntry = \"#{entry}\""
17
- script << "if (!((gc \$HostsLocation) -contains $HostEntry)) { Add-Content -Path $HostsLocation -Value $HostEntry; }"
18
- end
16
+ host_defs = "'" + host_entries.join('\', \'') + "'"
17
+ script << "@(#{host_defs}) | % { if (\$Hosts -notcontains \$_) { Add-Content -Path \$HostsPath -Value \$_ }}"
19
18
 
20
- @machine.communicate.sudo(script.join("\r\n"), :elevated => true)
19
+ @machine.communicate.sudo(script.join("; "))
21
20
  end
22
21
 
23
22
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantHosts
2
- VERSION = '2.2.2'
2
+ VERSION = '2.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hosts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-17 00:00:00.000000000 Z
11
+ date: 2014-09-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Manage static DNS entries and configuration for Vagrant guests.