tracking_number 1.6.0 → 2.0.1
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/.github/workflows/ruby.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/tracking_number/base.rb +1 -1
- data/lib/tracking_number/version.rb +1 -1
- data/package.json +16 -7
- data/test/tracking_number_test.rb +7 -1
- data/tracking_number.gemspec +1 -0
- data/yarn.lock +20 -15
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ced09c83642540d591ffa13e64ca6b28be023180cf5489666d0310f91fa1bb25
|
4
|
+
data.tar.gz: 6a32ca6f7e2ab19865e7979a06d2b94e1e7dd949628376a18d967727ec3a1dce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf16cc77823c8702a2691b2e90d43950bd4e270803a9346fc3e9780535e9c62bc92bf4001e0a4edefdd614d8412de7bc5b4a25ebc191b2694eb6a63db05c35b
|
7
|
+
data.tar.gz: cc24bea7fd7377a5d53e393886470b2daa0a78ae734f82fd1104031d9673784a7b62f9933768c1faab0b25bf1db389bbcb34029fd7b9a4635d555722b60e9273
|
data/.github/workflows/ruby.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
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
|
+
|
10
|
+
# [2.0.0](https://github.com/jkeen/tracking_number/compare/v1.6.0...v2.0.0) (2024-08-18)
|
11
|
+
|
3
12
|
# [1.6.0](https://github.com/jkeen/tracking_number/compare/v1.5.0...v1.6.0) (2023-11-14)
|
4
13
|
|
5
14
|
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
[](https://badge.fury.io/rb/tracking_number)
|
3
3
|
[]()
|
4
4
|
|
5
|
-
> Hey there tracking number enthusiast! I
|
5
|
+
> Hey there tracking number enthusiast! I don't use this project in any production capacity, and really never have. I am not a tracking number expert, and I don't have inside connections to a shipping company—I'm just a guy that once tried to make a package tracking app and this gem is all that survived. When I have absolutely nothing to do it's kinda fun to tinker with, but time has become more and more of a precious resource. Anyway, maintaining this is thankless work, and if this project has been useful for you I sure would appreciate a cup or two of coffee slid my way as a token of appreciation. A PR would also be nice.
|
6
6
|
>
|
7
7
|
> <a href="https://www.buymeacoffee.com/jeffkeen" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: auto !important;width: 150px !important;" ></a>
|
8
8
|
|
data/lib/tracking_number/base.rb
CHANGED
@@ -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
|
data/package.json
CHANGED
@@ -15,13 +15,15 @@
|
|
15
15
|
"semantic-release": "semantic-release"
|
16
16
|
},
|
17
17
|
"devDependencies": {
|
18
|
-
"semantic-release-rubygem": "^1.2.0",
|
19
|
-
"semantic-release": "^19.0.3",
|
20
18
|
"@semantic-release/changelog": "^6.0.1",
|
21
|
-
"@semantic-release/git": "^10.0.1"
|
19
|
+
"@semantic-release/git": "^10.0.1",
|
20
|
+
"semantic-release": "^19.0.3",
|
21
|
+
"semantic-release-rubygem": "^1.2.0"
|
22
22
|
},
|
23
23
|
"release": {
|
24
|
-
"branches": [
|
24
|
+
"branches": [
|
25
|
+
"main"
|
26
|
+
],
|
25
27
|
"plugins": [
|
26
28
|
[
|
27
29
|
"@semantic-release/commit-analyzer",
|
@@ -65,7 +67,11 @@
|
|
65
67
|
}
|
66
68
|
],
|
67
69
|
"parserOpts": {
|
68
|
-
"noteKeywords": [
|
70
|
+
"noteKeywords": [
|
71
|
+
"BREAKING CHANGE",
|
72
|
+
"BREAKING CHANGES",
|
73
|
+
"BREAKING"
|
74
|
+
]
|
69
75
|
}
|
70
76
|
}
|
71
77
|
],
|
@@ -82,11 +88,14 @@
|
|
82
88
|
[
|
83
89
|
"@semantic-release/git",
|
84
90
|
{
|
85
|
-
"assets": [
|
91
|
+
"assets": [
|
92
|
+
"CHANGELOG.md"
|
93
|
+
],
|
86
94
|
"message": "${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}"
|
87
95
|
}
|
88
96
|
]
|
89
97
|
],
|
90
98
|
"debug": false,
|
91
99
|
"dryRun": false
|
92
|
-
}
|
100
|
+
}
|
101
|
+
}
|
@@ -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
|
data/tracking_number.gemspec
CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.version = TrackingNumber::VERSION
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
12
|
+
s.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
|
12
13
|
s.authors = ['Jeff Keen']
|
13
14
|
s.description = "This gem identifies valid tracking numbers and the service they're associated with. It can also tell you a little bit about the package purely from the number—there's quite a bit of info tucked away into those numbers, it turns out."
|
14
15
|
s.email = 'jeff@keen.me'
|
data/yarn.lock
CHANGED
@@ -333,9 +333,9 @@
|
|
333
333
|
"@octokit/openapi-types" "^14.0.0"
|
334
334
|
|
335
335
|
"@semantic-release/changelog@^6.0.1":
|
336
|
-
version "6.0.
|
337
|
-
resolved "https://registry.
|
338
|
-
integrity sha512-
|
336
|
+
version "6.0.3"
|
337
|
+
resolved "https://registry.yarnpkg.com/@semantic-release/changelog/-/changelog-6.0.3.tgz#6195630ecbeccad174461de727d5f975abc23eeb"
|
338
|
+
integrity sha512-dZuR5qByyfe3Y03TpmCvAxCyTnp7r5XwtHRf/8vD9EAn4ZWbavUX8adMtXYzE86EVh0gyLA7lm5yW4IV30XUag==
|
339
339
|
dependencies:
|
340
340
|
"@semantic-release/error" "^3.0.0"
|
341
341
|
aggregate-error "^3.0.0"
|
@@ -362,7 +362,7 @@
|
|
362
362
|
|
363
363
|
"@semantic-release/error@^3.0.0":
|
364
364
|
version "3.0.0"
|
365
|
-
resolved "https://registry.
|
365
|
+
resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-3.0.0.tgz#30a3b97bbb5844d695eb22f9d3aa40f6a92770c2"
|
366
366
|
integrity sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==
|
367
367
|
|
368
368
|
"@semantic-release/git@^10.0.1":
|
@@ -492,7 +492,7 @@ agentkeepalive@^4.2.1:
|
|
492
492
|
|
493
493
|
aggregate-error@^3.0.0:
|
494
494
|
version "3.1.0"
|
495
|
-
resolved "https://registry.
|
495
|
+
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
|
496
496
|
integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
|
497
497
|
dependencies:
|
498
498
|
clean-stack "^2.0.0"
|
@@ -725,7 +725,7 @@ cidr-regex@^3.1.1:
|
|
725
725
|
|
726
726
|
clean-stack@^2.0.0:
|
727
727
|
version "2.2.0"
|
728
|
-
resolved "https://registry.
|
728
|
+
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
|
729
729
|
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
|
730
730
|
|
731
731
|
cli-columns@^4.0.0:
|
@@ -1188,9 +1188,9 @@ fs-extra@^10.0.0:
|
|
1188
1188
|
universalify "^2.0.0"
|
1189
1189
|
|
1190
1190
|
fs-extra@^11.0.0:
|
1191
|
-
version "11.
|
1192
|
-
resolved "https://registry.
|
1193
|
-
integrity sha512-
|
1191
|
+
version "11.2.0"
|
1192
|
+
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
|
1193
|
+
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
|
1194
1194
|
dependencies:
|
1195
1195
|
graceful-fs "^4.2.0"
|
1196
1196
|
jsonfile "^6.0.1"
|
@@ -1308,11 +1308,16 @@ globby@^11.0.0, globby@^11.0.1:
|
|
1308
1308
|
merge2 "^1.4.1"
|
1309
1309
|
slash "^3.0.0"
|
1310
1310
|
|
1311
|
-
graceful-fs@^4.1.2, graceful-fs@^4.
|
1311
|
+
graceful-fs@^4.1.2, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6:
|
1312
1312
|
version "4.2.10"
|
1313
1313
|
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz"
|
1314
1314
|
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
|
1315
1315
|
|
1316
|
+
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
1317
|
+
version "4.2.11"
|
1318
|
+
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
1319
|
+
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
1320
|
+
|
1316
1321
|
handlebars@^4.7.7:
|
1317
1322
|
version "4.7.7"
|
1318
1323
|
resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz"
|
@@ -1454,7 +1459,7 @@ imurmurhash@^0.1.4:
|
|
1454
1459
|
|
1455
1460
|
indent-string@^4.0.0:
|
1456
1461
|
version "4.0.0"
|
1457
|
-
resolved "https://registry.
|
1462
|
+
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
|
1458
1463
|
integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
|
1459
1464
|
|
1460
1465
|
infer-owner@^1.0.4:
|
@@ -1652,7 +1657,7 @@ json-stringify-safe@^5.0.1:
|
|
1652
1657
|
|
1653
1658
|
jsonfile@^6.0.1:
|
1654
1659
|
version "6.1.0"
|
1655
|
-
resolved "https://registry.
|
1660
|
+
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
|
1656
1661
|
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
|
1657
1662
|
dependencies:
|
1658
1663
|
universalify "^2.0.0"
|
@@ -3286,9 +3291,9 @@ universal-user-agent@^6.0.0:
|
|
3286
3291
|
integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==
|
3287
3292
|
|
3288
3293
|
universalify@^2.0.0:
|
3289
|
-
version "2.0.
|
3290
|
-
resolved "https://registry.
|
3291
|
-
integrity sha512-
|
3294
|
+
version "2.0.1"
|
3295
|
+
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
|
3296
|
+
integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
|
3292
3297
|
|
3293
3298
|
url-join@^4.0.0:
|
3294
3299
|
version "4.0.1"
|
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:
|
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:
|
11
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 3.0.0
|
202
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
204
|
- - ">="
|