slaw 0.7.2 → 0.7.3
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/README.md +5 -0
- data/bin/slaw +16 -0
- data/lib/slaw/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea560c6ca4986938adc55f944e1530e2f213af40
|
4
|
+
data.tar.gz: 27c25b8edf02ca79a169f3ba8ae6e8215f44c716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c456e3373e43272b6ec6c8e15bc848c61e479cca955ff454daf06949c947ddc6b26b02b2f3d995663e608a434bea91553d60b13aa5a31965bd2509ad2840c0e
|
7
|
+
data.tar.gz: 38741a5d5cd8a9a5c72b9959719f6051c0e0ae88b56a8be50bd6fb3bc7f2e67c4121a3ec604047209f22be3ee46764c3898f0df8bbbeaa9630b4da63f634dce6
|
data/README.md
CHANGED
@@ -216,6 +216,11 @@ Akoma Ntoso `component` elements at the end of the XML document, with a name of
|
|
216
216
|
|
217
217
|
## Changelog
|
218
218
|
|
219
|
+
### 0.7.3
|
220
|
+
|
221
|
+
* add link-definitions command to find and extract defined terms and link them to their definitions
|
222
|
+
* exit with non-zero exit code on failure (see https://github.com/erikhuda/thor/issues/244)
|
223
|
+
|
219
224
|
### 0.7.2
|
220
225
|
|
221
226
|
* add --section-number-position argument to slaw command
|
data/bin/slaw
CHANGED
@@ -6,6 +6,12 @@ require 'slaw'
|
|
6
6
|
class SlawCLI < Thor
|
7
7
|
# TODO: support different grammars and locales
|
8
8
|
|
9
|
+
# Exit with non-zero exit code on failure.
|
10
|
+
# See https://github.com/erikhuda/thor/issues/244
|
11
|
+
def self.exit_on_failure?
|
12
|
+
true
|
13
|
+
end
|
14
|
+
|
9
15
|
class_option :verbose, type: :boolean, desc: "Display log output on stderr"
|
10
16
|
|
11
17
|
desc "parse FILE", "Parse FILE into Akoma Ntoso XML"
|
@@ -82,6 +88,16 @@ class SlawCLI < Thor
|
|
82
88
|
puts act.to_xml(indent: 2)
|
83
89
|
end
|
84
90
|
|
91
|
+
desc "link-definitions FILE", "Find and link defined terms in FILE"
|
92
|
+
def link_definitions(name)
|
93
|
+
builder = Slaw::ActGenerator.new.builder
|
94
|
+
|
95
|
+
doc = File.open(name, 'r') { |f| doc = builder.parse_xml(f.read) }
|
96
|
+
builder.link_definitions(doc)
|
97
|
+
|
98
|
+
puts builder.to_xml(doc)
|
99
|
+
end
|
100
|
+
|
85
101
|
map %w(--version) => :__print_version
|
86
102
|
desc "--version", "Print slaw version info"
|
87
103
|
def __print_version
|
data/lib/slaw/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slaw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Kempe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|