avm 0.4.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/data/instance/files_unit.rb +40 -0
  3. data/lib/avm/data/instance/package.rb +18 -0
  4. data/lib/avm/data/instance/unit.rb +17 -0
  5. data/lib/avm/{git/issue.rb → data/instance.rb} +2 -2
  6. data/lib/avm/data/package/dump.rb +119 -0
  7. data/lib/avm/data/package/load.rb +48 -0
  8. data/lib/avm/data/package.rb +42 -0
  9. data/lib/avm/{files → data}/rotate.rb +1 -1
  10. data/lib/avm/data/unit.rb +94 -0
  11. data/lib/avm/docker/runner.rb +8 -0
  12. data/lib/avm/instances/application.rb +25 -0
  13. data/lib/avm/instances/base/auto_values/access.rb +40 -0
  14. data/lib/avm/instances/base/auto_values/admin.rb +19 -0
  15. data/lib/avm/instances/base/auto_values/data.rb +26 -0
  16. data/lib/avm/instances/base/auto_values/database.rb +71 -0
  17. data/lib/avm/instances/base/auto_values/filesystem.rb +45 -0
  18. data/lib/avm/instances/base/auto_values/mailer.rb +34 -0
  19. data/lib/avm/instances/base/auto_values/ruby.rb +15 -0
  20. data/lib/avm/instances/base/auto_values/source.rb +15 -0
  21. data/lib/avm/instances/base/auto_values/system.rb +23 -0
  22. data/lib/avm/instances/base/auto_values/web.rb +46 -0
  23. data/lib/avm/instances/base/auto_values.rb +21 -0
  24. data/lib/avm/instances/base/dockerizable.rb +45 -0
  25. data/lib/avm/instances/base/entry_keys.rb +22 -0
  26. data/lib/avm/instances/base.rb +64 -0
  27. data/lib/avm/instances/entries.rb +43 -0
  28. data/lib/avm/instances/entry.rb +54 -0
  29. data/lib/avm/instances/entry_keys.rb +57 -0
  30. data/lib/avm/instances/runner.rb +38 -0
  31. data/lib/avm/instances.rb +8 -0
  32. data/lib/avm/jobs/base.rb +1 -0
  33. data/lib/avm/path_string.rb +27 -0
  34. data/lib/avm/registry/base.rb +65 -0
  35. data/lib/avm/registry.rb +29 -0
  36. data/lib/avm/rspec/setup.rb +22 -0
  37. data/lib/avm/rspec/shared_examples/in_avm_registry.rb +11 -0
  38. data/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +14 -0
  39. data/lib/avm/{app_src.rb → rspec.rb} +1 -1
  40. data/lib/avm/runners/base.rb +31 -0
  41. data/lib/avm/scms/base.rb +28 -0
  42. data/lib/avm/scms/commit.rb +43 -0
  43. data/lib/avm/self/docker_image.rb +14 -0
  44. data/lib/avm/self/instance/entry_keys.rb +12 -0
  45. data/lib/avm/self/instance.rb +24 -0
  46. data/lib/avm/source_stereotypes/base.rb +21 -0
  47. data/lib/avm/{app_src → sources}/base.rb +25 -3
  48. data/lib/avm/{app_src → sources}/configuration/_locale.rb +1 -1
  49. data/lib/avm/{app_src → sources}/configuration/_rubocop.rb +1 -1
  50. data/lib/avm/{app_src → sources}/configuration/_tests.rb +1 -1
  51. data/lib/avm/{app_src → sources}/configuration.rb +1 -1
  52. data/lib/avm/{git/organize.rb → sources.rb} +2 -4
  53. data/lib/avm/sync.rb +94 -0
  54. data/lib/avm/version.rb +1 -1
  55. metadata +74 -73
  56. data/lib/avm/files/appendable/file_content.rb +0 -24
  57. data/lib/avm/files/appendable/plain_directory.rb +0 -25
  58. data/lib/avm/files/appendable/resource_base.rb +0 -13
  59. data/lib/avm/files/appendable/tar_output_command.rb +0 -26
  60. data/lib/avm/files/appendable/templatized_directory.rb +0 -29
  61. data/lib/avm/files/appendable.rb +0 -55
  62. data/lib/avm/files/appender.rb +0 -11
  63. data/lib/avm/files/deploy.rb +0 -71
  64. data/lib/avm/files/formatter/formats/base.rb +0 -62
  65. data/lib/avm/files/formatter/formats/generic_plain.rb +0 -34
  66. data/lib/avm/files/formatter/formats/html.rb +0 -45
  67. data/lib/avm/files/formatter/formats/javascript.rb +0 -24
  68. data/lib/avm/files/formatter/formats/json.rb +0 -27
  69. data/lib/avm/files/formatter/formats/php.rb +0 -22
  70. data/lib/avm/files/formatter/formats/python.rb +0 -22
  71. data/lib/avm/files/formatter/formats/ruby.rb +0 -22
  72. data/lib/avm/files/formatter/formats/xml.rb +0 -28
  73. data/lib/avm/files/formatter/formats.rb +0 -13
  74. data/lib/avm/files/formatter/utf8_assert.rb +0 -74
  75. data/lib/avm/files/formatter.rb +0 -90
  76. data/lib/avm/files.rb +0 -9
  77. data/lib/avm/git/auto_commit/commit_info.rb +0 -23
  78. data/lib/avm/git/auto_commit/rules/base.rb +0 -39
  79. data/lib/avm/git/auto_commit/rules/last.rb +0 -19
  80. data/lib/avm/git/auto_commit/rules/manual.rb +0 -45
  81. data/lib/avm/git/auto_commit/rules/new.rb +0 -24
  82. data/lib/avm/git/auto_commit/rules/nth.rb +0 -31
  83. data/lib/avm/git/auto_commit/rules/unique.rb +0 -21
  84. data/lib/avm/git/auto_commit/rules.rb +0 -31
  85. data/lib/avm/git/auto_commit_path/ruby.rb +0 -20
  86. data/lib/avm/git/auto_commit_path.rb +0 -28
  87. data/lib/avm/git/commit/class_methods.rb +0 -31
  88. data/lib/avm/git/commit/deploy.rb +0 -38
  89. data/lib/avm/git/commit/deploy_methods.rb +0 -19
  90. data/lib/avm/git/commit/diff_tree_line.rb +0 -32
  91. data/lib/avm/git/commit/file.rb +0 -46
  92. data/lib/avm/git/commit.rb +0 -59
  93. data/lib/avm/git/file_auto_fixup.rb +0 -83
  94. data/lib/avm/git/issue/complete/commits.rb +0 -42
  95. data/lib/avm/git/issue/complete/git_subrepos.rb +0 -23
  96. data/lib/avm/git/issue/complete/local_branch.rb +0 -54
  97. data/lib/avm/git/issue/complete/local_tag.rb +0 -39
  98. data/lib/avm/git/issue/complete/push.rb +0 -54
  99. data/lib/avm/git/issue/complete/remote.rb +0 -33
  100. data/lib/avm/git/issue/complete/test.rb +0 -45
  101. data/lib/avm/git/issue/complete/tracker.rb +0 -28
  102. data/lib/avm/git/issue/complete/validation.rb +0 -31
  103. data/lib/avm/git/issue/complete/validations.rb +0 -53
  104. data/lib/avm/git/issue/complete/working_tree.rb +0 -19
  105. data/lib/avm/git/issue/complete.rb +0 -51
  106. data/lib/avm/git/issue/deliver.rb +0 -56
  107. data/lib/avm/git/organize/reference_update.rb +0 -34
  108. data/lib/avm/git/organize/repository.rb +0 -76
  109. data/lib/avm/git/revision_test.rb +0 -105
  110. data/lib/avm/git/subrepo_check/parent.rb +0 -51
  111. data/lib/avm/git/subrepo_check/remote.rb +0 -89
  112. data/lib/avm/git/subrepo_check/show_result.rb +0 -32
  113. data/lib/avm/git/subrepo_check.rb +0 -38
  114. data/lib/avm/git/subrepo_checks.rb +0 -59
  115. data/lib/avm/git.rb +0 -10
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module Runners
7
+ class Base
8
+ enable_abstract_methods
9
+
10
+ class << self
11
+ def command_argument
12
+ stereotype_name.underscore.dasherize
13
+ end
14
+
15
+ def stereotype_name
16
+ name.split('::')[-3]
17
+ end
18
+ end
19
+
20
+ delegate :command_argument, :stereotype_name, to: :class
21
+
22
+ runner_with :help, :subcommands do
23
+ subcommands
24
+ end
25
+
26
+ def to_s
27
+ stereotype_name
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Scms
7
+ class Base
8
+ enable_abstract_methods
9
+ abstract_methods :update, :valid?
10
+ common_constructor :path do
11
+ self.path = path.to_pathname
12
+ end
13
+
14
+ # @return [Avm::Scms::Commit,NilClass]
15
+ def commit_if_change(_message = nil)
16
+ raise_abstract_method __method__
17
+ end
18
+
19
+ def name
20
+ self.class.name.demodulize
21
+ end
22
+
23
+ def to_s
24
+ name
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Scms
7
+ class Commit
8
+ enable_abstract_methods
9
+
10
+ # @return [Array<Pathname>]
11
+ def changed_files
12
+ raise_abstract_method __method__
13
+ end
14
+
15
+ # @param other [Avm::Scms::Commit]
16
+ # @return [Avm::Scms::Commit]
17
+ def merge_with(_other)
18
+ raise_abstract_method __method__
19
+ end
20
+
21
+ # @return [Array<Pathname>]
22
+ def no_scm_changed_files
23
+ changed_files.reject { |path| scm_file?(path) }
24
+ end
25
+
26
+ # @param new_message [String]
27
+ def reword(_new_message)
28
+ raise_abstract_method __method__
29
+ end
30
+
31
+ # @return [Array<Pathname>]
32
+ def scm_changed_files
33
+ changed_files.select { |path| scm_file?(path) }
34
+ end
35
+
36
+ # @param path [Pathname]
37
+ # @return [TrueClass,FalseClass]
38
+ def scm_file?(_path)
39
+ raise_abstract_method __method__
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'avm/docker/image'
5
+
6
+ module Avm
7
+ module Self
8
+ class DockerImage < ::Avm::Docker::Image
9
+ def stereotype_tag
10
+ nil
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Self
5
+ class Instance < ::Avm::Instances::Base
6
+ module EntryKeys
7
+ DATA_DEFAULT_PATH = 'data.default_path'
8
+ DOCKER_REGISTRY_NAME = 'docker.registry.name'
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/instances/base'
4
+ require 'avm/self/docker_image'
5
+ require 'avm/self/instance/entry_keys'
6
+ require 'avm/eac_ubuntu_base0/docker_image'
7
+
8
+ module Avm
9
+ module Self
10
+ class Instance < ::Avm::Instances::Base
11
+ def docker_image_class
12
+ ::Avm::Self::DockerImage
13
+ end
14
+
15
+ def docker_registry
16
+ read_entry(::Avm::Self::Instance::EntryKeys::DOCKER_REGISTRY_NAME)
17
+ end
18
+
19
+ def docker_run_arguments
20
+ ['-e', "LOCAL_USER_ID=#{::Process.uid}"]
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module SourceStereotypes
7
+ class Base
8
+ enable_abstract_methods
9
+ abstract_methods :valid?
10
+ common_constructor :source
11
+
12
+ def name
13
+ self.class.name
14
+ end
15
+
16
+ def to_s
17
+ name
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,11 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/registry'
3
4
  require 'eac_git'
