avm-tools 0.64.2 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avm/local_projects/instance.rb +8 -0
- data/lib/avm/patches/object/template.rb +3 -3
- data/lib/avm/projects/stereotype.rb +2 -2
- data/lib/avm/self.rb +5 -1
- data/lib/avm/tools/runner/local_project.rb +5 -0
- data/lib/avm/tools/runner/local_project/test.rb +34 -0
- data/lib/avm/tools/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b49415c22196804138f3b05422b6efeec1aa7d092d4ec282721b4a292b81cc26
|
4
|
+
data.tar.gz: da7e1f8019ee6ea9694088a328f8c988143325f72fca48b99e082a8217616aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 993126704ac357031cd9f050964aace90fedb10c29849b1de13a05b1cc4f8c222223f6d10604517d5a87c03bcf03d09337d517e067cad85af0aba9c39e001af2
|
7
|
+
data.tar.gz: 40d27a357cf1ba0d5534289bebc3cbf2a529e4250cee92a8a6de80b623a5ba6b9d055c22f397e133e1f5fcc5ec26e57e9d307c07acc1e70721600a57a7930258
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/instances/configuration'
|
3
4
|
require 'eac_launcher/paths/real'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
require 'avm/projects/stereotypes'
|
@@ -13,6 +14,8 @@ module Avm
|
|
13
14
|
source_stereotypes_mixins
|
14
15
|
end
|
15
16
|
|
17
|
+
delegate :to_s, to: :path
|
18
|
+
|
16
19
|
# Backward compatibility with [EacLauncher::Paths::Logical].
|
17
20
|
# @return [EacLauncher::Paths::Real].
|
18
21
|
def real
|
@@ -21,6 +24,11 @@ module Avm
|
|
21
24
|
|
22
25
|
private
|
23
26
|
|
27
|
+
# @return [Avm::Instances::Configuration]
|
28
|
+
def configuration_uncached
|
29
|
+
::Avm::Instances::Configuration.find_in_path(path)
|
30
|
+
end
|
31
|
+
|
24
32
|
def stereotypes_uncached
|
25
33
|
::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
|
26
34
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/self'
|
3
4
|
require 'eac_ruby_utils/patches/object/template'
|
4
5
|
|
5
|
-
::EacRubyUtils::Templates::Searcher.default.included_paths <<
|
6
|
-
('
|
7
|
-
)
|
6
|
+
::EacRubyUtils::Templates::Searcher.default.included_paths <<
|
7
|
+
::Avm::Self.root.join('template').to_path
|
@@ -47,14 +47,14 @@ module Avm
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def sub_constant(constant_name, is_a)
|
50
|
+
return nil unless const_defined?(constant_name)
|
51
|
+
|
50
52
|
constant = const_get(constant_name)
|
51
53
|
unless is_a.if_present(true) { |v| constant.is_a?(v) }
|
52
54
|
raise("#{constant} is not a #{is_a}")
|
53
55
|
end
|
54
56
|
|
55
57
|
constant
|
56
|
-
rescue NameError
|
57
|
-
nil
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/lib/avm/self.rb
CHANGED
@@ -10,12 +10,16 @@ module Avm
|
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def application
|
13
|
-
@application ||= ::EacRubyBase0::Application.new(
|
13
|
+
@application ||= ::EacRubyBase0::Application.new(root.to_path)
|
14
14
|
end
|
15
15
|
|
16
16
|
def instance
|
17
17
|
@instance ||= ::Avm::Self::Instance.by_id('avm-tools_self')
|
18
18
|
end
|
19
|
+
|
20
|
+
def root
|
21
|
+
::Pathname.new('../..').expand_path(__dir__)
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/console/docopt_runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Tools
|
8
|
+
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
9
|
+
class LocalProject < ::EacRubyUtils::Console::DocoptRunner
|
10
|
+
class Test < ::EacRubyUtils::Console::DocoptRunner
|
11
|
+
include ::EacCli::DefaultRunner
|
12
|
+
|
13
|
+
runner_definition do
|
14
|
+
desc 'Test local project.'
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
context(:instance_banner)
|
19
|
+
infov 'Test command', test_command
|
20
|
+
if test_command.present?
|
21
|
+
test_command.system!
|
22
|
+
else
|
23
|
+
fatal_error 'No test command found'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_command
|
28
|
+
context(:instance).configuration.if_present(&:any_test_command)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/avm/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.65.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -489,6 +489,7 @@ files:
|
|
489
489
|
- lib/avm/tools/runner/launcher/publish.rb
|
490
490
|
- lib/avm/tools/runner/local_project.rb
|
491
491
|
- lib/avm/tools/runner/local_project/info.rb
|
492
|
+
- lib/avm/tools/runner/local_project/test.rb
|
492
493
|
- lib/avm/tools/runner/local_project/update.rb
|
493
494
|
- lib/avm/tools/runner/ruby.rb
|
494
495
|
- lib/avm/tools/runner/ruby/gems.rb
|