vagrant-goodhosts 1.1.1 → 1.1.4

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
  SHA256:
3
- metadata.gz: 913057d147ca19a4c9b051dbc06ec58e054ed045b5e46d964cd305db0ead2651
4
- data.tar.gz: 601e5e9e7c0bfba28f6504aa9ee6947c6c83aca51d3e86c4e5b4c623ef650779
3
+ metadata.gz: 9999dc28ea8a634d9d2f562f3db11171adc264e0587c9f2d2b0cc1749a762b17
4
+ data.tar.gz: 14b2cfa13216292504af3acab9aa47f57bd91c2e0cd5f2e6bf883b91c39485b2
5
5
  SHA512:
6
- metadata.gz: '0816afef7b1974b05fb643e58ad4d035ca051bb1447a4e61a6b25e7b5b5863a8756854dacbf10986b6d68d3220f1d476f8d6a180049d6fcec0e3c8901df85a62'
7
- data.tar.gz: 347e634628dc20e3190e74aa2350abaa309677440b76fdb6dc7b6825212172183ad73b0f8d1c65a06cd29454304ccd0536fc65b4018088eac5439c719c0b6a59
6
+ metadata.gz: 371e94ffe4c948617ab74c77d9789fa95736e3619b5c0bc64caa113b31e6091b7339923fda3a1d2e0158cfa3ca0d7812ae1b51cea64f74fe8fc170bb411a4a7b
7
+ data.tar.gz: f6c2714dd8e3ff3ef0c0055219183e4d63695a32ab74f88aaf982c8578a735440976a1c2d13639bc03b32f5837a6bab7468b4fb66c43e3b584a7e3887317651a
data/.rubocop.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  AllCops:
2
+ TargetRubyVersion: 2.5
2
3
  Exclude:
3
4
  - 'Gemfile'
4
5
  - 'Rakefile'
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
- ## Installing The Development Version
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
- return 'cli_osx'
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
- return 'cli'
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
- address = Resolv.getaddress(hostname)
101
- if address != ip_address
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
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GoodHosts
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.4'
4
4
  end
5
5
  end
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 goodhosts_darwin_amd64.tar.gz goodhosts && mv goodhosts cli_osx
9
- tar -zxvf goodhosts_linux_amd64.tar.gz goodhosts && mv goodhosts cli
10
- tar -zxvf goodhosts_windows_amd64.tar.gz goodhosts.exe && mv goodhosts.exe cli.exe
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
@@ -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.5'
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', '~> 1.3'
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.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: 2021-11-04 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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/cli_osx
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.5'
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.2.27
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