eac_tools 0.78.0 → 0.79.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +27 -18
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/application_scms/base.rb +28 -0
- data/sub/avm/lib/avm/application_scms.rb +9 -0
- data/sub/avm/lib/avm/applications/base/scm.rb +27 -0
- data/sub/avm/lib/avm/applications/base.rb +10 -1
- data/sub/avm/lib/avm/entries/base/inherited_entry_value.rb +16 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +2 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +2 -1
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/generic_component.rb +4 -19
- data/sub/avm/lib/avm/patches/eac_config/entry_path.rb +46 -0
- data/sub/avm/lib/avm/registry/application_scms.rb +15 -0
- data/sub/avm/lib/avm/registry.rb +3 -3
- data/sub/avm/lib/avm/rspec/shared_examples/entries_values.rb +2 -2
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/applications/base/entries_spec.rb +29 -0
- data/sub/avm/spec/lib/avm/applications/base/entries_spec_files/config.yml +11 -0
- data/sub/avm/spec/lib/avm/patches/eac_config/entry_path_spec.rb +28 -0
- data/sub/avm-eac_github_base0/Gemfile +8 -0
- data/sub/avm-eac_github_base0/avm-eac_github_base0.gemspec +21 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/entity.rb +24 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/organization.rb +19 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/repository.rb +14 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/root.rb +20 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/api.rb +18 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/application_scms/base.rb +13 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/application_scms.rb +11 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0/version.rb +7 -0
- data/sub/avm-eac_github_base0/lib/avm/eac_github_base0.rb +9 -0
- data/sub/avm-eac_github_base0/spec/avm/eac_github_base0/application_scms/base_spec.rb +7 -0
- data/sub/avm-eac_github_base0/spec/rubocop_spec.rb +3 -0
- data/sub/avm-eac_github_base0/spec/spec_helper.rb +4 -0
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +3 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +1 -1
- data/sub/avm-tools/lib/avm/tools/runner/application/info.rb +2 -1
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- metadata +44 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90311d99a8fde34e9e085138cecf3eb3eaec19cd6db5df22b900ca73a058a568
|
4
|
+
data.tar.gz: '082caa63292c671845f74e8a913054ad212894aa117ddc7d3f7cd2ff65885bdb'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392a2ae0e2f9688a644ae606bd2b6e8c82e06a2aa0e9f30138972866f15f29dd045533b5ebd59303b2613ce43bebdfc3903535727a5e2f2b48c410c5a6b04168
|
7
|
+
data.tar.gz: 99306a1b0f26497d5bebb657c766c912acc347be451a23eea152c0e73f9f5b9e1fe31c39dc1eed32faebbeebf1df39f6cf47d86759b26c902222b217c1c5743c
|
data/Gemfile.lock
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
4
|
+
eac_tools (0.79.0)
|
5
|
+
avm (~> 0.81)
|
6
6
|
avm-eac_asciidoctor_base0 (~> 0.19)
|
7
7
|
avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
|
8
|
+
avm-eac_github_base0 (~> 0.2)
|
8
9
|
avm-eac_latex_base0 (~> 0.3, >= 0.3.1)
|
9
10
|
avm-eac_php_base0 (~> 0.4, >= 0.4.2)
|
10
11
|
avm-eac_postgresql_base0 (~> 0.5, >= 0.5.2)
|
11
12
|
avm-eac_python_base0 (~> 0.2, >= 0.2.1)
|
12
13
|
avm-eac_rails_base0 (~> 0.10, >= 0.10.3)
|
13
14
|
avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
|
14
|
-
avm-eac_redmine_base0 (~> 0.21, >= 0.21.
|
15
|
+
avm-eac_redmine_base0 (~> 0.21, >= 0.21.2)
|
15
16
|
avm-eac_redmine_plugin_base0 (~> 0.4)
|
16
17
|
avm-eac_ruby_base1 (~> 0.32, >= 0.32.1)
|
17
18
|
avm-eac_webapp_base0 (~> 0.18, >= 0.18.2)
|
18
19
|
avm-eac_wordpress_base0 (~> 0.3, >= 0.3.1)
|
19
20
|
avm-git (~> 0.13, >= 0.13.4)
|
20
|
-
avm-tools (~> 0.
|
21
|
+
avm-tools (~> 0.157)
|
21
22
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
22
23
|
|
23
24
|
PATH
|
@@ -37,6 +38,14 @@ PATH
|
|
37
38
|
avm (~> 0.79)
|
38
39
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
39
40
|
|
41
|
+
PATH
|
42
|
+
remote: sub/avm-eac_github_base0
|
43
|
+
specs:
|
44
|
+
avm-eac_github_base0 (0.2.0)
|
45
|
+
avm (~> 0.81)
|
46
|
+
eac_rest (~> 0.10)
|
47
|
+
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
48
|
+
|
40
49
|
PATH
|
41
50
|
remote: sub/avm-eac_latex_base0
|
42
51
|
specs:
|
@@ -86,8 +95,8 @@ PATH
|
|
86
95
|
PATH
|
87
96
|
remote: sub/avm-eac_redmine_base0
|
88
97
|
specs:
|
89
|
-
avm-eac_redmine_base0 (0.21.
|
90
|
-
avm (~> 0.
|
98
|
+
avm-eac_redmine_base0 (0.21.2)
|
99
|
+
avm (~> 0.81)
|
91
100
|
avm-eac_generic_base0 (~> 0.12, >= 0.12.1)
|
92
101
|
avm-eac_rails_base1 (~> 0.9, >= 0.9.3)
|
93
102
|
avm-eac_ubuntu_base0 (~> 0.5)
|
@@ -163,9 +172,9 @@ PATH
|
|
163
172
|
PATH
|
164
173
|
remote: sub/avm-tools
|
165
174
|
specs:
|
166
|
-
avm-tools (0.
|
175
|
+
avm-tools (0.157.0)
|
167
176
|
aranha-parsers (~> 0.21)
|
168
|
-
avm (~> 0.
|
177
|
+
avm (~> 0.81)
|
169
178
|
avm-eac_ruby_base1 (~> 0.32, >= 0.32.1)
|
170
179
|
avm-eac_ubuntu_base0 (~> 0.5)
|
171
180
|
avm-files (~> 0.6, >= 0.6.2)
|
@@ -181,7 +190,7 @@ PATH
|
|
181
190
|
PATH
|
182
191
|
remote: sub/avm
|
183
192
|
specs:
|
184
|
-
avm (0.
|
193
|
+
avm (0.81.0)
|
185
194
|
aranha-parsers (~> 0.21)
|
186
195
|
eac_cli (~> 0.38)
|
187
196
|
eac_config (~> 0.14, >= 0.14.1)
|
@@ -268,10 +277,10 @@ GEM
|
|
268
277
|
eac_cli (~> 0.35)
|
269
278
|
eac_fs (~> 0.16)
|
270
279
|
eac_ruby_utils (~> 0.117)
|
271
|
-
eac_ruby_gem_support (0.8.
|
280
|
+
eac_ruby_gem_support (0.8.2)
|
272
281
|
eac_ruby_utils (~> 0.119, >= 0.119.2)
|
273
282
|
rspec (~> 3.12)
|
274
|
-
rubocop (~> 1.
|
283
|
+
rubocop (~> 1.57, >= 1.57.1)
|
275
284
|
rubocop-rails (~> 2.21, >= 2.21.2)
|
276
285
|
rubocop-rspec (~> 2.24, >= 2.24.1)
|
277
286
|
eac_ruby_utils (0.119.2)
|
@@ -343,8 +352,7 @@ GEM
|
|
343
352
|
diff-lcs (>= 1.2.0, < 2.0)
|
344
353
|
rspec-support (~> 3.12.0)
|
345
354
|
rspec-support (3.12.1)
|
346
|
-
rubocop (1.57.
|
347
|
-
base64 (~> 0.1.1)
|
355
|
+
rubocop (1.57.2)
|
348
356
|
json (~> 2.3)
|
349
357
|
language_server-protocol (>= 3.17.0)
|
350
358
|
parallel (~> 1.10)
|
@@ -355,18 +363,18 @@ GEM
|
|
355
363
|
rubocop-ast (>= 1.28.1, < 2.0)
|
356
364
|
ruby-progressbar (~> 1.7)
|
357
365
|
unicode-display_width (>= 2.4.0, < 3.0)
|
358
|
-
rubocop-ast (1.
|
366
|
+
rubocop-ast (1.30.0)
|
359
367
|
parser (>= 3.2.1.0)
|
360
368
|
rubocop-capybara (2.19.0)
|
361
369
|
rubocop (~> 1.41)
|
362
370
|
rubocop-factory_bot (2.24.0)
|
363
371
|
rubocop (~> 1.33)
|
364
|
-
rubocop-rails (2.
|
372
|
+
rubocop-rails (2.22.1)
|
365
373
|
activesupport (>= 4.2.0)
|
366
374
|
rack (>= 1.1)
|
367
375
|
rubocop (>= 1.33.0, < 2.0)
|
368
|
-
rubocop-rspec (2.
|
369
|
-
rubocop (~> 1.
|
376
|
+
rubocop-rspec (2.25.0)
|
377
|
+
rubocop (~> 1.40)
|
370
378
|
rubocop-capybara (~> 2.17)
|
371
379
|
rubocop-factory_bot (~> 2.22)
|
372
380
|
ruby-filemagic (0.7.3)
|
@@ -385,6 +393,7 @@ DEPENDENCIES
|
|
385
393
|
avm!
|
386
394
|
avm-eac_asciidoctor_base0!
|
387
395
|
avm-eac_generic_base0!
|
396
|
+
avm-eac_github_base0!
|
388
397
|
avm-eac_latex_base0!
|
389
398
|
avm-eac_php_base0!
|
390
399
|
avm-eac_postgresql_base0!
|
@@ -407,4 +416,4 @@ DEPENDENCIES
|
|
407
416
|
eac_tools!
|
408
417
|
|
409
418
|
BUNDLED WITH
|
410
|
-
2.
|
419
|
+
2.4.19
|
data/lib/eac_tools/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module ApplicationScms
|
7
|
+
class Base
|
8
|
+
class << self
|
9
|
+
# @return [String]
|
10
|
+
def type_name
|
11
|
+
name.gsub(/#{Regexp.quote('::ApplicationScms::Base')}$/, '').demodulize
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# !method initialize(url)
|
16
|
+
# @param url [Addressable::URI]
|
17
|
+
common_constructor :url do
|
18
|
+
self.url = url.to_uri
|
19
|
+
end
|
20
|
+
delegate :type_name, to: :class
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def to_s
|
24
|
+
"#{type_name}[#{url}]"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Applications
|
8
|
+
class Base
|
9
|
+
module Scm
|
10
|
+
common_concern do
|
11
|
+
uri_components_entries_values 'scm', %w[repos_path type]
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Avm::ApplicationScms::Base]
|
15
|
+
def scm
|
16
|
+
@scm ||= ::Avm::Registry.application_scms.detect(scm_type, scm_url)
|
17
|
+
end
|
18
|
+
|
19
|
+
# @param value [String]
|
20
|
+
# @return [String]
|
21
|
+
def scm_repos_path_inherited_value_proc(value)
|
22
|
+
value.to_pathname.join(id).to_path
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -7,11 +7,18 @@ module Avm
|
|
7
7
|
module Applications
|
8
8
|
class Base
|
9
9
|
enable_simple_cache
|
10
|
-
require_sub __FILE__, include_modules: true
|
11
10
|
include ::Avm::Entries::Base
|
12
11
|
|
13
12
|
AVM_TYPE = 'Application'
|
14
13
|
|
14
|
+
class << self
|
15
|
+
# @param id [String]
|
16
|
+
# @return [Avm::Applications::Base]
|
17
|
+
def by_id(id)
|
18
|
+
new(id)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
15
22
|
common_constructor :id do
|
16
23
|
self.id = id.to_s
|
17
24
|
end
|
@@ -23,6 +30,8 @@ module Avm
|
|
23
30
|
def instance(suffix)
|
24
31
|
stereotype.instance_class.new(self, suffix)
|
25
32
|
end
|
33
|
+
|
34
|
+
require_sub __FILE__, include_modules: true
|
26
35
|
end
|
27
36
|
end
|
28
37
|
end
|
@@ -18,8 +18,23 @@ module Avm
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
# @param provider_id [String]
|
22
|
+
# @return [Avm::Entries::Base]
|
23
|
+
def other_entries_provider(provider_id)
|
24
|
+
other_entries_provider_class.by_id(provider_id)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [Class]
|
28
|
+
def other_entries_provider_class
|
29
|
+
[::Avm::Instances::Base, ::Avm::Applications::Base].each do |klass|
|
30
|
+
return klass if entries_provider.is_a?(klass)
|
31
|
+
end
|
32
|
+
|
33
|
+
raise "No provider class found for \"#{entries_provider}\""
|
34
|
+
end
|
35
|
+
|
21
36
|
def other_entry_value(instance_id)
|
22
|
-
|
37
|
+
other_entries_provider(instance_id).read_entry_optional(target_entry_suffix)
|
23
38
|
end
|
24
39
|
|
25
40
|
def self_entry_value
|
@@ -13,8 +13,9 @@ module Avm
|
|
13
13
|
common_constructor :uri_component_entry_value
|
14
14
|
delegate :component_entry_path, :entries_provider, to: :uri_component_entry_value
|
15
15
|
|
16
|
+
# @return [Symbol]
|
16
17
|
def default_value_method_name
|
17
|
-
|
18
|
+
component_entry_path.default_method_name
|
18
19
|
end
|
19
20
|
|
20
21
|
def result
|
@@ -28,8 +28,9 @@ module Avm
|
|
28
28
|
->(value) { entries_provider.send(inherited_value_block_method_name, value) }
|
29
29
|
end
|
30
30
|
|
31
|
+
# @return [Symbol]
|
31
32
|
def inherited_value_block_method_name
|
32
|
-
|
33
|
+
component_entry_path.inherited_block_method_name
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/entries/uri_builder'
|
4
|
+
require 'avm/patches/eac_config/entry_path'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
@@ -10,14 +11,8 @@ module Avm
|
|
10
11
|
class GenericComponent
|
11
12
|
common_constructor :owner, :component
|
12
13
|
delegate :entries_provider_class, :prefix, to: :owner
|
13
|
-
|
14
|
-
|
15
|
-
['auto', component_method_name].join('_')
|
16
|
-
end
|
17
|
-
|
18
|
-
def component_method_name
|
19
|
-
[prefix, component].join('_')
|
20
|
-
end
|
14
|
+
delegate :auto_method_name, :get_method_name, :get_optional_method_name,
|
15
|
+
to: :entry_key_path
|
21
16
|
|
22
17
|
def define_auto_method
|
23
18
|
outer_self = self
|
@@ -48,22 +43,12 @@ module Avm
|
|
48
43
|
::EacConfig::EntryPath.assert([prefix, component])
|
49
44
|
end
|
50
45
|
|
51
|
-
# @return [String]
|
52
|
-
def get_method_name # rubocop:disable Naming/AccessorMethodName
|
53
|
-
component_method_name
|
54
|
-
end
|
55
|
-
|
56
|
-
# @return [String]
|
57
|
-
def get_optional_method_name # rubocop:disable Naming/AccessorMethodName
|
58
|
-
get_method_name + '_optional'
|
59
|
-
end
|
60
|
-
|
61
46
|
def id_component
|
62
47
|
@id_component ||= owner.component_factory('id')
|
63
48
|
end
|
64
49
|
|
65
50
|
def inherited_value_proc_name
|
66
|
-
|
51
|
+
entry_key_path.inherited_block_method_name
|
67
52
|
end
|
68
53
|
|
69
54
|
def setup
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_config/entry_path'
|
4
|
+
|
5
|
+
module EacConfig
|
6
|
+
class EntryPath
|
7
|
+
# @return [Symbol]
|
8
|
+
def auto_method_name
|
9
|
+
method_name('auto_', '')
|
10
|
+
end
|
11
|
+
|
12
|
+
# @return [Symbol]
|
13
|
+
def default_method_name
|
14
|
+
method_name('', '_default_value')
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Symbol]
|
18
|
+
def get_method_name # rubocop:disable Naming/AccessorMethodName
|
19
|
+
method_name('', '')
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [Symbol]
|
23
|
+
def get_optional_method_name # rubocop:disable Naming/AccessorMethodName
|
24
|
+
method_name('', '_optional')
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [Symbol]
|
28
|
+
def inherited_block_method_name
|
29
|
+
method_name('', '_inherited_value_proc')
|
30
|
+
end
|
31
|
+
|
32
|
+
# @return [String]
|
33
|
+
def variableize
|
34
|
+
parts.join('_')
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
# @param before [String]
|
40
|
+
# @param after [String]
|
41
|
+
# @return [Symbol]
|
42
|
+
def method_name(before, after)
|
43
|
+
"#{before}#{variableize}#{after}".to_sym
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry/from_gems'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Registry
|
7
|
+
class ApplicationScms < ::Avm::Registry::FromGems
|
8
|
+
def class_detect(klass, detect_args)
|
9
|
+
return nil unless klass.type_name == detect_args[0]
|
10
|
+
|
11
|
+
klass.new(*detect_args[1..-1])
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/sub/avm/lib/avm/registry.rb
CHANGED
@@ -7,9 +7,9 @@ module Avm
|
|
7
7
|
module Registry
|
8
8
|
require_sub __FILE__
|
9
9
|
enable_listable
|
10
|
-
lists.add_symbol :category, :applications, :
|
11
|
-
:file_formats, :instances, :launcher_stereotypes, :runners,
|
12
|
-
:source_generators, :sources
|
10
|
+
lists.add_symbol :category, :applications, :application_scms, :application_stereotypes,
|
11
|
+
:config_objects, :file_formats, :instances, :launcher_stereotypes, :runners,
|
12
|
+
:scms, :source_generators, :sources
|
13
13
|
|
14
14
|
class << self
|
15
15
|
enable_simple_cache
|
@@ -13,8 +13,8 @@ require 'eac_ruby_utils/core_ext'
|
|
13
13
|
context "when a auto value is requested for \"#{instance_id}.#{input}\"" do
|
14
14
|
let(:instance) { described_class.by_id(instance_id) }
|
15
15
|
|
16
|
-
it ".
|
17
|
-
expect(instance.
|
16
|
+
it ".entry('#{input}').value should return \"#{expected}\"" do
|
17
|
+
expect(instance.entry(input).value).to eq(expected)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/applications/base'
|
4
|
+
|
5
|
+
RSpec.describe ::Avm::Applications::Base do
|
6
|
+
include_examples 'entries_values', __FILE__, {
|
7
|
+
'app0' => {
|
8
|
+
'name' => 'Application 0',
|
9
|
+
'organization' => nil,
|
10
|
+
'scm.id' => 'app1',
|
11
|
+
'scm.type' => 'ScmX',
|
12
|
+
'scm.url' => 'http://nowhere.net/anypath',
|
13
|
+
'scm.repos_path' => 'mygroup/app0'
|
14
|
+
},
|
15
|
+
'app1' => {
|
16
|
+
'name' => nil,
|
17
|
+
'organization' => 'org1',
|
18
|
+
'scm.id' => nil,
|
19
|
+
'scm.type' => 'ScmX',
|
20
|
+
'scm.url' => 'http://nowhere.net/anypath',
|
21
|
+
'scm.repos_path' => 'mygroup'
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
# @return [Avm::Entries::Base]
|
26
|
+
def build_instance(instance_id)
|
27
|
+
described_class.new(instance_id)
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/patches/eac_config/entry_path'
|
4
|
+
|
5
|
+
::RSpec.describe ::EacConfig::EntryPath do
|
6
|
+
{
|
7
|
+
'install.path' => {
|
8
|
+
auto: 'auto_install_path',
|
9
|
+
default: 'install_path_default_value',
|
10
|
+
get: 'install_path',
|
11
|
+
get_optional: 'install_path_optional',
|
12
|
+
inherited_block: 'install_path_inherited_value_proc'
|
13
|
+
}
|
14
|
+
}.each do |instance_path, test_data|
|
15
|
+
context "when path is \"#{instance_path}\"" do
|
16
|
+
let(:instance) { described_class.assert(instance_path) }
|
17
|
+
|
18
|
+
test_data.each do |method_prefix, expected_value|
|
19
|
+
method_name = "#{method_prefix}_method_name"
|
20
|
+
context "when method name is \"#{method_name}\"" do
|
21
|
+
it do
|
22
|
+
expect(instance.send(method_name)).to eq(expected_value.to_sym)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'avm/eac_github_base0/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'avm-eac_github_base0'
|
9
|
+
s.version = Avm::EacGithubBase0::VERSION
|
10
|
+
s.authors = ['Put here the authors']
|
11
|
+
s.summary = 'Put here de description.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib}/**/*']
|
14
|
+
s.required_ruby_version = '>= 2.7'
|
15
|
+
|
16
|
+
s.add_dependency 'avm', '~> 0.81'
|
17
|
+
s.add_dependency 'eac_rest', '~> 0.10'
|
18
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.119', '>= 0.119.2'
|
19
|
+
|
20
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.8', '>= 0.8.2'
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_rest/api'
|
4
|
+
require 'eac_rest/entity'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacGithubBase0
|
9
|
+
class Api < ::EacRest::Api
|
10
|
+
class Entity < ::EacRest::Entity
|
11
|
+
def all_from_list(entity_class, url_suffix)
|
12
|
+
r = []
|
13
|
+
while url_suffix.present?
|
14
|
+
response = api.request_json(url_suffix).response
|
15
|
+
r += response.body_data_or_raise
|
16
|
+
.map { |child_data| child_entity(entity_class, child_data) }
|
17
|
+
url_suffix = response.link('next')
|
18
|
+
end
|
19
|
+
r
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_github_base0/api/entity'
|
4
|
+
require 'avm/eac_github_base0/api/repository'
|
5
|
+
require 'eac_rest/api'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacGithubBase0
|
10
|
+
class Api < ::EacRest::Api
|
11
|
+
class Organization < ::Avm::EacGithubBase0::Api::Entity
|
12
|
+
# @return [Array<Avm::EacGithubBase0::Api::Repository>]
|
13
|
+
def repositories
|
14
|
+
all_from_list(::Avm::EacGithubBase0::Api::Repository, "/orgs/#{id}/repos")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_github_base0/api/entity'
|
4
|
+
require 'eac_rest/api'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacGithubBase0
|
9
|
+
class Api < ::EacRest::Api
|
10
|
+
class Repository < ::Avm::EacGithubBase0::Api::Entity
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_github_base0/api/entity'
|
4
|
+
require 'avm/eac_github_base0/api/organization'
|
5
|
+
require 'eac_rest/api'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacGithubBase0
|
10
|
+
class Api < ::EacRest::Api
|
11
|
+
class Root < ::Avm::EacGithubBase0::Api::Entity
|
12
|
+
# @param id [String]
|
13
|
+
# @return [Avm::EacGithubBase0::Api::Organization]
|
14
|
+
def organization(id)
|
15
|
+
child_entity(::Avm::EacGithubBase0::Api::Organization, id)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_rest/api'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacGithubBase0
|
8
|
+
class Api < ::EacRest::Api
|
9
|
+
DEFAULT_ROOT_URL = 'https://api.github.com'
|
10
|
+
|
11
|
+
def initialize(root_url = DEFAULT_ROOT_URL)
|
12
|
+
super(root_url)
|
13
|
+
end
|
14
|
+
|
15
|
+
require_sub __FILE__
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.required_ruby_version = '>= 2.7.0'
|
16
16
|
|
17
|
-
s.add_dependency 'avm', '~> 0.
|
17
|
+
s.add_dependency 'avm', '~> 0.81'
|
18
18
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.12', '>= 0.12.1'
|
19
19
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.9', '>= 0.9.3'
|
20
20
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.5'
|
@@ -16,6 +16,7 @@ module Avm
|
|
16
16
|
|
17
17
|
common_concern do
|
18
18
|
uri_components_entries_values GITOLITE_ENTRY_KEYS_PREFIX
|
19
|
+
undef_method :gitolite_path_inherited_value_proc
|
19
20
|
end
|
20
21
|
|
21
22
|
# @return [Avm::Instances::Data::FilesUnit]
|
@@ -28,8 +29,9 @@ module Avm
|
|
28
29
|
DEFAULT_HOSTNAME
|
29
30
|
end
|
30
31
|
|
32
|
+
# @return [String]
|
31
33
|
def gitolite_path_default_value
|
32
|
-
|
34
|
+
gitolite_username_optional.if_present do |v|
|
33
35
|
::File.join(DEFAULT_PATH_PARENT, v)
|
34
36
|
end
|
35
37
|
end
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.required_ruby_version = '>= 2.7.0'
|
18
18
|
|
19
19
|
s.add_dependency 'aranha-parsers', '~> 0.21'
|
20
|
-
s.add_dependency 'avm', '~> 0.
|
20
|
+
s.add_dependency 'avm', '~> 0.81'
|
21
21
|
s.add_dependency 'avm-eac_ruby_base1', '~> 0.32', '>= 0.32.1'
|
22
22
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.5'
|
23
23
|
s.add_dependency 'avm-files', '~> 0.6', '>= 0.6.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.79.0
|
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: 2023-10-
|
11
|
+
date: 2023-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.81'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.81'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: avm-eac_asciidoctor_base0
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 0.12.1
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: avm-eac_github_base0
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.2'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.2'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: avm-eac_latex_base0
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +201,7 @@ dependencies:
|
|
187
201
|
version: '0.21'
|
188
202
|
- - ">="
|
189
203
|
- !ruby/object:Gem::Version
|
190
|
-
version: 0.21.
|
204
|
+
version: 0.21.2
|
191
205
|
type: :runtime
|
192
206
|
prerelease: false
|
193
207
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -197,7 +211,7 @@ dependencies:
|
|
197
211
|
version: '0.21'
|
198
212
|
- - ">="
|
199
213
|
- !ruby/object:Gem::Version
|
200
|
-
version: 0.21.
|
214
|
+
version: 0.21.2
|
201
215
|
- !ruby/object:Gem::Dependency
|
202
216
|
name: avm-eac_redmine_plugin_base0
|
203
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -298,14 +312,14 @@ dependencies:
|
|
298
312
|
requirements:
|
299
313
|
- - "~>"
|
300
314
|
- !ruby/object:Gem::Version
|
301
|
-
version: '0.
|
315
|
+
version: '0.157'
|
302
316
|
type: :runtime
|
303
317
|
prerelease: false
|
304
318
|
version_requirements: !ruby/object:Gem::Requirement
|
305
319
|
requirements:
|
306
320
|
- - "~>"
|
307
321
|
- !ruby/object:Gem::Version
|
308
|
-
version: '0.
|
322
|
+
version: '0.157'
|
309
323
|
- !ruby/object:Gem::Dependency
|
310
324
|
name: eac_ruby_utils
|
311
325
|
requirement: !ruby/object:Gem::Requirement
|
@@ -437,6 +451,20 @@ files:
|
|
437
451
|
- sub/avm-eac_generic_base0/spec/lib/avm/eac_generic_base0/sources/base_spec.rb
|
438
452
|
- sub/avm-eac_generic_base0/spec/rubocop_spec.rb
|
439
453
|
- sub/avm-eac_generic_base0/spec/spec_helper.rb
|
454
|
+
- sub/avm-eac_github_base0/Gemfile
|
455
|
+
- sub/avm-eac_github_base0/avm-eac_github_base0.gemspec
|
456
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0.rb
|
457
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/api.rb
|
458
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/entity.rb
|
459
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/organization.rb
|
460
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/repository.rb
|
461
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/api/root.rb
|
462
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/application_scms.rb
|
463
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/application_scms/base.rb
|
464
|
+
- sub/avm-eac_github_base0/lib/avm/eac_github_base0/version.rb
|
465
|
+
- sub/avm-eac_github_base0/spec/avm/eac_github_base0/application_scms/base_spec.rb
|
466
|
+
- sub/avm-eac_github_base0/spec/rubocop_spec.rb
|
467
|
+
- sub/avm-eac_github_base0/spec/spec_helper.rb
|
440
468
|
- sub/avm-eac_latex_base0/Gemfile
|
441
469
|
- sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec
|
442
470
|
- sub/avm-eac_latex_base0/lib/avm/eac_latex_base0.rb
|
@@ -1115,6 +1143,8 @@ files:
|
|
1115
1143
|
- sub/avm/Gemfile
|
1116
1144
|
- sub/avm/avm.gemspec
|
1117
1145
|
- sub/avm/lib/avm.rb
|
1146
|
+
- sub/avm/lib/avm/application_scms.rb
|
1147
|
+
- sub/avm/lib/avm/application_scms/base.rb
|
1118
1148
|
- sub/avm/lib/avm/application_stereotypes.rb
|
1119
1149
|
- sub/avm/lib/avm/application_stereotypes/base.rb
|
1120
1150
|
- sub/avm/lib/avm/applications.rb
|
@@ -1124,6 +1154,7 @@ files:
|
|
1124
1154
|
- sub/avm/lib/avm/applications/base/naming.rb
|
1125
1155
|
- sub/avm/lib/avm/applications/base/organization.rb
|
1126
1156
|
- sub/avm/lib/avm/applications/base/publishing.rb
|
1157
|
+
- sub/avm/lib/avm/applications/base/scm.rb
|
1127
1158
|
- sub/avm/lib/avm/applications/base/stereotype.rb
|
1128
1159
|
- sub/avm/lib/avm/data/callbacks.rb
|
1129
1160
|
- sub/avm/lib/avm/data/clearer.rb
|
@@ -1222,8 +1253,10 @@ files:
|
|
1222
1253
|
- sub/avm/lib/avm/launcher/publish/check_result.rb
|
1223
1254
|
- sub/avm/lib/avm/launcher/stereotype.rb
|
1224
1255
|
- sub/avm/lib/avm/launcher_stereotypes.rb
|
1256
|
+
- sub/avm/lib/avm/patches/eac_config/entry_path.rb
|
1225
1257
|
- sub/avm/lib/avm/path_string.rb
|
1226
1258
|
- sub/avm/lib/avm/registry.rb
|
1259
|
+
- sub/avm/lib/avm/registry/application_scms.rb
|
1227
1260
|
- sub/avm/lib/avm/registry/application_stereotypes.rb
|
1228
1261
|
- sub/avm/lib/avm/registry/application_stereotypes/build_available.rb
|
1229
1262
|
- sub/avm/lib/avm/registry/application_stereotypes/stereotype_builder.rb
|
@@ -1312,6 +1345,8 @@ files:
|
|
1312
1345
|
- sub/avm/lib/avm/version_number.rb
|
1313
1346
|
- sub/avm/lib/avm/with/application_stereotype.rb
|
1314
1347
|
- sub/avm/lib/avm/with/extra_subcommands.rb
|
1348
|
+
- sub/avm/spec/lib/avm/applications/base/entries_spec.rb
|
1349
|
+
- sub/avm/spec/lib/avm/applications/base/entries_spec_files/config.yml
|
1315
1350
|
- sub/avm/spec/lib/avm/applications/base_spec.rb
|
1316
1351
|
- sub/avm/spec/lib/avm/applications/base_spec_fixture.yml
|
1317
1352
|
- sub/avm/spec/lib/avm/file_formats/base_spec.rb
|
@@ -1325,6 +1360,7 @@ files:
|
|
1325
1360
|
- sub/avm/spec/lib/avm/launcher/instances/base_spec_files/projects/ruby_gem_stub/lib/ruby_gem_stub/version.rb
|
1326
1361
|
- sub/avm/spec/lib/avm/launcher/instances/base_spec_files/projects/ruby_gem_stub/ruby_gem_stub.gemspec
|
1327
1362
|
- sub/avm/spec/lib/avm/launcher/instances/base_spec_files/settings.yaml
|
1363
|
+
- sub/avm/spec/lib/avm/patches/eac_config/entry_path_spec.rb
|
1328
1364
|
- sub/avm/spec/lib/avm/scms/auto_commit/file_resource_name_spec.rb
|
1329
1365
|
- sub/avm/spec/lib/avm/scms/base_spec.rb
|
1330
1366
|
- sub/avm/spec/lib/avm/sources/base_spec.rb
|