statelint 0.6.0 → 0.8.0

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: 5262124338dfbdc1d35c192fdd7489f32fa033b00d0d770fd4401b65f867f7af
4
- data.tar.gz: ffa8f53eb75b50b9f19e3ffe9921bbf21b375ba46f9bca34d33f26bd1f07f60e
3
+ metadata.gz: 169dae8f5c5a2bfef5cf5c0ebff7e769857b6fc92f44c05f6486f8b50ba80ed9
4
+ data.tar.gz: 0b82b21bf6ed92ec38da043bff6a97f4ce00d762e0bf7fae291d95c879afb442
5
5
  SHA512:
6
- metadata.gz: 7d90e211e7e76d11b1086a07df8b57c6a364abd36ddaa0132d9cae3282e4eca57e087fed77edb977303369edd094b8c8aa839166ec506095449e6819c2ecdc95
7
- data.tar.gz: 381c044574782f87de89426762fb235dbf209c0e9e89b5af9d4ab843db78cecc4be9ff2fe7e26deb1ba324eb373a2369331f37dc4dfd8bf40bc642eb417a6de0
6
+ metadata.gz: 5fde8ad484bd9a04f68fb2412d9dea0f824b3b9ce00874cdde759671451ba0c450c8d00c0d5550f5add5d9b8e81359cd1361dc1520dc4d0b9a528af8a601e1a0
7
+ data.tar.gz: 1d0d6e4b036a73cbffe526b6bf0042998a016a4bd9da561b077f4dbe00bfdc606e806250ccc3af6048a608eb01757982d150895317df3168f7149daf6db3b808
@@ -0,0 +1,27 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ ruby-version: ['3.2', '2.7']
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Set up Ruby ${{ matrix.ruby-version }}
21
+ uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ - name: Install dependencies
25
+ run: bundle install
26
+ - name: Run tests
27
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  *~
2
2
  *.gem
3
+ .bundle
4
+ vendor
data/README.md CHANGED
@@ -36,3 +36,10 @@ in objects, so neither does statelint.
36
36
 
37
37
  Bug reports and pull requests are welcome on GitHub
38
38
 
39
+ ### Testing
40
+
41
+ All changes should be covered by unit tests in the `spec` directory. To run tests, execute the following from the package root:
42
+
43
+ ```
44
+ bundle exec rspec
45
+ ```
@@ -41,6 +41,7 @@ A Task State MAY have a referencePath field named "TimeoutSecondsPath".
41
41
  A Task State MAY have a referencePath field named "HeartbeatSecondsPath".
42
42
  A Task State MAY have only one of "TimeoutSeconds" and "TimeoutSecondsPath".
43
43
  A Task State MAY have only one of "HeartbeatSeconds" and "HeartbeatSecondsPath".
44
+ A Task State MAY have an object field named "Credentials".
44
45
  A Retrier MUST have a nonempty-string-array field named "ErrorEquals".
45
46
  A Retrier MAY have an positive-integer field named "IntervalSeconds".
46
47
  A Retrier MAY have a nonnegative-integer field named "MaxAttempts" whose value MUST be less than 99999999.
@@ -64,6 +65,7 @@ A Choice Rule with an "Or" field is a "Boolean".
64
65
  A Choice Rule with a "Not" field is a "Boolean".
65
66
  A Choice Rule MAY have a field named "Variable".
66
67
  A Choice Rule with a "Variable" field is a "Comparison".
68
+ A Choice Rule MAY have a string field named "Comment".
67
69
  A Comparison MUST have a field named one of "StringEquals", "StringLessThan", "StringGreaterThan", "StringLessThanEquals", "StringGreaterThanEquals", "NumericEquals", "NumericLessThan", "NumericGreaterThan", "NumericLessThanEquals", "NumericGreaterThanEquals", "BooleanEquals", "TimestampEquals", "TimestampLessThan", "TimestampGreaterThan", "TimestampLessThanEquals", "TimestampGreaterThanEquals", "StringEqualsPath", "StringLessThanPath", "StringGreaterThanPath", "StringLessThanEqualsPath", "StringGreaterThanEqualsPath", "NumericEqualsPath", "NumericLessThanPath", "NumericGreaterThanPath", "NumericLessThanEqualsPath", "NumericGreaterThanEqualsPath", "BooleanEqualsPath", "TimestampEqualsPath", "TimestampLessThanPath", "TimestampGreaterThanPath", "TimestampLessThanEqualsPath", "TimestampGreaterThanEqualsPath", "IsNull", "IsPresent", "IsNumeric", "IsString", "IsBoolean", "IsTimestamp", or "StringMatches".
68
70
  A Comparison MAY have a string field named "StringEquals".
69
71
  A Comparison MAY have a string field named "StringLessThan".
@@ -115,6 +117,7 @@ A Nested Rule with an "Or" field is a "Nested Boolean".
115
117
  A Nested Rule with a "Not" field is a "Nested Boolean".
116
118
  A Nested Rule MUST NOT have a field named "Next".
117
119
  A Nested Rule MAY have a field named "Variable".
120
+ A Nested Rule MAY have a string field named "Comment".
118
121
  A Nested Rule with a "Variable" field is a "Nested Comparison".
119
122
  A Nested Comparison MAY have a string field named "StringEquals".
120
123
  A Nested Comparison MAY have a string field named "StringLessThan".
@@ -165,9 +168,18 @@ A Wait State MAY have a referencePath field named "TimestampPath".
165
168
  A Wait State MUST have only one of "Seconds", "SecondsPath", "Timestamp", and "TimestampPath".
166
169
  A Wait State MUST have a field named one of "Seconds", "SecondsPath", "Timestamp", or "TimestampPath".
167
170
  A Parallel State MUST have an object-array field named "Branches"; each element is a "Branch".
168
- A Map State MUST have an object field named "Iterator"; its value is a "Branch".
171
+ A Map State MAY have an object field named "Iterator"; its value is a "ItemProcessor".
172
+ A Map State MAY have an object field named "ItemProcessor"; its value is a "ItemProcessor".
173
+ A Map State MUST have only one of "Iterator" and "ItemProcessor".
169
174
  A Map State MAY have a field named "ItemsPath".
175
+ A Map State MAY have an object field named "ItemSelector".
176
+ A Map State MAY have only one of "ItemSelector" and "Parameters".
170
177
  A Map State MAY have a numeric field named "MaxConcurrency".
171
178
  A Branch MUST have an object field named "States"; each field is a "State".
172
179
  A Branch MUST have a string field named "StartAt".
173
180
  A Branch MAY have a string field named "Comment".
181
+ A Catcher MAY have a string field named "Comment".
182
+ A ItemProcessor MAY have an object field named "ProcessorConfig".
183
+ A ItemProcessor MAY have a string field named "Comment".
184
+ A ItemProcessor MUST have a string field named "StartAt".
185
+ A ItemProcessor MUST have an object field named "States"; each field is a "State".
data/statelint.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'statelint'
3
- s.version = '0.6.0'
3
+ s.version = '0.8.0'
4
4
  s.summary = "State Machine JSON validator"
5
5
  s.description = "Validates a JSON object representing a State Machine"
6
6
  s.authors = ["Tim Bray"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statelint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Bray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-28 00:00:00.000000000 Z
11
+ date: 2024-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: j2119
@@ -37,6 +37,7 @@ executables:
37
37
  extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
+ - ".github/workflows/ruby.yml"
40
41
  - ".gitignore"
41
42
  - Gemfile
42
43
  - LICENSE