avm-tools 0.126.0 → 0.129.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/tools/runner/source_generate.rb +45 -0
  3. data/lib/avm/tools/version.rb +1 -1
  4. metadata +5 -50
  5. data/lib/avm/eac_wordpress_base0/apache_host.rb +0 -25
  6. data/lib/avm/eac_wordpress_base0/deploy.rb +0 -10
  7. data/lib/avm/eac_wordpress_base0/instance.rb +0 -24
  8. data/lib/avm/eac_wordpress_base0.rb +0 -9
  9. data/lib/avm/tools/runner/app_src/eac_asciidoctor_base0/build.rb +0 -56
  10. data/lib/avm/tools/runner/app_src/eac_asciidoctor_base0.rb +0 -14
  11. data/lib/avm/tools/runner/eac_asciidoctor_base0.rb +0 -14
  12. data/lib/avm/tools/runner/eac_wordpress_base0.rb +0 -15
  13. data/sub/avm-eac_asciidoctor_base0/Gemfile +0 -5
  14. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +0 -22
  15. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/apache_host.rb +0 -17
  16. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/apache_path.rb +0 -10
  17. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/deploy.rb +0 -26
  18. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instance.rb +0 -11
  19. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb +0 -16
  20. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build/file.rb +0 -30
  21. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build.rb +0 -49
  22. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner/build.rb +0 -54
  23. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner.rb +0 -30
  24. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources.rb +0 -11
  25. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +0 -7
  26. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0.rb +0 -9
  27. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb +0 -7
  28. data/sub/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb +0 -3
  29. data/sub/avm-eac_asciidoctor_base0/spec/spec_helper.rb +0 -4
  30. data/template/avm/eac_wordpress_base0/deploy/wp-config.php.template +0 -90
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ca5230a46a057172eeb3466c0a663732ce38a3619ed6969629ed9f490ada86f
4
- data.tar.gz: fe8d5b1796b9d427ab3642607785e8eb911f81266295f35238858469a679394c
3
+ metadata.gz: 13289ba2478f5a9021fbdee9cc58c8bb60f21f422b1dba4d04142585ec0617f4
4
+ data.tar.gz: cc996031a9af437291d47931d8f96f91c4bdf21d3ead9d3beb75df28b541e057
5
5
  SHA512:
6
- metadata.gz: abe3b7dbe5b630ff0fb2ac15e867139728d08aedc24df9f46401222b093ec2c7d948f0bced59cf99ff960aaa169e1b46f86344fc1ea86a9331d2af395ad3a43c
7
- data.tar.gz: b4334483e8cf90a20d72ebb3efc4c3fa35d83a8ccd37f3b03176ab640706b0ae61699d214c45bb010d7c76512ae1c52de06d3a584ca418281df43017ee0a3c35
6
+ metadata.gz: 4e54e4bce526bead624b2ce78780a1227a254676323ce5d2eaa6d17a1852cb6ece000205d9d65406db859839613df870161cfd8322933c01620cafbf2ac14ee7
7
+ data.tar.gz: a764d26c324c0621e96ded2ec32aa3263be949f8257a1f099d36b172d20352ace8e43da3311cb9459f2b8ae741556b9770e6a7c45ecb01070cdf3f207b1235ca
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/runners/base'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module Tools
8
+ class Runner
9
+ class SourceGenerate
10
+ runner_with :help do
11
+ pos_arg :stereotype_name
12
+ pos_arg :target_path
13
+ end
14
+
15
+ def run
16
+ start_banner
17
+ generate
18
+ end
19
+
20
+ def generate
21
+ infom 'Generating...'
22
+ generator.perform
23
+ success "Source generated in \"#{generator.target_path}\""
24
+ end
25
+
26
+ def start_banner
27
+ infov 'Stereotype', stereotype_name
28
+ infov 'Target path', target_path
29
+ infov 'Generator', generator.class
30
+ end
31
+
32
+ def generator_uncached
33
+ ::Avm::Registry.source_generators.detect_optional(stereotype_name, target_path) ||
34
+ fatal_error("No generator found for stereotype \"#{stereotype_name}\"")
35
+ end
36
+
37
+ delegate :stereotype_name, to: :parsed
38
+
39
+ def target_path
40
+ parsed.target_path.to_pathname
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.126.0'
5
+ VERSION = '0.129.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.126.0
4
+ version: 0.129.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -30,34 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.27'
33
+ version: '0.30'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.27'
41
- - !ruby/object:Gem::Dependency
42
- name: avm-eac_asciidoctor_base0
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.3'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 0.3.4
51
- type: :runtime
52
- prerelease: false
53
- version_requirements: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - "~>"
56
- - !ruby/object:Gem::Version
57
- version: '0.3'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 0.3.4
40
+ version: '0.30'
61
41
  - !ruby/object:Gem::Dependency
