cron_to_go_sync 0.0.2 → 0.0.4
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/dependabot.yml +0 -4
- data/.github/workflows/ci.yml +11 -11
- data/.github/workflows/release.yml +4 -4
- data/.pre-commit-config.yaml +5 -6
- data/.rubocop.yml +4 -4
- data/.standard.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/CODEOWNERS +2 -0
- data/Gemfile +5 -4
- data/Gemfile.lock +130 -92
- data/lib/cron_to_go_sync/parser.rb +2 -1
- data/lib/cron_to_go_sync/version.rb +1 -1
- data/spec/parser_spec.rb +16 -0
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ebc91b473d45c2521e35c0e75197c4e311f063ea66f4c3e29268c86c91a0ccd
|
|
4
|
+
data.tar.gz: efd6925c903d3f37d11d5be3ebff027c0c63215994a40a44f8dbbbf9ca3100a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9a0da4b45c5239f5517bc4856fb1ec5d6297600563965ae355d25c55f3924f0a49833627e7bc159b3d9826537c9e3bb1f7b00134fd04115e2898a8ef944f4a9
|
|
7
|
+
data.tar.gz: 4d63d96969d56820c036900223734c55bedf4c29b08f0c06e5ef35c432c995a3816262df800a1b35ee54dc7f5c8f496b745ac5ce531b760f4b7e6aab86c67bd8
|
data/.github/dependabot.yml
CHANGED
|
@@ -14,8 +14,6 @@ updates:
|
|
|
14
14
|
- ":robot: dependabot"
|
|
15
15
|
- ":octocat: github-actions"
|
|
16
16
|
- ":heavy_plus_sign: dependencies"
|
|
17
|
-
reviewers:
|
|
18
|
-
- instrumentl/code-reviewers
|
|
19
17
|
- package-ecosystem: "bundler"
|
|
20
18
|
directory: "/"
|
|
21
19
|
schedule:
|
|
@@ -25,5 +23,3 @@ updates:
|
|
|
25
23
|
- ":robot: dependabot"
|
|
26
24
|
- ":gem: ruby"
|
|
27
25
|
- ":heavy_plus_sign: dependencies"
|
|
28
|
-
reviewers:
|
|
29
|
-
- instrumentl/code-reviewers
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -2,11 +2,11 @@ name: "CI"
|
|
|
2
2
|
on:
|
|
3
3
|
pull_request:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
5
|
+
branches: main
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
8
|
test:
|
|
9
|
-
runs-on: ubuntu-
|
|
9
|
+
runs-on: ubuntu-24.04
|
|
10
10
|
timeout-minutes: 30
|
|
11
11
|
permissions:
|
|
12
12
|
contents: read
|
|
@@ -18,12 +18,12 @@ jobs:
|
|
|
18
18
|
strategy:
|
|
19
19
|
fail-fast: true
|
|
20
20
|
matrix:
|
|
21
|
-
ruby: ["3.
|
|
21
|
+
ruby: ["3.2", "3.3", "3.4"]
|
|
22
22
|
steps:
|
|
23
23
|
- name: Checkout code
|
|
24
|
-
uses: actions/checkout@
|
|
24
|
+
uses: actions/checkout@v5
|
|
25
25
|
- name: Install Ruby and gems
|
|
26
|
-
uses: ruby/setup-ruby@
|
|
26
|
+
uses: ruby/setup-ruby@v1
|
|
27
27
|
with:
|
|
28
28
|
bundler-cache: true
|
|
29
29
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -31,23 +31,23 @@ jobs:
|
|
|
31
31
|
timeout-minutes: 20
|
|
32
32
|
run: bundle exec rspec -f doc
|
|
33
33
|
lint:
|
|
34
|
-
runs-on: ubuntu-
|
|
34
|
+
runs-on: ubuntu-24.04
|
|
35
35
|
timeout-minutes: 20
|
|
36
36
|
permissions:
|
|
37
37
|
contents: read
|
|
38
38
|
steps:
|
|
39
39
|
- name: Checkout code
|
|
40
|
-
uses: actions/checkout@
|
|
40
|
+
uses: actions/checkout@v5
|
|
41
41
|
- name: Install Ruby and gems
|
|
42
|
-
uses: ruby/setup-ruby@
|
|
42
|
+
uses: ruby/setup-ruby@v1
|
|
43
43
|
with:
|
|
44
44
|
bundler-cache: true
|
|
45
|
-
ruby-version: "3.
|
|
45
|
+
ruby-version: "3.4"
|
|
46
46
|
- name: Bundle Audit Check
|
|
47
47
|
run: bundle exec bundle-audit update && bundle exec bundle-audit check
|
|
48
48
|
- name: Setup Python
|
|
49
|
-
uses: actions/setup-python@
|
|
49
|
+
uses: actions/setup-python@v6
|
|
50
50
|
with:
|
|
51
51
|
python-version: "3.10"
|
|
52
52
|
- name: Run pre-commit
|
|
53
|
-
uses: pre-commit
|
|
53
|
+
uses: instrumentl/pre-commit-action@v4
|
|
@@ -4,15 +4,15 @@ on:
|
|
|
4
4
|
types: [published]
|
|
5
5
|
jobs:
|
|
6
6
|
release:
|
|
7
|
-
runs-on: ubuntu-
|
|
7
|
+
runs-on: ubuntu-24.04
|
|
8
8
|
steps:
|
|
9
9
|
- name: Checkout code
|
|
10
|
-
uses: actions/checkout@
|
|
10
|
+
uses: actions/checkout@v5
|
|
11
11
|
- name: Install Ruby and gems
|
|
12
|
-
uses: ruby/setup-ruby@
|
|
12
|
+
uses: ruby/setup-ruby@v1
|
|
13
13
|
with:
|
|
14
14
|
bundler-cache: true
|
|
15
|
-
ruby-version: "3.
|
|
15
|
+
ruby-version: "3.4"
|
|
16
16
|
- name: Publish gem
|
|
17
17
|
run: |
|
|
18
18
|
umask 077
|
data/.pre-commit-config.yaml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev:
|
|
3
|
+
rev: v5.0.0
|
|
4
4
|
hooks:
|
|
5
5
|
- id: trailing-whitespace
|
|
6
6
|
- id: end-of-file-fixer
|
|
@@ -8,11 +8,10 @@ repos:
|
|
|
8
8
|
- id: check-yaml
|
|
9
9
|
exclude: '.rubocop.yml'
|
|
10
10
|
- id: check-added-large-files
|
|
11
|
-
- id:
|
|
11
|
+
- id: fix-byte-order-marker
|
|
12
12
|
exclude: '^spec/data/'
|
|
13
13
|
- id: check-merge-conflict
|
|
14
|
-
- repo: https://github.com/
|
|
15
|
-
rev: '
|
|
14
|
+
- repo: https://github.com/instrumentl/pre-commit-standardrb.git
|
|
15
|
+
rev: 'v1.42.1'
|
|
16
16
|
hooks:
|
|
17
|
-
|
|
18
|
-
additional_dependencies: ["standard:1.25.3"]
|
|
17
|
+
- id: standardrb
|
data/.rubocop.yml
CHANGED
data/.standard.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/CODEOWNERS
ADDED
data/Gemfile
CHANGED
|
@@ -6,11 +6,12 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
8
|
group :development, :test do
|
|
9
|
-
gem "rspec", "~> 3.
|
|
10
|
-
gem "rspec-its", "~>
|
|
11
|
-
gem "standard", "~> 1.
|
|
12
|
-
gem "pry", "~> 0.
|
|
9
|
+
gem "rspec", "~> 3.13"
|
|
10
|
+
gem "rspec-its", "~>2.0"
|
|
11
|
+
gem "standard", "~> 1.44.0"
|
|
12
|
+
gem "pry", "~> 0.15"
|
|
13
13
|
gem "webmock", "~> 3"
|
|
14
14
|
gem "vcr", "~> 6"
|
|
15
15
|
gem "bundle-audit", "~> 0.1.0"
|
|
16
|
+
gem "mutex_m", "~> 0.3.0"
|
|
16
17
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cron_to_go_sync (0.0.
|
|
4
|
+
cron_to_go_sync (0.0.4)
|
|
5
5
|
activesupport
|
|
6
6
|
dry-types
|
|
7
7
|
dry-validation
|
|
@@ -15,157 +15,195 @@ PATH
|
|
|
15
15
|
GEM
|
|
16
16
|
remote: https://rubygems.org/
|
|
17
17
|
specs:
|
|
18
|
-
activesupport (
|
|
19
|
-
|
|
18
|
+
activesupport (8.1.1)
|
|
19
|
+
base64
|
|
20
|
+
bigdecimal
|
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
22
|
+
connection_pool (>= 2.2.5)
|
|
23
|
+
drb
|
|
20
24
|
i18n (>= 1.6, < 2)
|
|
25
|
+
json
|
|
26
|
+
logger (>= 1.4.2)
|
|
21
27
|
minitest (>= 5.1)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
securerandom (>= 0.3)
|
|
29
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
30
|
+
uri (>= 0.13.1)
|
|
31
|
+
addressable (2.8.7)
|
|
32
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
33
|
+
ast (2.4.3)
|
|
34
|
+
base64 (0.3.0)
|
|
35
|
+
bigdecimal (3.3.1)
|
|
26
36
|
bundle-audit (0.1.0)
|
|
27
37
|
bundler-audit
|
|
28
|
-
bundler-audit (0.9.
|
|
38
|
+
bundler-audit (0.9.2)
|
|
29
39
|
bundler (>= 1.2.0, < 3)
|
|
30
40
|
thor (~> 1.0)
|
|
31
41
|
citrus (3.0.2)
|
|
32
42
|
coderay (1.1.3)
|
|
33
|
-
concurrent-ruby (1.
|
|
34
|
-
|
|
43
|
+
concurrent-ruby (1.3.5)
|
|
44
|
+
connection_pool (2.5.4)
|
|
45
|
+
crack (1.0.1)
|
|
46
|
+
bigdecimal
|
|
35
47
|
rexml
|
|
36
|
-
diff-lcs (1.
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
diff-lcs (1.6.2)
|
|
49
|
+
drb (2.2.3)
|
|
50
|
+
dry-configurable (1.3.0)
|
|
51
|
+
dry-core (~> 1.1)
|
|
39
52
|
zeitwerk (~> 2.6)
|
|
40
|
-
dry-core (1.
|
|
53
|
+
dry-core (1.1.0)
|
|
41
54
|
concurrent-ruby (~> 1.0)
|
|
55
|
+
logger
|
|
42
56
|
zeitwerk (~> 2.6)
|
|
43
|
-
dry-inflector (1.
|
|
44
|
-
dry-initializer (3.
|
|
45
|
-
dry-logic (1.
|
|
57
|
+
dry-inflector (1.2.0)
|
|
58
|
+
dry-initializer (3.2.0)
|
|
59
|
+
dry-logic (1.6.0)
|
|
60
|
+
bigdecimal
|
|
46
61
|
concurrent-ruby (~> 1.0)
|
|
47
|
-
dry-core (~> 1.
|
|
62
|
+
dry-core (~> 1.1)
|
|
48
63
|
zeitwerk (~> 2.6)
|
|
49
|
-
dry-schema (1.
|
|
64
|
+
dry-schema (1.14.1)
|
|
50
65
|
concurrent-ruby (~> 1.0)
|
|
51
66
|
dry-configurable (~> 1.0, >= 1.0.1)
|
|
52
|
-
dry-core (~> 1.
|
|
53
|
-
dry-initializer (~> 3.
|
|
54
|
-
dry-logic (
|
|
55
|
-
dry-types (
|
|
67
|
+
dry-core (~> 1.1)
|
|
68
|
+
dry-initializer (~> 3.2)
|
|
69
|
+
dry-logic (~> 1.5)
|
|
70
|
+
dry-types (~> 1.8)
|
|
56
71
|
zeitwerk (~> 2.6)
|
|
57
|
-
dry-types (1.
|
|
72
|
+
dry-types (1.8.3)
|
|
73
|
+
bigdecimal (~> 3.0)
|
|
58
74
|
concurrent-ruby (~> 1.0)
|
|
59
75
|
dry-core (~> 1.0)
|
|
60
76
|
dry-inflector (~> 1.0)
|
|
61
77
|
dry-logic (~> 1.4)
|
|
62
78
|
zeitwerk (~> 2.6)
|
|
63
|
-
dry-validation (1.
|
|
79
|
+
dry-validation (1.11.1)
|
|
64
80
|
concurrent-ruby (~> 1.0)
|
|
65
|
-
dry-core (~> 1.
|
|
66
|
-
dry-initializer (~> 3.
|
|
67
|
-
dry-schema (
|
|
81
|
+
dry-core (~> 1.1)
|
|
82
|
+
dry-initializer (~> 3.2)
|
|
83
|
+
dry-schema (~> 1.14)
|
|
68
84
|
zeitwerk (~> 2.6)
|
|
69
|
-
faraday (2.
|
|
70
|
-
faraday-net_http (>= 2.0, < 3.
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
faraday (2.14.0)
|
|
86
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
87
|
+
json
|
|
88
|
+
logger
|
|
89
|
+
faraday-follow_redirects (0.4.0)
|
|
73
90
|
faraday (>= 1, < 3)
|
|
74
|
-
faraday-net_http (3.
|
|
75
|
-
|
|
91
|
+
faraday-net_http (3.4.1)
|
|
92
|
+
net-http (>= 0.5.0)
|
|
93
|
+
faraday-retry (2.3.2)
|
|
76
94
|
faraday (~> 2.0)
|
|
77
|
-
hashdiff (1.
|
|
78
|
-
i18n (1.
|
|
95
|
+
hashdiff (1.2.1)
|
|
96
|
+
i18n (1.14.7)
|
|
79
97
|
concurrent-ruby (~> 1.0)
|
|
80
|
-
interactor (3.
|
|
98
|
+
interactor (3.2.0)
|
|
99
|
+
ostruct
|
|
81
100
|
interactor-contracts (0.3.0)
|
|
82
101
|
dry-validation (~> 1.0)
|
|
83
102
|
interactor (~> 3)
|
|
84
|
-
json (2.
|
|
85
|
-
language_server-protocol (3.17.0.
|
|
86
|
-
lint_roller (1.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
json (2.15.2)
|
|
104
|
+
language_server-protocol (3.17.0.5)
|
|
105
|
+
lint_roller (1.1.0)
|
|
106
|
+
logger (1.7.0)
|
|
107
|
+
method_source (1.1.0)
|
|
108
|
+
minitest (5.26.0)
|
|
109
|
+
mutex_m (0.3.0)
|
|
110
|
+
net-http (0.7.0)
|
|
111
|
+
uri
|
|
112
|
+
ostruct (0.6.3)
|
|
113
|
+
parallel (1.27.0)
|
|
114
|
+
parser (3.3.10.0)
|
|
91
115
|
ast (~> 2.4.1)
|
|
92
|
-
|
|
116
|
+
racc
|
|
117
|
+
prism (1.6.0)
|
|
118
|
+
pry (0.15.2)
|
|
93
119
|
coderay (~> 1.1)
|
|
94
120
|
method_source (~> 1.0)
|
|
95
|
-
public_suffix (
|
|
121
|
+
public_suffix (6.0.2)
|
|
122
|
+
racc (1.8.1)
|
|
96
123
|
rainbow (3.1.1)
|
|
97
|
-
regexp_parser (2.
|
|
98
|
-
rexml (3.
|
|
99
|
-
rspec (3.
|
|
100
|
-
rspec-core (~> 3.
|
|
101
|
-
rspec-expectations (~> 3.
|
|
102
|
-
rspec-mocks (~> 3.
|
|
103
|
-
rspec-core (3.
|
|
104
|
-
rspec-support (~> 3.
|
|
105
|
-
rspec-expectations (3.
|
|
124
|
+
regexp_parser (2.11.3)
|
|
125
|
+
rexml (3.4.4)
|
|
126
|
+
rspec (3.13.2)
|
|
127
|
+
rspec-core (~> 3.13.0)
|
|
128
|
+
rspec-expectations (~> 3.13.0)
|
|
129
|
+
rspec-mocks (~> 3.13.0)
|
|
130
|
+
rspec-core (3.13.6)
|
|
131
|
+
rspec-support (~> 3.13.0)
|
|
132
|
+
rspec-expectations (3.13.5)
|
|
106
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
107
|
-
rspec-support (~> 3.
|
|
108
|
-
rspec-its (
|
|
109
|
-
rspec-core (>= 3.
|
|
110
|
-
rspec-expectations (>= 3.
|
|
111
|
-
rspec-mocks (3.
|
|
134
|
+
rspec-support (~> 3.13.0)
|
|
135
|
+
rspec-its (2.0.0)
|
|
136
|
+
rspec-core (>= 3.13.0)
|
|
137
|
+
rspec-expectations (>= 3.13.0)
|
|
138
|
+
rspec-mocks (3.13.7)
|
|
112
139
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
113
|
-
rspec-support (~> 3.
|
|
114
|
-
rspec-support (3.
|
|
115
|
-
rubocop (1.
|
|
140
|
+
rspec-support (~> 3.13.0)
|
|
141
|
+
rspec-support (3.13.6)
|
|
142
|
+
rubocop (1.70.0)
|
|
116
143
|
json (~> 2.3)
|
|
144
|
+
language_server-protocol (>= 3.17.0)
|
|
117
145
|
parallel (~> 1.10)
|
|
118
|
-
parser (>= 3.
|
|
146
|
+
parser (>= 3.3.0.2)
|
|
119
147
|
rainbow (>= 2.2.2, < 4.0)
|
|
120
|
-
regexp_parser (>=
|
|
121
|
-
|
|
122
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
|
148
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
149
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
|
123
150
|
ruby-progressbar (~> 1.7)
|
|
124
|
-
unicode-display_width (>= 2.4.0, <
|
|
125
|
-
rubocop-ast (1.
|
|
126
|
-
parser (>= 3.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
rubocop
|
|
151
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
152
|
+
rubocop-ast (1.47.1)
|
|
153
|
+
parser (>= 3.3.7.2)
|
|
154
|
+
prism (~> 1.4)
|
|
155
|
+
rubocop-performance (1.23.1)
|
|
156
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
157
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
130
158
|
ruby-progressbar (1.13.0)
|
|
131
|
-
|
|
132
|
-
standard (1.
|
|
159
|
+
securerandom (0.4.1)
|
|
160
|
+
standard (1.44.0)
|
|
133
161
|
language_server-protocol (~> 3.17.0.2)
|
|
134
162
|
lint_roller (~> 1.0)
|
|
135
|
-
rubocop (~> 1.
|
|
163
|
+
rubocop (~> 1.70.0)
|
|
136
164
|
standard-custom (~> 1.0.0)
|
|
137
|
-
standard-performance (~> 1.
|
|
138
|
-
standard-custom (1.0.
|
|
165
|
+
standard-performance (~> 1.6)
|
|
166
|
+
standard-custom (1.0.2)
|
|
139
167
|
lint_roller (~> 1.0)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
168
|
+
rubocop (~> 1.50)
|
|
169
|
+
standard-performance (1.6.0)
|
|
170
|
+
lint_roller (~> 1.1)
|
|
171
|
+
rubocop-performance (~> 1.23.0)
|
|
172
|
+
thor (1.4.0)
|
|
173
|
+
toml-rb (4.1.0)
|
|
145
174
|
citrus (~> 3.0, > 3.0)
|
|
175
|
+
racc (~> 1.7)
|
|
146
176
|
tzinfo (2.0.6)
|
|
147
177
|
concurrent-ruby (~> 1.0)
|
|
148
|
-
unicode-display_width (2.
|
|
149
|
-
|
|
150
|
-
|
|
178
|
+
unicode-display_width (3.2.0)
|
|
179
|
+
unicode-emoji (~> 4.1)
|
|
180
|
+
unicode-emoji (4.1.0)
|
|
181
|
+
uri (1.1.1)
|
|
182
|
+
vcr (6.3.1)
|
|
183
|
+
base64
|
|
184
|
+
webmock (3.26.1)
|
|
151
185
|
addressable (>= 2.8.0)
|
|
152
186
|
crack (>= 0.3.2)
|
|
153
187
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
154
|
-
zeitwerk (2.
|
|
188
|
+
zeitwerk (2.7.3)
|
|
155
189
|
|
|
156
190
|
PLATFORMS
|
|
157
191
|
arm64-darwin-22
|
|
192
|
+
arm64-darwin-23
|
|
193
|
+
arm64-darwin-24
|
|
194
|
+
arm64-darwin-25
|
|
158
195
|
x86_64-linux
|
|
159
196
|
|
|
160
197
|
DEPENDENCIES
|
|
161
198
|
bundle-audit (~> 0.1.0)
|
|
162
199
|
cron_to_go_sync!
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
rspec
|
|
166
|
-
|
|
200
|
+
mutex_m (~> 0.3.0)
|
|
201
|
+
pry (~> 0.15)
|
|
202
|
+
rspec (~> 3.13)
|
|
203
|
+
rspec-its (~> 2.0)
|
|
204
|
+
standard (~> 1.44.0)
|
|
167
205
|
vcr (~> 6)
|
|
168
206
|
webmock (~> 3)
|
|
169
207
|
|
|
170
208
|
BUNDLED WITH
|
|
171
|
-
2.
|
|
209
|
+
2.5.23
|
|
@@ -68,7 +68,8 @@ module CronToGoSync
|
|
|
68
68
|
lower = lower.to_i
|
|
69
69
|
upper = upper.to_i
|
|
70
70
|
return "invalid range lower #{lower}" if lower < lower_limit || lower > upper_limit
|
|
71
|
-
return "invalid range upper #{upper}" if upper <
|
|
71
|
+
return "invalid range upper #{upper}" if upper < lower_limit || upper > upper_limit
|
|
72
|
+
return "range not in order" if upper <= lower
|
|
72
73
|
elsif !range.match?(/\A[0-9]+\z/)
|
|
73
74
|
return "invalid range value #{range}"
|
|
74
75
|
else
|
data/spec/parser_spec.rb
CHANGED
|
@@ -30,5 +30,21 @@ RSpec.describe CronToGoSync::Parser do
|
|
|
30
30
|
input_hash = {"job_name" => {schedule: "*/99 * * * *", enabled: true, ttl: 86400, dyno_size: "Basic", command: "/bin/true"}}
|
|
31
31
|
expect { described_class.parse_hash(input_hash) }.to raise_error(RuntimeError, /invalid denominator value/)
|
|
32
32
|
end
|
|
33
|
+
|
|
34
|
+
it "validates schedule range" do
|
|
35
|
+
input_hash = {"job_name" => {schedule: "* * * * 1-5", enabled: true, ttl: 86400, dyno_size: "Basic", command: "/bin/true"}}
|
|
36
|
+
parsed = described_class.parse_hash(input_hash)
|
|
37
|
+
expect(parsed["job_name"][:schedule]).to eq "* * * * 1-5"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it "validates schedule range values" do
|
|
41
|
+
input_hash = {"job_name" => {schedule: "* * * * 1-9", enabled: true, ttl: 86400, dyno_size: "Basic", command: "/bin/true"}}
|
|
42
|
+
expect { described_class.parse_hash(input_hash) }.to raise_error(RuntimeError, /invalid range upper/)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "validates schedule range order" do
|
|
46
|
+
input_hash = {"job_name" => {schedule: "* * * * 5-1", enabled: true, ttl: 86400, dyno_size: "Basic", command: "/bin/true"}}
|
|
47
|
+
expect { described_class.parse_hash(input_hash) }.to raise_error(RuntimeError, /range not in order/)
|
|
48
|
+
end
|
|
33
49
|
end
|
|
34
50
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cron_to_go_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Instrumentl, Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -160,6 +159,7 @@ files:
|
|
|
160
159
|
- ".rubocop.yml"
|
|
161
160
|
- ".standard.yml"
|
|
162
161
|
- CHANGELOG.md
|
|
162
|
+
- CODEOWNERS
|
|
163
163
|
- Gemfile
|
|
164
164
|
- Gemfile.lock
|
|
165
165
|
- LICENSE.txt
|
|
@@ -181,7 +181,6 @@ metadata:
|
|
|
181
181
|
homepage_uri: https://github.com/instrumentl/cron_to_go_sync-rb
|
|
182
182
|
source_code_uri: https://github.com/instrumentl/cron_to_go_sync-rb
|
|
183
183
|
changelog_uri: https://github.com/instrumentl/cron_to_go_sync-rb/blob/main/CHANGELOG.md
|
|
184
|
-
post_install_message:
|
|
185
184
|
rdoc_options: []
|
|
186
185
|
require_paths:
|
|
187
186
|
- lib
|
|
@@ -196,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
196
195
|
- !ruby/object:Gem::Version
|
|
197
196
|
version: '0'
|
|
198
197
|
requirements: []
|
|
199
|
-
rubygems_version: 3.
|
|
200
|
-
signing_key:
|
|
198
|
+
rubygems_version: 3.6.9
|
|
201
199
|
specification_version: 4
|
|
202
200
|
summary: CronToGo configuration syncing library
|
|
203
201
|
test_files: []
|