slaw 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/bin/slaw +16 -0
  4. data/lib/slaw/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9da16bde12dc6832dbf6772de7205268e7ebe3d2
4
- data.tar.gz: 74eb889730d1be5cf02a656f410cf66f7878fa50
3
+ metadata.gz: ea560c6ca4986938adc55f944e1530e2f213af40
4
+ data.tar.gz: 27c25b8edf02ca79a169f3ba8ae6e8215f44c716
5
5
  SHA512:
6
- metadata.gz: c5b5d462affc8dc8e2a39fffee9c6612f1755746a9c5c3c31b654515f9062dd060ef0f9aebc383dd92e1799db583bac41ccb72abc0bdeaec3e44051f54fd9932
7
- data.tar.gz: d06d15f2768bd2abb2aae5ca2919975d55e75acde2e4c256099c96e75aac84b01cb43832db2146836be9c864a945045100778c8897f901c0eb54a434d8626c37
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
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
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.2
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-01 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler