avm-files 0.7.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/files/appendable/file_content.rb +7 -0
- data/lib/avm/files/appendable/plain_directory.rb +5 -0
- data/lib/avm/files/appendable/resource_base.rb +6 -0
- data/lib/avm/files/appendable/tar_output_command.rb +5 -0
- data/lib/avm/files/appendable/templatized_directory.rb +19 -8
- data/lib/avm/files/runner_with/filesystem_traverser.rb +2 -2
- data/lib/avm/files/version.rb +1 -1
- metadata +16 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 756611429da59f150cac533b9034ce4980fd1a9a49f96c0abb36918a2fd70fed
|
4
|
+
data.tar.gz: 8cb10396cec9e310e106f375a471a1325985a7f0c9c7cef04853095fd1ed9299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eb0df54f9a8064aff5c243a35e9c4ab83cf86598e66e864bf4449c6c3474b875981a1339299cff820419e8aa56b3533859141a41d66152f54294369ea762107
|
7
|
+
data.tar.gz: 48014a52fe99a6c1bff357e9645ffcd5b5011431355ea92265edba9d43841451cfd4a5171f4b401ac59c433a6c8c9dcbb4fbae04e28185331690407270d5bb7f
|
@@ -6,7 +6,13 @@ module Avm
|
|
6
6
|
module Files
|
7
7
|
module Appendable
|
8
8
|
class ResourceBase
|
9
|
+
acts_as_abstract :to_s_attributes
|
9
10
|
common_constructor :appender
|
11
|
+
|
12
|
+
def to_s
|
13
|
+
v_to_s = to_s_attributes.map { |k| "#{k}: #{send(k)}" }.join(', ')
|
14
|
+
"#{self.class.name}[#{v_to_s}]"
|
15
|
+
end
|
10
16
|
end
|
11
17
|
end
|
12
18
|
end
|
@@ -8,20 +8,31 @@ module Avm
|
|
8
8
|
module Files
|
9
9
|
module Appendable
|
10
10
|
class TemplatizedDirectory < ::Avm::Files::Appendable::ResourceBase
|
11
|
-
|
11
|
+
common_constructor :appender, :source_path, super_args: -> { [appender] }
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
# @return [Object]
|
14
|
+
def applier
|
15
|
+
return source_path if source_path.respond_to?(:apply)
|
16
|
+
|
17
|
+
applier_from_path
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [EacTemplates::Variables::Directory]
|
21
|
+
def applier_from_path
|
22
|
+
raise "\"#{source_path}\" is not a directory" unless ::File.directory?(source_path)
|
23
|
+
|
24
|
+
::EacTemplates::Variables::Directory.new(source_path)
|
16
25
|
end
|
17
26
|
|
18
27
|
def write_on(target_dir)
|
19
28
|
raise 'Variables source not set' if appender.variables_source.blank?
|
20
29
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
30
|
+
applier.apply(appender.variables_source, target_dir)
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [Enumerable<Symbol>]
|
34
|
+
def to_s_attributes
|
35
|
+
[:source_path]
|
25
36
|
end
|
26
37
|
end
|
27
38
|
end
|
data/lib/avm/files/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-files
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -16,96 +16,90 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.84.2
|
19
|
+
version: '0.93'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.84.2
|
26
|
+
version: '0.93'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: eac_cli
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
33
|
+
version: '0.42'
|
40
34
|
type: :runtime
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
38
|
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
40
|
+
version: '0.42'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: eac_fs
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
47
|
+
version: '0.18'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
54
|
+
version: '0.18'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: eac_ruby_utils
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - "~>"
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
61
|
+
version: '0.122'
|
68
62
|
type: :runtime
|
69
63
|
prerelease: false
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
66
|
- - "~>"
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
68
|
+
version: '0.122'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: eac_templates
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
73
|
- - "~>"
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0.
|
75
|
+
version: '0.7'
|
82
76
|
- - ">="
|
83
77
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
78
|
+
version: 0.7.1
|
85
79
|
type: :runtime
|
86
80
|
prerelease: false
|
87
81
|
version_requirements: !ruby/object:Gem::Requirement
|
88
82
|
requirements:
|
89
83
|
- - "~>"
|
90
84
|
- !ruby/object:Gem::Version
|
91
|
-
version: '0.
|
85
|
+
version: '0.7'
|
92
86
|
- - ">="
|
93
87
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.
|
88
|
+
version: 0.7.1
|
95
89
|
- !ruby/object:Gem::Dependency
|
96
90
|
name: eac_ruby_gem_support
|
97
91
|
requirement: !ruby/object:Gem::Requirement
|
98
92
|
requirements:
|
99
93
|
- - "~>"
|
100
94
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0.
|
95
|
+
version: '0.10'
|
102
96
|
type: :development
|
103
97
|
prerelease: false
|
104
98
|
version_requirements: !ruby/object:Gem::Requirement
|
105
99
|
requirements:
|
106
100
|
- - "~>"
|
107
101
|
- !ruby/object:Gem::Version
|
108
|
-
version: '0.
|
102
|
+
version: '0.10'
|
109
103
|
description:
|
110
104
|
email:
|
111
105
|
executables: []
|