avm-eac_asciidoctor_base0 0.24.0 → 0.25.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86a2fbf3a41bc705973e5d72606bb82f9e490c2dc1be92e69374c1daaaede203
4
- data.tar.gz: bae73a31143d7ab4f3bcd3b792087780b72a613173828751341ed7e0280345a1
3
+ metadata.gz: '079bbc7c1690a55b2b1e2f17ec526a8aa531dd9cd100945ab3d1e98de7718316'
4
+ data.tar.gz: 37cd592cb2937f66ab48c8916c5ebd5d8df2e3d2f0d6c6e45074df97ce65f609
5
5
  SHA512:
6
- metadata.gz: 7b9de587064b412d52b4d081780f484edb1112544edcbd2c7fbce3c77098136e76246f328063b751bd41baefaaff03b7ea5767f9c9082351ec73aecdf484e594
7
- data.tar.gz: 90eee15a5f8dfb0a8aeb93c947d3b29c0e6a6cce830ab5d4915126af4cc14c2a8358a98eaa314ee2c0ae42c19bb7e9b32859a76e3d6b99d7fd352ee0a6c85a43
6
+ metadata.gz: 3cd003068dc0342fc667118ac18d78d9e2667ed3ac1c088487428d3b8ebfc1a0ddc4be317dc0032d3cf18da708db313b408202cfd44fbc071d79e8864afee6a2
7
+ data.tar.gz: c2724e9e53014f39bcc275ad05bbbeaa4cf7a4f889bcd1c5666ddee220b06cc5b66e7e40e157d8fbbf1d1fe4bdfea19efa8baa3757ae1ccae3035515963ba6c2
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'asciidoctor'
4
4
  require 'avm/eac_asciidoctor_base0/instances/macros'
5
- require 'avm/eac_asciidoctor_base0/logging/catcher'
6
5
  require 'eac_ruby_utils/core_ext'
7
6
 
8
7
  module Avm
@@ -24,15 +23,6 @@ module Avm
24
23
 
25
24
  # @return [Asciidoctor::Document]
26
25
  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