4
5
  require 'eac_ruby_utils/core_ext'
5
6
 
6
7
  module Avm
7
- module AppSrc
8
+ module Sources
8
9
  class Base
10
+ require_sub __FILE__
9
11
  enable_simple_cache
10
12
  enable_listable
11
13
  lists.add_symbol :option, :parent
@@ -14,9 +16,10 @@ module Avm
14
16
  self.options = self.class.lists.option.hash_keys_validate!(options)
15
17
  end
16
18
 
19
+ delegate :locale, to: :configuration
17
20
  delegate :to_s, to: :path
18
21
 
19
- # @return [Avm::AppSrc::Base]
22
+ # @return [Avm::Sources::Base]
20
23
  def parent
21
24
  options[OPTION_PARENT]
22
25
  end
@@ -28,18 +31,37 @@ module Avm
28
31
  path.relative_path_from(parent.path)
29
32
  end
30
33
 
31
- # @return [Enumerable<Avm::AppSrc::Base>]
34
+ # @return [Enumerable<Avm::Sources::Base>]
32
35
  def subs
33
36
  git_repo.subrepos
34
37
  .map { |subrepo| self.class.new(subrepo.subpath.expand_path(path), parent: self) }
35
38
  end
36
39
 
40
+ def update
41
+ stereotype.update_source(self)
42
+ end
43
+
37
44
  private
38
45
 
46
+ # @return [Avm::Sources::Configuration]
47
+ def configuration_uncached
48
+ ::Avm::Sources::Configuration.find_in_path(path) || ::Avm::Sources::Configuration.new
49
+ end
50
+
39
51
  # @return [EacGit::Local]
40
52
  def git_repo_uncached
41
53
  ::EacGit::Local.new(path)
42
54
  end
55
+
56
+ # @return [Avm::Scms::Base]
57
+ def scm_uncached
58
+ ::Avm::Registry.scms.detect(path)
59
+ end
60
+
61
+ # @return [Avm::SourceStereotypes::Base]
62
+ def stereotype_uncached
63
+ ::Avm::Registry.source_stereotypes.detect(self)
64
+ end
43
65
  end
44
66
  end
45
67
  end
@@ -4,7 +4,7 @@ require 'avm/patches/eac_ruby_gems_utils/gem'
4
4
  require 'i18n'
5
5
 
6
6
  module Avm
7
- module AppSrc
7
+ module Sources
8
8
  class Configuration < ::EacConfig::OldConfigs
9
9
  LOCALE_KEY = :locale
10
10
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- module AppSrc
4
+ module Sources
5
5
  class Configuration < ::EacConfig::OldConfigs
6
6
  RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
7
7
  RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
@@ -3,7 +3,7 @@
3
3
  require 'avm/patches/eac_ruby_gems_utils/gem'
4
4
 
5
5
  module Avm
6
- module AppSrc
6
+ module Sources
7
7
  class Configuration < ::EacConfig::OldConfigs
8
8
  BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
9
9
  TEST_COMMAND_KEY = 'test.command'
@@ -5,7 +5,7 @@ require 'eac_ruby_utils/core_ext'
5
5
  require 'yaml'
6
6
 
7
7
  module Avm
8
- module AppSrc
8
+ module Sources
9
9
  class Configuration < ::EacConfig::OldConfigs
10
10
  require_sub __FILE__
11
11
 
@@ -3,9 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module Git
7
- module Organize
8
- require_sub __FILE__
9
- end
6
+ module Sources
7
+ require_sub __FILE__
10
8
  end
11
9
  end
data/lib/avm/sync.rb ADDED
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ class Sync
7
+ attr_reader :excludes, :includes
8
+
9
+ common_constructor :source_path, :target_path do
10
+ self.source_path = source_path.to_pathname
11
+ self.target_path = target_path.to_pathname
12
+ @excludes = []
13
+ @includes = []
14
+ end
15
+
16
+ def run
17
+ clear_target
18
+ copy
19
+ end
20
+
21
+ def add_exclude(exclude)
22
+ excludes << exclude
23
+
24
+ self
25
+ end
26
+
27
+ def add_excludes(*excludes)
28
+ excludes.each { |exclude| add_exclude(exclude) }
29
+
30
+ self
31
+ end
32
+
33
+ def add_include(include)
34
+ includes << include
35
+
36
+ self
37
+ end
38
+
39
+ def add_includes(*includes)
40
+ includes.each { |include| add_include(include) }
41
+
42
+ self
43
+ end
44
+
45
+ def move_mode(value)
46
+ @move_mode = value
47
+
48
+ self
49
+ end
50
+
51
+ def move_mode?
52
+ @move_mode ? true : false
53
+ end
54
+
55
+ private
56
+
57
+ def clear_target
58
+ target_remove(target_path)
59
+ target_path.children.each { |tchild| target_remove(tchild) }
60
+ end
61
+
62
+ def copy
63
+ source_path.children.each do |schild|
64
+ ::FileUtils.cp_r(schild.to_path, target_path.to_path)
65
+ schild.rmtree if move_mode?
66
+ end
67
+ end
68
+
69
+ def source_to_target_path(source_path)
70
+ source_path.relative_path_from(self.source_path).expand_path(target_path)
71
+ end
72
+
73
+ def target_remove(tpath)
74
+ return if skip_target_path?(tpath)
75
+
76
+ if tpath.directory?
77
+ tpath.children.each { |tchild| target_remove(tchild) }
78
+ tpath.rmdir if tpath.children.empty?
79
+ elsif tpath.file?
80
+ tpath.unlink
81
+ end
82
+ end
83
+
84
+ def skip_target_path?(tpath)
85
+ skip_path?(tpath.relative_path_from(target_path))
86
+ end
87
+
88
+ def skip_path?(relpath)
89
+ relpath = relpath.expand_path('/')
90
+ excludes.any? { |exclude| relpath.fnmatch?(exclude) } &&
91
+ includes.none? { |include| relpath.fnmatch?(include) }
92
+ end
93
+ end
94
+ end
data/lib/avm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.4.0'
4
+ VERSION = '0.7.0'
5
5
  end
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-25 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: eac_cli
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.23'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.23.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.23'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.23.1
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: eac_docker
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +64,14 @@ dependencies:
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '0.68'
67
+ version: '0.77'
48
68
  type: :runtime
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
- version: '0.68'
74
+ version: '0.77'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: eac_templates
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -161,85 +181,66 @@ extensions: []
161
181
  extra_rdoc_files: []
162
182
  files:
163
183
  - lib/avm.rb
164
- - lib/avm/app_src.rb
165
- - lib/avm/app_src/base.rb
166
- - lib/avm/app_src/configuration.rb
167
- - lib/avm/app_src/configuration/_locale.rb
168
- - lib/avm/app_src/configuration/_rubocop.rb
169
- - lib/avm/app_src/configuration/_tests.rb
184
+ - lib/avm/data/instance.rb
185
+ - lib/avm/data/instance/files_unit.rb
186
+ - lib/avm/data/instance/package.rb
187
+ - lib/avm/data/instance/unit.rb
188
+ - lib/avm/data/package.rb
189
+ - lib/avm/data/package/dump.rb
190
+ - lib/avm/data/package/load.rb
191
+ - lib/avm/data/rotate.rb
192
+ - lib/avm/data/unit.rb
170
193
  - lib/avm/docker.rb
171
194
  - lib/avm/docker/container.rb
172
195
  - lib/avm/docker/image.rb
173
196
  - lib/avm/docker/runner.rb
174
197
  - lib/avm/executables.rb
175
- - lib/avm/files.rb
176
- - lib/avm/files/appendable.rb
177
- - lib/avm/files/appendable/file_content.rb
178
- - lib/avm/files/appendable/plain_directory.rb
179
- - lib/avm/files/appendable/resource_base.rb
180
- - lib/avm/files/appendable/tar_output_command.rb
181
- - lib/avm/files/appendable/templatized_directory.rb
182
- - lib/avm/files/appender.rb
183
- - lib/avm/files/deploy.rb
184
- - lib/avm/files/formatter.rb
185
- - lib/avm/files/formatter/formats.rb
186
- - lib/avm/files/formatter/formats/base.rb
187
- - lib/avm/files/formatter/formats/generic_plain.rb
188
- - lib/avm/files/formatter/formats/html.rb
189
- - lib/avm/files/formatter/formats/javascript.rb
190
- - lib/avm/files/formatter/formats/json.rb
191
- - lib/avm/files/formatter/formats/php.rb
192
- - lib/avm/files/formatter/formats/python.rb
193
- - lib/avm/files/formatter/formats/ruby.rb
194
- - lib/avm/files/formatter/formats/xml.rb
195
- - lib/avm/files/formatter/utf8_assert.rb
196
- - lib/avm/files/rotate.rb
197
- - lib/avm/git.rb
198
- - lib/avm/git/auto_commit/commit_info.rb
199
- - lib/avm/git/auto_commit/rules.rb
200
- - lib/avm/git/auto_commit/rules/base.rb
201
- - lib/avm/git/auto_commit/rules/last.rb
202
- - lib/avm/git/auto_commit/rules/manual.rb
203
- - lib/avm/git/auto_commit/rules/new.rb
204
- - lib/avm/git/auto_commit/rules/nth.rb
205
- - lib/avm/git/auto_commit/rules/unique.rb
206
- - lib/avm/git/auto_commit_path.rb
207
- - lib/avm/git/auto_commit_path/ruby.rb
208
- - lib/avm/git/commit.rb
209
- - lib/avm/git/commit/class_methods.rb
210
- - lib/avm/git/commit/deploy.rb
211
- - lib/avm/git/commit/deploy_methods.rb
212
- - lib/avm/git/commit/diff_tree_line.rb
213
- - lib/avm/git/commit/file.rb
214
- - lib/avm/git/file_auto_fixup.rb
215
- - lib/avm/git/issue.rb
216
- - lib/avm/git/issue/complete.rb
217
- - lib/avm/git/issue/complete/commits.rb
218
- - lib/avm/git/issue/complete/git_subrepos.rb
219
- - lib/avm/git/issue/complete/local_branch.rb
220
- - lib/avm/git/issue/complete/local_tag.rb
221
- - lib/avm/git/issue/complete/push.rb
222
- - lib/avm/git/issue/complete/remote.rb
223
- - lib/avm/git/issue/complete/test.rb
224
- - lib/avm/git/issue/complete/tracker.rb
225
- - lib/avm/git/issue/complete/validation.rb
226
- - lib/avm/git/issue/complete/validations.rb
227
- - lib/avm/git/issue/complete/working_tree.rb
228
- - lib/avm/git/issue/deliver.rb
229
- - lib/avm/git/organize.rb
230
- - lib/avm/git/organize/reference_update.rb
231
- - lib/avm/git/organize/repository.rb
232
- - lib/avm/git/revision_test.rb
233
- - lib/avm/git/subrepo_check.rb
234
- - lib/avm/git/subrepo_check/parent.rb
235
- - lib/avm/git/subrepo_check/remote.rb
236
- - lib/avm/git/subrepo_check/show_result.rb
237
- - lib/avm/git/subrepo_checks.rb
198
+ - lib/avm/instances.rb
199
+ - lib/avm/instances/application.rb
200
+ - lib/avm/instances/base.rb
201
+ - lib/avm/instances/base/auto_values.rb
202
+ - lib/avm/instances/base/auto_values/access.rb
203
+ - lib/avm/instances/base/auto_values/admin.rb
204
+ - lib/avm/instances/base/auto_values/data.rb
205
+ - lib/avm/instances/base/auto_values/database.rb
206
+ - lib/avm/instances/base/auto_values/filesystem.rb
207
+ - lib/avm/instances/base/auto_values/mailer.rb
208
+ - lib/avm/instances/base/auto_values/ruby.rb
209
+ - lib/avm/instances/base/auto_values/source.rb
210
+ - lib/avm/instances/base/auto_values/system.rb
211
+ - lib/avm/instances/base/auto_values/web.rb
212
+ - lib/avm/instances/base/dockerizable.rb
213
+ - lib/avm/instances/base/entry_keys.rb
238
214
  - lib/avm/instances/docker_image.rb
