eac_tools 0.60.3 → 0.61.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +13 -13
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_lines.rb +1 -1
  5. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb +16 -4
  6. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb +23 -1
  7. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/base.rb +21 -0
  8. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/breadcrumbs.rb +55 -0
  9. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs/document_builder.rb +63 -0
  10. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs.rb +35 -0
  11. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/default_body.rb +21 -0
  12. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros.rb +13 -0
  13. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb +5 -1
  14. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  15. data/sub/avm-files/avm-files.gemspec +1 -1
  16. data/sub/avm-files/lib/avm/files/version.rb +1 -1
  17. data/sub/avm-git/avm-git.gemspec +2 -2
  18. data/sub/avm-git/lib/avm/git/version.rb +1 -1
  19. data/sub/eac_templates/lib/eac_templates/abstract/directory.rb +42 -0
  20. data/sub/eac_templates/lib/eac_templates/abstract/file.rb +25 -0
  21. data/sub/eac_templates/lib/eac_templates/abstract/fs_object.rb +94 -0
  22. data/sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb +13 -0
  23. data/sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb +8 -0
  24. data/sub/eac_templates/lib/eac_templates/interface_methods.rb +3 -3
  25. data/sub/eac_templates/lib/eac_templates/modules/ancestor/directory.rb +4 -2
  26. data/sub/eac_templates/lib/eac_templates/modules/ancestor/file.rb +3 -2
  27. data/sub/eac_templates/lib/eac_templates/modules/ancestor/fs_object.rb +6 -13
  28. data/sub/eac_templates/lib/eac_templates/modules/ancestor.rb +6 -3
  29. data/sub/eac_templates/lib/eac_templates/sources/directory.rb +23 -10
  30. data/sub/eac_templates/lib/eac_templates/sources/file.rb +3 -14
  31. data/sub/eac_templates/lib/eac_templates/sources/fs_object.rb +17 -17
  32. data/sub/eac_templates/lib/eac_templates/sources/set.rb +5 -4
  33. data/sub/eac_templates/lib/eac_templates/variables/content.rb +52 -0
  34. data/sub/eac_templates/lib/eac_templates/variables/directory.rb +7 -5
  35. data/sub/eac_templates/lib/eac_templates/variables/file.rb +9 -33
  36. data/sub/eac_templates/lib/eac_templates/version.rb +1 -1
  37. data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec.rb → modules/base_spec.rb} +41 -20
  38. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b +1 -0
  39. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c +1 -0
  40. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c +1 -0
  41. data/sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b +1 -0
  42. data/sub/eac_templates/spec/lib/eac_templates/variables/{file_spec.rb → content_spec.rb} +4 -4
  43. metadata +33 -28
  44. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/breadcrumbs_macro_value.rb +0 -59
  45. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb +0 -49
  46. data/sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/a_module/a/a_b +0 -1
  47. data/sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/a_module/c +0 -1
  48. data/sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/super_class/a/a_b +0 -1
  49. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path1/a_module/a/a_a +0 -0
  50. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path1/a_module/b +0 -0
  51. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path1/super_class/a/a_b +0 -0
  52. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path1/super_class/b +0 -0
  53. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path2/a_module/b +0 -0
  54. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path2/sub_class/b +0 -0
  55. /data/sub/eac_templates/spec/lib/eac_templates/{patches/module/template_spec_files → modules/base_spec_files}/path2/super_class/b +0 -0
  56. /data/sub/eac_templates/spec/lib/eac_templates/variables/{file_spec_files → content_spec_files}/expected_content +0 -0
  57. /data/sub/eac_templates/spec/lib/eac_templates/variables/{file_spec_files → content_spec_files}/source.template +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.3
4
+ version: 0.61.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-30 00:00:00.000000000 Z
11
+ date: 2023-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -36,20 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.18'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 0.18.1
39
+ version: '0.19'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - "~>"
48
45
  - !ruby/object:Gem::Version
49
- version: '0.18'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 0.18.1
46
+ version: '0.19'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: avm-eac_generic_base0
55
49
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +275,7 @@ dependencies:
281
275
  version: '0.13'
282
276
  - - ">="
283
277
  - !ruby/object:Gem::Version
284
- version: 0.13.1
278
+ version: 0.13.2
285
279
  type: :runtime
286
280
  prerelease: false
287
281
  version_requirements: !ruby/object:Gem::Requirement
@@ -291,7 +285,7 @@ dependencies:
291
285
  version: '0.13'
292
286
  - - ">="
293
287
  - !ruby/object:Gem::Version
294
- version: 0.13.1
288
+ version: 0.13.2
295
289
  - !ruby/object:Gem::Dependency
296
290
  name: avm-tools
297
291
  requirement: !ruby/object:Gem::Requirement
@@ -412,12 +406,16 @@ files:
412
406
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb
413
407
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build.rb
414
408
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb
415
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/breadcrumbs_macro_value.rb
416
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb
417
409
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_lines.rb
418
410
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/media.rb
419
411
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb
420
412
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb
413
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros.rb
414
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/base.rb
415
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/breadcrumbs.rb
416
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs.rb
417
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs/document_builder.rb
418
+ - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/default_body.rb
421
419
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/source_generators.rb
422
420
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/source_generators/base.rb
423
421
  - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources.rb
@@ -1971,6 +1969,11 @@ files:
1971
1969
  - sub/eac_templates/Gemfile
1972
1970
  - sub/eac_templates/eac_templates.gemspec
