You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-R STRING string containing ruleset. Should probably be quoted
181
182
--test-jcr parse and test the JCR only
183
+
--process-parts creates smaller files for specification writing
182
184
-S STRING name of root rule. All roots will be tried if none is specified
183
185
-o FILE file containing overide ruleset (option can be repeated)
184
186
-O STRING string containing overide rule (option can be repeated)
@@ -193,7 +195,7 @@ Return codes:
193
195
2 = fall through bad condition
194
196
3 = unsuccessful evaluation of JSON
195
197
196
-
JCR Version 0.7.0
198
+
JCR Version 0.8.0
197
199
```
198
200
199
201
## Usage as a Library
@@ -216,6 +218,30 @@ The `callback.rb` demonstrates the usage of custom code for evaluation of rules.
216
218
5. If the callback returns false or a string, this is turned into a `JCR::Evaluation` signifying a failed evaluation. In cases where a string is returned, the string is used as the reason for failing the evaluation.
217
219
6. For validation of rules inside arrays and objects, a failed evaluation will usually result in the terminating the evaluation of the rest of the sibling rules of the containing array or object.
218
220
221
+
## Using the `--process-parts` Option
222
+
223
+
The `--process-parts` option extracts parts of a JCR file into multiple files based
224
+
on comments in the file. It can also create a new file without the
225
+
comments. This is useful for JCR going into specification documents
226
+
where it is nice to break the JCR up for illustrative purposes in
227
+
the specification but to also have one JCR file for programmatic
228
+
testing purposes.
229
+
230
+
The file parts are extracted using the comments
231
+
232
+
; start_part FILENAME
233
+
234
+
and
235
+
236
+
; end_part
237
+
238
+
The comments must also be the only thing present on the line
239
+
though leading whitespace is allowed if desired.
240
+
241
+
To get a new file with all parts but these comments, use this
0 commit comments