215
+ - lib/avm/instances/entries.rb
216
+ - lib/avm/instances/entry.rb
217
+ - lib/avm/instances/entry_keys.rb
218
+ - lib/avm/instances/runner.rb
239
219
  - lib/avm/jobs.rb
240
220
  - lib/avm/jobs/base.rb
241
221
  - lib/avm/jobs/variables_source.rb
222
+ - lib/avm/path_string.rb
223
+ - lib/avm/registry.rb
224
+ - lib/avm/registry/base.rb
242
225
  - lib/avm/result.rb
226
+ - lib/avm/rspec.rb
227
+ - lib/avm/rspec/setup.rb
228
+ - lib/avm/rspec/shared_examples/in_avm_registry.rb
229
+ - lib/avm/rspec/shared_examples/not_in_avm_registry.rb
230
+ - lib/avm/runners/base.rb
231
+ - lib/avm/scms/base.rb
232
+ - lib/avm/scms/commit.rb
233
+ - lib/avm/self/docker_image.rb
234
+ - lib/avm/self/instance.rb
235
+ - lib/avm/self/instance/entry_keys.rb
236
+ - lib/avm/source_stereotypes/base.rb
237
+ - lib/avm/sources.rb
238
+ - lib/avm/sources/base.rb
239
+ - lib/avm/sources/configuration.rb
240
+ - lib/avm/sources/configuration/_locale.rb
241
+ - lib/avm/sources/configuration/_rubocop.rb
242
+ - lib/avm/sources/configuration/_tests.rb
243
+ - lib/avm/sync.rb
243
244
  - lib/avm/version.rb
