tracking_number 1.3.1 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +4 -0
- data/.github/workflows/release.yml +36 -0
- data/.github/workflows/ruby.yml +15 -2
- data/.tool-versions +1 -0
- data/CHANGELOG.md +11 -0
- data/lib/data/couriers/ups.json +12 -4
- data/lib/tracking_number/version.rb +1 -1
- data/package.json +92 -0
- data/tracking_number.gemspec +15 -6
- data/yarn.lock +3420 -0
- metadata +10 -11
- data/.travis.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d8a86aeaa8c06073cb379d6c64b1637b8246c8cd54f821696c20c39348061b2
|
4
|
+
data.tar.gz: 8e561f7d1ea8c26d0003297ea4ce5cf9835b805bb6278714c10f81a164375f38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5920313b3ea08d709c564a3ca5b03e9ee34e0fe213e83fbdee53680504a24f02dac5fa9e774f864d77259e960100177abf9430b5e717991ec589d881f9f9d246
|
7
|
+
data.tar.gz: df3aab7b35d0cbfaa9b012439de32f0e38dac1217d65c14939dccbc8792ccb918059f58eafcb2f37d52de9f0b911ccaac8bfd16dceb9f0b94923fa0de8a94695
|
data/.github/dependabot.yml
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
name: Generate New Release
|
3
|
+
|
4
|
+
on:
|
5
|
+
workflow_dispatch:
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
release:
|
9
|
+
name: Release
|
10
|
+
runs-on: ubuntu-18.04
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v3
|
14
|
+
with:
|
15
|
+
submodules: true
|
16
|
+
persist-credentials: false
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Build
|
22
|
+
run: |
|
23
|
+
gem install bundler
|
24
|
+
git submodule update --init --recursive
|
25
|
+
bundle install --jobs 4 --retry 3
|
26
|
+
- name: Setup Node.js
|
27
|
+
uses: actions/setup-node@v2
|
28
|
+
with:
|
29
|
+
node-version: 14
|
30
|
+
- name: Install Dependencies
|
31
|
+
run: yarn install --frozen-lockfile
|
32
|
+
- name: Release
|
33
|
+
env:
|
34
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
35
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
36
|
+
run: node_modules/.bin/semantic-release
|
data/.github/workflows/ruby.yml
CHANGED
@@ -6,10 +6,12 @@ jobs:
|
|
6
6
|
fail-fast: false
|
7
7
|
matrix:
|
8
8
|
os: [ ubuntu-latest ]
|
9
|
-
ruby: [ '2.
|
9
|
+
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
|
10
10
|
runs-on: ${{ matrix.os }}
|
11
11
|
steps:
|
12
12
|
- uses: actions/checkout@v3
|
13
|
+
with:
|
14
|
+
submodules: true
|
13
15
|
- name: Set up Ruby
|
14
16
|
uses: ruby/setup-ruby@v1
|
15
17
|
with:
|
@@ -17,6 +19,17 @@ jobs:
|
|
17
19
|
- name: Build and test with Rake
|
18
20
|
run: |
|
19
21
|
gem install bundler
|
20
|
-
git submodule update --init
|
22
|
+
git submodule update --init --recursive
|
21
23
|
bundle install --jobs 4 --retry 3
|
22
24
|
bundle exec rake
|
25
|
+
publish:
|
26
|
+
name: Release
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
if: github.ref == 'refs/heads/main'
|
29
|
+
needs: [test]
|
30
|
+
steps:
|
31
|
+
- name: Dispatch Release
|
32
|
+
uses: benc-uk/workflow-dispatch@v1
|
33
|
+
with:
|
34
|
+
workflow: Generate New Release
|
35
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.0.3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
tracking_number changelog
|
2
|
+
|
3
|
+
## [1.3.5](https://github.com/jkeen/tracking_number/compare/v1.3.4...v1.3.5) (2023-01-09)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* modify release process to include submodules, the lack of which caused the 1.3.2 gem release to not work at all ([578af83](https://github.com/jkeen/tracking_number/commit/578af83d1b9da51c6edb8400d3aba8b195b66629))
|
9
|
+
|
10
|
+
## [1.3.2](https://github.com/jkeen/tracking_number/compare/v1.3.1...v1.3.2) (2022-12-23)
|
11
|
+
|
1
12
|
# Changelog
|
2
13
|
|
3
14
|
## [v1.2](https://github.com/jkeen/tracking_number/tree/v1.2) (2022-11-03)
|
data/lib/data/couriers/ups.json
CHANGED
@@ -139,8 +139,8 @@
|
|
139
139
|
"name": "UPS Waybill",
|
140
140
|
"regex": [
|
141
141
|
"\\s*(?<ServiceType>([A-Z]\\s*){1})",
|
142
|
-
"(?<SerialNumber>(?:[0-9]\\s*){9
|
143
|
-
"(?<CheckDigit>[0-9]\\s*)"
|
142
|
+
"(?<SerialNumber>(?:[0-9]\\s*){9})",
|
143
|
+
"(?<CheckDigit>[0-9]\\s*){1}"
|
144
144
|
],
|
145
145
|
"validation": {
|
146
146
|
"checksum": {
|
@@ -161,6 +161,10 @@
|
|
161
161
|
{
|
162
162
|
"matches": "K",
|
163
163
|
"name": "UPS Ground"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"matches": "V",
|
167
|
+
"name": "UPS WorldWide Express Saver"
|
164
168
|
}
|
165
169
|
]
|
166
170
|
}
|
@@ -170,12 +174,16 @@
|
|
170
174
|
"valid": [
|
171
175
|
"K1506235620",
|
172
176
|
"K2479825491",
|
173
|
-
"J4603636537"
|
177
|
+
"J4603636537",
|
178
|
+
"V0490119172",
|
179
|
+
"V0431105627"
|
174
180
|
],
|
175
181
|
"invalid": [
|
176
182
|
"K1506235622",
|
177
183
|
"K2479825492",
|
178
|
-
"J4603636538"
|
184
|
+
"J4603636538",
|
185
|
+
"V0411335627",
|
186
|
+
"V0423305841"
|
179
187
|
]
|
180
188
|
}
|
181
189
|
}
|
data/package.json
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
{
|
2
|
+
"name": "tracking_number",
|
3
|
+
"version": "1.x.x-semantic-release",
|
4
|
+
"repository": {
|
5
|
+
"type": "git",
|
6
|
+
"url": "git+https://github.com/jkeen/tracking_number.git"
|
7
|
+
},
|
8
|
+
"author": "jkeen",
|
9
|
+
"license": "MIT",
|
10
|
+
"bugs": {
|
11
|
+
"url": "https://github.com/jkeen/tracking_number/issues"
|
12
|
+
},
|
13
|
+
"homepage": "https://github.com/jkeen/tracking_number#readme",
|
14
|
+
"scripts": {
|
15
|
+
"semantic-release": "semantic-release"
|
16
|
+
},
|
17
|
+
"devDependencies": {
|
18
|
+
"semantic-release-rubygem": "^1.2.0",
|
19
|
+
"semantic-release": "^19.0.3",
|
20
|
+
"@semantic-release/changelog": "^6.0.1",
|
21
|
+
"@semantic-release/git": "^10.0.1"
|
22
|
+
},
|
23
|
+
"release": {
|
24
|
+
"branches": ["main"],
|
25
|
+
"plugins": [
|
26
|
+
[
|
27
|
+
"@semantic-release/commit-analyzer",
|
28
|
+
{
|
29
|
+
"releaseRules": [
|
30
|
+
{
|
31
|
+
"type": "*!",
|
32
|
+
"release": "major"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"type": "feat",
|
36
|
+
"release": "minor"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"type": "build",
|
40
|
+
"release": "patch"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"type": "ci",
|
44
|
+
"release": "patch"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"type": "chore",
|
48
|
+
"release": "patch"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"type": "docs",
|
52
|
+
"release": "patch"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"type": "refactor",
|
56
|
+
"release": "patch"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"type": "style",
|
60
|
+
"release": "patch"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"type": "test",
|
64
|
+
"release": "patch"
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"parserOpts": {
|
68
|
+
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
|
69
|
+
}
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"@semantic-release/release-notes-generator",
|
73
|
+
[
|
74
|
+
"@semantic-release/changelog",
|
75
|
+
{
|
76
|
+
"changelogTitle": "tracking_number changelog",
|
77
|
+
"changelogFile": "CHANGELOG.md"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"semantic-release-rubygem",
|
81
|
+
"@semantic-release/github",
|
82
|
+
[
|
83
|
+
"@semantic-release/git",
|
84
|
+
{
|
85
|
+
"assets": ["CHANGELOG.md"],
|
86
|
+
"message": "${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}"
|
87
|
+
}
|
88
|
+
]
|
89
|
+
],
|
90
|
+
"debug": false,
|
91
|
+
"dryRun": false
|
92
|
+
}}
|
data/tracking_number.gemspec
CHANGED
@@ -17,19 +17,28 @@ Gem::Specification.new do |s|
|
|
17
17
|
]
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
|
-
gem_dir = "#{File.expand_path(File.join(__FILE__, '..'))}/"
|
21
20
|
|
21
|
+
gem_dir = "#{File.expand_path(File.join(__FILE__, '..'))}/"
|
22
22
|
`git submodule --quiet foreach pwd`.split($OUTPUT_RECORD_SEPARATOR).each do |submodule_path|
|
23
23
|
Dir.chdir(submodule_path.chomp) do
|
24
24
|
submodule_relative_path = submodule_path.sub gem_dir, ''
|
25
|
-
|
25
|
+
|
26
|
+
# issue git ls-files in submodule's directory
|
27
|
+
submodule_files = `git ls-files -- couriers/*`.split($OUTPUT_RECORD_SEPARATOR)
|
28
|
+
|
26
29
|
# prepend the submodule path to create absolute file paths
|
30
|
+
submodule_files_fullpaths = submodule_files.map do |filename|
|
31
|
+
"#{submodule_path}/#{filename}"
|
32
|
+
end
|
27
33
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
34
|
+
# remove leading path parts to get paths relative to the gem's root dir
|
35
|
+
# (this assumes, that the gemspec resides in the gem's root dir)
|
36
|
+
submodule_files_paths = submodule_files_fullpaths.map do |filename|
|
37
|
+
filename.gsub gem_dir, ''
|
32
38
|
end
|
39
|
+
|
40
|
+
# add relative paths to gem.files
|
41
|
+
s.files += submodule_files_paths
|
33
42
|
end
|
34
43
|
end
|
35
44
|
|