vagrant-zones 0.1.100 → 0.1.101

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f3b4be02798563d9d0f4fce9a66a07ac6cd1ea7ef09edfdeb4f9fe232a67341
4
- data.tar.gz: 9ed384b15f7ee5d4f81552116580fb94c72aa9dcff84f644d8d74e9fa4db7d66
3
+ metadata.gz: b58a4f65279cdf4fd1ef75666dfad9977f8003c77d6b228672a126d4a436f76a
4
+ data.tar.gz: b48932d77bd5cbe24e35678f5ed4a13a0be2ac04cfd0fba11f4a6d72048584c8
5
5
  SHA512:
6
- metadata.gz: 4bf472087023060df2fe90c19a12410cf7e73b805dc78e3f1de4addf173466b50306257dfacabfb436d016b359b65f39a37a490fd7eaf77a0a3d26ed18e38643
7
- data.tar.gz: faea40fce30d5dfc5be5915ec4c68c11d8df94afcc846707fbcad16818e0396b1209e4dc9fbb473ac147be574b4faded2fb5a63f90e23f1325c3177e69ab192a
6
+ metadata.gz: acaa60b70fc4dd5a51c7adafb54995629ded5e95884c86ce8cd2b43d1a0745756e7044a59496f5603b203e24bc9a2894b40fdfece7227cd0001deb167579d199
7
+ data.tar.gz: 60e9a8a9ca5b93603740742c56e5250f62b9e848515ef10e8889e17c39d0d46c4ba57ea032eb2d4284ede6c51b49814f00c7ed4c5859398f041e3b66604926c8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.101](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.100...v0.1.101) (2025-05-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * windows zoneniczloginsetup ([c0eef21](https://github.com/STARTcloud/vagrant-zones/commit/c0eef2157555d668d0a55dddfcbdb2ea419a623d))
9
+ * windows zoneniczloginsetup ([68581e3](https://github.com/STARTcloud/vagrant-zones/commit/68581e37c4c9dd7353ccdfabdc7a5937f5c6a555))
10
+
3
11
  ## [0.1.100](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.99...v0.1.100) (2025-05-09)
4
12
 
5
13
 
@@ -1358,48 +1358,35 @@ module VagrantPlugins
1358
1358
  # Normalize the MAC address to uppercase with hyphens (Windows format)
1359
1359
  normalized_mac = mac.split(':').map { |segment| segment.rjust(2, '0') }.join('-').upcase
1360
1360
 
1361
- # Debug output
1362
- uii.info("Looking for adapter with MAC: #{normalized_mac}")
1363
-
1364
- # Use the bash command with sed to wrap adapter name with VZWI markers
1365
- ## DO NOT EVER ADJUST THIS COMMAND, WE MUST USE THIS EXACT COMMAND TO GET THE DATA FROM THE MACHINE
1366
- ## DO NOT ADJUST THE COMMAND, IT IS IMPORTANT THAT WE DO NOT EVER ADJUST THIS COMMAND
1367
- ## DO NOT ADJUST THE COMMAND
1368
- ## DO NOT ADJUST THE COMMAND!!!!!!!!!! SERIOUSLY
1369
- getmac_cmd = %(bash -c "getmac /v /FO csv /NH | grep "#{normalized_mac}" | awk -F, '{print $1}' | sed 's/"/VZWI/g'")
1361
+ # rubocop:disable Style/RedundantStringEscape
1362
+ getmac_cmd = %(bash -c "getmac /v /FO csv /NH | grep \\\"#{normalized_mac}\\\" | awk -F, '{print $1}' | sed 's/\\\"/VZWI/g'")
1363
+ # rubocop:enable Style/RedundantStringEscape
1370
1364
  raw_output = zlogin(uii, getmac_cmd)
1371
-
1372
- uii.info("Raw adapter result: #{raw_output.inspect}")
1373
-
1374
- if raw_output.is_a?(String)
1375
- hex_display = raw_output.bytes.map { |b| format('\\x%02X', b) }.join
1376
- uii.info("Hex representation: #{hex_display}")
1377
- elsif raw_output.is_a?(Array)
1378
- # Handle array case
1379
- hex_display = raw_output.join.bytes.map { |b| format('\\x%02X', b) }.join
1380
- uii.info("Hex representation (array joined): #{hex_display}")
1381
- end
1382
-
1383
- # Use the strings-ansi gem to sanitize the raw output
1384
1365
  adapter_name = nil
1385
1366
 
1386
1367
  # First sanitize the raw output to remove all ANSI escape sequences
1387
1368
  raw_output_str = raw_output.is_a?(Array) ? raw_output.join : raw_output.to_s
1388
1369
  sanitized_output = Strings::ANSI.sanitize(raw_output_str)
1389
1370
 
1390
- # Debug the sanitized output
1391
- uii.info("Sanitized output: #{sanitized_output.inspect}")
1392
-
1393
1371
  # Find VZWI markers in the sanitized output
1394
1372
  sanitized_output.split(/[\r\n]+/).each do |line|
1395
1373
  next unless line.include?('VZWI')
1396
1374
 
1397
- uii.info("Found line with VZWI markers (sanitized): #{line}")
1375
+ # Find all positions of "VZWI" in the string
1376
+ positions = []
1377
+ pos = -1
1378
+ while (pos = line.index('VZWI', pos + 1))
1379
+ positions << pos
1380
+ end
1381
+
1382
+ # If we have at least 2 occurrences, extract between the last pair
1383
+ if positions.length >= 2
1384
+ # Get the last two VZWI positions
1385
+ last_pair_start = positions[-2]
1386
+ last_pair_end = positions[-1]
1398
1387
 
1399
- # Extract the adapter name between VZWI markers using direct match
1400
- if line =~ /VZWI(.+?)VZWI/
1401
- adapter_name = ::Regexp.last_match(1)
1402
- uii.info("Extracted adapter name from sanitized output: '#{adapter_name}'")
1388
+ # Extract between these positions (adding 4 to skip "VZWI")
1389
+ adapter_name = line[(last_pair_start + 4)...last_pair_end]
1403
1390
  end
1404
1391
  break
1405
1392
  end
@@ -1407,7 +1394,6 @@ module VagrantPlugins
1407
1394
  # Only proceed if we got a valid adapter name
1408
1395
  if adapter_name && !adapter_name.empty?
1409
1396
  # Rename the adapter to the VNIC name
1410
- uii.info("Using extracted adapter name '#{adapter_name}' for rename")
1411
1397
  rename_adapter = %(netsh interface set interface name="#{adapter_name}" newname="#{vnic_name}")
1412
1398
  uii.info(I18n.t('vagrant_zones.win_applied_rename_adapter')) if zlogin(uii, rename_adapter)
1413
1399
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module VagrantPlugins
4
4
  module ProviderZone
5
- VERSION = '0.1.100'
5
+ VERSION = '0.1.101'
6
6
  NAME = 'vagrant-zones'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-zones
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.100
4
+ version: 0.1.101
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gilbert