tracking_number 2.0.0 → 2.0.1

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
  SHA256:
3
- metadata.gz: e06e5887cc3a0316fe5a91cbcd544ff96e11cf39034926bd196acee9eca7d716
4
- data.tar.gz: 221fff9ec8207d17ef36072ee3d7313e1a30acdf2791ef6aa98a8cf243b734c1
3
+ metadata.gz: ced09c83642540d591ffa13e64ca6b28be023180cf5489666d0310f91fa1bb25
4
+ data.tar.gz: 6a32ca6f7e2ab19865e7979a06d2b94e1e7dd949628376a18d967727ec3a1dce
5
5
  SHA512:
6
- metadata.gz: 7152bb607cc2e19bafa3b0e9efb7b903787cbbf307d2f4e9ecb3b7944b98c352c34b22c7aaf8950b91ea8d9f0127278523d841732ca67cf2c54a029eba442f51
7
- data.tar.gz: c201d4823c212014c499f36170071ec126208401d3aa7eab8d75edc98b820bd2a9a793e5cdaa75e12a0fe81c20a29c8711b6aeae7408180f8101f80d69921318
6
+ metadata.gz: 9bf16cc77823c8702a2691b2e90d43950bd4e270803a9346fc3e9780535e9c62bc92bf4001e0a4edefdd614d8412de7bc5b4a25ebc191b2694eb6a63db05c35b
7
+ data.tar.gz: cc24bea7fd7377a5d53e393886470b2daa0a78ae734f82fd1104031d9673784a7b62f9933768c1faab0b25bf1db389bbcb34029fd7b9a4635d555722b60e9273
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  tracking_number changelog
2
2
 
3
+ ## [2.0.1](https://github.com/jkeen/tracking_number/compare/v2.0.0...v2.0.1) (2024-08-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * upcase body before searching to find lowercase tracking numbers ([#85](https://github.com/jkeen/tracking_number/issues/85)) ([e07c754](https://github.com/jkeen/tracking_number/commit/e07c754ba3647ae4e587b30a5c51bfa23a4589e5))
9
+
3
10
  # [2.0.0](https://github.com/jkeen/tracking_number/compare/v1.6.0...v2.0.0) (2024-08-18)
4
11
 
5
12
  # [1.6.0](https://github.com/jkeen/tracking_number/compare/v1.5.0...v1.6.0) (2023-11-14)
@@ -24,7 +24,7 @@ module TrackingNumber
24
24
  # matches with match groups within the match data
25
25
  matches = []
26
26
 
27
- body.scan(const_get(:SEARCH_PATTERN)) do
27
+ body.upcase.scan(const_get(:SEARCH_PATTERN)) do
28
28
  # get the match data instead, which is needed with these types of regexes
29
29
  matches << $~
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module TrackingNumber
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -40,6 +40,12 @@ class TrackingNumberTest < Minitest::Test
40
40
  assert_equal 1, s.size
41
41
  assert_equal "1Z879E930346834440", s.first.tracking_number
42
42
  end
43
+
44
+ should "return tracking numbers entered as lowercase" do
45
+ s = TrackingNumber.search("hello 1z879E930346834440 bye")
46
+ assert_equal 1, s.size
47
+ assert_equal "1Z879E930346834440", s.first.tracking_number
48
+ end
43
49
  end
44
50
 
45
51
  context "tracking number additional data for ups" do
@@ -201,7 +207,7 @@ class TrackingNumberTest < Minitest::Test
201
207
  context "searching numbers that have partners" do
202
208
  partnership_number = "420 11213 92 6129098349792366623 8"
203
209
  single_number = "92001903060085300042901077"
204
-
210
+
205
211
  search_string = ["number that matches two services", partnership_number, " number that matches only one: ", single_number, "let's see if that does it"].join(' ')
206
212
 
207
213
  should "match only carriers by default" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracking_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Keen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-18 00:00:00.000000000 Z
11
+ date: 2024-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport