vagrant-goodhosts 1.1.0beta2 → 1.1.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
  SHA256:
3
- metadata.gz: 58cfe3e3e7669fb2b8bf147db6786a38f6b94b8d4164460852872a007d2df40c
4
- data.tar.gz: c5131a3c95e03d98a182092138ad55b1df1ae9cbe66ef7ad2800a2e3721b0d97
3
+ metadata.gz: 45d903470fa6dcb3da784a7cf514e2657f0b8fcabf240dcc27b62c3cb392d3af
4
+ data.tar.gz: a42fca228267c92d706eacfc5bc335954975e3ac13611a8e4199830f3ec0a50f
5
5
  SHA512:
6
- metadata.gz: a6d3be03ecd50f179a01380ccda77aaddeddc943d324179e750777222c1b974c50186492d9753bdc8c3ae47da032363fcde0862a045c4fa741fe3335d8c26077
7
- data.tar.gz: 4fd89f66e460df2accaf9ceae0ed8736b257dfde7e3b1f19cb8a65877e62f87d14d88421c4a98141a371b4aaf0170843555a4bd07e96976c6b60f2923d088925
6
+ metadata.gz: c64e57715871cd38e54cc485ec672bc7d34c9e9b8ba79ad269741926122953958abc543ef69ef5fb73d691d5be192ba59b29c09af56d294384f707e956c599e6
7
+ data.tar.gz: 5eb7a176fa5cfdc3dfc39dfb5aca3b17dcb9c595088186c8a00e5e26fdd618e42e0bae8e4a6b90149974af1f1177c2e6ca8fa15650adffb6d1372ec23115bae7
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source "https://rubygems.org"
2
+ ruby "~> 2.5.0"
2
3
 
3
4
  group :development do
4
5
  gem "vagrant", git: "https://github.com/hashicorp/vagrant.git"
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
@@ -104,7 +112,7 @@ module VagrantPlugins
104
112
  rescue StandardError => _e
105
113
  hostnames_to_add.append(hostname)
106
114
  end
107
- return hostnames_to_add
115
+ return hostnames_to_add.join(' ')
108
116
  end
109
117
 
110
118
  def add_goodhost_entries(ip_address, hostnames)
@@ -139,7 +147,7 @@ module VagrantPlugins
139
147
 
140
148
  # filter out the hosts we've already added
141
149
  hosts_to_add = check_hostnames_to_add(ip_address, hostnames)
142
- next if hosts_to_add.none?
150
+ next if hosts_to_add.empty?
143
151
 
144
152
  _stdin, _stdout, stderr, wait_thr, command = add_goodhost_entries(ip_address, hosts_to_add)
145
153
  unless wait_thr.value.success?
@@ -203,6 +211,7 @@ module VagrantPlugins
203
211
 
204
212
  def print_readme(error, error_text, command)
205
213
  unless error
214
+ @ui.info "[vagrant-goodhosts] Finished processing"
206
215
  return false
207
216
  end
208
217
 
Binary file
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GoodHosts
3
- VERSION = '1.1.0beta2'
3
+ VERSION = '1.1.3'
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,6 +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
10
  s.authors = ['Daniele Scasciafratte']
10
11
  s.email = ['mte90net@gmail.com']
11
12
  s.description = "Enables Vagrant to update hosts file on the host machine with goodhosts"
@@ -19,7 +20,7 @@ Gem::Specification.new do |s|
19
20
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
21
  s.require_paths = ['lib']
21
22
 
22
- s.add_development_dependency 'bundler', '~> 1.3'
23
+ s.add_development_dependency 'bundler', '>= 2.2.10'
23
24
  s.add_development_dependency 'rake'
24
25
 
25
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.0beta2
4
+ version: 1.1.3
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-10-13 00:00:00.000000000 Z
11
+ date: 2022-01-04 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,12 +93,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
93
  requirements:
92
94
  - - ">="
93
95
  - !ruby/object:Gem::Version
94
- version: '0'
96
+ version: '2.5'
95
97
  required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  requirements:
97
- - - ">"
99
+ - - ">="
98
100
  - !ruby/object:Gem::Version
99
- version: 1.3.1
101
+ version: '0'
100
102
  requirements: []
101
103
  rubygems_version: 3.2.27
102
104
  signing_key:
Binary file
Binary file