26
  ::Asciidoctor.convert(
37
27
  pre_processed_body_source_content,
38
28
  base_dir: convert_base_dir,
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_asciidoctor_base0/instances/build'
4
+ require 'avm/eac_asciidoctor_base0/sources/runners/ignore_errors_option'
4
5
  require 'eac_cli/core_ext'
5
6
  require 'os'
6
7
 
@@ -9,18 +10,14 @@ module Avm
9
10
  module Sources
10
11
  module Runners
11
12
  class Build
13
+ include ::Avm::EacAsciidoctorBase0::Sources::Runners::IgnoreErrorsOption
14
+
12
15
  runner_with :help do
13
16
  desc 'Build the project'
14
17
  arg_opt '-d', '--target-dir', 'Directory to build'
15
18
  bool_opt '--open', 'Show the result.'
16
19
  end
17
20
 
18
- def run
19
- start_banner
20
- build.perform
21
- open
22
- end
23
-
24
21
  private
25
22
 
26
23
  # @return [Avm::EacAsciidoctorBase0::Instances::Build]
@@ -43,6 +40,13 @@ module Avm
43
40
  build.root_document.body_target_path
44
41
  end
45
42
 
43
+ # @return [void]
44
+ def run_without_rescue
45
+ start_banner
46
+ build.perform
47
+ open
48
+ end
49
+
46
50
  def start_banner
47
51
  runner_context.call(:source_banner)
48
52
  infov 'Target directory', build.target_directory
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/eac_asciidoctor_base0/sources/runners/ignore_errors_option'
3
4
  require 'os'
4
5
  require 'eac_cli/core_ext'
5
6
 
@@ -9,11 +10,15 @@ module Avm
9
10
  module Runners
10
11
  class Document
11
12
  class Build
13
+ include ::Avm::EacAsciidoctorBase0::Sources::Runners::IgnoreErrorsOption
14
+
12
15
  runner_with :help do
13
16
  bool_opt '-O', '--open'
14
17
  end
15
18
 
16
- def run
19
+ protected
20
+
21
+ def run_without_rescue
17
22
  %w[build open ending].each { |p| send("run_#{p}") }
18
23
  end
19
24
 
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_asciidoctor_base0/logging/catcher'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module EacAsciidoctorBase0
8
+ module Sources
9
+ module Runners
10
+ module IgnoreErrorsOption
11
+ common_concern do
12
+ acts_as_abstract :run_without_rescue
13
+
14
+ include ::EacCli::Runner
15
+ runner_definition do
16
+ bool_opt '-g', '--ignore-errors'
17
+ end
18
+ end
19
+
20
+ # @return [Boolean]
21
+ delegate :ignore_errors?, to: :parsed
22
+
23
+ # @return [void]
24
+ def run
25
+ catcher_send { run_without_rescue }
26
+ rescue ::Avm::EacAsciidoctorBase0::Logging::Error => e
27
+ fatal_error e
28
+ end
29
+
30
+ protected
31
+
32
+ # @return [Proc]
33
+ def catcher_send(&block)
34
+ if ignore_errors?
35
+ block.call
36
+ else
37
+ ::Avm::EacAsciidoctorBase0::Logging::Catcher.on(&block)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.24.0'
5
+ VERSION = '0.25.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_asciidoctor_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.0
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: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2024-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -57,6 +57,9 @@ dependencies:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0.18'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.18.1
60
63
  type: :runtime
61
64
  prerelease: false
62
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -64,34 +67,23 @@ dependencies:
64
67
  - - "~>"
65
68
  - !ruby/object:Gem::Version
66
69
  version: '0.18'
67
- - !ruby/object:Gem::Dependency
68
- name: eac_ruby_gem_support
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '0.10'
74
- type: :runtime
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
70
+ - - ">="
79
71
  - !ruby/object:Gem::Version
80
- version: '0.10'
72
+ version: 0.18.1
81
73
  - !ruby/object:Gem::Dependency
82
74
  name: eac_ruby_utils
83
75
  requirement: !ruby/object:Gem::Requirement
84
76
  requirements:
85
77
  - - "~>"
86
78
  - !ruby/object:Gem::Version
87
- version: '0.122'
79
+ version: '0.123'
88
80
  type: :runtime
89
81
  prerelease: false
90
82
  version_requirements: !ruby/object:Gem::Requirement
91
83
  requirements:
92
84
  - - "~>"
93
85
  - !ruby/object:Gem::Version
94
- version: '0.122'
86
+ version: '0.123'
95
87
  - !ruby/object:Gem::Dependency
96
88
  name: os
97
89
  requirement: !ruby/object:Gem::Requirement
@@ -126,34 +118,20 @@ dependencies:
126
118
  - - "~>"
127
119
  - !ruby/object:Gem::Version
128
120
  version: '3.30'
129
- - !ruby/object:Gem::Dependency
130
- name: eac_fs
131
- requirement: !ruby/object:Gem::Requirement
132
- requirements:
133
- - - "~>"
134
- - !ruby/object:Gem::Version
135
- version: '0.16'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- requirements:
140
- - - "~>"
141
- - !ruby/object:Gem::Version
142
- version: '0.16'
143
121
  - !ruby/object:Gem::Dependency
144
122
  name: eac_ruby_gem_support
145
123
  requirement: !ruby/object:Gem::Requirement
146
124
  requirements:
147
125
  - - "~>"
148
126
  - !ruby/object:Gem::Version
149
- version: '0.9'
127
+ version: '0.10'
150
128
  type: :development
151
129
  prerelease: false
152
130
  version_requirements: !ruby/object:Gem::Requirement
153
131
  requirements:
154
132
  - - "~>"
155
133
  - !ruby/object:Gem::Version
156
- version: '0.9'
134
+ version: '0.10'
157
135
  description:
158
136
  email:
159
137
  executables: []
@@ -199,6 +177,7 @@ files:
199
177
  - lib/avm/eac_asciidoctor_base0/sources/runners/document.rb
200
178
  - lib/avm/eac_asciidoctor_base0/sources/runners/document/build.rb
201
179
  - lib/avm/eac_asciidoctor_base0/sources/runners/documents.rb
180
+ - lib/avm/eac_asciidoctor_base0/sources/runners/ignore_errors_option.rb
202
181
  - lib/avm/eac_asciidoctor_base0/version.rb
203
182
  - template/avm/eac_asciidoctor_base0/instances/deploy/.keep
204
183
  - template/avm/eac_asciidoctor_base0/source_generators/base/content/body.adoc