62
42
  name: avm-eac_ruby_base1
63
43
  requirement: !ruby/object:Gem::Requirement
@@ -232,10 +212,6 @@ files:
232
212
  - Gemfile
233
213
  - exe/avm
234
214
  - lib/avm.rb
235
- - lib/avm/eac_wordpress_base0.rb
236
- - lib/avm/eac_wordpress_base0/apache_host.rb
237
- - lib/avm/eac_wordpress_base0/deploy.rb
238
- - lib/avm/eac_wordpress_base0/instance.rb
239
215
  - lib/avm/eac_writings_base0.rb
240
216
  - lib/avm/eac_writings_base0/apache_host.rb
241
217
  - lib/avm/eac_writings_base0/commons.rb
@@ -319,8 +295,6 @@ files:
319
295
  - lib/avm/tools/core_ext.rb
320
296
  - lib/avm/tools/runner.rb
321
297
  - lib/avm/tools/runner/app_src.rb
322
- - lib/avm/tools/runner/app_src/eac_asciidoctor_base0.rb
323
- - lib/avm/tools/runner/app_src/eac_asciidoctor_base0/build.rb
324
298
  - lib/avm/tools/runner/app_src/eac_writings_base0.rb
325
299
  - lib/avm/tools/runner/app_src/eac_writings_base0/build_chapters.rb
326
300
  - lib/avm/tools/runner/app_src/eac_writings_base0/build_single.rb
@@ -341,9 +315,7 @@ files:
341
315
  - lib/avm/tools/runner/application_stereotypes/list.rb
342
316
  - lib/avm/tools/runner/config.rb
343
317
  - lib/avm/tools/runner/config/load_path.rb
344
- - lib/avm/tools/runner/eac_asciidoctor_base0.rb
345
318
  - lib/avm/tools/runner/eac_webapp_base0.rb
346
- - lib/avm/tools/runner/eac_wordpress_base0.rb
347
319
  - lib/avm/tools/runner/eac_writings_base0.rb
348
320
  - lib/avm/tools/runner/files.rb
349
321
  - lib/avm/tools/runner/files/format.rb
@@ -372,27 +344,11 @@ files:
372
344
  - lib/avm/tools/runner/self.rb
373
345
  - lib/avm/tools/runner/self/docker.rb
374
346
  - lib/avm/tools/runner/self/registry.rb
347
+ - lib/avm/tools/runner/source_generate.rb
375
348
  - lib/avm/tools/self.rb
376
349
  - lib/avm/tools/version.rb
377
350
  - locale/en.yml
378
351
  - locale/pt-BR.yml
379
- - sub/avm-eac_asciidoctor_base0/Gemfile
380
- - sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec
381
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0.rb
382
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/apache_host.rb
383
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/apache_path.rb
384
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/deploy.rb
385
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instance.rb
386
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources.rb
387
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/base.rb
388
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build.rb
389
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/build/file.rb
390
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner.rb
391
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/sources/runner/build.rb
392
- - sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb
393
- - sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb
394
- - sub/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb
395
- - sub/avm-eac_asciidoctor_base0/spec/spec_helper.rb
396
352
  - sub/avm-eac_postgresql_base0/Gemfile
397
353
  - sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec
398
354
  - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb
@@ -781,7 +737,6 @@ files:
781
737
  - sub/eac_templates/spec/lib/object/template_spec_files/path/my_stub_with_template
782
738
  - sub/eac_templates/spec/rubocop_spec.rb
783
739
  - sub/eac_templates/spec/spec_helper.rb