1973
1971
  - sub/eac_templates/lib/eac_templates.rb
1972
+ - sub/eac_templates/lib/eac_templates/abstract/directory.rb
1973
+ - sub/eac_templates/lib/eac_templates/abstract/file.rb
1974
+ - sub/eac_templates/lib/eac_templates/abstract/fs_object.rb
1975
+ - sub/eac_templates/lib/eac_templates/abstract/fs_object_by_pathname.rb
1976
+ - sub/eac_templates/lib/eac_templates/abstract/not_found_error.rb
1974
1977
  - sub/eac_templates/lib/eac_templates/core_ext.rb
1975
1978
  - sub/eac_templates/lib/eac_templates/interface_methods.rb
1976
1979
  - sub/eac_templates/lib/eac_templates/modules.rb
@@ -1996,6 +1999,7 @@ files:
1996
1999
  - sub/eac_templates/lib/eac_templates/sources/set.rb
1997
2000
  - sub/eac_templates/lib/eac_templates/sources/single.rb
1998
2001
  - sub/eac_templates/lib/eac_templates/variables.rb
2002
+ - sub/eac_templates/lib/eac_templates/variables/content.rb
1999
2003
  - sub/eac_templates/lib/eac_templates/variables/directory.rb
2000
2004
  - sub/eac_templates/lib/eac_templates/variables/file.rb
2001
2005
  - sub/eac_templates/lib/eac_templates/variables/fs_object.rb
@@ -2007,26 +2011,27 @@ files:
2007
2011
  - sub/eac_templates/lib/eac_templates/variables/providers/generic.rb
2008
2012
  - sub/eac_templates/lib/eac_templates/variables/providers/hash.rb
2009
2013
  - sub/eac_templates/lib/eac_templates/version.rb
2010
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec.rb
2011
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path1/a_module/a/a_a
2012
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path1/a_module/b
2013
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path1/super_class/a/a_b
2014
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path1/super_class/b
2015
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/a_module/a/a_b
2016
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/a_module/b
2017
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/a_module/c
2018
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/sub_class/b
2019
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/super_class/a/a_b
2020
- - sub/eac_templates/spec/lib/eac_templates/patches/module/template_spec_files/path2/super_class/b
2014
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec.rb
2015
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/a/a_a
2016
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/a_module/b
2017
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/a/a_b
2018
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path1/super_class/b
2019
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/a/a_b
2020
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/b
2021
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/a_module/c
2022
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/prepended_module/c
2023
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/sub_class/b
2024
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/a/a_b
2025
+ - sub/eac_templates/spec/lib/eac_templates/modules/base_spec_files/path2/super_class/b
2021
2026
  - sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec.rb
2022
2027
  - sub/eac_templates/spec/lib/eac_templates/patches/object/template_spec_files/path/my_stub_with_template
2023
2028
  - sub/eac_templates/spec/lib/eac_templates/sources/set_spec.rb
2024
2029
  - sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file1.template
2025
2030
  - sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path1/subdir1/file2
2026
2031
  - sub/eac_templates/spec/lib/eac_templates/sources/set_spec_files/path2/subdir1/file3.template
2027
- - sub/eac_templates/spec/lib/eac_templates/variables/file_spec.rb
2028
- - sub/eac_templates/spec/lib/eac_templates/variables/file_spec_files/expected_content
2029
- - sub/eac_templates/spec/lib/eac_templates/variables/file_spec_files/source.template
2032
+ - sub/eac_templates/spec/lib/eac_templates/variables/content_spec.rb
2033
+ - sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/expected_content
2034
+ - sub/eac_templates/spec/lib/eac_templates/variables/content_spec_files/source.template
2030
2035
  - sub/eac_templates/spec/rubocop_spec.rb
2031
2036
  - sub/eac_templates/spec/spec_helper.rb
2032
2037
  homepage:
@@ -1,59 +0,0 @@
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 BreadcrumbsMacroValue
11
- enable_method_class
12
- common_constructor :document
13
-
14
- NODE_SEPARATOR = ' » '
15
- ROOT_DOCUMENT_TITLE = 'Home'
16
-
17
- # @return [Array<String>]
18
- def result
19
- trail_nodes.join(NODE_SEPARATOR)
20
- end
21
-
22
- def trail_nodes
23
- r = []
24
- current = document
25
- while current.present?
26
- r.unshift(Node.new(document, current))
27
- current = current.parent_document
28
- end
29
- r
30
- end
31
-
32
- class Node
33
- common_constructor :current, :document
34
-
35
- # @return [String]
36
- def address
37
- current.href_to_other_body(document)
38
- end
39
-
40
- # @return [String]
41
- def title
42
- if document.parent_document.present?
43
- document.source_document.title
44
- else
45
- ROOT_DOCUMENT_TITLE
46
- end
47
- end
48
-
49
- # @return [String]
50
- def to_s
51
- "link:#{address}[#{title}]"
52
- end
53
- end
54
- end
55
- end
56
- end
57
- end
58
- end
59
- end
@@ -1,49 +0,0 @@
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
- document.href_to_other_body(child)
27
- end
28
-
29
- # @return [String]
30
- def link
31
- "link:#{address}[#{title}]"
32
- end
33
-
34
- # @return [String]
35
- def result
36
- "* #{link}"
37
- end
38
-
39
- # @return [String]
40
- def title
41
- child.source_document.title
42
- end
43
- end
44
- end
45
- end
46
- end
47
- end
48
- end
49
- end