eac_tools 0.59.0 → 0.60.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +50 -50
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/aranha-parsers/aranha-parsers.gemspec +2 -5
  5. data/sub/aranha-parsers/lib/aranha/parsers/source_address/hash_http_base.rb +13 -22
  6. data/sub/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +6 -12
  7. data/sub/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  8. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec.rb +32 -0
  9. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.source.yml +6 -0
  10. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.target.yaml +10 -0
  11. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.source.yml +5 -0
  12. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.target.yaml +12 -0
  13. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.source.yml +1 -0
  14. data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.target.yaml +10 -0
  15. data/sub/avm/avm.gemspec +1 -1
  16. data/sub/avm/lib/avm/data/package/build_directory.rb +28 -0
  17. data/sub/avm/lib/avm/data/package/dump.rb +10 -8
  18. data/sub/avm/lib/avm/data/package/load.rb +8 -11
  19. data/sub/avm/lib/avm/data/package.rb +3 -0
  20. data/sub/avm/lib/avm/data/unit.rb +5 -0
  21. data/sub/avm/lib/avm/instances/data/files_unit.rb +8 -1
  22. data/sub/avm/lib/avm/version.rb +1 -1
  23. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -1
  24. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb +0 -1
  25. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/breadcrumbs_macro_value.rb +59 -0
  26. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb +1 -3
  27. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_lines.rb +7 -1
  28. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb +20 -1
  29. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  30. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec.rb +58 -18
  31. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec_files/pre_processed_root_body.adoc +7 -2
  32. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec.rb +4 -20
  33. data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb +1 -6
  34. data/sub/avm-eac_asciidoctor_base0/spec/spec_helper/eac_asciidoctor_base0_stubs.rb +55 -0
  35. data/sub/avm-eac_asciidoctor_base0/spec/spec_helper.rb +3 -0
  36. data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
  37. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/base.rb +0 -1
  38. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
  39. data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +3 -3
  40. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances/base.rb +0 -1
  41. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
  42. data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +2 -2
  43. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +1 -1
  44. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +1 -1
  45. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +1 -1
  46. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +11 -1
  47. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  48. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
  49. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +5 -0
  50. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  51. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  52. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +5 -4
  53. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  54. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  55. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +7 -12
  56. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/{file_unit.rb → setup_files_unit.rb} +12 -3
  57. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +3 -4
  58. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +2 -1
  59. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  60. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  61. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/base.rb +19 -1
  62. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  63. metadata +55 -22
  64. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb +0 -23
@@ -0,0 +1,59 @@
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 BreadcrumbsMacroValue
11
+ enable_method_class
12
+ common_constructor :document
13
+
14
+ NODE_SEPARATOR = ' » '
15
+ ROOT_DOCUMENT_TITLE = 'Home'
16
+
17
+ # @return [Array<String>]
18
+ def result
19
+ trail_nodes.join(NODE_SEPARATOR)
20
+ end
21
+
22
+ def trail_nodes
23
+ r = []
24
+ current = document
25
+ while current.present?
26
+ r.unshift(Node.new(document, current))
27
+ current = current.parent_document
28
+ end
29
+ r
30
+ end
31
+
32
+ class Node
33
+ common_constructor :current, :document
34
+
35
+ # @return [String]
36
+ def address
37
+ current.href_to_other_body(document)
38
+ end
39
+
40
+ # @return [String]
41
+ def title
42
+ if document.parent_document.present?
43
+ document.source_document.title
44
+ else
45
+ ROOT_DOCUMENT_TITLE
46
+ end
47
+ end
48
+
49
+ # @return [String]
50
+ def to_s
51
+ "link:#{address}[#{title}]"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -23,9 +23,7 @@ module Avm
23
23
 
24
24
  # @return [Pathname]
25
25
  def address
26
- child.body_target_path.relative_path_from(
27
- document.body_target_path.dirname
28
- )
26
+ document.href_to_other_body(child)
29
27
  end
30
28
 
31
29
  # @return [String]
@@ -43,9 +43,15 @@ module Avm
43
43
  "#{author_name} <#{author_email}>"
44
44
  end
45
45
 
46
+ # @return [String]
47
+ def breadcrumbs_lines
48
+ ['[.normal]', document.breadcrumbs_macro_value]
49
+ end
50
+
46
51
  # @return [Array<String>]
47
52
  def result
48
- [stylesheet_line, title_line, author_line] + attributes_lines
53
+ [stylesheet_line, title_line, author_line] + attributes_lines + [''] +
54
+ breadcrumbs_lines
49
55
  end
50
56
 
51
57
  # @return [String]
@@ -16,6 +16,12 @@ module Avm
16
16
  enable_speaker
17
17
  common_constructor :build, :parent_document, :source_document
18
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
+
19
25
  # Absolute path to the output of Asciidoctor's source file.
20
26
  #
21
27
  # @return [Pathname]
@@ -32,6 +38,19 @@ module Avm
32
38
  )
33
39
  end
34
40
 
41
+ # @param basename [String]
42
+ # @return [Avm::EacAsciidoctorBase0::Instances::Build::Document, nil]
43
+ def child(basename)
44
+ basename = basename.to_s
45
+ children.find { |c| c.source_document.root_path.basename.to_path == basename }
46
+ end
47
+
48
+ # @param basename [String]
49
+ # @return [Avm::EacAsciidoctorBase0::Instances::Build::Document]
50
+ def child!(basename)
51
+ child(basename) || raise("Child not found with basename \"#{basename}\"")
52
+ end
53
+
35
54
  # @return [Pathname]
36
55
  def convert_base_dir
37
56
  source_document.root_path
@@ -56,7 +75,7 @@ module Avm
56
75
  def pre_processed_body_source_content
57
76
  (
58
77
  header_lines + [''] + source_document.body_path.read.each_line
59
- .flat_map { |line| pre_process_line(line.rstrip) }
78
+ .flat_map { |line| pre_process_line(line.rstrip) }
60
79
  ).map { |line| "#{line.rstrip}\n" }.join
61
80
  end
62
81
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.17.0'
5
+ VERSION = '0.18.1'
6
6
  end
7
7
  end
@@ -1,32 +1,72 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_asciidoctor_base0/sources/base'
4
3
  require 'avm/eac_asciidoctor_base0/instances/build'
5
4
 
6
- ::RSpec.describe ::Avm::EacAsciidoctorBase0::Instances::Build::Document do
7
- let(:application) { ::Avm::Applications::Base.new('myapp') }
8
- let(:application_instance) do
9
- ::Avm::EacAsciidoctorBase0::Instances::Base
10
- .new(application, 'stub')
11
- end
12
- let(:build) { ::Avm::EacAsciidoctorBase0::Instances::Build.new(application_instance) }
5
+ ::RSpec.describe ::Avm::EacAsciidoctorBase0::Instances::Build::Document do # rubocop:disable Metrics/BlockLength
6
+ let(:app_director) { eac_asciidoctor_base0_stubs }
7
+ let(:build) { ::Avm::EacAsciidoctorBase0::Instances::Build.new(app_director.instance) }
13
8
  let(:fixtures_dir) { __dir__.to_pathname.join('document_spec_files') }
14
- let(:instance) { build.root_document }
15
- let(:source) { avm_source('EacAsciidoctorBase0', target_basename: application.id) }
9
+ let(:instance) { build_doc_child(build.root_document, :c1, :c1_1, :c1_1_1) }
16
10
  let(:target_file) { fixtures_dir.join('pre_processed_root_body.adoc') }
11
+ let(:source) { app_director.source }
12
+ let(:doc_template) do
13
+ r = temp_dir
14
+ ::FileUtils.copy_entry(source.root_document.root_path, r)
15
+ r
16
+ end
17
17
 
18
18
  before do
19
- application.entry('stereotype').write('EacAsciidoctorBase0')
20
- ::EacConfig::Node.context.current.entry("#{application.id}_dev.install.path")
21
- .value = source.path.to_path
22
- application_instance.entry('install.path').write(source.path.to_path)
23
- application_instance.entry('install.name').write('The Author')
24
- application_instance.entry('install.name_initials').write('T.A.')
25
- application_instance.entry('install.email').write('theauthor@example.net')
26
- application_instance.entry('web.url').write('https://www.example.net')
19
+ copy_template_hash(
20
+ source.root_document,
21
+ c1: {
22
+ c1_1: {
23
+ c1_1_1: {
24
+ c1_1_1_1: {},
25
+ c1_1_1_2: {}
26
+ },
27
+ c1_1_2: {
28
+ c1_1_2_1: {},
29
+ c1_1_2_2: {}
30
+ }
31
+ }
32
+ },
33
+ c2: {
34
+ c2_1: {}
35
+ }
36
+ )
27
37
  end
28
38
 
29
39
  it do
30
40
  expect(instance.pre_processed_body_source_content).to eq(target_file.read)
31
41
  end
42
+
43
+ # @return [Avm::EacAsciidoctorBase0::Sources::Base::Document]
44
+ def copy_template_doc(parent, basename)
45
+ parent.assert_argument(::Avm::EacAsciidoctorBase0::Sources::Base::Document, 'parent')
46
+
47
+ root_target = parent.root_path.join(basename.to_s)
48
+ ::FileUtils.copy_entry(doc_template, root_target)
49
+ root_target.join('title').write(root_target.basename.to_path)
50
+ ::Avm::EacAsciidoctorBase0::Sources::Base::Document.new(parent.source, parent,
51
+ root_target.basename)
52
+ end
53
+
54
+ # @return [Array<Avm::EacAsciidoctorBase0::Sources::Base::Document>]
55
+ def copy_template_hash(parent, hash)
56
+ parent.assert_argument(::Avm::EacAsciidoctorBase0::Sources::Base::Document, 'parent')
57
+ hash.assert_argument(::Hash, 'hash')
58
+
59
+ hash.map do |k, v|
60
+ r = copy_template_doc(parent, k)
61
+ copy_template_hash(r, v)
62
+ r
63
+ end
64
+ end
65
+
66
+ # @return [Avm::EacAsciidoctorBase0::Instances::Build::Document]
67
+ def build_doc_child(build_doc, *path)
68
+ basename = path.shift.to_s
69
+ r = build_doc.child!(basename)
70
+ path.any? ? build_doc_child(r, *path) : r
71
+ end
32
72
  end
@@ -1,5 +1,5 @@
1
- :stylesheet: ../theme/main.css
2
- = EacAsciidoctorBase0 Generated Source
1
+ :stylesheet: ../../../../theme/main.css
2
+ = c1_1_1
3
3
  The Author <theauthor@example.net>
4
4
  :Author Initials: T.A.
5
5
  :toc: left
@@ -7,8 +7,13 @@ The Author <theauthor@example.net>
7
7
  :numbered:
8
8
  :website: https://www.example.net
9
9
 
10
+ [.normal]
11
+ link:../../../index.html[Home] » link:../../index.html[c1] » link:../index.html[c1_1] » link:index.html[c1_1_1]
12
+
10
13
  == Child Documents
11
14
 
15
+ * link:c1_1_1_1/index.html[c1_1_1_1]
16
+ * link:c1_1_1_2/index.html[c1_1_1_2]
12
17
 
13
18
  == First Section
14
19
 
@@ -1,32 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_asciidoctor_base0/sources/base'
4
3
  require 'avm/eac_asciidoctor_base0/instances/build'
5
4
  require 'eac_fs/comparator'
6
5
 
7
- ::RSpec.describe ::Avm::EacAsciidoctorBase0::Instances::Build do # rubocop:disable Metrics/BlockLength
8
- let(:application) { ::Avm::Applications::Base.new('myapp') }
9
- let(:application_instance) do
10
- ::Avm::EacAsciidoctorBase0::Instances::Base
11
- .new(application, 'stub')
12
- end
6
+ ::RSpec.describe ::Avm::EacAsciidoctorBase0::Instances::Build do
7
+ let(:app_director) { eac_asciidoctor_base0_stubs }
13
8
  let(:fs_comparator) { ::EacFs::Comparator.new.truncate_file('*.html') }
14
- let(:instance) { described_class.new(application_instance) }
15
- let(:source) { avm_source('EacAsciidoctorBase0', target_basename: application.id) }
16
-
17
- before do
18
- application.entry('stereotype').write('EacAsciidoctorBase0')
19
- ::EacConfig::Node.context.current.entry("#{application.id}_dev.install.path")
20
- .value = source.path.to_path
21
- application_instance.entry('install.name').write('The Author')
22
- application_instance.entry('install.name_initials').write('T.A.')
23
- application_instance.entry('install.email').write('theauthor@example.net')
24
- application_instance.entry('web.url').write('https://www.example.net')
25
- end
9
+ let(:instance) { described_class.new(app_director.instance) }
26
10
 
27
11
  include_examples 'source_target_fixtures', __FILE__ do
28
12
  def source_data(source_file)
29
- ::FileUtils.copy_entry(source_file, source.path)
13
+ ::FileUtils.copy_entry(source_file, app_director.source.path)
30
14
  instance.perform
31
15
  fs_comparator.build(instance.target_directory)
32
16
  end
@@ -7,12 +7,7 @@ require 'avm/eac_asciidoctor_base0/sources/base'
7
7
  include_examples 'in_avm_registry', 'sources'
8
8
 
9
9
  describe '#instance' do
10
- let(:application) { ::Avm::Applications::Base.new('myapp') }
11
- let(:source) { avm_source('EacAsciidoctorBase0', target_basename: application.id) }
12
-
13
- before do
14
- application.local_source_path_entry.value = source.path
15
- end
10
+ let(:source) { eac_asciidoctor_base0_stubs.source }
16
11
 
17
12
  it do
18
13
  expect(source.instance).to be_a(::Avm::EacAsciidoctorBase0::Instances::Base)
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_config/node'
4
+ require 'avm/applications/base'
5
+ require 'avm/instances/base'
6
+ require 'eac_ruby_utils/core_ext'
7
+
8
+ module EacAsciidoctorBase0Stubs
9
+ class Director
10
+ DEFAULT_APPLICATION_ID = 'myapp'
11
+ INSTANCE_ENTRY_KEYS = {
12
+ 'install.name' => 'The Author',
13
+ 'install.name_initials' => 'T.A.',
14
+ 'install.email' => 'theauthor@example.net',
15
+ 'web.url' => 'https://www.example.net'
16
+ }.freeze
17
+
18
+ enable_simple_cache
19
+ common_constructor :rspec_example, :application_id, default: [DEFAULT_APPLICATION_ID] do
20
+ source
21
+ application
22
+ instance
23
+ end
24
+
25
+ private
26
+
27
+ # @return [Avm::Applications::Base]
28
+ def application_uncached
29
+ r = ::Avm::Applications::Base.new(application_id)
30
+ r.entry('stereotype').write('EacAsciidoctorBase0')
31
+ r.local_source_path_entry.value = source.path.to_path
32
+ r
33
+ end
34
+
35
+ # @return [Avm::EacAsciidoctorBase0::Instances::Base]
36
+ def instance_uncached
37
+ r = ::Avm::EacAsciidoctorBase0::Instances::Base.new(application, 'stub')
38
+ INSTANCE_ENTRY_KEYS.each { |k, v| r.entry(k).write(v) }
39
+ r
40
+ end
41
+
42
+ # @return [Avm::EacAsciidoctorBase0::Sources::Base]
43
+ def source_uncached
44
+ rspec_example.avm_source('EacAsciidoctorBase0', target_basename: application_id)
45
+ end
46
+ end
47
+
48
+ def eac_asciidoctor_base0_stubs(id = nil)
49
+ args = [self]
50
+ args << id if id.present?
51
+ ::EacAsciidoctorBase0Stubs::Director.new(*args)
52
+ end
53
+ end
54
+
55
+ ::EacRubyUtils::Rspec.default_setup.rspec_config.include(::EacAsciidoctorBase0Stubs)
@@ -3,3 +3,6 @@
3
3
  require 'eac_ruby_utils/rspec/default_setup'
