vagrant-hostmanager 1.8.8 → 1.8.9

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: fdb0a0eb13e64cf9530407a15bf5efe9523a7968
4
- data.tar.gz: '0629a70649acb753bed9936af7e06c8c0324ff0a'
3
+ metadata.gz: fce5ec859549e9cef8fddd359dcbe92fb78f6f07
4
+ data.tar.gz: 5e07f95e4b8d63078516c700d3f0ce0549c2d4bc
5
5
  SHA512:
6
- metadata.gz: 9ac3e558ebade1adaca93526218eec2fa70ac89157691c1f691397d885b02e5d2f5dd294f9f35cf0a0aa77be546e0eaaca267021b88efdb3efd49cbdecdf2ea3
7
- data.tar.gz: b409c3c0586a870a43266fab2eefabe5fcdbebe3cb65bd0171d26636f0bc7f2b26c211f63a873e282ea24e97c9395c5f354bc15ce18e7bf0e9ffe743edf8d931
6
+ metadata.gz: fd3633a5d72fa50e497d494838561eb9017f54b20c14d64a8e3458eaaeb759d0dcf2d3789762fa2373926cf3a9be53028b3e4396a5a143afc7e8069b209d02f5
7
+ data.tar.gz: a331fa0f83557c27f79bfd434366c4f5de14783f03b0e023b5d5d792f8df86fc5468b2d16d177cbcf6a371ca05e7e85805b39744545d69f23b24f0237e5c5795
@@ -88,8 +88,8 @@ module VagrantPlugins
88
88
 
89
89
  def update_content(file_content, resolving_machine, include_id, line_endings)
90
90
  id = include_id ? " id: #{read_or_create_id}" : ""
91
- header = "## vagrant-hostmanager-start#{id}\n"
92
- footer = "## vagrant-hostmanager-end\n"
91
+ header = "## vagrant-hostmanager-start#{id}"
92
+ footer = "## vagrant-hostmanager-end"
93
93
  body = get_machines
94
94
  .map { |machine| get_hosts_file_entry(machine, resolving_machine) }
95
95
  .join
@@ -146,12 +146,12 @@ module VagrantPlugins
146
146
  if body.empty?
147
147
  block = "\n"
148
148
  else
149
- block = "\n\n" + header + body + footer + "\n"
149
+ block = "\n\n" + header + "\n" + body + footer + "\n\n"
150
150
  end
151
151
  # Pattern for finding existing block
152
152
  header_pattern = Regexp.quote(header)
153
153
  footer_pattern = Regexp.quote(footer)
154
- pattern = Regexp.new("\n*#{header_pattern}.*?#{footer_pattern}\n*", Regexp::MULTILINE)
154
+ pattern = Regexp.new("[\r\n]*#{header_pattern}.*?#{footer_pattern}[\r\n]*", Regexp::MULTILINE)
155
155
  # Replace existing block or append
156
156
  content = old_content.match(pattern) ? old_content.sub(pattern, block) : old_content.rstrip + block
157
157
  if line_endings == "crlf"
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostManager
3
- VERSION = '1.8.8'
3
+ VERSION = '1.8.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hostmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.8
4
+ version: 1.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Dahlen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-17 00:00:00.000000000 Z
12
+ date: 2018-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler