eac_tools 0.95.0 → 0.96.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +18 -16
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +26 -0
  5. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/documents_owner.rb +30 -0
  6. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/file_formats/base/file_resource_name.rb +37 -0
  7. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/file_formats/base.rb +17 -0
  8. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_host.rb +19 -0
  9. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_path.rb +12 -0
  10. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb +33 -0
  11. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/body_target.rb +47 -0
  12. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_lines.rb +92 -0
  13. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/media.rb +28 -0
  14. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/pre_process_line.rb +64 -0
  15. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb +101 -0
  16. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/theme.rb +41 -0
  17. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build.rb +60 -0
  18. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb +28 -0
  19. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/base.rb +21 -0
  20. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/breadcrumbs.rb +55 -0
  21. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs/document_builder.rb +63 -0
  22. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/child_docs.rb +35 -0
  23. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros/default_body.rb +21 -0
  24. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem.rb → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/macros.rb} +3 -3
  25. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1 → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0}/instances.rb +1 -1
  26. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/logging/catcher.rb +47 -0
  27. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/logging/error.rb +18 -0
  28. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats.rb → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/logging.rb} +2 -2
  29. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/source_generators/base.rb +28 -0
  30. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1 → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0}/source_generators.rb +1 -1
  31. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/instance_to_build.rb +45 -0
  32. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base/theme.rb +46 -0
  33. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb +49 -0
  34. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/media.rb +28 -0
  35. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document/title.rb +31 -0
  36. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/document.rb +56 -0
  37. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/build.rb +54 -0
  38. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/document/build.rb +46 -0
  39. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/document.rb +30 -0
  40. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runners/documents.rb +28 -0
  41. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1 → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0}/sources/runners.rb +1 -1
  42. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1 → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0}/sources.rb +1 -1
  43. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1 → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0}/version.rb +2 -2
  44. data/sub/{avm-eac_ruby_base1/lib/avm/eac_ruby_base1.rb → avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0.rb} +1 -1
  45. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/file_formats/base_spec.rb +13 -0
  46. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec.rb +81 -0
  47. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec_files/pre_processed_root_body.adoc +25 -0
  48. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec.rb +22 -0
  49. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/_media/a_media_file +1 -0
  50. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc1/_media/a_media_file +1 -0
  51. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc1/body.adoc +11 -0
  52. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc1/title +1 -0
  53. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc2/body.adoc +11 -0
  54. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc2/doc2_1/_media/a_media_file +1 -0
  55. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc2/doc2_1/body.adoc +11 -0
  56. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc2/doc2_1/title +1 -0
  57. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.source/content/doc2/title +1 -0
  58. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/_media/a_media_file +1 -0
  59. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/_theme/main.css +1 -0
  60. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/doc1/_media/a_media_file +1 -0
  61. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/doc1/index.html +1 -0
  62. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/doc2/doc2_1/_media/a_media_file +1 -0
  63. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/doc2/doc2_1/index.html +1 -0
  64. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/doc2/index.html +1 -0
  65. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec_files/first.target/index.html +1 -0
  66. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/source_generators/base_spec.rb +8 -0
  67. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/source_generators/base_spec_files/no_options/content/body.adoc +11 -0
  68. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/source_generators/base_spec_files/no_options/content/title +1 -0
  69. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/source_generators/base_spec_files/no_options/theme/main.css +1 -0
  70. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb +16 -0
  71. data/sub/avm-eac_asciidoctor_base0/spec/spec_helper/eac_asciidoctor_base0_stubs.rb +55 -0
  72. data/sub/{avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem → avm-eac_asciidoctor_base0}/spec/spec_helper.rb +4 -0
  73. data/sub/avm-eac_asciidoctor_base0/template/avm/eac_asciidoctor_base0/source_generators/base/content/body.adoc +11 -0
  74. data/sub/avm-eac_asciidoctor_base0/template/avm/eac_asciidoctor_base0/source_generators/base/content/title +1 -0
  75. data/sub/avm-eac_asciidoctor_base0/template/avm/eac_asciidoctor_base0/source_generators/base/theme/main.css +1 -0
  76. metadata +78 -150
  77. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +0 -23
  78. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/add_or_replace_gem_line.rb +0 -56
  79. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile/dependency.rb +0 -19
  80. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/gemfile.rb +0 -34
  81. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/depends_on.rb +0 -25
  82. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict.rb +0 -44
  83. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/in_gemfile.rb +0 -17
  84. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_buffer.rb +0 -77
  85. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_factory.rb +0 -33
  86. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base.rb +0 -19
  87. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/ruby_requirement.rb +0 -16
  88. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser/version_requirement.rb +0 -26
  89. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler/incompatible_parser.rb +0 -25
  90. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/bundler.rb +0 -11
  91. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base/file_resource_name.rb +0 -47
  92. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/file_formats/base.rb +0 -22
  93. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/instances/mixin.rb +0 -19
  94. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/build.rb +0 -126
  95. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher/gem/specification.rb +0 -63
  96. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher.rb +0 -11
  97. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/local_project_mixin.rb +0 -28
  98. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +0 -130
  99. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base.rb +0 -37
  100. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes.rb +0 -11
  101. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/preferred_version_requirements.rb +0 -43
  102. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/setup.rb +0 -16
  103. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec/source_generator.rb +0 -22
  104. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rspec.rb +0 -11
  105. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/configured.rb +0 -31
  106. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb +0 -17
  107. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb +0 -42
  108. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop.rb +0 -55
  109. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb +0 -62
  110. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb +0 -25
  111. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec.rb +0 -59
  112. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/remote.rb +0 -36
  113. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb +0 -45
  114. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems.rb +0 -11
  115. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/lib_rename.rb +0 -77
  116. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base/rubocop.rb +0 -30
  117. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners/base.rb +0 -18
  118. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/runners.rb +0 -11
  119. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/dependencies.rb +0 -63
  120. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/gemfile_lock.rb +0 -27
  121. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/options.rb +0 -35
  122. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base/version_builder.rb +0 -62
  123. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb +0 -112
  124. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundle_command.rb +0 -39
  125. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +0 -68
  126. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb +0 -42
  127. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop.rb +0 -28
  128. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubocop_command.rb +0 -73
  129. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubygems.rb +0 -43
  130. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/update.rb +0 -25
  131. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version.rb +0 -31
  132. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb +0 -19
  133. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +0 -61
  134. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb +0 -23
  135. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local/sibling.rb +0 -53
  136. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/gemfile_local.rb +0 -69
  137. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/namespace_replacer.rb +0 -55
  138. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundle.rb +0 -29
  139. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +0 -58
  140. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock/git.rb +0 -60
  141. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_lock.rb +0 -89
  142. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +0 -76
  143. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb +0 -19
  144. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +0 -68
  145. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/base.rb +0 -59
  146. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/minitest.rb +0 -29
  147. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/decorated_gem.rb +0 -52
  148. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple/result.rb +0 -29
  149. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/multiple.rb +0 -90
  150. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/rspec.rb +0 -25
  151. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests.rb +0 -13
  152. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +0 -59
  153. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update_dependency_requirements.rb +0 -64
  154. data/sub/avm-eac_ruby_base1/locale/en.yml +0 -9
  155. data/sub/avm-eac_ruby_base1/locale/pt-BR.yml +0 -9
  156. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +0 -7
  157. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.source.out +0 -192
  158. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml +0 -300
  159. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out +0 -245
  160. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml +0 -355
  161. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.source.out +0 -0
  162. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/3.target.yaml +0 -305
  163. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec.rb +0 -15
  164. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.source +0 -6
  165. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/Gemfile.target +0 -3
  166. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.source +0 -6
  167. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/file_formats/base_spec_files/ruby_code.rb.target +0 -5
  168. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/build_spec.rb +0 -46
  169. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher/gem/specification_spec.rb +0 -59
  170. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish_spec.rb +0 -29
  171. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/launcher_stereotypes/base_spec.rb +0 -23
  172. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/preferred_version_requirements_spec.rb +0 -23
  173. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec.rb +0 -14
  174. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/rubygems/version_file_spec_files/a_version_file.rb +0 -7
  175. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec.rb +0 -36
  176. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile +0 -5
  177. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir1/dir3/Gemfile.lock +0 -27
  178. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir2/empty.rb +0 -1
  179. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/runners/base/rubocop_spec_files/dir4/false_command.rb +0 -4
  180. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb +0 -19
  181. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile +0 -8
  182. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile.lock +0 -1
  183. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/_gitignore +0 -2
  184. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/dashed-mygem.gemspec +0 -19
  185. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem/version.rb +0 -7
  186. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/lib/dashed/mygem.rb +0 -9
  187. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile +0 -8
  188. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile.lock +0 -1
  189. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/_gitignore +0 -2
  190. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem/version.rb +0 -5
  191. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/lib/mygem.rb +0 -7
  192. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/mygem.gemspec +0 -19
  193. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/spec/rubocop_spec.rb +0 -3
  194. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/spec/spec_helper.rb +0 -4
  195. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec.rb +0 -30
  196. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile +0 -5
  197. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Gemfile.lock +0 -19
  198. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/Rakefile +0 -14
  199. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/exe/myrunner +0 -5
  200. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem/version.rb +0 -5
  201. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/lib/mygem.rb +0 -5
  202. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base/bundler_spec_files/mygem/mygem.gemspec +0 -17
  203. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/sources/base_spec.rb +0 -16
  204. data/sub/avm-eac_ruby_base1/spec/rubocop_spec.rb +0 -3
  205. data/sub/avm-eac_ruby_base1/spec/spec_helper.rb +0 -4
  206. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/gemspec.template +0 -19
  207. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/root_lib.template +0 -7
  208. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/Gemfile +0 -8
  209. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/rubocop_spec.rb +0 -3
  210. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/spec_helper.rb +0 -4
  211. data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/version.template +0 -5
  212. /data/sub/{avm-eac_ruby_base1 → avm-eac_asciidoctor_base0}/Gemfile +0 -0
  213. /data/sub/{avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem → avm-eac_asciidoctor_base0}/spec/rubocop_spec.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a124b9d5d4a885d3d505b8fc99ece9ff1efc29abdef44b0b26eafff061b5b744
4
- data.tar.gz: b3ec5c4b38557617a6b83f72315bd7a9ef37a528694d05928cb7f778bedaa6ec
3
+ metadata.gz: bcddc537bf7d33465c21a75bb134a6fb57009abd8e56da74595f76c6dab41245
4
+ data.tar.gz: d578287e68dc31506c0739e1edfe1303f4e7f528bb7e652c011f94f13cdd2180
5
5
  SHA512:
6
- metadata.gz: 76bc38b3f70c766bf0cf236518c897e0fe25fe53c6a0e80b5a020c013e5a1ee68ab722c620356ba16b308f648e71c56a330554bc35d883249a0ee0e763288d69
7
- data.tar.gz: 61abdd5b8b306e7218164a2e008cb9d5be0915471fd8d1c6fa40860d9c8659f4f5875b337d7080ec47b0763ee05ef38ac24cf584424322d1b225e8bb3fcda85d
6
+ metadata.gz: de1053a06fd859a336b9ff5d60b116239e8ba19def9e8bf6e8ed6daaea1ef4eb3a34026c89bf4fbbb0b92efbe04e9945f3c38b709d448b7dd198f829b805a3fe
7
+ data.tar.gz: 7d2270c0ada7eb229c8e5a2e4e6def1130e090cced5ae6237a930a7171e0c436f344ff00b5767450ebb624699c373c99397e04b20c55d44724849bc4fe03e4a8
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.95.0)
4
+ eac_tools (0.96.0)
5
5
  avm (~> 0.94)
6
- avm-eac_asciidoctor_base0 (~> 0.23)
6
+ avm-eac_asciidoctor_base0 (~> 0.24)
7
7
  avm-eac_generic_base0 (~> 0.13)
8
8
  avm-eac_github_base0 (~> 0.3)
9
9
  avm-eac_gitlab_base0 (~> 0.4)
@@ -25,14 +25,16 @@ PATH
25
25
  eac_ruby_utils (~> 0.122)
26
26
 
27
27
  PATH
28
- remote: sub/avm-eac_ruby_base1
28
+ remote: sub/avm-eac_asciidoctor_base0
29
29
  specs:
30
- avm-eac_ruby_base1 (0.35.0)
31
- avm (~> 0.94)
32
- avm-eac_generic_base0 (~> 0.13)
33
- eac_envs-http (~> 0.5, >= 0.5.1)
30
+ avm-eac_asciidoctor_base0 (0.24.0)
31
+ asciidoctor (~> 2.0, >= 2.0.23)
32
+ avm-eac_webapp_base0 (~> 0.20, >= 0.20.1)
33
+ eac_fs (~> 0.18)
34
34
  eac_ruby_gem_support (~> 0.10)
35
35
  eac_ruby_utils (~> 0.122)
36
+ os (~> 1.1, >= 1.1.4)
37
+ rouge (~> 3.30)
36
38
 
37
39
  GEM
38
40
  remote: https://rubygems.org/
@@ -56,12 +58,6 @@ GEM
56
58
  eac_templates (~> 0.7, >= 0.7.1)
57
59
  minitar (~> 0.9)
58
60
  ruby-progressbar (~> 1.13)
59
- avm-eac_asciidoctor_base0 (0.23.0)
60
- asciidoctor (~> 2.0, >= 2.0.22)
61
- avm-eac_webapp_base0 (~> 0.19)
62
- eac_ruby_utils (~> 0.121)
63
- os (~> 1.1, >= 1.1.4)
64
- rouge (~> 3.30)
65
61
  avm-eac_generic_base0 (0.13.0)
66
62
  avm (~> 0.90)
67
63
  eac_ruby_utils (~> 0.121)
@@ -110,6 +106,12 @@ GEM
110
106
  avm-eac_ruby_base0 (0.1.0)
111
107
  avm-eac_ruby_base1 (~> 0.34)
112
108
  eac_ruby_utils (~> 0.122)
109
+ avm-eac_ruby_base1 (0.35.0)
110
+ avm (~> 0.94)
111
+ avm-eac_generic_base0 (~> 0.13)
112
+ eac_envs-http (~> 0.5, >= 0.5.1)
113
+ eac_ruby_gem_support (~> 0.10)
114
+ eac_ruby_utils (~> 0.122)
113
115
  avm-eac_ubuntu_base0 (0.5.1)
114
116
  avm (~> 0.86, >= 0.86.2)
115
117
  eac_ruby_utils (~> 0.121)
@@ -275,10 +277,10 @@ GEM
275
277
  rubocop (~> 1.41)
276
278
  rubocop-factory_bot (2.26.1)
277
279
  rubocop (~> 1.61)
278
- rubocop-rails (2.25.1)
280
+ rubocop-rails (2.26.0)
279
281
  activesupport (>= 4.2.0)
280
282
  rack (>= 1.1)
281
- rubocop (>= 1.33.0, < 2.0)
283
+ rubocop (>= 1.52.0, < 2.0)
282
284
  rubocop-ast (>= 1.31.1, < 2.0)
283
285
  rubocop-rspec (2.31.0)
284
286
  rubocop (~> 1.40)
@@ -313,7 +315,7 @@ PLATFORMS
313
315
  x86_64-linux
314
316
 
315
317
  DEPENDENCIES
316
- avm-eac_ruby_base1!
318
+ avm-eac_asciidoctor_base0!
317
319
  eac_ruby_gem_support (~> 0.10)
318
320
  eac_tools!
