eac_tools 0.43.0 → 0.44.0
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 -3
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb +51 -0
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_macro_value.rb +1 -4
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb +3 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb +3 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build.rb +1 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/instance_to_build.rb +45 -0
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb +5 -0
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/build.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec_files/pre_processed_root_body.adoc +3 -0
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/source_generators/base_spec_files/no_options/content/body.adoc +4 -0
- data/sub/avm-eac_asciidoctor_base0/template/avm/eac_asciidoctor_base0/source_generators/base/content/body.adoc +4 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4c29f133ac7e8ea838302984ba5d8c0a947e16cc615764dae97e2b9100bd40b
|
4
|
+
data.tar.gz: 49926d91a7fe7fc5b3135b6910b7a8bb211a9d21bab5072a9e2a87b2f759e60c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55a8b88951fc5b287d5f0897157129199b4d4229936e1ea31da011f66ae45a26d9a3966ae71afc595babe9da9312e5837a23c4c645702e4184bd6633d1effb3
|
7
|
+
data.tar.gz: b578bec6760cc52df6c9736ef4d4428f0af4460e056d3939553090b680ee7a8059ec608221867176dacacc33014c2f04434405154e4049ca9aad7125c327152b
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
4
|
+
eac_tools (0.44.0)
|
5
5
|
avm (~> 0.55)
|
6
|
-
avm-eac_asciidoctor_base0 (~> 0.
|
6
|
+
avm-eac_asciidoctor_base0 (~> 0.12)
|
7
7
|
avm-eac_generic_base0 (~> 0.8)
|
8
8
|
avm-eac_latex_base0 (~> 0.3)
|
9
9
|
avm-eac_php_base0 (~> 0.3)
|
@@ -33,7 +33,7 @@ PATH
|
|
33
33
|
PATH
|
34
34
|
remote: sub/avm-eac_asciidoctor_base0
|
35
35
|
specs:
|
36
|
-
avm-eac_asciidoctor_base0 (0.
|
36
|
+
avm-eac_asciidoctor_base0 (0.12.0)
|
37
37
|
asciidoctor (~> 2.0, >= 2.0.18)
|
38
38
|
avm-eac_webapp_base0 (~> 0.12, >= 0.12.2)
|
39
39
|
eac_ruby_utils (~> 0.107)
|
data/lib/eac_tools/version.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacAsciidoctorBase0
|
7
|
+
module Instances
|
8
|
+
class Build
|
9
|
+
class Document
|
10
|
+
class ChildDocsMacroValue
|
11
|
+
enable_method_class
|
12
|
+
common_constructor :document
|
13
|
+
|
14
|
+
# @return [Array<String>]
|
15
|
+
def result
|
16
|
+
document.children.map { |child_doc| ChildDocLine.new(document, child_doc) }.sort
|
17
|
+
.map(&:result)
|
18
|
+
end
|
19
|
+
|
20
|
+
class ChildDocLine
|
21
|
+
common_constructor :document, :child
|
22
|
+
compare_by :title, :address
|
23
|
+
|
24
|
+
# @return [Pathname]
|
25
|
+
def address
|
26
|
+
child.body_target_path.relative_path_from(
|
27
|
+
document.body_target_path.dirname
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [String]
|
32
|
+
def link
|
33
|
+
"link:#{address}[#{title}]"
|
34
|
+
end
|
35
|
+
|
36
|
+
# @return [String]
|
37
|
+
def result
|
38
|
+
"* #{link}"
|
39
|
+
end
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
def title
|
43
|
+
child.source_document.title
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -17,11 +17,12 @@ module Avm
|
|
17
17
|
|
18
18
|
common_constructor :document, :line
|
19
19
|
|
20
|
+
# @return [Array<String>]
|
20
21
|
def result
|
21
22
|
if macro?
|
22
23
|
macro_value
|
23
24
|
else
|
24
|
-
line
|
25
|
+
[line]
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
@@ -33,6 +34,7 @@ module Avm
|
|
33
34
|
MACRO_PARSER
|
34
35
|
end
|
35
36
|
|
37
|
+
# @return [Array<String>]
|
36
38
|
def macro_value
|
37
39
|
document.send("#{macro_name}_macro_value")
|
38
40
|
end
|
data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb
CHANGED
@@ -36,7 +36,7 @@ module Avm
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def perform_self
|
39
|
-
infov 'Building', source_document.
|
39
|
+
infov 'Building', source_document.subpath
|
40
40
|
::Asciidoctor.convert(
|
41
41
|
pre_processed_body_source_content,
|
42
42
|
base_dir: convert_base_dir,
|
@@ -51,7 +51,8 @@ module Avm
|
|
51
51
|
# @return [String]
|
52
52
|
def pre_processed_body_source_content
|
53
53
|
source_document.body_path.read.each_line
|
54
|
-
.
|
54
|
+
.flat_map { |line| pre_process_line(line.rstrip) }
|
55
|
+
.map { |line| "#{line.rstrip}\n" }.join
|
55
56
|
end
|
56
57
|
|
57
58
|
def tree_documents_count
|
@@ -13,14 +13,13 @@ module Avm
|
|
13
13
|
enable_listable
|
14
14
|
lists.add_symbol :option, :target_directory
|
15
15
|
common_constructor :instance, :options, default: [{}] do
|
16
|
-
instance.assert_argument(::Avm::EacAsciidoctorBase0::Instances::Base, 'instance')
|
17
16
|
self.options = self.class.lists.option.hash_keys_validate!(options.symbolize_keys)
|
18
17
|
end
|
19
18
|
|
20
19
|
SOURCE_EXTNAMES = %w[.adoc .asc].freeze
|
21
20
|
|
22
21
|
def perform
|
23
|
-
infov '
|
22
|
+
infov 'Documents to build', root_document.tree_documents_count
|
24
23
|
target_directory.clear
|
25
24
|
root_document.perform
|
26
25
|
end
|
data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/instance_to_build.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'asciidoctor'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacAsciidoctorBase0
|
8
|
+
module Sources
|
9
|
+
class Base
|
10
|
+
class InstanceToBuild
|
11
|
+
AUTHOR_EMAIL = 'author@local.net'
|
12
|
+
AUTHOR_NAME = 'Local Author'
|
13
|
+
AUTHOR_NAME_INITIALS = 'L.A.'
|
14
|
+
|
15
|
+
common_constructor :source
|
16
|
+
|
17
|
+
# @return [Struct]
|
18
|
+
def application
|
19
|
+
::Struct.new(:local_source).new(source)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def author_email
|
24
|
+
AUTHOR_EMAIL
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [String]
|
28
|
+
def author_name
|
29
|
+
AUTHOR_NAME
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [String]
|
33
|
+
def author_name_initials
|
34
|
+
AUTHOR_NAME_INITIALS
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [String]
|
38
|
+
def web_url
|
39
|
+
"file://#{source.path.expand_path.join('build', 'index.html')}"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -18,6 +18,11 @@ module Avm
|
|
18
18
|
path.join(CONTENT_DIRECTORY_SUBPATH)
|
19
19
|
end
|
20
20
|
|
21
|
+
# @return [Avm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild]
|
22
|
+
def instance_to_build
|
23
|
+
::Avm::EacAsciidoctorBase0::Sources::Base::InstanceToBuild.new(self)
|
24
|
+
end
|
25
|
+
|
21
26
|
# @return [Avm::EacAsciidoctorBase0::Sources::Base::Document
|
22
27
|
def root_document
|
23
28
|
::Avm::EacAsciidoctorBase0::Sources::Base::Document.new(self, nil, nil)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.44.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.12'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: avm-eac_generic_base0
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -307,6 +307,7 @@ files:
|
|
307
307
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb
|
308
308
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build.rb
|
309
309
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb
|
310
|
+
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb
|
310
311
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_macro_value.rb
|
311
312
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb
|
312
313
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb
|
@@ -318,6 +319,7 @@ files:
|
|
318
319
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb
|
319
320
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document.rb
|
320
321
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/document/title.rb
|
322
|
+
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/instance_to_build.rb
|
321
323
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/theme.rb
|
322
324
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners.rb
|
323
325
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/build.rb
|