eac_tools 0.10.0 → 0.11.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 +7 -7
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/applications/base/stereotype.rb +31 -0
- data/sub/avm/lib/avm/applications/base.rb +17 -0
- data/sub/avm/lib/avm/registry/application_stereotypes.rb +26 -10
- data/sub/avm/lib/avm/registry/instances.rb +1 -1
- data/sub/avm/lib/avm/scms/base.rb +2 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +14 -0
- data/sub/{avm-tools/lib/avm/tools/runner/eac_redmine_base0 → avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners}/docker.rb +3 -3
- data/sub/{avm-tools/lib/avm/tools/runner/eac_redmine_base0 → avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners}/project_rename.rb +3 -3
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners.rb +13 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +25 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/core_update.rb +1 -3
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +0 -1
- data/sub/avm-tools/lib/avm/tools/runner/instance/info.rb +1 -0
- data/sub/avm-tools/lib/avm/tools/runner/instance.rb +6 -1
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- metadata +12 -11
- data/sub/avm/lib/avm/application_stereotypes/base/by_gem.rb +0 -17
- data/sub/avm/lib/avm/application_stereotypes/base/detection.rb +0 -34
- data/sub/avm-tools/lib/avm/tools/runner/eac_redmine_base0.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf951e52229600803d874cf5338a82d4a5844fc2b6394efe31f5f6fe6e90e211
|
4
|
+
data.tar.gz: f30235f79e322f9c454de1e4260e660b06a6297dd391db4a1d6631ef97c9d2f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80341907f9a9c14fdda123bc57ee50266f9894e23f247e3c84849bccd6b7ede54a9aebe9fd10463ee61440fe8f834c60f27a03992b8eddb8002ac81bb29ed3a5
|
7
|
+
data.tar.gz: 298ec77d399c84bba732913eb5329373fa5b7500c4d09c2347f86f3ad899cce452fffcbbd7a9b893341c7f310dc1ed17ab9fd2c8473e3895c54ca05470990ee4
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
4
|
+
eac_tools (0.11.0)
|
5
5
|
avm-eac_generic_base0 (~> 0.4)
|
6
6
|
avm-eac_rails_base0 (~> 0.5)
|
7
7
|
avm-eac_rails_base1 (~> 0.4, >= 0.4.1)
|
8
|
-
avm-eac_redmine_base0 (~> 0.
|
8
|
+
avm-eac_redmine_base0 (~> 0.11)
|
9
9
|
avm-eac_redmine_plugin_base0 (~> 0.3)
|
10
10
|
avm-eac_ruby_base1 (~> 0.11)
|
11
|
-
avm-tools (~> 0.
|
11
|
+
avm-tools (~> 0.125)
|
12
12
|
eac_ruby_utils (~> 0.96)
|
13
13
|
|
14
14
|
PATH
|
@@ -36,7 +36,8 @@ PATH
|
|
36
36
|
PATH
|
37
37
|
remote: sub/avm-eac_redmine_base0
|
38
38
|
specs:
|
39
|
-
avm-eac_redmine_base0 (0.
|
39
|
+
avm-eac_redmine_base0 (0.11.0)
|
40
|
+
avm (~> 0.29)
|
40
41
|
avm-eac_generic_base0 (~> 0.4)
|
41
42
|
avm-eac_rails_base1 (~> 0.4, >= 0.4.1)
|
42
43
|
avm-eac_ubuntu_base0 (~> 0.3)
|
@@ -63,12 +64,11 @@ PATH
|
|
63
64
|
PATH
|
64
65
|
remote: sub/avm-tools
|
65
66
|
specs:
|
66
|
-
avm-tools (0.
|
67
|
+
avm-tools (0.125.0)
|
67
68
|
aranha-parsers (~> 0.4)
|
68
69
|
avm (~> 0.27)
|
69
70
|
avm-eac_asciidoctor_base0 (~> 0.3, >= 0.3.4)
|
70
71
|
avm-eac_rails_base0 (~> 0.3)
|
71
|
-
avm-eac_redmine_base0 (~> 0.5, >= 0.5.2)
|
72
72
|
avm-eac_ruby_base1 (~> 0.8)
|
73
73
|
avm-eac_ubuntu_base0 (~> 0.3)
|
74
74
|
avm-files (~> 0.1)
|
@@ -82,7 +82,7 @@ PATH
|
|
82
82
|
PATH
|
83
83
|
remote: sub/avm
|
84
84
|
specs:
|
85
|
-
avm (0.
|
85
|
+
avm (0.29.0)
|
86
86
|
eac_cli (~> 0.27, >= 0.27.6)
|
87
87
|
eac_config (~> 0.9)
|
88
88
|
eac_docker (~> 0.3)
|
data/lib/eac_tools/version.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/registry'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Applications
|
7
|
+
class Base
|
8
|
+
module Stereotype
|
9
|
+
# @return [Avm::ApplicationStereotypes::Base, nil]
|
10
|
+
def stereotype_by_configuration
|
11
|
+
entry('stereotype').optional_value.if_present do |v|
|
12
|
+
::Avm::Registry.application_stereotypes.detect(v)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [Avm::ApplicationStereotypes::Base, nil]
|
17
|
+
def stereotype_by_source
|
18
|
+
::Avm::Registry.application_stereotypes.detect_optional(local_source.class)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
# @return [Avm::ApplicationStereotypes::Base]
|
24
|
+
def stereotype_uncached
|
25
|
+
stereotype_by_configuration || stereotype_by_source ||
|
26
|
+
raise("Could not find stereotype for application \"#{self}\"")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,13 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/instances/entries'
|
4
|
+
require 'avm/registry'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
7
8
|
module Applications
|
8
9
|
class Base
|
10
|
+
enable_simple_cache
|
11
|
+
require_sub __FILE__, include_modules: true
|
9
12
|
include ::Avm::Instances::Entries
|
10
13
|
|
14
|
+
LOCAL_INSTANCE_SUFFIX = 'dev'
|
15
|
+
|
11
16
|
common_constructor :id do
|
12
17
|
self.id = id.to_s
|
13
18
|
end
|
@@ -23,6 +28,18 @@ module Avm
|
|
23
28
|
def name
|
24
29
|
entry(::Avm::Instances::EntryKeys::NAME).read
|
25
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
# @return [Avm::Instances::Base]
|
35
|
+
def local_instance_uncached
|
36
|
+
instance(LOCAL_INSTANCE_SUFFIX)
|
37
|
+
end
|
38
|
+
|
39
|
+
# @return [Avm::Sources::Base]
|
40
|
+
def local_source_uncached
|
41
|
+
::Avm::Registry.sources.detect(local_instance.fs_path)
|
42
|
+
end
|
26
43
|
end
|
27
44
|
end
|
28
45
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/instances/base'
|
4
|
+
require 'avm/sources/base'
|
3
5
|
require 'eac_ruby_utils/core_ext'
|
4
6
|
|
5
7
|
module Avm
|
@@ -10,26 +12,40 @@ module Avm
|
|
10
12
|
|
11
13
|
common_constructor :module_suffix
|
12
14
|
|
15
|
+
def detect(obj)
|
16
|
+
detect_optional(obj) || raise_not_found(obj)
|
17
|
+
end
|
18
|
+
|
19
|
+
def detect_optional(obj)
|
20
|
+
detect_by_instance_class(obj) || detect_by_source_class(obj) || detecy_by_name(obj)
|
21
|
+
end
|
22
|
+
|
13
23
|
private
|
14
24
|
|
15
25
|
def available_uncached
|
16
26
|
build_available
|
17
27
|
end
|
18
28
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
29
|
+
def detect_by_instance_class(obj)
|
30
|
+
return nil unless obj.is_a?(::Class) && obj < ::Avm::Instances::Base
|
31
|
+
|
32
|
+
available.find { |a| a.instance_class == obj }
|
23
33
|
end
|
24
34
|
|
25
|
-
def
|
26
|
-
|
27
|
-
|
35
|
+
def detecy_by_name(obj)
|
36
|
+
return nil unless obj.is_a?(::String)
|
37
|
+
|
38
|
+
available.find { |a| a.name == obj }
|
39
|
+
end
|
40
|
+
|
41
|
+
def detect_by_source_class(obj)
|
42
|
+
return nil unless obj.is_a?(::Class) && obj < ::Avm::Sources::Base
|
43
|
+
|
44
|
+
available.find { |a| a.source_class == obj }
|
28
45
|
end
|
29
46
|
|
30
|
-
def
|
31
|
-
|
32
|
-
.map { |klass| class_detect(klass, registered_initialize_args) }.find(&:present?)
|
47
|
+
def raise_not_found(obj)
|
48
|
+
raise("No registered module valid for #{obj} (Available: #{available.join(', ')})")
|
33
49
|
end
|
34
50
|
end
|
35
51
|
end
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
# @return [Avm::Instances::Base, nil]
|
10
10
|
def class_detect(klass, detect_args)
|
11
11
|
r = ::Avm::Instances::Base.by_id(*detect_args)
|
12
|
-
r.application.stereotype.instance_class == klass ?
|
12
|
+
r.application.stereotype.instance_class == klass ? klass.by_id(*detect_args) : nil
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/with_application_stereotype'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module Avm
|
@@ -7,6 +8,7 @@ module Avm
|
|
7
8
|
class Base
|
8
9
|
enable_abstract_methods
|
9
10
|
enable_simple_cache
|
11
|
+
include ::Avm::WithApplicationStereotype
|
10
12
|
abstract_methods :update, :valid?
|
11
13
|
common_constructor :path do
|
12
14
|
self.path = path.to_pathname
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale,template}/**/*']
|
14
14
|
|
15
|
+
s.add_dependency 'avm', '~> 0.29'
|
15
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.4'
|
16
17
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.4', '>= 0.4.1'
|
17
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/base'
|
4
|
+
require 'avm/eac_redmine_base0/instances/runners'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRedmineBase0
|
9
|
+
module Instances
|
10
|
+
class Base < ::Avm::Instances::Base
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -3,9 +3,9 @@
|
|
3
3
|
require 'avm/docker/runner'
|
4
4
|
|
5
5
|
module Avm
|
6
|
-
module
|
7
|
-
|
8
|
-
|
6
|
+
module EacRedmineBase0
|
7
|
+
module Instances
|
8
|
+
module Runners
|
9
9
|
class Docker < ::Avm::Docker::Runner
|
10
10
|
def use_default_registry?
|
11
11
|
false
|
@@ -4,9 +4,9 @@ require 'eac_cli/core_ext'
|
|
4
4
|
require 'avm/eac_rails_base1/runner/code_runner'
|
5
5
|
|
6
6
|
module Avm
|
7
|
-
module
|
8
|
-
|
9
|
-
|
7
|
+
module EacRedmineBase0
|
8
|
+
module Instances
|
9
|
+
module Runners
|
10
10
|
class ProjectRename
|
11
11
|
runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle do
|
12
12
|
pos_arg :from
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_redmine_base0/instance'
|
4
|
+
require 'avm/eac_redmine_base0/deploy'
|
5
|
+
require 'avm/eac_redmine_base0/apache_host'
|
6
|
+
require 'avm/eac_rails_base1/runner'
|
7
|
+
require 'eac_ruby_utils/core_ext'
|
8
|
+
|
9
|
+
module Avm
|
10
|
+
module EacRedmineBase0
|
11
|
+
module Runners
|
12
|
+
class Base < ::Avm::EacRailsBase1::Runner
|
13
|
+
require_sub __FILE__
|
14
|
+
|
15
|
+
STEREOTYPE_NAME = 'EacRedmineBase0'
|
16
|
+
|
17
|
+
class << self
|
18
|
+
def stereotype_name
|
19
|
+
STEREOTYPE_NAME
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,10 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/eac_rails_base1/sources/base'
|
3
4
|
require 'avm/eac_redmine_base0/core_update'
|
4
5
|
require 'eac_cli/core_ext'
|
5
|
-
require 'avm/eac_rails_base1/sources/base'
|
6
|
-
require 'avm/eac_redmine_base0/sources/runners'
|
7
|
-
require 'eac_ruby_utils/core_ext'
|
8
6
|
|
9
7
|
module Avm
|
10
8
|
module EacRedmineBase0
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'avm', '~> 0.27'
|
19
19
|
s.add_dependency 'avm-eac_asciidoctor_base0', '~> 0.3', '>= 0.3.4'
|
20
20
|
s.add_dependency 'avm-eac_rails_base0', '~> 0.3'
|
21
|
-
s.add_dependency 'avm-eac_redmine_base0', '~> 0.5', '>= 0.5.2'
|
22
21
|
s.add_dependency 'avm-eac_ruby_base1', '~> 0.8'
|
23
22
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
24
23
|
s.add_dependency 'avm-files', '~> 0.1'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/instances/base'
|
4
|
+
require 'avm/registry'
|
4
5
|
require 'eac_cli/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
@@ -14,10 +15,14 @@ module Avm
|
|
14
15
|
subcommands
|
15
16
|
end
|
16
17
|
|
18
|
+
def extra_available_subcommands
|
19
|
+
instance.if_present({}, &:extra_available_subcommands)
|
20
|
+
end
|
21
|
+
|
17
22
|
private
|
18
23
|
|
19
24
|
def instance_uncached
|
20
|
-
::Avm::
|
25
|
+
::Avm::Registry.instances.detect(parsed.instance_id)
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
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.11.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: 2022-07-
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_generic_base0
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.11'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0.
|
74
|
+
version: '0.11'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: avm-eac_redmine_plugin_base0
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0.
|
109
|
+
version: '0.125'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0.
|
116
|
+
version: '0.125'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: eac_ruby_utils
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,8 +219,13 @@ files:
|
|
219
219
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/data_unit.rb
|
220
220
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/deploy.rb
|
221
221
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instance.rb
|
222
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb
|
222
223
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb
|
224
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners.rb
|
225
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/docker.rb
|
226
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb
|
223
227
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/rest_api.rb
|
228
|
+
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb
|
224
229
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb
|
225
230
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners.rb
|
226
231
|
- sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/core_update.rb
|
@@ -420,9 +425,6 @@ files:
|
|
420
425
|
- sub/avm-tools/lib/avm/tools/runner/config.rb
|
421
426
|
- sub/avm-tools/lib/avm/tools/runner/config/load_path.rb
|
422
427
|
- sub/avm-tools/lib/avm/tools/runner/eac_asciidoctor_base0.rb
|
423
|
-
- sub/avm-tools/lib/avm/tools/runner/eac_redmine_base0.rb
|
424
|
-
- sub/avm-tools/lib/avm/tools/runner/eac_redmine_base0/docker.rb
|
425
|
-
- sub/avm-tools/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb
|
426
428
|
- sub/avm-tools/lib/avm/tools/runner/eac_webapp_base0.rb
|
427
429
|
- sub/avm-tools/lib/avm/tools/runner/eac_wordpress_base0.rb
|
428
430
|
- sub/avm-tools/lib/avm/tools/runner/eac_writings_base0.rb
|
@@ -969,10 +971,9 @@ files:
|
|
969
971
|
- sub/avm/lib/avm.rb
|
970
972
|
- sub/avm/lib/avm/application_stereotypes.rb
|
971
973
|
- sub/avm/lib/avm/application_stereotypes/base.rb
|
972
|
-
- sub/avm/lib/avm/application_stereotypes/base/by_gem.rb
|
973
|
-
- sub/avm/lib/avm/application_stereotypes/base/detection.rb
|
974
974
|
- sub/avm/lib/avm/applications.rb
|
975
975
|
- sub/avm/lib/avm/applications/base.rb
|
976
|
+
- sub/avm/lib/avm/applications/base/stereotype.rb
|
976
977
|
- sub/avm/lib/avm/data/instance.rb
|
977
978
|
- sub/avm/lib/avm/data/instance/files_unit.rb
|
978
979
|
- sub/avm/lib/avm/data/instance/package.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module ApplicationStereotypes
|
5
|
-
class Base
|
6
|
-
module ByGem
|
7
|
-
common_concern
|
8
|
-
|
9
|
-
module ClassMethods
|
10
|
-
def by_gem(gem_name)
|
11
|
-
new(gem_name.gsub('-', '/').camelize)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Avm
|
4
|
-
module ApplicationStereotypes
|
5
|
-
class Base
|
6
|
-
module Detection
|
7
|
-
common_concern
|
8
|
-
|
9
|
-
module ClassMethods
|
10
|
-
# @return [Class<Avm::Sources::Base>, nil]
|
11
|
-
def detect(object)
|
12
|
-
return singleton_instance if
|
13
|
-
%w[name instance_class source_class].any? { |t| send("detect_by_#{t}?", object) }
|
14
|
-
end
|
15
|
-
|
16
|
-
# @return [Boolean]
|
17
|
-
def detect_by_instance_class?(object)
|
18
|
-
object.is_a?(::Class) && singleton_instance.instance_class == object
|
19
|
-
end
|
20
|
-
|
21
|
-
# @return [Boolean]
|
22
|
-
def detect_by_name?(object)
|
23
|
-
object.is_a?(::String) && singleton_instance.name == object
|
24
|
-
end
|
25
|
-
|
26
|
-
# @return [Boolean]
|
27
|
-
def detect_by_source_class?(object)
|
28
|
-
object.is_a?(::Class) && singleton_instance.source_class == object
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_rails_base1/runner'
|
4
|
-
require 'avm/eac_redmine_base0'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module Tools
|
9
|
-
class Runner
|
10
|
-
class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
|
11
|
-
require_sub __FILE__
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|