avm-eac_asciidoctor_base0 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/eac_asciidoctor_base0/runners/base.rb +13 -0
- data/lib/avm/eac_asciidoctor_base0/runners.rb +11 -0
- data/lib/avm/eac_asciidoctor_base0/sources/runners/build.rb +54 -0
- data/lib/avm/eac_asciidoctor_base0/sources/runners.rb +13 -0
- data/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce0cea77daec015c3e022f662397504a19e1f06a0c62798870ec100ec183b69e
|
4
|
+
data.tar.gz: ccf9f453f6058c454e7d0a351a80b1603da8e763a2633770ea9948f9e771f8bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098edd92c8828b4d18c561ba2bb08a5afbb75e600d3f915d0fb59eda7689a7021798873d38f34adf459349af06be773fa4218ad5ead2f1e97c211cc1b0cb6512'
|
7
|
+
data.tar.gz: 0d4eb13715406bdf40c5d250667bf64ac66cc0cbae72dd0596ea5451bb0f0e280905a93bd43b1cc2c09b4ed813e7156a63c9fe0803e32c183d3aef80b06e5970
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/tools/core_ext'
|
4
|
+
require 'avm/eac_asciidoctor_base0/sources/build'
|
5
|
+
require 'os'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacAsciidoctorBase0
|
9
|
+
module Sources
|
10
|
+
module Runners
|
11
|
+
class Build
|
12
|
+
runner_with :help do
|
13
|
+
desc 'Build the project'
|
14
|
+
arg_opt '-d', '--target-dir', 'Directory to build'
|
15
|
+
bool_opt '--open', 'Show the result.'
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
start_banner
|
20
|
+
build.run
|
21
|
+
open
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def build_uncached
|
27
|
+
::Avm::EacAsciidoctorBase0::Sources::Build.new(runner_context.call(:project),
|
28
|
+
target_directory: parsed.target_dir)
|
29
|
+
end
|
30
|
+
|
31
|
+
def default_target_directory
|
32
|
+
runner_context.call(:project).root.join('build')
|
33
|
+
end
|
34
|
+
|
35
|
+
def open
|
36
|
+
return unless parsed.open?
|
37
|
+
|
38
|
+
infom "Opening \"#{open_path}\"..."
|
39
|
+
::EacRubyUtils::Envs.local.command(OS.open_file_command, open_path).system!
|
40
|
+
end
|
41
|
+
|
42
|
+
def open_path
|
43
|
+
build.source_files.first.target_path
|
44
|
+
end
|
45
|
+
|
46
|
+
def start_banner
|
47
|
+
runner_context.call(:project_banner)
|
48
|
+
infov 'Target directory', build.target_directory
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
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.
|
4
|
+
version: 0.4.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: 2022-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -111,12 +111,16 @@ files:
|
|
111
111
|
- lib/avm/eac_asciidoctor_base0/apache_path.rb
|
112
112
|
- lib/avm/eac_asciidoctor_base0/deploy.rb
|
113
113
|
- lib/avm/eac_asciidoctor_base0/instance.rb
|
114
|
+
- lib/avm/eac_asciidoctor_base0/runners.rb
|
115
|
+
- lib/avm/eac_asciidoctor_base0/runners/base.rb
|
114
116
|
- lib/avm/eac_asciidoctor_base0/sources.rb
|
115
117
|
- lib/avm/eac_asciidoctor_base0/sources/base.rb
|
116
118
|
- lib/avm/eac_asciidoctor_base0/sources/build.rb
|
117
119
|
- lib/avm/eac_asciidoctor_base0/sources/build/file.rb
|
118
120
|
- lib/avm/eac_asciidoctor_base0/sources/runner.rb
|
119
121
|
- lib/avm/eac_asciidoctor_base0/sources/runner/build.rb
|
122
|
+
- lib/avm/eac_asciidoctor_base0/sources/runners.rb
|
123
|
+
- lib/avm/eac_asciidoctor_base0/sources/runners/build.rb
|
120
124
|
- lib/avm/eac_asciidoctor_base0/version.rb
|
121
125
|
homepage:
|
122
126
|
licenses: []
|