@@ -109,13 +109,18 @@ which can be found [here](https://raw.githubusercontent.com/arineng/jcr/09/draft
109
109
* 0.6.3 - XOR experimentation which was never merged
110
110
* 0.6.4 - Version that matches -07 of the draft specification
111
111
* 0.6.5 - Fixed a bug with roots and empty object and array rules
112
- * next
112
+ * 0.7.0
113
113
* Tracks the -09 draft
114
114
* Fixes to allow annotations for groups in arrays and objects
115
115
* Text output is now proper JCR
116
116
* Fixed issue with multiple files on the command line with MacOS
117
117
* Support for Ruby 2.4
118
- * Dropped Ruby 1.8, 1.9, and 2.0. Now only testing against 2.1, 2.3 and 2.4
118
+ * Dropped Ruby 1.8, 1.9, and 2.0. CI testing on:
119
+ * Linux 2.1, 2.3, 2.4, and JRuby 9.1
120
+ * OSX 2.3 and 2.4
121
+ * Fixes to ABNF in multi-line directives
122
+ * Much better CLI and programmatic validation failure information and structures
123
+ * Fixes to print errors when the JCR fails to parse
119
124
120
125
The current version of the JCR specification can be found
121
126
[ here] ( https://raw.githubusercontent.com/arineng/jcr/07/draft-newton-json-content-rules.txt )
@@ -165,18 +170,30 @@ Usage: jcr [OPTIONS] [JSON_FILES]
165
170
166
171
Evaluates JSON against JSON Content Rules (JCR).
167
172
173
+ If -J is not specified, JSON_FILES is used.
168
174
If JSON_FILES is not specified, standard input (STDIN) is used.
169
175
170
176
Use -v to see results, otherwise check the exit code.
171
177
172
178
Options
173
179
-r FILE file containing ruleset
174
180
-R STRING string containing ruleset. Should probably be quoted
175
- -s STRING name of root rule. All roots will be tried if none is specified
181
+ --test-jcr parse and test the JCR only
182
+ -S STRING name of root rule. All roots will be tried if none is specified
176
183
-o FILE file containing overide ruleset (option can be repeated)
177
184
-O STRING string containing overide rule (option can be repeated)
185
+ -J STRING string containing JSON to evaluate. Should probably be quoted
178
186
-v verbose
187
+ -q quiet
179
188
-h display help
189
+
190
+ Return codes:
191
+ 0 = success
192
+ 1 = parsing or other bad condition
193
+ 2 = fall through bad condition
194
+ 3 = unsuccessful evaluation of JSON
195
+
196
+ JCR Version 0.7.0
180
197
```
181
198
182
199
## Usage as a Library
@@ -186,6 +203,7 @@ It is easy to call the JCR Validator from Ruby programs. The `examples` director
186
203
* ` simple.rb ` is a simple and basic example
187
204
* ` override.rb ` shows how to override specific rules in a ruleset.
188
205
* ` callback.rb ` demonstrates how to do custom validation with callbacks
206
+ * ` trace_failures.rb ` demonstrates how to access validation failure information
189
207
190
208
### Custom Validation Using Callbacks
191
209
0 commit comments