metanorma 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -1
- data/lib/metanorma.rb +2 -0
- data/lib/metanorma/asciidoctor_extensions.rb +1 -0
- data/lib/metanorma/asciidoctor_extensions/glob_include_processor.rb +22 -0
- data/lib/metanorma/input/asciidoc.rb +2 -2
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +2 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 719e0a648d4b04e1bef5f855cde357b517551d50b3a8a0abca2f8f2c340c253c
|
4
|
+
data.tar.gz: 3cd70ccdd980e869bc130b2ca88d524741624ab926e37988634e5c97674054bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fea024ec085822b3637df3cab6abae988c32988c783af52281ce4da1592104d6bebc6ec8f39940fd4c916e6ca295b03133cee8f2abbeec7561bf3de54c325b8
|
7
|
+
data.tar.gz: a4b52af8af72a734f36dd5d95d24ce4765f12c6fbdd577a787229ed9701e7b0a116a31f102d5e7851b03af537ae237e7fe16b56bb1aa179ca9f13b0501ad890d
|
data/Gemfile.lock
CHANGED
data/lib/metanorma.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative "asciidoctor_extensions/glob_include_processor"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Metanorma::AsciidoctorExtensions
|
2
|
+
|
3
|
+
class GlobIncludeProcessor < ::Asciidoctor::Extensions::IncludeProcessor
|
4
|
+
def process doc, reader, target_glob, attributes
|
5
|
+
Dir[File.join reader.dir, target_glob].sort.reverse_each do |target|
|
6
|
+
content = IO.readlines target
|
7
|
+
content.unshift '' unless attributes['adjoin-option']
|
8
|
+
reader.push_include content, target, target, 1, attributes
|
9
|
+
end
|
10
|
+
reader
|
11
|
+
end
|
12
|
+
|
13
|
+
def handles? target
|
14
|
+
target.include? '*'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
Asciidoctor::Extensions.register do
|
21
|
+
include_processor ::Metanorma::AsciidoctorExtensions::GlobIncludeProcessor
|
22
|
+
end
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = '>= 2.3.0'
|
26
26
|
|
27
|
+
spec.add_runtime_dependency 'asciidoctor'
|
28
|
+
|
27
29
|
spec.add_development_dependency "bundler", "~> 1.16"
|
28
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
29
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: asciidoctor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,8 @@ files:
|
|
122
136
|
- bin/rasterize.js
|
123
137
|
- bin/setup
|
124
138
|
- lib/metanorma.rb
|
139
|
+
- lib/metanorma/asciidoctor_extensions.rb
|
140
|
+
- lib/metanorma/asciidoctor_extensions/glob_include_processor.rb
|
125
141
|
- lib/metanorma/document.rb
|
126
142
|
- lib/metanorma/input.rb
|
127
143
|
- lib/metanorma/input/asciidoc.rb
|