4
4
  ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
5
5
  .stub_avm_contexts
6
+
7
+ require 'eac_ruby_utils/require_sub'
8
+ ::EacRubyUtils.require_sub __FILE__
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.52'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.12'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.106'
15
+ s.add_dependency 'avm', '~> 0.67'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
20
20
  end
@@ -6,7 +6,6 @@ module Avm
6
6
  module EacLatexBase0
7
7
  module Instances
8
8
  class Base < ::Avm::EacWebappBase0::Instances::Base
9
- FILES_UNITS = {}.freeze
10
9
  end
11
10
  end
12
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacLatexBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
16
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.13'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.109'
15
+ s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
16
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
20
20
  end
@@ -7,7 +7,6 @@ module Avm
7
7
  module EacPhpBase0
8
8
  module Instances
9
9
  class Base < ::Avm::EacWebappBase0::Instances::Base
10
- FILES_UNITS = {}.freeze
11
10
  end
12
11
  end
13
12
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPhpBase0
5
- VERSION = '0.4.1'
5
+ VERSION = '0.4.2'
6
6
  end
7
7
  end
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.57'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.109'
15
+ s.add_dependency 'avm', '~> 0.66', '>= 0.66.1'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
19
  end
@@ -28,7 +28,7 @@ module Avm
28
28
  info 'Database has no tables'
29
29
  else
30
30
  info "Removing #{ts.count} table(s)..."
31
- run_sql('drop table ' + ts.map { |t| "\"#{t}\"" }.join(', ') + ' cascade')
31
+ run_sql('drop table if exists ' + ts.map { |t| "\"#{t}\"" }.join(', ') + ' cascade')
32
32
  end
33
33
  end
34
34
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacPostgresqlBase0
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.4'
6
6
  end
7
7
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.1'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.3'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.112'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -7,7 +7,17 @@ module Avm
7
7
  module EacRailsBase0
8
8
  module Instances
9
9
  class Base < ::Avm::EacRailsBase1::Instances::Base
10
- FILES_UNITS = { uploads: 'public/uploads' }.freeze
10
+ UPLOADS_UNIT_SUBPATH = 'public/uploads'
11
+
12
+ # @return [Avm::Instances::Data::Package]
13
+ def data_package_create
14
+ super.add_unit('uploads', uploads_unit)
15
+ end
16
+
17
+ # @return [Avm::Instances::Data::FilesUnit]
18
+ def uploads_unit
19
+ ::Avm::Instances::Data::FilesUnit.new(self, UPLOADS_UNIT_SUBPATH)
20
+ end
11
21
  end
12
22
  end
13
23
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.10.0'
5
+ VERSION = '0.10.1'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.66', '>= 0.66.1'
15
+ s.add_dependency 'avm', '~> 0.67'
16
16
  s.add_dependency 'avm-eac_ruby_base1', '~> 0.30', '>= 0.30.1'
17
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.14'
17
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
18
18
  s.add_dependency 'eac_ruby_utils', '~> 0.112'
19
19
 
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -17,6 +17,11 @@ module Avm
17
17
  the_gem.bundle(*args).chdir_root.envvar('RAILS_ENV', DEFAULT_RAILS_ENVIRONMENT)
18
18
  end
19
19
 
20
+ # @return [Avm::Instances::Data::Package]
21
+ def data_package_create
22
+ super.add_unit('database', database_unit)
23
+ end
24
+
20
25
  def rake(*args)
21
26
  bundle('exec', 'rake', *args)
22
27
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.8.2'
5
+ VERSION = '0.8.3'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.66', '>= 0.66.1'
15
+ s.add_dependency 'avm', '~> 0.67'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
17
- s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.2'
17
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.8', '>= 0.8.3'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
19
19
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
20
20
  s.add_dependency 'eac_fs', '~> 0.16'
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'addressable/uri'
4
- require 'avm/eac_redmine_base0/instances/data_package'
5
4
  require 'avm/eac_redmine_base0/instances/docker_image'
6
5
  require 'avm/eac_redmine_base0/instances/runners'
7
6
  require 'avm/eac_redmine_base0/instances/rest_api'
@@ -31,9 +30,11 @@ module Avm
31
30
  ]
32
31
  end
33
32
 
34
- # @return [Avm::EacRedmineBase0::Instances::DataPackage]
35
- def data_package
36
- @data_package ||= ::Avm::EacRedmineBase0::Instances::DataPackage.new(self)
33
+ # @return [Avm::Instances::Data::Package]
34
+ def data_package_create
35
+ r = super.add_unit('files', files_data_unit).add_unit('gitolite', gitolite_data_unit)
36
+ r.after_load { instance.run_installer }
37
+ r
37
38
  end
38
39
 
39
40
  # @return [Addressable::URI]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.19.0'
5
+ VERSION = '0.19.1'
6
6
  end
7
7
  end
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.66'
15
+ s.add_dependency 'avm', '~> 0.67'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
17
- s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.3'
17
+ s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2', '>= 0.2.4'
18
18
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
19
19
  s.add_dependency 'avm-files', '~> 0.6'
20
20
  s.add_dependency 'eac_ruby_utils', '~> 0.112'
@@ -4,7 +4,6 @@ require 'avm/instances/base'
4
4
  require 'avm/eac_postgresql_base0/instance_with'
5
5
  require 'avm/instances/data/files_unit'
6
6
  require 'avm/instances/data/package'
7
- require 'avm/eac_webapp_base0/instances/deploy/file_unit'
8
7
  require 'avm/eac_webapp_base0/instances/runners'
9
8
  require 'avm/eac_ubuntu_base0/instances/base'
10
9
 
@@ -16,8 +15,6 @@ module Avm
16
15
  include ::Avm::EacPostgresqlBase0::InstanceWith
17
16
  enable_simple_cache
18
17
 
19
- FILES_UNITS = [].freeze
20
-
21
18
  def data_dump(argv = [])
22
19
  run_subcommand(data_dump_runner_class, argv)
23
20
  end
@@ -33,10 +30,14 @@ module Avm
33
30
  ).run
34
31
  end
35
32
 
33
+ # @return [Avm::Instances::Data::Package]
36
34
  def data_package
37
- @data_package ||= ::Avm::Instances::Data::Package.new(
38
- self, units: { database: database_unit }.merge(files_units)
39
- )
35
+ @data_package ||= data_package_create
36
+ end
37
+
38
+ # @return [Avm::Instances::Data::Package]
39
+ def data_package_create
40
+ ::Avm::Instances::Data::Package.new(self)
40
41
  end
41
42
 
42
43
  def database_unit
@@ -49,12 +50,6 @@ module Avm
49
50
  def platform_instance_uncached
50
51
  ::Avm::EacUbuntuBase0::Instances::Base.by_id(id)
51
52
  end
52
-
53
- def files_units
54
- self.class.const_get('FILES_UNITS').transform_values do |fs_path_subpath|
55
- ::Avm::Instances::Data::FilesUnit.new(self, fs_path_subpath)
56
- end
57
- end
58
53
  end
59
54
  end
60
55
  end