244
245
  - lib/avm/version_number.rb
245
246
  homepage:
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'avm/files/appendable/resource_base'
5
-
6
- module Avm
7
- module Files
8
- module Appendable
9
- class FileContent < ::Avm::Files::Appendable::ResourceBase
10
- attr_reader :target_path, :content
11
-
12
- def initialize(deploy, target_path, content)
13
- super(deploy)
14
- @target_path = target_path
15
- @content = content
16
- end
17
-
18
- def write_on(target_dir)
19
- target_dir.join(target_path).write(content)
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'avm/files/appendable/resource_base'
5
-
6
- module Avm
7
- module Files
8
- module Appendable
9
- class PlainDirectory < ::Avm::Files::Appendable::ResourceBase
10
- attr_reader :source_path
11
-
12
- def initialize(appender, source_path)
13
- super(appender)
14
- @source_path = source_path.to_pathname
15
- end
16
-
17
- def write_on(target_dir)
18
- raise "\"#{source_path}\" is not a directory" unless source_path.directory?
19
-
20
- ::FileUtils.cp_r("#{source_path}/.", target_dir.to_path)
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Files
7
- module Appendable
8
- class ResourceBase
9
- common_constructor :appender
10
- end
11
- end
12
- end
13
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_ruby_utils/envs'
5
- require 'avm/files/appendable/resource_base'
6
-
7
- module Avm
8
- module Files
9
- module Appendable
10
- class TarOutputCommand < ::Avm::Files::Appendable::ResourceBase
11
- attr_reader :command
12
-
13
- def initialize(appender, command)
14
- super(appender)
15
- @command = command
16
- end
17
-
18
- def write_on(target_dir)
19
- command.pipe(
20
- ::EacRubyUtils::Envs.local.command('tar', '-xf', '-', '-C', target_dir)
21
- ).execute!
22
- end
23
- end
24
- end
25
- end
26
- end