319
321
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.95.0'
4
+ VERSION = '0.96.0'
5
5
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_asciidoctor_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_asciidoctor_base0'
9
+ s.version = Avm::EacAsciidoctorBase0::VERSION
10
+ s.authors = ['Put here the authors']
11
+ s.summary = 'Put here de description.'
12
+
13
+ s.files = Dir['{lib,template}/**/*', 'template/avm/eac_asciidoctor_base0/instances/deploy/.keep']
14
+ s.required_ruby_version = '>= 2.7'
15
+
16
+ s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.23'
17
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.20', '>= 0.20.1'
18
+ s.add_dependency 'eac_fs', '~> 0.18'
19
+ s.add_dependency 'eac_ruby_gem_support', '~> 0.10'
20
+ s.add_dependency 'eac_ruby_utils', '~> 0.122'
21
+ s.add_dependency 'os', '~> 1.1', '>= 1.1.4'
22
+ s.add_dependency 'rouge', '~> 3.30'
23
+
24
+ s.add_development_dependency 'eac_fs', '~> 0.16'
25
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.9'
26
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'eac_ruby_utils/recursive_builder'
5
+
6
+ module Avm
7
+ module EacAsciidoctorBase0
8
+ module DocumentsOwner
9
+ common_concern
10
+
11
+ # @param subpath [Pathname]
12
+ # @return [Avm::EacAsciidoctorBase0::Sources::Document]
13
+ # @raise [KeyError]
14
+ def document(subpath)
15
+ documents.find { |d| d.subpath.to_pathname == subpath.to_pathname } ||
16
+ raise(::KeyError, "Document not found with subpath = \"#{subpath}\"")
17
+ end
18
+
19
+ # @return [Enumerable<Avm::EacAsciidoctorBase0::Sources::Document>]
20
+ def documents
21
+ ::EacRubyUtils::RecursiveBuilder.new(root_document, &:children).result
22
+ end
23
+
24
+ # @return [Object]
25
+ def root_document
26
+ raise "Abstract method hit: #{__method__}"
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_generic_base0/file_formats/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacAsciidoctorBase0
8
+ module FileFormats
9
+ class Base < ::Avm::EacGenericBase0::FileFormats::Base
10
+ class FileResourceName
11
+ enable_method_class
12
+ common_constructor :file_format, :path do
13
+ self.path = path.to_pathname
14
+ end
15
+
16
+ CONTENT_PATTERNS = [%r{content/(.+)\z}].freeze
17
+
18
+ # @param path [Pathname]
19
+ # @return [Avm::FileFormats::FileWith]
20
+ def result
21
+ result_from_content || file_format.result_from_superclass(path)
22
+ end
23
+
24
+ private
25
+
26
+ def result_from_content
27
+ file_format.result_from_patterns(CONTENT_PATTERNS, path) do |m|
28
+ r = ::File.dirname(m[1])
29
+ r = '' if r == '.'
30
+ "Content[/#{r}]"
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_generic_base0/file_formats/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacAsciidoctorBase0
8
+ module FileFormats
9
+ class Base < ::Avm::EacGenericBase0::FileFormats::Base
10
+ require_sub __FILE__
11
+
12
+ VALID_BASENAMES = %w[*.adoc title].freeze
13
+ VALID_TYPES = %w[].freeze
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instances/apache_host'
4
+
5
+ module Avm
6
+ module EacAsciidoctorBase0
7
+ module Instances
8
+ class ApacheHost < ::Avm::EacWebappBase0::Instances::ApacheHost
9
+ def document_root
10
+ instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
11
+ end
12
+
13
+ def extra_content
14
+ ''
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_webapp_base0/instances/apache_path'
4
+
5
+ module Avm
6
+ module EacAsciidoctorBase0
7
+ module Instances
8
+ class ApachePath < ::Avm::EacWebappBase0::Instances::ApachePath
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_asciidoctor_base0/instances/apache_host'
4
+ require 'avm/eac_asciidoctor_base0/instances/apache_path'
5
+ require 'avm/eac_asciidoctor_base0/instances/deploy'
6
+ require 'avm/eac_webapp_base0/instances/base'
7
+
8
+ module Avm
9
+ module EacAsciidoctorBase0
10
+ module Instances
11
+ class Base < ::Avm::EacWebappBase0::Instances::Base
12
+ AUTHOR_EMAIL_ENTRY_PATH = 'install.email'
13
+ AUTHOR_NAME_ENTRY_PATH = 'install.name'
14
+ AUTHOR_NAME_INITIALS_ENTRY_PATH = 'install.name_initials'
15
+
16
+ # @return [String]
17
+ def author_email
18
+ entry(AUTHOR_EMAIL_ENTRY_PATH).value!
19
+ end
20
+
21
+ # @return [String]
22
+ def author_name
23
+ entry(AUTHOR_NAME_ENTRY_PATH).value!
24
+ end
25
+
26
+ # @return [String]
27
+ def author_name_initials
28
+ entry(AUTHOR_NAME_INITIALS_ENTRY_PATH).value!
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'asciidoctor'
4
+ require 'avm/eac_asciidoctor_base0/instances/macros'
5
+ require 'avm/eac_asciidoctor_base0/logging/catcher'
6
+ require 'eac_ruby_utils/core_ext'
7
+
8
+ module Avm
9
+ module EacAsciidoctorBase0
10
+ module Instances
11
+ class Build
12
+ class Document
13
+ module BodyTarget
14
+ common_concern
15
+
16
+ BODY_TARGET_BASENAME = 'index.html'
17
+
18
+ # Absolute path to the output of Asciidoctor's source file.
19
+ #
20
+ # @return [Pathname]
21
+ def body_target_path
22
+ build.target_directory.join(source_document.subpath).join(BODY_TARGET_BASENAME)
23
+ end
24
+
25
+ # @return [Asciidoctor::Document]
26
+ def body_target_write
27
+ ::Avm::EacAsciidoctorBase0::Logging::Catcher.on do
28
+ body_target_write_without_logging_catch
29
+ end
30
+ end
31
+
32
+ protected
33
+
34
+ # @return [Asciidoctor::Document]
35
+ def body_target_write_without_logging_catch
36
+ ::Asciidoctor.convert(
37
+ pre_processed_body_source_content,
38
+ base_dir: convert_base_dir,
39
+ to_file: body_target_path.to_path, safe: :unsafe, mkdirs: true
40
+ )
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,92 @@
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 HeaderLines
11
+ enable_method_class
12
+ enable_settings_provider
13
+ enable_simple_cache
14
+ common_constructor :document
15
+
16
+ delegate :build, :source_document, to: :document
17
+ delegate :instance, to: :build
18
+ delegate :author_email, :author_name, to: :instance
19
+
20
+ ATTRIBUTES = ['Author Initials', 'toc', 'icons', 'numbered', 'source-highlighter',
21
+ 'website'].freeze
22
+ TOC = 'left'
23
+ ICONS = ''
24
+ NUMBERED = ''
25
+ SOURCE_HIGHLIGHTER = 'rouge'
26
+
27
+ # @return [String]
28
+ def attribute_line(name, value)
29
+ [":#{name}:", value].compact_blank.join(' ')
30
+ end
31
+
32
+ def attributes_lines
33
+ ATTRIBUTES.map { |attr| attribute_line(attr, attribute_value(attr)) }
34
+ end
35
+
36
+ def attribute_value(attr)
37
+ setting_value(attr.variableize)
38
+ end
39
+
40
+ def author_initials
41
+ instance.author_name_initials
42
+ end
43
+
44
+ def author_line
45
+ "#{author_name} <#{author_email}>"
46
+ end
47
+
48
+ # @return [String]
49
+ def breadcrumbs_lines
50
+ ['[.normal]', document.macro_lines(:breadcrumbs)]
51
+ end
52
+
53
+ # @return [Array<String>]
54
+ def result
55
+ [stylesheet_line, title_line, author_line] + attributes_lines + [''] +
56
+ breadcrumbs_lines
57
+ end
58
+
59
+ # @return [Pathname]
60
+ def relative_path_to_stylesheet
61
+ build.theme.target_stylesheet_path
62
+ .relative_path_from(document.body_target_path.dirname)
63
+ end
64
+
65
+ # @return [String]
66
+ def stylesheet_line
67
+ attribute_line('stylesheet', stylesheet_path)
68
+ end
69
+
70
+ # @return [String]
71
+ def title_line
72
+ "= #{source_document.title}"
73
+ end
74
+
75
+ def website
76
+ instance.web_url
77
+ end
78
+
79
+ protected
80
+
81
+ # @return [Pathname]
82
+ def stylesheet_path_uncached
83
+ temp = ::EacRubyUtils::Fs::Temp.file
84
+ temp.write("@import '#{relative_path_to_stylesheet}'\n")
85
+ temp.to_pathname
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,28 @@
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 Instances
9
+ class Build
10
+ class Document
11
+ module Media
12
+ def copy_media_directory
13
+ source_document.copy_media_directory_to(media_target_path)
14
+ end
15
+
16
+ # @return [Pathname]
17
+ def media_target_path
18
+ build.target_directory.join(
19
+ parent_document.present? ? source_document.subpath : '',
20
+ ::Avm::EacAsciidoctorBase0::Sources::Document::Media::MEDIA_DIRECTORY_BASENAME
21
+ )
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,64 @@
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 PreProcessLine
11
+ enable_method_class
12
+ enable_simple_cache
13
+
14
+ ARGUMENT_SEPARATOR = ','
15
+ MACRO_PARSER = %r{\A\s*//\#(\S+)(?:\s+(.+))?\s*?\z}.to_parser do |m|
16
+ ::Struct.new(:name, :arguments).new(m[1],
17
+ m[2].to_s.split(ARGUMENT_SEPARATOR).map(&:strip))
18
+ end
19
+
20
+ common_constructor :document, :line
21
+
22
+ # @return [Array<String>]
23
+ def result
24
+ if macro?
25
+ macro_value
26
+ else
27
+ [line]
28
+ end
29
+ end
30
+
31
+ def macro?
32
+ macro_name.present?
33
+ end
34
+
35
+ # @return [Array<String>, nil]
36
+ def macro_arguments
37
+ parsed_macro.if_present(&:arguments)
38
+ end
39
+
40
+ # @return [String, nil]
41
+ def macro_name
42
+ parsed_macro.if_present(&:name)
43
+ end
44
+
45
+ def macro_parser
46
+ MACRO_PARSER
47
+ end
48
+
49
+ # @return [Array<String>]
50
+ def macro_value
51
+ document.macro_lines(macro_name, macro_arguments)
52
+ end
53
+
54
+ private
55
+
56
+ def parsed_macro_uncached
57
+ macro_parser.parse(line)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'asciidoctor'
4
+ require 'avm/eac_asciidoctor_base0/instances/macros'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacAsciidoctorBase0
9
+ module Instances
10
+ class Build
11
+ class Document
12
+ require_sub __FILE__, include_modules: true
13
+
14
+ enable_simple_cache
15
+ enable_speaker
16
+ common_constructor :build, :parent_document, :source_document
17
+ delegate :subpath, to: :source_document
18
+
19
+ # @param other [Avm::EacAsciidoctorBase0::Instances::Build::Document]
20
+ # @return [String]
21
+ def href_to_other_body(other)
22
+ other.body_target_path.relative_path_from(body_target_path.dirname)
23
+ end
24
+
25
+ # @return [Enumerable<String>]
26
+ def body_source_lines
27
+ if source_document.body_path.file?
28
+ source_document.body_path.read.each_line
29
+ else
30
+ default_body_source_lines
31
+ end
32
+ end
33
+
34
+ # @param basename [String]
35
+ # @return [Avm::EacAsciidoctorBase0::Instances::Build::Document, nil]
36
+ def child(basename)
37
+ basename = basename.to_s
38
+ children.find { |c| c.source_document.root_path.basename.to_path == basename }
39
+ end
40
+
41
+ # @param basename [String]
42
+ # @return [Avm::EacAsciidoctorBase0::Instances::Build::Document]
43
+ def child!(basename)
44
+ child(basename) || raise("Child not found with basename \"#{basename}\"")
45
+ end
46
+
47
+ # @return [Pathname]
48
+ def convert_base_dir
49
+ source_document.root_path
50
+ end
51
+
52
+ # @return [Enumerable<String>]
53
+ def default_body_source_lines
54
+ macro_lines(:default_body)
55
+ end
56
+
57
+ # @param name [String]
58
+ # @return [Array<String>]
59
+ def macro_lines(name, arguments = [])
60
+ ::Avm::EacAsciidoctorBase0::Instances::Macros.const_get(name.to_s.camelize)
61
+ .new(self, arguments).result
62
+ end
63
+
64
+ def perform
65
+ perform_self
66
+ perform_children
67
+ end
68
+
69
+ def perform_self
70
+ infov 'Building', source_document.subpath
71
+ body_target_write
72
+ copy_media_directory
73
+ end
74
+
75
+ def perform_children
76
+ children.each(&:perform)
77
+ end
78
+
79
+ # @return [String]
80
+ def pre_processed_body_source_content
81
+ (
82
+ header_lines + [''] + body_source_lines
83
+ .flat_map { |line| pre_process_line(line.rstrip) }
84
+ ).map { |line| "#{line.rstrip}\n" }.join
85
+ end
86
+
87
+ def tree_documents_count
88
+ children.inject(1) { |a, e| a + e.tree_documents_count }
89
+ end
90
+
91
+ private
92
+
93
+ def children_uncached
94
+ source_document.children
95
+ .map { |source_child| self.class.new(build, self, source_child) }
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_asciidoctor_base0/instances/macros'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacAsciidoctorBase0
8
+ module Instances
9
+ class Build
10
+ class Theme
11
+ TARGET_SUBPATH = '_theme'
12
+
13
+ common_constructor :build
14
+
15
+ # @return [void]
16
+ def perform
17
+ copy_theme_to_target
18
+ end
19
+
20
+ # @return [Pathname]
21
+ def target_path
22
+ build.target_directory.join(TARGET_SUBPATH)
23
+ end
24
+
25
+ # @return [Pathname]
26
+ def target_stylesheet_path
27
+ target_path
28
+ .join(Avm::EacAsciidoctorBase0::Sources::Base::Theme::THEME_STYLESHEET_BASENAME)
29
+ end
30
+
31
+ protected
32
+
33
+ # @return [void]
34
+ def copy_theme_to_target
35
+ build.source.copy_theme_directory_to(target_path)
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end