784
- - template/avm/eac_wordpress_base0/deploy/wp-config.php.template
785
740
  - template/avm/eac_writings_base0/commons/all.tex
786
741
  - template/avm/eac_writings_base0/commons/ebook.tex
787
742
  - template/avm/eac_writings_base0/commons/images.tex
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/apache_host'
4
-
5
- module Avm
6
- module EacWordpressBase0
7
- class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
8
- def document_root
9
- instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
10
- end
11
-
12
- def extra_content
13
- "AssignUserID #{system_user} #{system_group}"
14
- end
15
-
16
- def system_user
17
- instance.read_entry('system.username')
18
- end
19
-
20
- def system_group
21
- instance.read_entry('system.groupname')
22
- end
23
- end
24
- end
25
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/deploy'
4
-
5
- module Avm
6
- module EacWordpressBase0
7
- class Deploy < ::Avm::EacWebappBase0::Deploy
8
- end
9
- end
10
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/instances/entry_keys'
4
- require 'avm/eac_webapp_base0/instance'
5
-
6
- module Avm
7
- module EacWordpressBase0
8
- class Instance < ::Avm::EacWebappBase0::Instance
9
- FILES_UNITS = { uploads: 'wp-content/uploads', themes: 'wp-content/themes' }.freeze
10
-
11
- def database_unit
12
- web_url = read_entry(::Avm::Instances::EntryKeys::WEB_URL)
13
- super.after_load do
14
- info 'Fixing web addresses...'
15
- run_sql(<<~SQL)
16
- update wp_options
17
- set option_value = '#{web_url}'
18
- where option_name in ('siteurl', 'home')
19
- SQL
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacWordpressBase0
7
- require_sub __FILE__
8
- end
9
- end
@@ -1,56 +0,0 @@
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 Tools
9
- class Runner
10
- class AppSrc
11
- class EacAsciidoctorBase0
12
- class Build
13
- runner_with :help do
14
- desc 'Build the project'
15
- arg_opt '-d', '--target-dir', 'Directory to build'
16
- bool_opt '--open', 'Show the result.'
17
- end
18
-
19
- def run
20
- start_banner
21
- build.run
22
- open
23
- end
24
-
25
- private
26
-
27
- def build_uncached
28
- ::Avm::EacAsciidoctorBase0::Sources::Build.new(runner_context.call(:project),
29
- target_directory: parsed.target_dir)
30
- end
31
-
32
- def default_target_directory
33
- runner_context.call(:project).root.join('build')
34
- end
35
-
36
- def open
37
- return unless parsed.open?
38
-
39
- infom "Opening \"#{open_path}\"..."
40
- ::EacRubyUtils::Envs.local.command(OS.open_file_command, open_path).system!
41
- end
42
-
43
- def open_path
44
- build.source_files.first.target_path
45
- end
46
-
47
- def start_banner
48
- runner_context.call(:project_banner)
49
- infov 'Target directory', build.target_directory
50
- end
51
- end
52
- end
53
- end
54
- end
55
- end
56
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_asciidoctor_base0/sources/runner'
4
-
5
- module Avm
6
- module Tools
7
- class Runner
8
- class AppSrc
9
- class EacAsciidoctorBase0 < ::Avm::EacAsciidoctorBase0::Sources::Runner
10
- end
11
- end
12
- end
13
- end
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
- require 'avm/eac_asciidoctor_base0'
5
-
6
- module Avm
7
- module Tools
8
- class Runner
9
- class EacAsciidoctorBase0 < ::Avm::EacWebappBase0::Runner
10
- require_sub __FILE__
11
- end
12
- end
13
- end
14
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
- require 'avm/eac_wordpress_base0'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module Tools
9
- class Runner
10
- class EacWordpressBase0 < ::Avm::EacWebappBase0::Runner
11
- require_sub __FILE__
12
- end
13
- end
14
- end
15
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
@@ -1,22 +0,0 @@
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}/**/*']
14
-
15
- s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.12'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.2'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.63'
18
- s.add_dependency 'os'
19
- s.add_dependency 'rouge', '~> 3.26'
20
-
21
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
22
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/apache_host'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
8
- def document_root
9
- instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
10
- end
11
-
12
- def extra_content
13
- ''
14
- end
15
- end
16
- end
17
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/apache_path'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- class ApachePath < ::Avm::EacWebappBase0::ApachePath
8
- end
9
- end
10
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/deploy'
4
- require 'avm/eac_asciidoctor_base0/sources/base'
5
- require 'avm/eac_asciidoctor_base0/sources/build'
6
-
7
- module Avm
8
- module EacAsciidoctorBase0
9
- class Deploy < ::Avm::EacWebappBase0::Deploy
10
- def build_content
11
- ::Avm::EacAsciidoctorBase0::Sources::Build.new(
12
- project,
13
- ::Avm::EacAsciidoctorBase0::Sources::Build::OPTION_TARGET_DIRECTORY => build_dir
14
- ).run
15
- end
16
-
17
- private
18
-
19
- def project_uncached
20
- ::Avm::EacAsciidoctorBase0::Sources::Base.new(
21
- instance.source_instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
22
- )
23
- end
24
- end
25
- end
26
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/instance'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- class Instance < ::Avm::EacWebappBase0::Instance
8
- FILES_UNITS = {}.freeze
9
- end
10
- end
11
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/sources/base'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacAsciidoctorBase0
8
- module Sources
9
- class Base < ::Avm::EacWebappBase0::Sources::Base
10
- def valid?
11
- false
12
- end
13
- end
14
- end
15
- end
16
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'asciidoctor'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- module Sources
8
- class Build
9
- class File
10
- enable_speaker
11
- common_constructor :build, :subpath
12
-
13
- def run
14
- infov 'Building', subpath
15
- ::Asciidoctor.convert_file source_path.to_path,
16
- to_file: target_path.to_path, safe: :unsafe, mkdirs: true
17
- end
18
-
19
- def source_path
20
- build.project.path.join(subpath)
21
- end
22
-
23
- def target_path
24
- build.target_directory.join(subpath).basename_sub('.*') { |b| "#{b}.html" }
25
- end
26
- end
27
- end
28
- end
29
- end
30
- end
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_ruby_utils/fs/clearable_directory'
5
-
6
- module Avm
7
- module EacAsciidoctorBase0
8
- module Sources
9
- class Build
10
- require_sub __FILE__
11
- enable_speaker
12
- enable_simple_cache
13
- enable_listable
14
- lists.add_symbol :option, :target_directory
15
- common_constructor :project, :options, default: [{}] do
16
- self.options = self.class.lists.option.hash_keys_validate!(options.symbolize_keys)
17
- end
18
-
19
- SOURCE_EXTNAMES = %w[.adoc .asc].freeze
20
-
21
- def run
22
- infov 'Files to build', source_files.count
23
- target_directory.clear
24
- source_files.each(&:run)
25
- end
26
-
27
- def default_target_directory
28
- project.path.join('build')
29
- end
30
-
31
- def target_directory
32
- ::EacRubyUtils::Fs::ClearableDirectory.new(
33
- options[OPTION_TARGET_DIRECTORY] || default_target_directory
34
- )
35
- end
36
-
37
- def source_files_uncached
38
- r = []
39
- project.path.children.each do |child|
40
- next unless SOURCE_EXTNAMES.include?(child.extname)
41
-
42
- r << ::Avm::EacAsciidoctorBase0::Sources::Build::File.new(self, child.basename)
43
- end
44
- r
45
- end
46
- end
47
- end
48
- end
49
- end
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_asciidoctor_base0/sources/build'
4
- require 'eac_ruby_base0/core_ext'
5
- require 'os'
6
-
7
- module Avm
8
- module EacAsciidoctorBase0
9
- module Sources
10
- class Runner
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).path.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
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_asciidoctor_base0/sources/base'
4
- require 'eac_ruby_base0/core_ext'
5
-
6
- module Avm
7
- module EacAsciidoctorBase0
8
- module Sources
9
- class Runner
10
- require_sub __FILE__
11
-
12
- runner_with :help, :subcommands do
13
- desc 'EacAsciidoctorBase0 utitilies for local projects.'
14
- subcommands
15
- end
16
-
17
- def project_banner
18
- infov 'Project', project.application.name
19
- infov 'Path', project.path
20
- end
21
-
22
- private
23
-
24
- def project_uncached
25
- ::Avm::EacAsciidoctorBase0::Sources::Base.new(runner_context.call(:instance_path))
26
- end
27
- end
28
- end
29
- end
30
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- module Sources
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module EacAsciidoctorBase0
5
- VERSION = '0.3.4'
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacAsciidoctorBase0
7
- require_sub __FILE__
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_asciidoctor_base0/sources/base'
4
-
5
- ::RSpec.describe ::Avm::EacAsciidoctorBase0::Sources::Base do
6
- include_examples 'in_avm_registry', 'sources'
7
- end
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/rspec/default_setup'
4
- ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -1,90 +0,0 @@
1
- <?php
2
- /**
3
- * The base configuration for WordPress
4
- *
5
- * The wp-config.php creation script uses this file during the
6
- * installation. You don't have to use the web site, you can
7
- * copy this file to "wp-config.php" and fill in the values.
8
- *
9
- * This file contains the following configurations:
10
- *
11
- * * MySQL settings
12
- * * Secret keys
13
- * * Database table prefix
14
- * * ABSPATH
15
- *
16
- * @link https://codex.wordpress.org/Editing_wp-config.php
17
- *
18
- * @package WordPress
19
- */
20
-
21
- // ** MySQL settings - You can get this info from your web host ** //
22
- /** The name of the database for WordPress */
23
- define( 'DB_NAME', '%%DATABASE.NAME%%' );
24
-
25
- /** MySQL database username */
26
- define( 'DB_USER', '%%DATABASE.USER%%' );
27
-
28
- /** MySQL database password */
29
- define( 'DB_PASSWORD', '%%DATABASE.PASSWORD%%' );
30
-
31
- /** MySQL hostname */
32
- define( 'DB_HOST', 'localhost' );
33
-
34
- /** Database Charset to use in creating database tables. */
35
- define( 'DB_CHARSET', 'utf8' );
36
-
37
- /** The Database Collate type. Don't change this if in doubt. */
38
- define( 'DB_COLLATE', '' );
39
-
40
- /**#@+
41
- * Authentication Unique Keys and Salts.
42
- *
43
- * Change these to different unique phrases!
44
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service
45
- } * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
46
- *
47
- * @since 2.6.0
48
- */
49
- define('AUTH_KEY', '%%AUTH_KEY%%');
50
- define('SECURE_AUTH_KEY', '%%SECURE_AUTH_KEY%%');
51
- define('LOGGED_IN_KEY', '%%LOGGED_IN_KEY%%');
52
- define('NONCE_KEY', '%%NONCE_KEY%%');
53
- define('AUTH_SALT', '%%AUTH_SALT%%');
54
- define('SECURE_AUTH_SALT', '%%SECURE_AUTH_SALT%%');
55
- define('LOGGED_IN_SALT', '%%LOGGED_IN_SALT%%');
56
- define('NONCE_SALT', '%%NONCE_SALT%%');
57
-
58
- /**#@-*/
59
-
60
- /**
61
- * WordPress Database Table prefix.
62
- *
63
- * You can have multiple installations in one database if you give each
64
- * a unique prefix. Only numbers, letters, and underscores please!
65
- */
66
- $table_prefix = 'wp_';
67
-
68
- /**
69
- * For developers: WordPress debugging mode.
70
- *
71
- * Change this to true to enable the display of notices during development.
72
- * It is strongly recommended that plugin and theme developers use WP_DEBUG
73
- * in their development environments.
74
- *
75
- * For information on other constants that can be used for debugging,
76
- * visit the Codex.
77
- *
78
- * @link https://codex.wordpress.org/Debugging_in_WordPress
79
- */
80
- define( 'WP_DEBUG', false );
81
-
82
- /* That's all, stop editing! Happy publishing. */
83
-
84
- /** Absolute path to the WordPress directory. */
85
- if ( ! defined( 'ABSPATH' ) ) {
86
- define( 'ABSPATH', dirname( __FILE__ ) . '/' );
87
- }
88
-
89
- /** Sets up WordPress vars and included files. */
90
- require_once( ABSPATH . 'wp-settings.php' );