sneakers-queue-migrator 0.1.5 → 0.1.6
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sneakers/migrator/version.rb +1 -1
- data/lib/sneakers/migrator.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5828ad577fd278f6a7aea2c664dc830f16d223718123ff1c777277a1ae3aa1fa
|
4
|
+
data.tar.gz: 33679288215dca825e5f16af92ddf95877e9f0655a2a8e1a73b702ec5f3a3d55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfa2182dd468ce08ee611300fb92c1d7f1541bcf2db0e5214b1b1fd47e0a9d36ccec11998800dd9b8a6abdcacb3e247d49a664f173156669747ae8fdf735d203
|
7
|
+
data.tar.gz: cccfd10de6106480a89fbe6ca70351e0ead63e0ca2ec593ad8e3aeecb51ff64a25b0b6896c331a433fb6efeeb0ae73325cd933a23c665281f184ef61439d8246
|
data/Gemfile.lock
CHANGED
data/lib/sneakers/migrator.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# rubocop:disable Style/StringConcatenation
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require_relative "migrator/version"
|
@@ -176,7 +177,8 @@ module Sneakers
|
|
176
177
|
# Remove comments and excessive whitespace
|
177
178
|
code = str.gsub(/#.*$/, "").gsub(/\n/, " ").gsub(/\s+/, " ")
|
178
179
|
# Convert Ruby %w[ ... ] and %w( ... ) to array syntax for YAML
|
179
|
-
|
180
|
+
# Also handle %i[ ... ] for symbol arrays
|
181
|
+
code = code.gsub(/%[wi][\[(](.*?)[\])]/) do
|
180
182
|
words = ::Regexp.last_match(1).strip.split(/\s+/)
|
181
183
|
"[" + words.map { |w| "\"#{w}\"" }.join(", ") + "]" # rubocop:disable Style/StringConcatenation
|
182
184
|
end
|
@@ -424,3 +426,5 @@ module Sneakers
|
|
424
426
|
end
|
425
427
|
end
|
426
428
|
end
|
429
|
+
|
430
|
+
# rubocop:enable Style/StringConcatenation
|