vagrant-goodhosts 1.1.1 → 1.1.4
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 +4 -4
- data/.rubocop.yml +1 -0
- data/README.md +12 -1
- data/lib/vagrant-goodhosts/GoodHosts.rb +17 -4
- data/lib/vagrant-goodhosts/bundle/cli.exe +0 -0
- data/lib/vagrant-goodhosts/bundle/cli_amd64_linux +0 -0
- data/lib/vagrant-goodhosts/bundle/cli_amd64_osx +0 -0
- data/lib/vagrant-goodhosts/bundle/cli_arm64_linux +0 -0
- data/lib/vagrant-goodhosts/bundle/cli_arm64_osx +0 -0
- data/lib/vagrant-goodhosts/version.rb +1 -1
- data/package.sh +5 -3
- data/vagrant-goodhosts.gemspec +2 -2
- metadata +12 -10
- data/lib/vagrant-goodhosts/bundle/cli +0 -0
- data/lib/vagrant-goodhosts/bundle/cli_osx +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9999dc28ea8a634d9d2f562f3db11171adc264e0587c9f2d2b0cc1749a762b17
|
4
|
+
data.tar.gz: 14b2cfa13216292504af3acab9aa47f57bd91c2e0cd5f2e6bf883b91c39485b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 371e94ffe4c948617ab74c77d9789fa95736e3619b5c0bc64caa113b31e6091b7339923fda3a1d2e0158cfa3ca0d7812ae1b51cea64f74fe8fc170bb411a4a7b
|
7
|
+
data.tar.gz: f6c2714dd8e3ff3ef0c0055219183e4d63695a32ab74f88aaf982c8578a735440976a1c2d13639bc03b32f5837a6bab7468b4fb66c43e3b584a7e3887317651a
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -24,6 +24,13 @@ To update the plugin:
|
|
24
24
|
vagrant plugin update vagrant-goodhosts
|
25
25
|
```
|
26
26
|
|
27
|
+
### Installation from Gem file
|
28
|
+
|
29
|
+
The gem file is released with every [release](https://github.com/goodhosts/vagrant/releases) and you can install it with vagrant as it is a plugin after all.
|
30
|
+
Affter downloading the file run this command to install manually:
|
31
|
+
|
32
|
+
`vagrant plugin install vagrant-goodhosts-*.gem`
|
33
|
+
|
27
34
|
## Usage
|
28
35
|
|
29
36
|
You currently only need the `hostname` and a `:private_network` network with a fixed IP address.
|
@@ -115,7 +122,7 @@ You have to open an elevated command prompt; hold `❖ Win` and press `X`, then
|
|
115
122
|
|
116
123
|
cacls %SYSTEMROOT%\system32\drivers\etc\hosts /E /G %USERNAME%:W
|
117
124
|
|
118
|
-
##
|
125
|
+
## Generate The Development Version
|
119
126
|
|
120
127
|
If you would like to install `vagrant-goodhosts` to make contributions or changes, run the following commands::
|
121
128
|
|
@@ -125,3 +132,7 @@ cd vagrant-goodhosts
|
|
125
132
|
./package.sh
|
126
133
|
vagrant plugin install vagrant-goodhosts-*.gem
|
127
134
|
```
|
135
|
+
|
136
|
+
## Test the plugin
|
137
|
+
|
138
|
+
You need to run a Vagrant machine with the minimum settings specified in the [Usage](https://github.com/goodhosts/vagrant#usage) section, it is enough a turn on and off and in the meantime if the hosts file in your machine is written in the right way.
|
@@ -48,9 +48,17 @@ module VagrantPlugins
|
|
48
48
|
if OS.windows?
|
49
49
|
return 'cli.exe'
|
50
50
|
elsif OS.mac?
|
51
|
-
|
51
|
+
if Etc.uname[:version].include? 'ARM64'
|
52
|
+
return 'cli_arm64_osx'
|
53
|
+
else
|
54
|
+
return 'cli_amd64_osx'
|
55
|
+
end
|
52
56
|
elsif OS.linux?
|
53
|
-
|
57
|
+
if Etc.uname[:version].include? 'ARM64'
|
58
|
+
return 'cli_arm64_linux'
|
59
|
+
else
|
60
|
+
return 'cli_amd64_linux'
|
61
|
+
end
|
54
62
|
else
|
55
63
|
raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
|
56
64
|
end
|
@@ -97,8 +105,12 @@ module VagrantPlugins
|
|
97
105
|
hostnames = hostnames.split
|
98
106
|
# check which hostnames actually need adding
|
99
107
|
hostnames.each do |hostname|
|
100
|
-
|
101
|
-
|
108
|
+
begin
|
109
|
+
address = Resolv.getaddress(hostname)
|
110
|
+
if address != ip_address
|
111
|
+
hostnames_to_add.append(hostname)
|
112
|
+
end
|
113
|
+
rescue StandardError => _e
|
102
114
|
hostnames_to_add.append(hostname)
|
103
115
|
end
|
104
116
|
rescue StandardError => _e
|
@@ -203,6 +215,7 @@ module VagrantPlugins
|
|
203
215
|
|
204
216
|
def print_readme(error, error_text, command)
|
205
217
|
unless error
|
218
|
+
@ui.info "[vagrant-goodhosts] Finished processing"
|
206
219
|
return false
|
207
220
|
end
|
208
221
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/package.sh
CHANGED
@@ -5,9 +5,11 @@ cd ./lib/vagrant-goodhosts/bundle
|
|
5
5
|
# Download
|
6
6
|
curl -s https://api.github.com/repos/goodhosts/cli/releases/latest | jq --raw-output '.assets[] | .browser_download_url' | xargs wget -i
|
7
7
|
# Extract
|
8
|
-
tar -zxvf
|
9
|
-
tar -zxvf
|
10
|
-
tar -zxvf
|
8
|
+
tar -zxvf goodhosts-1.1.0-darwin-amd64.tar.gz goodhosts && mv goodhosts cli_amd64_osx
|
9
|
+
tar -zxvf goodhosts-1.1.0-darwin-arm64.tar.gz goodhosts && mv goodhosts cli_arm64_osx
|
10
|
+
tar -zxvf goodhosts-1.1.0-linux-amd64.tar.gz goodhosts && mv goodhosts cli_amd64_linux
|
11
|
+
tar -zxvf goodhosts-1.1.0-linux-arm64.tar.gz goodhosts && mv goodhosts cli_arm64_linux
|
12
|
+
tar -zxvf goodhosts-1.1.0-windows-amd64.tar.gz goodhosts.exe && mv goodhosts.exe cli.exe
|
11
13
|
rm -f ./*.tar.gz
|
12
14
|
rm -f ./*.txt
|
13
15
|
# Generate
|
data/vagrant-goodhosts.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'vagrant-goodhosts'
|
7
7
|
s.version = VagrantPlugins::GoodHosts::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.required_ruby_version = '>= 2.
|
9
|
+
s.required_ruby_version = '>= 2.2'
|
10
10
|
s.authors = ['Daniele Scasciafratte']
|
11
11
|
s.email = ['mte90net@gmail.com']
|
12
12
|
s.description = "Enables Vagrant to update hosts file on the host machine with goodhosts"
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
21
21
|
s.require_paths = ['lib']
|
22
22
|
|
23
|
-
s.add_development_dependency 'bundler', '
|
23
|
+
s.add_development_dependency 'bundler', '>= 2.2.10'
|
24
24
|
s.add_development_dependency 'rake'
|
25
25
|
|
26
26
|
s.add_runtime_dependency "os"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-goodhosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniele Scasciafratte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,9 +71,11 @@ files:
|
|
71
71
|
- lib/vagrant-goodhosts/Action/RemoveHosts.rb
|
72
72
|
- lib/vagrant-goodhosts/Action/UpdateHosts.rb
|
73
73
|
- lib/vagrant-goodhosts/GoodHosts.rb
|
74
|
-
- lib/vagrant-goodhosts/bundle/cli
|
75
74
|
- lib/vagrant-goodhosts/bundle/cli.exe
|
76
|
-
- lib/vagrant-goodhosts/bundle/
|
75
|
+
- lib/vagrant-goodhosts/bundle/cli_amd64_linux
|
76
|
+
- lib/vagrant-goodhosts/bundle/cli_amd64_osx
|
77
|
+
- lib/vagrant-goodhosts/bundle/cli_arm64_linux
|
78
|
+
- lib/vagrant-goodhosts/bundle/cli_arm64_osx
|
77
79
|
- lib/vagrant-goodhosts/config.rb
|
78
80
|
- lib/vagrant-goodhosts/plugin.rb
|
79
81
|
- lib/vagrant-goodhosts/version.rb
|
@@ -91,14 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
93
|
requirements:
|
92
94
|
- - ">="
|
93
95
|
- !ruby/object:Gem::Version
|
94
|
-
version: '2.
|
96
|
+
version: '2.2'
|
95
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
98
|
requirements:
|
97
99
|
- - ">="
|
98
100
|
- !ruby/object:Gem::Version
|
99
101
|
version: '0'
|
100
102
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
103
|
+
rubygems_version: 3.3.5
|
102
104
|
signing_key:
|
103
105
|
specification_version: 4
|
104
106
|
summary: Enables Vagrant to update hosts file on the host machine with goodhosts
|
Binary file
|
Binary file
|