avm 0.3.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) 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/data/unit.rb +94 -0
  10. data/lib/avm/jobs/base.rb +62 -0
  11. data/lib/avm/jobs/variables_source.rb +22 -0
  12. data/lib/avm/{git/organize.rb → jobs.rb} +2 -4
  13. data/lib/avm/path_string.rb +27 -0
  14. data/lib/avm/registry/base.rb +65 -0
  15. data/lib/avm/registry.rb +29 -0
  16. data/lib/avm/rspec/setup.rb +22 -0
  17. data/lib/avm/rspec/shared_examples/in_avm_registry.rb +11 -0
  18. data/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +14 -0
  19. data/lib/avm/rspec.rb +9 -0
  20. data/lib/avm/scms/base.rb +28 -0
  21. data/lib/avm/scms/commit.rb +43 -0
  22. data/lib/avm/source_stereotypes/base.rb +21 -0
  23. data/lib/avm/sources/base.rb +67 -0
  24. data/lib/avm/sources/configuration/_locale.rb +16 -0
  25. data/lib/avm/sources/configuration/_rubocop.rb +24 -0
  26. data/lib/avm/sources/configuration/_tests.rb +27 -0
  27. data/lib/avm/sources/configuration.rb +55 -0
  28. data/lib/avm/sources.rb +9 -0
  29. data/lib/avm/sync.rb +94 -0
  30. data/lib/avm/version.rb +1 -1
  31. metadata +80 -68
  32. data/lib/avm/files/appendable/file_content.rb +0 -24
  33. data/lib/avm/files/appendable/plain_directory.rb +0 -25
  34. data/lib/avm/files/appendable/resource_base.rb +0 -13
  35. data/lib/avm/files/appendable/tar_output_command.rb +0 -26
  36. data/lib/avm/files/appendable/templatized_directory.rb +0 -29
  37. data/lib/avm/files/appendable.rb +0 -55
  38. data/lib/avm/files/appender.rb +0 -11
  39. data/lib/avm/files/deploy.rb +0 -71
  40. data/lib/avm/files/formatter/formats/base.rb +0 -62
  41. data/lib/avm/files/formatter/formats/generic_plain.rb +0 -34
  42. data/lib/avm/files/formatter/formats/html.rb +0 -45
  43. data/lib/avm/files/formatter/formats/javascript.rb +0 -23
  44. data/lib/avm/files/formatter/formats/json.rb +0 -27
  45. data/lib/avm/files/formatter/formats/php.rb +0 -21
  46. data/lib/avm/files/formatter/formats/python.rb +0 -21
  47. data/lib/avm/files/formatter/formats/ruby.rb +0 -22
  48. data/lib/avm/files/formatter/formats/xml.rb +0 -27
  49. data/lib/avm/files/formatter/formats.rb +0 -13
  50. data/lib/avm/files/formatter/utf8_assert.rb +0 -72
  51. data/lib/avm/files/formatter.rb +0 -90
  52. data/lib/avm/files/info.rb +0 -24
  53. data/lib/avm/files/rotate.rb +0 -107
  54. data/lib/avm/files.rb +0 -9
  55. data/lib/avm/git/auto_commit/commit_info.rb +0 -23
  56. data/lib/avm/git/auto_commit/rules/base.rb +0 -39
  57. data/lib/avm/git/auto_commit/rules/last.rb +0 -19
  58. data/lib/avm/git/auto_commit/rules/manual.rb +0 -45
  59. data/lib/avm/git/auto_commit/rules/new.rb +0 -24
  60. data/lib/avm/git/auto_commit/rules/nth.rb +0 -31
  61. data/lib/avm/git/auto_commit/rules/unique.rb +0 -21
  62. data/lib/avm/git/auto_commit/rules.rb +0 -31
  63. data/lib/avm/git/auto_commit_path/ruby.rb +0 -20
  64. data/lib/avm/git/auto_commit_path.rb +0 -28
  65. data/lib/avm/git/commit/class_methods.rb +0 -31
  66. data/lib/avm/git/commit/deploy.rb +0 -38
  67. data/lib/avm/git/commit/deploy_methods.rb +0 -19
  68. data/lib/avm/git/commit/diff_tree_line.rb +0 -32
  69. data/lib/avm/git/commit/file.rb +0 -46
  70. data/lib/avm/git/commit.rb +0 -59
  71. data/lib/avm/git/file_auto_fixup.rb +0 -83
  72. data/lib/avm/git/issue/complete/commits.rb +0 -42
  73. data/lib/avm/git/issue/complete/git_subrepos.rb +0 -23
  74. data/lib/avm/git/issue/complete/local_branch.rb +0 -54
  75. data/lib/avm/git/issue/complete/local_tag.rb +0 -39
  76. data/lib/avm/git/issue/complete/push.rb +0 -54
  77. data/lib/avm/git/issue/complete/remote.rb +0 -33
  78. data/lib/avm/git/issue/complete/test.rb +0 -45
  79. data/lib/avm/git/issue/complete/tracker.rb +0 -28
  80. data/lib/avm/git/issue/complete/validation.rb +0 -31
  81. data/lib/avm/git/issue/complete/validations.rb +0 -53
  82. data/lib/avm/git/issue/complete/working_tree.rb +0 -19
  83. data/lib/avm/git/issue/complete.rb +0 -51
  84. data/lib/avm/git/issue/deliver.rb +0 -56
  85. data/lib/avm/git/organize/reference_update.rb +0 -34
  86. data/lib/avm/git/organize/repository.rb +0 -76
  87. data/lib/avm/git/revision_test.rb +0 -106
  88. data/lib/avm/git/subrepo_check/parent.rb +0 -51
  89. data/lib/avm/git/subrepo_check/remote.rb +0 -89
  90. data/lib/avm/git/subrepo_check/show_result.rb +0 -32
  91. data/lib/avm/git/subrepo_check.rb +0 -38
  92. data/lib/avm/git/subrepo_checks.rb +0 -59
  93. data/lib/avm/git.rb +0 -10
@@ -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,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
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry'
4
+ require 'eac_git'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module Sources
9
+ class Base
10
+ require_sub __FILE__
11
+ enable_simple_cache
12
+ enable_listable
13
+ lists.add_symbol :option, :parent
14
+ common_constructor :path, :options, default: [{}] do
15
+ self.path = path.to_pathname
16
+ self.options = self.class.lists.option.hash_keys_validate!(options)
17
+ end
18
+
19
+ delegate :locale, to: :configuration
20
+ delegate :to_s, to: :path
21
+
22
+ # @return [Avm::Sources::Base]
23
+ def parent
24
+ options[OPTION_PARENT]
25
+ end
26
+
27
+ # @return [Pathname]
28
+ def relative_path
29
+ return path if parent.blank?
30
+
31
+ path.relative_path_from(parent.path)
32
+ end
33
+
34
+ # @return [Enumerable<Avm::Sources::Base>]
35
+ def subs
36
+ git_repo.subrepos
37
+ .map { |subrepo| self.class.new(subrepo.subpath.expand_path(path), parent: self) }
38
+ end
39
+
40
+ def update
41
+ stereotype.update_source(self)
42
+ end
43
+
44
+ private
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
+
51
+ # @return [EacGit::Local]
52
+ def git_repo_uncached
53
+ ::EacGit::Local.new(path)
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
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/patches/eac_ruby_gems_utils/gem'
4
+ require 'i18n'
5
+
6
+ module Avm
7
+ module Sources
8
+ class Configuration < ::EacConfig::OldConfigs
9
+ LOCALE_KEY = :locale
10
+
11
+ def locale
12
+ read_entry(LOCALE_KEY) || ::I18n.default_locale
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Sources
5
+ class Configuration < ::EacConfig::OldConfigs
6
+ RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
7
+ RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
8
+
9
+ def rubocop_command
10
+ read_command(RUBOCOP_COMMAND_KEY)
11
+ end
12
+
13
+ def rubocop_gemfile
14
+ gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
15
+ return nil if gemfile_path.blank?
16
+
17
+ gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
18
+ return gemfile_path if gemfile_path.file?
19
+
20
+ raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/patches/eac_ruby_gems_utils/gem'
4
+
5
+ module Avm
6
+ module Sources
7
+ class Configuration < ::EacConfig::OldConfigs
8
+ BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
9
+ TEST_COMMAND_KEY = 'test.command'
10
+
11
+ def any_test_command
12
+ bundle_test_command || test_command
13
+ end
14
+
15
+ def test_command
16
+ read_command(TEST_COMMAND_KEY)
17
+ end
18
+
19
+ def bundle_test_command
20
+ read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
21
+ args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
22
+ ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_config/old_configs'
4
+ require 'eac_ruby_utils/core_ext'
5
+ require 'yaml'
6
+
7
+ module Avm
8
+ module Sources
9
+ class Configuration < ::EacConfig::OldConfigs
10
+ require_sub __FILE__
11
+
12
+ FILENAMES = %w[.avm.yml .avm.yaml].freeze
13
+
14
+ class << self
15
+ def find_by_path(path)
16
+ path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
17
+ internal_find_path(path.expand_path)
18
+ end
19
+
20
+ def find_in_path(path)
21
+ absolute_pathname = path.to_pathname.expand_path
22
+ if absolute_pathname.directory?
23
+ FILENAMES.each do |filename|
24
+ file = absolute_pathname.join(filename)
25
+ return new(file) if file.exist?
26
+ end
27
+ end
28
+ nil
29
+ end
30
+
31
+ private
32
+
33
+ def internal_find_path(absolute_pathname)
34
+ r = find_in_path(absolute_pathname)
35
+ return r if r.present?
36
+
37
+ internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
38
+ end
39
+ end
40
+
41
+ def initialize(path)
42
+ super(nil, storage_path: path)
43
+ end
44
+
45
+ # Utility to read a configuration as a [EacRubyUtils::Envs::Command].
46
+ # @return [EacRubyUtils::Envs::Command]
47
+ def read_command(key)
48
+ read_entry(key).if_present do |v|
49
+ args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
50
+ ::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Sources
7
+ require_sub __FILE__
8
+ end
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.3.1'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.6.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-02 00:00:00.000000000 Z
11
+ date: 2021-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_docker
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.68'
47
+ version: '0.77'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.68'
54
+ version: '0.77'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: eac_templates
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,6 +72,54 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: 0.1.1
75
+ - !ruby/object:Gem::Dependency
76
+ name: filesize
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0.2'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0.2'
89
+ - !ruby/object:Gem::Dependency
90
+ name: htmlbeautifier
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.3'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 1.3.1
99
+ type: :runtime
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.3'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.3.1
109
+ - !ruby/object:Gem::Dependency
110
+ name: minitar
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '0.9'
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '0.9'
75
123
  - !ruby/object:Gem::Dependency
76
124
  name: aranha-parsers
77
125
  requirement: !ruby/object:Gem::Requirement
@@ -113,77 +161,41 @@ extensions: []
113
161
  extra_rdoc_files: []
114
162
  files:
115
163
  - lib/avm.rb
164
+ - lib/avm/data/instance.rb
165
+ - lib/avm/data/instance/files_unit.rb
166
+ - lib/avm/data/instance/package.rb
167
+ - lib/avm/data/instance/unit.rb
168
+ - lib/avm/data/package.rb
169
+ - lib/avm/data/package/dump.rb
170
+ - lib/avm/data/package/load.rb
171
+ - lib/avm/data/unit.rb
116
172
  - lib/avm/docker.rb
117
173
  - lib/avm/docker/container.rb
118
174
  - lib/avm/docker/image.rb
119
175
  - lib/avm/docker/runner.rb
120
176
  - lib/avm/executables.rb
121
- - lib/avm/files.rb
122
- - lib/avm/files/appendable.rb
123
- - lib/avm/files/appendable/file_content.rb
124
- - lib/avm/files/appendable/plain_directory.rb
125
- - lib/avm/files/appendable/resource_base.rb
126
- - lib/avm/files/appendable/tar_output_command.rb
127
- - lib/avm/files/appendable/templatized_directory.rb
128
- - lib/avm/files/appender.rb
129
- - lib/avm/files/deploy.rb
130
- - lib/avm/files/formatter.rb
131
- - lib/avm/files/formatter/formats.rb
132
- - lib/avm/files/formatter/formats/base.rb
133
- - lib/avm/files/formatter/formats/generic_plain.rb
134
- - lib/avm/files/formatter/formats/html.rb
135
- - lib/avm/files/formatter/formats/javascript.rb
136
- - lib/avm/files/formatter/formats/json.rb
137
- - lib/avm/files/formatter/formats/php.rb
138
- - lib/avm/files/formatter/formats/python.rb
139
- - lib/avm/files/formatter/formats/ruby.rb
140
- - lib/avm/files/formatter/formats/xml.rb
141
- - lib/avm/files/formatter/utf8_assert.rb
142
- - lib/avm/files/info.rb
143
- - lib/avm/files/rotate.rb
144
- - lib/avm/git.rb
145
- - lib/avm/git/auto_commit/commit_info.rb
146
- - lib/avm/git/auto_commit/rules.rb
147
- - lib/avm/git/auto_commit/rules/base.rb
148
- - lib/avm/git/auto_commit/rules/last.rb
149
- - lib/avm/git/auto_commit/rules/manual.rb
150
- - lib/avm/git/auto_commit/rules/new.rb
151
- - lib/avm/git/auto_commit/rules/nth.rb
152
- - lib/avm/git/auto_commit/rules/unique.rb
153
- - lib/avm/git/auto_commit_path.rb
154
- - lib/avm/git/auto_commit_path/ruby.rb
155
- - lib/avm/git/commit.rb
156
- - lib/avm/git/commit/class_methods.rb
157
- - lib/avm/git/commit/deploy.rb
158
- - lib/avm/git/commit/deploy_methods.rb
159
- - lib/avm/git/commit/diff_tree_line.rb
160
- - lib/avm/git/commit/file.rb
161
- - lib/avm/git/file_auto_fixup.rb
162
- - lib/avm/git/issue.rb
163
- - lib/avm/git/issue/complete.rb
164
- - lib/avm/git/issue/complete/commits.rb
165
- - lib/avm/git/issue/complete/git_subrepos.rb
166
- - lib/avm/git/issue/complete/local_branch.rb
167
- - lib/avm/git/issue/complete/local_tag.rb
168
- - lib/avm/git/issue/complete/push.rb
169
- - lib/avm/git/issue/complete/remote.rb
170
- - lib/avm/git/issue/complete/test.rb
171
- - lib/avm/git/issue/complete/tracker.rb
172
- - lib/avm/git/issue/complete/validation.rb
173
- - lib/avm/git/issue/complete/validations.rb
174
- - lib/avm/git/issue/complete/working_tree.rb
175
- - lib/avm/git/issue/deliver.rb
176
- - lib/avm/git/organize.rb
177
- - lib/avm/git/organize/reference_update.rb
178
- - lib/avm/git/organize/repository.rb
179
- - lib/avm/git/revision_test.rb
180
- - lib/avm/git/subrepo_check.rb
181
- - lib/avm/git/subrepo_check/parent.rb
182
- - lib/avm/git/subrepo_check/remote.rb
183
- - lib/avm/git/subrepo_check/show_result.rb
184
- - lib/avm/git/subrepo_checks.rb
185
177
  - lib/avm/instances/docker_image.rb
178
+ - lib/avm/jobs.rb
179
+ - lib/avm/jobs/base.rb
180
+ - lib/avm/jobs/variables_source.rb
181
+ - lib/avm/path_string.rb
182
+ - lib/avm/registry.rb
183
+ - lib/avm/registry/base.rb
186
184
  - lib/avm/result.rb
185
+ - lib/avm/rspec.rb
186
+ - lib/avm/rspec/setup.rb
187
+ - lib/avm/rspec/shared_examples/in_avm_registry.rb
188
+ - lib/avm/rspec/shared_examples/not_in_avm_registry.rb
189
+ - lib/avm/scms/base.rb
190
+ - lib/avm/scms/commit.rb
191
+ - lib/avm/source_stereotypes/base.rb
192
+ - lib/avm/sources.rb
193
+ - lib/avm/sources/base.rb
194
+ - lib/avm/sources/configuration.rb
195
+ - lib/avm/sources/configuration/_locale.rb
196
+ - lib/avm/sources/configuration/_rubocop.rb
197
+ - lib/avm/sources/configuration/_tests.rb
198
+ - lib/avm/sync.rb
187
199
  - lib/avm/version.rb
188
200
  - lib/avm/version_number.rb
189
201
  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