vagrant-goodhosts 1.0.19 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/default.yml +15 -0
- data/.rubocop.yml +68 -0
- data/Gemfile +3 -0
- data/lib/vagrant-goodhosts/Action/BaseAction.rb +3 -2
- data/lib/vagrant-goodhosts/Action/RemoveHosts.rb +3 -3
- data/lib/vagrant-goodhosts/Action/UpdateHosts.rb +4 -4
- data/lib/vagrant-goodhosts/GoodHosts.rb +108 -103
- data/lib/vagrant-goodhosts/config.rb +10 -9
- data/lib/vagrant-goodhosts/plugin.rb +1 -0
- data/lib/vagrant-goodhosts/version.rb +1 -1
- data/lib/vagrant-goodhosts.rb +3 -1
- data/vagrant-goodhosts.gemspec +4 -2
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 913057d147ca19a4c9b051dbc06ec58e054ed045b5e46d964cd305db0ead2651
|
4
|
+
data.tar.gz: 601e5e9e7c0bfba28f6504aa9ee6947c6c83aca51d3e86c4e5b4c623ef650779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0816afef7b1974b05fb643e58ad4d035ca051bb1447a4e61a6b25e7b5b5863a8756854dacbf10986b6d68d3220f1d476f8d6a180049d6fcec0e3c8901df85a62'
|
7
|
+
data.tar.gz: 347e634628dc20e3190e74aa2350abaa309677440b76fdb6dc7b6825212172183ad73b0f8d1c65a06cd29454304ccd0536fc65b4018088eac5439c719c0b6a59
|
@@ -0,0 +1,15 @@
|
|
1
|
+
name: Linters
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v1
|
10
|
+
- name: RuboCop Linter
|
11
|
+
uses: andrewmcodes/rubocop-linter-action@v3.3.0
|
12
|
+
with:
|
13
|
+
exit_on_failure: true
|
14
|
+
env:
|
15
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'Gemfile'
|
4
|
+
- 'Rakefile'
|
5
|
+
- 'lib/vagrant-goodhosts/config.rb'
|
6
|
+
|
7
|
+
Naming/FileName:
|
8
|
+
Enabled: false
|
9
|
+
Naming/AccessorMethodName:
|
10
|
+
Enabled: false
|
11
|
+
Metrics/MethodLength:
|
12
|
+
Enabled: false
|
13
|
+
Metrics/PerceivedComplexity:
|
14
|
+
Enabled: false
|
15
|
+
Metrics/ModuleLength:
|
16
|
+
Enabled: false
|
17
|
+
Metrics/CyclomaticComplexity:
|
18
|
+
Enabled: false
|
19
|
+
Metrics/AbcSize:
|
20
|
+
Enabled: false
|
21
|
+
Style/FrozenStringLiteralComment:
|
22
|
+
Enabled: false
|
23
|
+
Style/RaiseArgs:
|
24
|
+
Enabled: false
|
25
|
+
Layout/LineLength:
|
26
|
+
Enabled: false
|
27
|
+
Style/StringLiterals:
|
28
|
+
Enabled: false
|
29
|
+
Style/ExpandPathArguments:
|
30
|
+
Enabled: false
|
31
|
+
Style/RedundantReturn:
|
32
|
+
Enabled: false
|
33
|
+
Style/SymbolArray:
|
34
|
+
Enabled: false
|
35
|
+
Style/ClassVars:
|
36
|
+
Enabled: false
|
37
|
+
Style/YodaCondition:
|
38
|
+
Enabled: false
|
39
|
+
Style/MethodCallWithoutArgsParentheses:
|
40
|
+
Enabled: false
|
41
|
+
Style/NumericPredicate:
|
42
|
+
Enabled: false
|
43
|
+
Style/ParallelAssignment:
|
44
|
+
Enabled: false
|
45
|
+
Style/Not:
|
46
|
+
Enabled: false
|
47
|
+
Style/EmptyLiteral:
|
48
|
+
Enabled: false
|
49
|
+
Style/IfUnlessModifier:
|
50
|
+
Enabled: false
|
51
|
+
Style/MutableConstant:
|
52
|
+
Enabled: false
|
53
|
+
Style/SymbolLiteral:
|
54
|
+
Enabled: false
|
55
|
+
Style/AccessorGrouping:
|
56
|
+
Enabled: false
|
57
|
+
Style/Next:
|
58
|
+
Enabled: false
|
59
|
+
Style/MultipleComparison:
|
60
|
+
Enabled: false
|
61
|
+
Style/FormatStringToken:
|
62
|
+
Enabled: false
|
63
|
+
Style/SoleNestedConditional:
|
64
|
+
Enabled: false
|
65
|
+
Style/GuardClause:
|
66
|
+
Enabled: false
|
67
|
+
Gemspec/RequiredRubyVersion:
|
68
|
+
Enabled: false
|
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
# Action to extend for the plugin needs, detects if it was already executed etc
|
1
2
|
module VagrantPlugins
|
2
3
|
module GoodHosts
|
3
4
|
module Action
|
5
|
+
# Extend it!
|
4
6
|
class BaseAction
|
5
7
|
include GoodHosts
|
6
8
|
|
@@ -35,10 +37,9 @@ module VagrantPlugins
|
|
35
37
|
@app.call(env)
|
36
38
|
end
|
37
39
|
|
38
|
-
def run(
|
40
|
+
def run(_env)
|
39
41
|
raise NotImplementedError.new("Must be implemented!")
|
40
42
|
end
|
41
|
-
|
42
43
|
end
|
43
44
|
end
|
44
45
|
end
|
@@ -1,8 +1,9 @@
|
|
1
|
+
# Run when is removing the hosts
|
1
2
|
module VagrantPlugins
|
2
3
|
module GoodHosts
|
3
4
|
module Action
|
5
|
+
# Remove hosts
|
4
6
|
class RemoveHosts < BaseAction
|
5
|
-
|
6
7
|
def run(env)
|
7
8
|
machine_action = env[:machine_action]
|
8
9
|
|
@@ -12,10 +13,9 @@ module VagrantPlugins
|
|
12
13
|
if ([:halt, :suspend].include? machine_action) && (false == @machine.config.goodhosts.remove_on_suspend)
|
13
14
|
@ui.info "[vagrant-goodhosts] Removing hosts on suspend disabled"
|
14
15
|
else
|
15
|
-
|
16
|
+
remove_host_entries
|
16
17
|
end
|
17
18
|
end
|
18
|
-
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -1,16 +1,19 @@
|
|
1
|
+
# The core of the plugin
|
1
2
|
require "rbconfig"
|
2
3
|
require "open3"
|
3
4
|
require "resolv"
|
5
|
+
require "os"
|
4
6
|
|
5
7
|
module VagrantPlugins
|
6
8
|
module GoodHosts
|
9
|
+
# Plugin module
|
7
10
|
module GoodHosts
|
8
|
-
def
|
11
|
+
def get_ips
|
9
12
|
ips = []
|
10
13
|
|
11
|
-
if @machine.config.vm.networks.
|
12
|
-
|
13
|
-
|
14
|
+
if @machine.config.vm.networks.empty?
|
15
|
+
@ui.error("[vagrant-goodhosts] No networks are available yet for this virtual machine to add IP/hosts for")
|
16
|
+
return ips
|
14
17
|
end
|
15
18
|
|
16
19
|
@machine.config.vm.networks.each do |network|
|
@@ -21,7 +24,7 @@ module VagrantPlugins
|
|
21
24
|
ip = options[:ip] if (key == :private_network || key == :public_network) && options[:goodhosts] != "skip"
|
22
25
|
ips.push(ip) if ip
|
23
26
|
|
24
|
-
@machine.config.vm.provider :hyperv do
|
27
|
+
@machine.config.vm.provider :hyperv do
|
25
28
|
timeout = @machine.provider_config.ip_address_timeout
|
26
29
|
@ui.output("[vagrant-goodhosts] Waiting for the guest machine to report its IP address ( this might take some time, have patience )...")
|
27
30
|
@ui.detail("Timeout: #{timeout} seconds")
|
@@ -30,43 +33,39 @@ module VagrantPlugins
|
|
30
33
|
vmm_server_address: @machine.provider_config.vmm_server_address,
|
31
34
|
proxy_server_address: @machine.provider_config.proxy_server_address,
|
32
35
|
timeout: timeout,
|
33
|
-
machine: @machine
|
36
|
+
machine: @machine
|
34
37
|
}
|
35
38
|
network = @machine.provider.driver.read_guest_ip(options)
|
36
39
|
if network["ip"]
|
37
40
|
ips.push(network["ip"]) unless ips.include? network["ip"]
|
38
41
|
end
|
39
42
|
end
|
40
|
-
|
41
43
|
end
|
42
44
|
return ips
|
43
45
|
end
|
44
46
|
|
45
|
-
# https://stackoverflow.com/a/13586108/1902215
|
46
47
|
def get_os_binary
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
|
57
|
-
end)
|
48
|
+
if OS.windows?
|
49
|
+
return 'cli.exe'
|
50
|
+
elsif OS.mac?
|
51
|
+
return 'cli_osx'
|
52
|
+
elsif OS.linux?
|
53
|
+
return 'cli'
|
54
|
+
else
|
55
|
+
raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
|
56
|
+
end
|
58
57
|
end
|
59
58
|
|
60
59
|
def get_cli
|
61
60
|
binary = get_os_binary
|
62
|
-
path = File.expand_path(File.dirname(File.dirname(__FILE__)))
|
61
|
+
path = format('%s%s', File.expand_path(File.dirname(File.dirname(__FILE__))), "/vagrant-goodhosts/bundle/")
|
63
62
|
path = "#{path}#{binary}"
|
64
63
|
|
65
64
|
return path
|
66
65
|
end
|
67
66
|
|
68
67
|
# Get a hash of hostnames indexed by ip, e.g. { 'ip1': ['host1'], 'ip2': ['host2', 'host3'] }
|
69
|
-
def
|
68
|
+
def get_hostnames(ips)
|
70
69
|
hostnames = Hash.new { |h, k| h[k] = [] }
|
71
70
|
|
72
71
|
case @machine.config.goodhosts.aliases
|
@@ -85,54 +84,50 @@ module VagrantPlugins
|
|
85
84
|
return hostnames
|
86
85
|
end
|
87
86
|
|
88
|
-
def
|
87
|
+
def disable_clean(ip_address)
|
89
88
|
unless ip_address.nil?
|
90
89
|
return @machine.config.goodhosts.disable_clean
|
91
90
|
end
|
91
|
+
|
92
92
|
return true
|
93
93
|
end
|
94
94
|
|
95
|
-
def
|
95
|
+
def check_hostnames_to_add(ip_address, hostnames)
|
96
96
|
hostnames_to_add = Array.new
|
97
97
|
hostnames = hostnames.split
|
98
98
|
# check which hostnames actually need adding
|
99
99
|
hostnames.each do |hostname|
|
100
|
-
|
101
|
-
|
102
|
-
if address != ip_address
|
103
|
-
hostnames_to_add.append( hostname )
|
104
|
-
end
|
105
|
-
rescue => exception
|
100
|
+
address = Resolv.getaddress(hostname)
|
101
|
+
if address != ip_address
|
106
102
|
hostnames_to_add.append(hostname)
|
107
103
|
end
|
104
|
+
rescue StandardError => _e
|
105
|
+
hostnames_to_add.append(hostname)
|
108
106
|
end
|
109
|
-
return hostnames_to_add
|
107
|
+
return hostnames_to_add.join(' ')
|
110
108
|
end
|
111
109
|
|
112
|
-
def
|
110
|
+
def add_goodhost_entries(ip_address, hostnames)
|
111
|
+
cli = get_cli
|
113
112
|
if cli.include? ".exe"
|
114
|
-
clean =
|
115
|
-
|
116
|
-
|
117
|
-
end
|
118
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3("powershell", "-Command", "Start-Process '#{cli}' -ArgumentList \"add\",#{clean}\"#{ip_address}\",\"#{hostnames}\" -Verb RunAs")
|
113
|
+
clean = get_clean_parameter_by_system(ip_address, true)
|
114
|
+
command = "Start-Process '#{cli}' -ArgumentList \"add\",#{clean}\"#{ip_address}\",\"#{hostnames}\" -Verb RunAs"
|
115
|
+
stdin, stdout, stderr, wait_thr = Open3.popen3("powershell", "-Command", command)
|
119
116
|
else
|
120
|
-
clean =
|
121
|
-
|
122
|
-
|
123
|
-
end
|
124
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3("sudo '#{cli}' add #{clean} #{ip_address} #{hostnames}")
|
117
|
+
clean = get_clean_parameter_by_system(ip_address, false)
|
118
|
+
command = "sudo '#{cli}' add #{clean} #{ip_address} #{hostnames}"
|
119
|
+
stdin, stdout, stderr, wait_thr = Open3.popen3(command)
|
125
120
|
end
|
126
|
-
return stdin, stdout, stderr, wait_thr
|
121
|
+
return stdin, stdout, stderr, wait_thr, command
|
127
122
|
end
|
128
123
|
|
129
|
-
def
|
124
|
+
def add_host_entries
|
130
125
|
error = false
|
131
|
-
|
132
|
-
|
133
|
-
hostnames_by_ips =
|
126
|
+
error_text = ''
|
127
|
+
command = ''
|
128
|
+
hostnames_by_ips = generate_hostnames_by_ips
|
134
129
|
|
135
|
-
return if
|
130
|
+
return if hostnames_by_ips.none?
|
136
131
|
|
137
132
|
@ui.info "[vagrant-goodhosts] Checking for host entries"
|
138
133
|
|
@@ -143,42 +138,39 @@ module VagrantPlugins
|
|
143
138
|
end
|
144
139
|
|
145
140
|
# filter out the hosts we've already added
|
146
|
-
hosts_to_add =
|
147
|
-
next if
|
141
|
+
hosts_to_add = check_hostnames_to_add(ip_address, hostnames)
|
142
|
+
next if hosts_to_add.empty?
|
148
143
|
|
149
|
-
|
150
|
-
|
144
|
+
_stdin, _stdout, stderr, wait_thr, command = add_goodhost_entries(ip_address, hosts_to_add)
|
145
|
+
unless wait_thr.value.success?
|
151
146
|
error = true
|
152
|
-
|
147
|
+
error_text = stderr.read.strip
|
153
148
|
end
|
154
149
|
end
|
155
|
-
|
150
|
+
print_readme(error, error_text, command)
|
156
151
|
end
|
157
152
|
|
158
|
-
def
|
153
|
+
def remove_goodhost_entries(ip_address, hostnames)
|
154
|
+
cli = get_cli
|
159
155
|
if cli.include? ".exe"
|
160
|
-
clean =
|
161
|
-
|
162
|
-
|
163
|
-
end
|
164
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3("powershell", "-Command", "Start-Process '#{cli}' -ArgumentList \"remove\",#{clean}\"#{ip_address}\",\"#{hostnames}\" -Verb RunAs")
|
156
|
+
clean = get_clean_parameter_by_system(ip_address, true)
|
157
|
+
command = "Start-Process '#{cli}' -ArgumentList \"remove\",#{clean}\"#{ip_address}\",\"#{hostnames}\" -Verb RunAs"
|
158
|
+
stdin, stdout, stderr, wait_thr = Open3.popen3("powershell", "-Command", command)
|
165
159
|
else
|
166
|
-
clean =
|
167
|
-
|
168
|
-
|
169
|
-
end
|
170
|
-
stdin, stdout, stderr, wait_thr = Open3.popen3("sudo '#{cli}' remove #{clean} #{ip_address} #{hostnames}")
|
160
|
+
clean = get_clean_parameter_by_system(ip_address, false)
|
161
|
+
command = "sudo '#{cli}' remove #{clean} #{ip_address} #{hostnames}"
|
162
|
+
stdin, stdout, stderr, wait_thr = Open3.popen3(command)
|
171
163
|
end
|
172
|
-
return stdin, stdout, stderr, wait_thr
|
164
|
+
return stdin, stdout, stderr, wait_thr, command
|
173
165
|
end
|
174
166
|
|
175
|
-
def
|
167
|
+
def remove_host_entries
|
176
168
|
error = false
|
177
|
-
|
178
|
-
|
179
|
-
hostnames_by_ips =
|
169
|
+
error_text = ''
|
170
|
+
command = ''
|
171
|
+
hostnames_by_ips = generate_hostnames_by_ips
|
180
172
|
|
181
|
-
return if
|
173
|
+
return if hostnames_by_ips.none?
|
182
174
|
|
183
175
|
@ui.info "[vagrant-goodhosts] Removing hosts"
|
184
176
|
|
@@ -188,59 +180,72 @@ module VagrantPlugins
|
|
188
180
|
next
|
189
181
|
end
|
190
182
|
|
191
|
-
|
192
|
-
|
183
|
+
_stdin, _stdout, stderr, wait_thr, command = remove_goodhost_entries(ip_address, hostnames)
|
184
|
+
unless wait_thr.value.success?
|
193
185
|
error = true
|
194
|
-
|
186
|
+
error_text = stderr.read.strip
|
195
187
|
end
|
196
188
|
end
|
197
|
-
|
189
|
+
print_readme(error, error_text, command)
|
198
190
|
end
|
199
191
|
|
200
|
-
def
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
192
|
+
def get_clean_parameter_by_system(ip_address, is_win)
|
193
|
+
clean = "--clean"
|
194
|
+
if is_win
|
195
|
+
clean = "\"--clean\","
|
196
|
+
end
|
197
|
+
|
198
|
+
if disable_clean(ip_address)
|
199
|
+
clean = ''
|
200
|
+
end
|
201
|
+
return clean
|
202
|
+
end
|
203
|
+
|
204
|
+
def print_readme(error, error_text, command)
|
205
|
+
unless error
|
206
|
+
return false
|
207
|
+
end
|
208
|
+
|
209
|
+
cli = get_cli
|
210
|
+
@ui.error "[vagrant-goodhosts] Issue executing goodhosts CLI: #{error_text}"
|
211
|
+
@ui.error "[vagrant-goodhosts] Command: #{command}"
|
212
|
+
@ui.error "[vagrant-goodhosts] Cli path: #{cli}"
|
213
|
+
if cli.include? ".exe"
|
214
|
+
@ui.error "[vagrant-goodhosts] Check the readme at https://github.com/goodhosts/vagrant#windows-uac-prompt"
|
215
|
+
exit
|
216
|
+
else
|
217
|
+
@ui.error "[vagrant-goodhosts] Check the readme at https://github.com/goodhosts/vagrant#passwordless-sudo"
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
def append_hostsnames_by_ips(hostnames_by_ips, hostnames, ip_address, ip_index)
|
222
|
+
if hostnames[ip_index].count() > 0
|
223
|
+
hostnames[ip_index].each do |hostname|
|
224
|
+
unless ip_address.nil?
|
225
|
+
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
|
226
|
+
end
|
210
227
|
end
|
228
|
+
hostnames_by_ips = { ip_address => hostnames[ip_index].join(" ") }
|
211
229
|
end
|
230
|
+
return hostnames_by_ips
|
212
231
|
end
|
213
232
|
|
214
|
-
def
|
233
|
+
def generate_hostnames_by_ips
|
215
234
|
hostnames_by_ips = []
|
216
|
-
ips =
|
235
|
+
ips = get_ips
|
217
236
|
if ips.count() < 1
|
218
237
|
@ui.error("[vagrant-goodhosts] No ip address found for this virtual machine")
|
219
238
|
return hostnames_by_ips
|
220
239
|
end
|
221
|
-
hostnames =
|
240
|
+
hostnames = get_hostnames(ips)
|
222
241
|
if ips.count() > 1
|
223
242
|
ips.each do |ip|
|
224
243
|
ip_address = ip
|
225
|
-
|
226
|
-
hostnames[ip].each do |hostname|
|
227
|
-
if !ip_address.nil?
|
228
|
-
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
|
229
|
-
end
|
230
|
-
end
|
231
|
-
hostnames_by_ips = { ip_address => hostnames[ip].join(" ") }
|
232
|
-
end
|
244
|
+
hostnames_by_ips = append_hostsnames_by_ips(hostnames_by_ips, hostnames, ip_address, ip)
|
233
245
|
end
|
234
246
|
else
|
235
247
|
ip_address = ips[0]
|
236
|
-
|
237
|
-
hostnames[ip_address].each do |hostname|
|
238
|
-
if !ip_address.nil?
|
239
|
-
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
|
240
|
-
end
|
241
|
-
end
|
242
|
-
hostnames_by_ips = { ip_address => hostnames[ip_address].join(" ") }
|
243
|
-
end
|
248
|
+
hostnames_by_ips = append_hostsnames_by_ips(hostnames_by_ips, hostnames, ip_address, ip_address)
|
244
249
|
end
|
245
250
|
|
246
251
|
return hostnames_by_ips
|
@@ -2,16 +2,17 @@ require "vagrant"
|
|
2
2
|
|
3
3
|
module VagrantPlugins
|
4
4
|
module GoodHosts
|
5
|
+
# Vagrant plugin definition
|
5
6
|
class Config < Vagrant.plugin("2", :config)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
attr_accessor :aliases
|
8
|
+
attr_accessor :id
|
9
|
+
attr_accessor :remove_on_suspend
|
10
|
+
attr_accessor :disable_clean
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@remove_on_suspend = true
|
14
|
+
@disable_clean = true
|
15
|
+
end
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
data/lib/vagrant-goodhosts.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
# Root file of the plugin
|
1
2
|
require "vagrant-goodhosts/version"
|
2
3
|
require "vagrant-goodhosts/plugin"
|
3
4
|
|
5
|
+
# Extend Vagrant Plugins
|
4
6
|
module VagrantPlugins
|
7
|
+
# Load our plugin
|
5
8
|
module GoodHosts
|
6
9
|
def self.source_root
|
7
10
|
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
8
11
|
end
|
9
12
|
end
|
10
13
|
end
|
11
|
-
|
data/vagrant-goodhosts.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'vagrant-goodhosts/version'
|
@@ -7,6 +6,7 @@ Gem::Specification.new do |s|
|
|
7
6
|
s.name = 'vagrant-goodhosts'
|
8
7
|
s.version = VagrantPlugins::GoodHosts::VERSION
|
9
8
|
s.platform = Gem::Platform::RUBY
|
9
|
+
s.required_ruby_version = '>= 2.5'
|
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"
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.homepage = 'https://github.com/goodhosts/vagrant'
|
15
15
|
s.license = 'MIT'
|
16
16
|
|
17
|
-
s.files = `git ls-files`.split(
|
17
|
+
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
18
18
|
s.files += Dir.glob("lib/vagrant-goodhosts/bundle/*")
|
19
19
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
20
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
@@ -22,4 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.add_development_dependency 'bundler', '~> 1.3'
|
24
24
|
s.add_development_dependency 'rake'
|
25
|
+
|
26
|
+
s.add_runtime_dependency "os"
|
25
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-goodhosts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
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
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: os
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Enables Vagrant to update hosts file on the host machine with goodhosts
|
42
56
|
email:
|
43
57
|
- mte90net@gmail.com
|
@@ -45,7 +59,9 @@ executables: []
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
62
|
+
- ".github/workflows/default.yml"
|
48
63
|
- ".gitignore"
|
64
|
+
- ".rubocop.yml"
|
49
65
|
- Gemfile
|
50
66
|
- LICENSE.txt
|
51
67
|
- README.md
|
@@ -75,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
91
|
requirements:
|
76
92
|
- - ">="
|
77
93
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
94
|
+
version: '2.5'
|
79
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
96
|
requirements:
|
81
97
|
- - ">="
|