eac_tools 0.16.1 → 0.19.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 +27 -15
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +24 -0
- data/sub/avm/lib/avm/entries/uri_builder.rb +85 -0
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +6 -9
- data/sub/avm/lib/avm/instances/base/auto_values.rb +2 -8
- data/sub/avm/lib/avm/instances/entry_keys.rb +1 -1
- data/sub/avm/lib/avm/registry/source_generators.rb +3 -2
- data/sub/avm/lib/avm/source_generators/base.rb +16 -1
- data/sub/avm/lib/avm/source_generators/option.rb +11 -0
- data/sub/avm/lib/avm/source_generators/option_list.rb +32 -0
- data/sub/avm/lib/avm/source_generators/runner.rb +52 -0
- data/sub/avm/lib/avm/sources/runner.rb +38 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +18 -1
- data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +6 -0
- data/sub/avm/spec/lib/avm/sources/runner_spec.rb +9 -0
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/instances/base.rb +12 -0
- data/sub/{avm-tools/lib/avm/rails.rb → avm-eac_generic_base0/lib/avm/eac_generic_base0/instances.rb} +4 -2
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
- data/sub/avm-eac_latex_base0/Gemfile +8 -0
- data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +20 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/apache_host.rb +19 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/base.rb +13 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/deploy.rb +38 -0
- data/sub/{avm-tools/lib/avm/ruby/bundler.rb → avm-eac_latex_base0/lib/avm/eac_latex_base0/instances.rb} +2 -2
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/base.rb +44 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/chapters_content.rb +49 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/commons.rb +16 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/copy_files.rb +45 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/file/base_stereotype.rb +23 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/file/chapter_index.rb +27 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/file/tex_source.rb +37 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build/file.rb +49 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/build.rb +119 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/runners/build_chapters.rb +43 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/runners/build_single.rb +33 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/runners/info.rb +32 -0
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/sources/runners.rb +13 -0
- data/sub/{avm-tools/lib/avm/ruby/gems.rb → avm-eac_latex_base0/lib/avm/eac_latex_base0/sources.rb} +2 -2
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +7 -0
- data/sub/{avm-tools/lib/avm/ruby.rb → avm-eac_latex_base0/lib/avm/eac_latex_base0.rb} +1 -1
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/dashed-mygem → avm-eac_latex_base0}/spec/rubocop_spec.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/dashed-mygem → avm-eac_latex_base0}/spec/spec_helper.rb +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/all.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/ebook.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/images.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/links.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/portuguese.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/source_code/java.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/source_code.tex +0 -0
- data/sub/{avm-tools/template/avm/eac_writings_base0 → avm-eac_latex_base0/template/avm/eac_latex_base0/sources/build}/commons/utils.tex +0 -0
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
- data/sub/{avm-tools/lib/avm/ruby/gems/generator.rb → avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators/base.rb} +27 -16
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/source_generators.rb +11 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb +84 -0
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec.rb → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec.rb} +8 -6
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem/Gemfile +8 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/dashed-mygem/dashed-mygem.gemspec +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/dashed-mygem/lib/dashed/mygem/version.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/dashed-mygem/lib/dashed/mygem.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/mygem → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem}/spec/rubocop_spec.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/mygem → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/dashed-mygem}/spec/spec_helper.rb +0 -0
- data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem/Gemfile +8 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/mygem/lib/mygem/version.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/mygem/lib/mygem.rb +0 -0
- data/sub/{avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files}/mygem/mygem.gemspec +0 -0
- data/sub/{avm-tools/template/avm/ruby/gems/generator/static → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem}/spec/rubocop_spec.rb +0 -0
- data/sub/{avm-tools/template/avm/ruby/gems/generator/static → avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/source_generators/base_spec_files/mygem}/spec/spec_helper.rb +0 -0
- data/sub/{avm-tools/template/avm/ruby/gems/generator → avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base}/gemspec.template +0 -0
- data/sub/{avm-tools/template/avm/ruby/gems/generator → avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base}/root_lib.template +0 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/Gemfile +8 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base/static/spec/spec_helper.rb +4 -0
- data/sub/{avm-tools/template/avm/ruby/gems/generator → avm-eac_ruby_base1/template/avm/eac_ruby_base1/source_generators/base}/version.template +0 -0
- data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +1 -0
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb +2 -2
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
- data/sub/avm-eac_wordpress_base0/spec/lib/avm/eac_wordpress_base0/instances/apache_host_spec.rb +4 -3
- data/sub/avm-tools/avm-tools.gemspec +1 -1
- data/sub/avm-tools/lib/avm/tools/runner/app_src.rb +4 -14
- data/sub/avm-tools/lib/avm/tools/runner/source_generate.rb +2 -35
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri/query_value.rb +37 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable/uri.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/addressable.rb +4 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/addressable/uri/query_value_spec.rb +25 -0
- metadata +111 -71
- data/sub/avm/lib/avm/instances/base/auto_values/system.rb +0 -23
- data/sub/avm-tools/lib/avm/eac_writings_base0/apache_host.rb +0 -17
- data/sub/avm-tools/lib/avm/eac_writings_base0/commons.rb +0 -12
- data/sub/avm-tools/lib/avm/eac_writings_base0/deploy.rb +0 -36
- data/sub/avm-tools/lib/avm/eac_writings_base0/file_build/base_stereotype.rb +0 -19
- data/sub/avm-tools/lib/avm/eac_writings_base0/file_build/chapter_index.rb +0 -23
- data/sub/avm-tools/lib/avm/eac_writings_base0/file_build/tex_source.rb +0 -33
- data/sub/avm-tools/lib/avm/eac_writings_base0/file_build.rb +0 -45
- data/sub/avm-tools/lib/avm/eac_writings_base0/instance.rb +0 -11
- data/sub/avm-tools/lib/avm/eac_writings_base0/project.rb +0 -33
- data/sub/avm-tools/lib/avm/eac_writings_base0/project_build/chapters_content.rb +0 -47
- data/sub/avm-tools/lib/avm/eac_writings_base0/project_build/copy_files.rb +0 -42
- data/sub/avm-tools/lib/avm/eac_writings_base0/project_build.rb +0 -117
- data/sub/avm-tools/lib/avm/eac_writings_base0.rb +0 -9
- data/sub/avm-tools/lib/avm/tools/runner/app_src/eac_writings_base0/build_chapters.rb +0 -45
- data/sub/avm-tools/lib/avm/tools/runner/app_src/eac_writings_base0/build_single.rb +0 -35
- data/sub/avm-tools/lib/avm/tools/runner/app_src/eac_writings_base0/info.rb +0 -34
- data/sub/avm-tools/lib/avm/tools/runner/app_src/eac_writings_base0.rb +0 -33
- data/sub/avm-tools/lib/avm/tools/runner/eac_writings_base0.rb +0 -14
- data/sub/avm-tools/lib/avm/tools/runner/ruby/gems/generate.rb +0 -39
- data/sub/avm-tools/lib/avm/tools/runner/ruby/gems.rb +0 -19
- data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/dashed-mygem/Gemfile +0 -5
- data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/dashed-mygem/Gemfile.lock +0 -1
- data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/mygem/Gemfile +0 -5
- data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/mygem/Gemfile.lock +0 -1
- data/sub/avm-tools/template/avm/ruby/gems/generator/static/Gemfile +0 -5
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module EacWritingsBase0
|
5
|
-
class ProjectBuild
|
6
|
-
class << self
|
7
|
-
def chapter_filename(chapter_name)
|
8
|
-
"chapter_#{chapter_name}"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
module ChaptersContent
|
13
|
-
private
|
14
|
-
|
15
|
-
def chapter
|
16
|
-
options[:chapter]
|
17
|
-
end
|
18
|
-
|
19
|
-
def chapter_filename(chapter_name)
|
20
|
-
::Avm::EacWritingsBase0::ProjectBuild.chapter_filename(chapter_name)
|
21
|
-
end
|
22
|
-
|
23
|
-
def check_chapter
|
24
|
-
return unless chapter
|
25
|
-
return if project.chapters.include?(chapter)
|
26
|
-
|
27
|
-
fatal_error("Chapter not found: \"#{chapter}\" (List: #{project.chapters})")
|
28
|
-
end
|
29
|
-
|
30
|
-
def include_content
|
31
|
-
main_path = source_temp_dir.join('main.tex')
|
32
|
-
main_path.write(main_path.read.gsub(CONTENT_VAR, include_chapters_content))
|
33
|
-
end
|
34
|
-
|
35
|
-
def include_chapters_content
|
36
|
-
r = chapters_content
|
37
|
-
r = "\\maketitle\n\n#{r}" if chapter.blank?
|
38
|
-
r
|
39
|
-
end
|
40
|
-
|
41
|
-
def chapters_content
|
42
|
-
project.chapters.map { |c| "\\include{#{chapter_filename(c)}}" }.join("\n")
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_writings_base0/commons'
|
4
|
-
require 'avm/eac_writings_base0/file_build'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacWritingsBase0
|
8
|
-
class ProjectBuild
|
9
|
-
module CopyFiles
|
10
|
-
def copy_project_files
|
11
|
-
copy_project_dir('.')
|
12
|
-
end
|
13
|
-
|
14
|
-
def copy_project_obj(subpath)
|
15
|
-
return if File.basename(subpath).start_with?('.')
|
16
|
-
|
17
|
-
if File.directory?(File.join(project.root, subpath))
|
18
|
-
copy_project_dir(subpath)
|
19
|
-
else
|
20
|
-
copy_project_file(subpath)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def copy_project_file(subpath)
|
25
|
-
::Avm::EacWritingsBase0::FileBuild.new(project, subpath).build_to_dir(source_temp_dir)
|
26
|
-
end
|
27
|
-
|
28
|
-
def copy_project_dir(subpath)
|
29
|
-
Dir.entries(File.join(project.root, subpath)).each do |f|
|
30
|
-
copy_project_obj(File.join(subpath, f))
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def copy_commons_files
|
35
|
-
target_dir = source_temp_dir.join('commons')
|
36
|
-
target_dir.mkpath
|
37
|
-
::Avm::EacWritingsBase0::Commons.instance.template.apply(self, target_dir)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,117 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/executables'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
require 'eac_ruby_utils/fs/temp'
|
6
|
-
require 'eac_ruby_utils/fs/clearable_directory'
|
7
|
-
|
8
|
-
module Avm
|
9
|
-
module EacWritingsBase0
|
10
|
-
class ProjectBuild
|
11
|
-
require_sub __FILE__, include_modules: true
|
12
|
-
enable_speaker
|
13
|
-
|
14
|
-
CONTENT_VAR = '%%%CONTENT%%%'
|
15
|
-
|
16
|
-
common_constructor :project, :options do
|
17
|
-
run
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
attr_reader :source_temp_dir
|
23
|
-
|
24
|
-
def run
|
25
|
-
start_banner
|
26
|
-
check_chapter
|
27
|
-
build
|
28
|
-
success('Done!')
|
29
|
-
end
|
30
|
-
|
31
|
-
def start_banner
|
32
|
-
infov('Chapter', chapter)
|
33
|
-
infov('Output file', output_file)
|
34
|
-
end
|
35
|
-
|
36
|
-
def build
|
37
|
-
on_temp_source_dir do
|
38
|
-
copy_project_files
|
39
|
-
copy_commons_files
|
40
|
-
include_content
|
41
|
-
compile
|
42
|
-
check
|
43
|
-
move_output_to_target
|
44
|
-
open_output
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def check
|
49
|
-
return if ::File.size(temp_output_file).positive?
|
50
|
-
|
51
|
-
fatal_error("Zero-size file builded: #{temp_output_file}")
|
52
|
-
end
|
53
|
-
|
54
|
-
def compile
|
55
|
-
compile_command.execute!.each_line do |line|
|
56
|
-
if line.include?('No file')
|
57
|
-
raise 'Command returned without error, but there is at least one "No file" line in' \
|
58
|
-
"log: #{line}"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def compile_command
|
64
|
-
::Avm::Executables.latex.command(*compile_command_args).chdir(source_temp_dir)
|
65
|
-
end
|
66
|
-
|
67
|
-
def compile_command_args
|
68
|
-
r = ["-output-director=#{build_dir}", '-output-format=pdf',
|
69
|
-
'-interaction=nonstopmode', '-halt-on-error', '-file-line-error']
|
70
|
-
r << if chapter.present?
|
71
|
-
"\\includeonly{#{chapter_filename(chapter)}}\\input{main.tex}"
|
72
|
-
else
|
73
|
-
'./main.tex'
|
74
|
-
end
|
75
|
-
r
|
76
|
-
end
|
77
|
-
|
78
|
-
def move_output_to_target
|
79
|
-
File.rename(temp_output_file, output_file)
|
80
|
-
infov('Size', ::Filesize.from("#{File.size(output_file)} B").pretty)
|
81
|
-
end
|
82
|
-
|
83
|
-
def temp_output_file
|
84
|
-
File.join(build_dir, 'main.pdf')
|
85
|
-
end
|
86
|
-
|
87
|
-
def on_temp_source_dir
|
88
|
-
if options[:source_dir].present?
|
89
|
-
@source_temp_dir = ::EacRubyUtils::Fs::ClearableDirectory.new(options.source_dir).clear
|
90
|
-
yield
|
91
|
-
else
|
92
|
-
::EacRubyUtils::Fs::Temp.on_directory do |directory|
|
93
|
-
@source_temp_dir = directory
|
94
|
-
yield
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def build_dir
|
100
|
-
r = project.root.join('build')
|
101
|
-
r.mkpath
|
102
|
-
r
|
103
|
-
end
|
104
|
-
|
105
|
-
def output_file
|
106
|
-
(options[:output_file] || project.default_output_file)
|
107
|
-
end
|
108
|
-
|
109
|
-
def open_output
|
110
|
-
return unless options[:open]
|
111
|
-
|
112
|
-
infom("Opening \"#{output_file}\"")
|
113
|
-
::Avm::Executables.xdg_open.command(output_file).system!
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_writings_base0/project_build'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class AppSrc
|
10
|
-
class EacWritingsBase0
|
11
|
-
class BuildChapters
|
12
|
-
runner_with :help do
|
13
|
-
arg_opt '-o', '--output-dir', 'Output chapters to specific directory.'
|
14
|
-
end
|
15
|
-
|
16
|
-
def run
|
17
|
-
runner_context.call(:project_banner)
|
18
|
-
output_dir.mkpath
|
19
|
-
project.chapters.each_with_index do |c, i|
|
20
|
-
::Avm::EacWritingsBase0::ProjectBuild.new(project, chapter_build_options(c, i))
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def chapter_build_options(chapter, index)
|
27
|
-
output_name = "#{(index + 1).to_s.rjust(3, '0')}_#{chapter}.pdf"
|
28
|
-
{ output_file: output_dir.join(output_name), chapter: chapter }
|
29
|
-
end
|
30
|
-
|
31
|
-
def output_dir_uncached
|
32
|
-
(
|
33
|
-
parsed.output_dir || project.default_output_dir.join('chapters')
|
34
|
-
).to_pathname
|
35
|
-
end
|
36
|
-
|
37
|
-
def project
|
38
|
-
runner_context.call(:project)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_writings_base0/project_build'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class AppSrc
|
10
|
-
class EacWritingsBase0
|
11
|
-
class BuildSingle
|
12
|
-
runner_with :help do
|
13
|
-
arg_opt '-s', '--source-dir', 'Write .tex source code in specific directory.'
|
14
|
-
arg_opt '-f', '--output-file', 'Output to specific file.'
|
15
|
-
arg_opt '-c', '--chapter', 'Write only the chapter <chapter>.'
|
16
|
-
bool_opt '-o', '--open', 'Open the file after build.'
|
17
|
-
end
|
18
|
-
|
19
|
-
def run
|
20
|
-
runner_context.call(:project_banner)
|
21
|
-
infov 'Build options', build_options
|
22
|
-
::Avm::EacWritingsBase0::ProjectBuild.new(runner_context.call(:project), parsed)
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def build_options
|
28
|
-
parsed.slice_fetch(:output_file, :open, :chapter, :source_dir)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_writings_base0/project_build'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class AppSrc
|
10
|
-
class EacWritingsBase0
|
11
|
-
class Info
|
12
|
-
runner_with :help do
|
13
|
-
desc 'Information about a loca EacRailsBase0 local project.'
|
14
|
-
end
|
15
|
-
|
16
|
-
def run
|
17
|
-
runner_context.call(:project_banner)
|
18
|
-
infov 'Chapters', project.chapters.count
|
19
|
-
project.chapters.each_with_index do |chapter, index|
|
20
|
-
infov " * #{index + 1}", chapter
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def project
|
27
|
-
runner_context.call(:project)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_writings_base0/project'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class AppSrc
|
10
|
-
class EacWritingsBase0
|
11
|
-
require_sub __FILE__
|
12
|
-
enable_simple_cache
|
13
|
-
|
14
|
-
runner_with :help, :subcommands do
|
15
|
-
desc 'EacWritingsBase0 utitilies for local projects.'
|
16
|
-
subcommands
|
17
|
-
end
|
18
|
-
|
19
|
-
def project_banner
|
20
|
-
infov 'Project', project.name
|
21
|
-
infov 'Path', project.root
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def project_uncached
|
27
|
-
::Avm::EacWritingsBase0::Project.new(runner_context.call(:instance_path))
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_webapp_base0/runner'
|
4
|
-
require 'avm/eac_writings_base0'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class EacWritingsBase0 < ::Avm::EacWebappBase0::Runner
|
10
|
-
require_sub __FILE__
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/ruby/gems/generator'
|
4
|
-
require 'eac_cli/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class Ruby
|
10
|
-
class Gems
|
11
|
-
class Generate
|
12
|
-
runner_with :help do
|
13
|
-
desc 'Create a gem.'
|
14
|
-
arg_opt '--eac-ruby-utils-version', 'Version for "eac_ruby_utils" gem.'
|
15
|
-
arg_opt '--eac-ruby-gem-support-version', 'Version for "eac_ruby_gem_support" gem.'
|
16
|
-
pos_arg :path
|
17
|
-
end
|
18
|
-
|
19
|
-
def run
|
20
|
-
success "Gem \"#{generator.name}\" created in \"#{generator.root_directory}\""
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def generator_uncached
|
26
|
-
::Avm::Ruby::Gems::Generator.new(parsed.path, generator_options)
|
27
|
-
end
|
28
|
-
|
29
|
-
def generator_options
|
30
|
-
%w[eac_ruby_utils eac_ruby_gem_support].map do |gem_name|
|
31
|
-
["#{gem_name}_version".to_sym, parsed.fetch("#{gem_name.variableize}_version")]
|
32
|
-
end.to_h
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class Ruby
|
9
|
-
class Gems
|
10
|
-
require_sub __FILE__
|
11
|
-
runner_with :help, :subcommands do
|
12
|
-
desc 'Rubygems utilities for AVM.'
|
13
|
-
subcommands
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/dashed-mygem/Gemfile.lock
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
TRUNCATED
|
data/sub/avm-tools/spec/lib/avm/tools/runner/ruby/gems/generate_spec_files/mygem/Gemfile.lock
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
TRUNCATED
|