seshbot-packing 0.8.2 → 0.8.3
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/seshbot/packing/package.rb +3 -1
- data/lib/seshbot/packing/version.rb +1 -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: b5c704b0aaa991e8fe3cc828791fa04b78b5cb742da74985e7d8fb4a151d6bb7
|
|
4
|
+
data.tar.gz: 704326012b06c7cb027004351e54f9123aceede796cf11da63bccaf793df68b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a9c6f27dceded9253e7e0ba1297ff4bb331d5b2b695e5261bb3255609c003ea438313d691e8fade12cb4752d021b1c1256214a7aa5ec39c81f3400c4afd2518
|
|
7
|
+
data.tar.gz: c18687b3b45ac45f5894e0b1ddc394d2931e698c68cc6c3c860cfeb4b8b4611ad7dc812b190ddf033f9828723207b29055f6229da8df974eb8170f933821f22a
|
data/Gemfile.lock
CHANGED
|
@@ -32,12 +32,14 @@ module Seshbot
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def packaged_size(sku)
|
|
35
|
-
size_regex = /-([LUP]\d{2}|[BCM]\d{3})/
|
|
35
|
+
size_regex = /-(K?[LUP]\d{2}|[BCM]\d{3})/
|
|
36
36
|
match = sku.match(size_regex)
|
|
37
37
|
raise "Cannot determine packaged size for SKU: #{sku}" if match.nil? || match.captures.empty?
|
|
38
38
|
|
|
39
39
|
# this is everything inside the (..) in the regex (everything except the leading '-')
|
|
40
40
|
result = match.captures[0]
|
|
41
|
+
# HACK! for legacy reasons, we don't consider K to be part of the size.
|
|
42
|
+
result.gsub!(/^K/, '')
|
|
41
43
|
|
|
42
44
|
if result == "B502"
|
|
43
45
|
result = "B306"
|