avm-tools 0.139.0 → 0.140.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e13784fd3035a1563c1eab7234d82b6b8d097ed58aae86ee922b1cbbb0fa208
4
- data.tar.gz: 29fa552a0905ccad677c5b2557d7216b3ec7b388d59ea928375bc8603c2a4588
3
+ metadata.gz: ed2d914555d3c58362e1295400822e92705cae0150e957fd451d9bb88605bf52
4
+ data.tar.gz: 0fa211ad333f697fc6c07bb89205552f64e5be5730795e5828cb6b652eef500b
5
5
  SHA512:
6
- metadata.gz: 8e7802bda4db106026decfb5b7e403f292b3c3fb0b998ab362b2feea704d8bee9c833f9fb0c9cfabb962e7fbf2b09a7c9630147332c6736d5511cc9ee7f385ec
7
- data.tar.gz: a9c310b9a2c40c54a34b4768780e0d8ed7133b2f8cd1bad2d02e96c3890454e9b65a1e9395a94036543e5fa62620ba1d28f61b823de9d1a3a17e6effad34fce4
6
+ metadata.gz: 153e38b2a7f25f90736f65388c2cdc61a011aefeee2247fdd94f0165624af5dc73b78cb7a7d31a39bec85e37712ec745b80eca5ac36f7eb2bd7a3aa129860af0
7
+ data.tar.gz: bf4e32eaf0b13d24215b29fde58b9d0dc44335050fad19ab86d6f970312d260ea63b6244e70372ccb72ada83e199bdf4d69ae2acb96c220090a4e6f3952821b8
@@ -1,20 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/projects/stereotype'
4
3
  require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module Avm
7
6
  module Projects
8
7
  module Stereotypes
9
8
  require_sub __FILE__, base: nil
10
-
11
- class << self
12
- def list
13
- @list ||= constants.map { |c| const_get(c) }
14
- .select { |c| c.included_modules.include?(Avm::Projects::Stereotype) }
15
- .freeze
16
- end
17
- end
18
9
  end
19
10
  end
20
11
  end
@@ -1,4 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/patches'
4
3
  require 'eac_ruby_base0/core_ext'
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/tools/core_ext'
4
+ require 'avm/projects/stereotypes'
4
5
 
5
6
  module Avm
6
7
  module Tools
@@ -48,10 +48,6 @@ module Avm
48
48
  infov " * #{name}", command
49
49
  end
50
50
  end
51
-
52
- def instance
53
- runner_context.call(:instance)
54
- end
55
51
  end
56
52
  end
57
53
  end
@@ -65,7 +65,7 @@ module Avm
65
65
  end
66
66
 
67
67
  def start_banner
68
- runner_context.call(:instance_banner)
68
+ runner_context.call(:source_banner)
69
69
  infov 'Selected units', test_performer.units.count
70
70
  end
71
71
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/sources/runner'
4
- require 'avm/tools/source'
5
4
  require 'eac_cli/core_ext'
6
5
 
7
6
  module Avm
@@ -10,20 +9,9 @@ module Avm
10
9
  class Source < ::Avm::Sources::Runner
11
10
  require_sub __FILE__
12
11
 
13
- def instance_banner
14
- infov 'Instance', instance
15
- infov 'Stereotypes', instance.stereotypes.map(&:label).join(', ')
16
- end
17
-
18
12
  def subject
19
13
  source
20
14
  end
21
-
22
- private
23
-
24
- def instance_uncached
25
- ::Avm::Tools::Source.new(source_path)
26
- end
27
15
  end
28
16
  end
29
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.139.0'
5
+ VERSION = '0.140.0'
6
6
  end
7
7
  end
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.139.0
4
+ version: 0.140.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: 2022-10-09 00:00:00.000000000 Z
11
+ date: 2022-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -265,19 +265,12 @@ files:
265
265
  - lib/avm/launcher/git/remote.rb
266
266
  - lib/avm/launcher/git/sub_warp_base.rb
267
267
  - lib/avm/launcher/git/warp_base.rb
268
- - lib/avm/launcher/instances.rb
269
- - lib/avm/launcher/paths.rb
270
- - lib/avm/launcher/project.rb
271
- - lib/avm/launcher/publish.rb
272
268
  - lib/avm/launcher/ruby.rb
273
269
  - lib/avm/launcher/ruby/gem.rb
274
270
  - lib/avm/launcher/ruby/gem/build.rb
275
271
  - lib/avm/launcher/ruby/gem/specification.rb
276
- - lib/avm/patches.rb
277
- - lib/avm/patches/i18n.rb
278
272
  - lib/avm/projects.rb
279
273
  - lib/avm/projects/stereotype.rb
280
- - lib/avm/projects/stereotype/job_comparator.rb
281
274
  - lib/avm/projects/stereotypes.rb
282
275
  - lib/avm/projects/stereotypes/git.rb
283
276
  - lib/avm/projects/stereotypes/git/local_project_mixin.rb
@@ -289,13 +282,9 @@ files:
289
282
  - lib/avm/projects/stereotypes/git_subtree.rb
290
283
  - lib/avm/projects/stereotypes/git_subtree/publish.rb
291
284
  - lib/avm/projects/stereotypes/git_subtree/warp.rb
292
- - lib/avm/projects/stereotypes/rails_application.rb
293
- - lib/avm/projects/stereotypes/rails_application/local_project_mixin.rb
294
- - lib/avm/projects/stereotypes/redmine_plugin.rb
295
285
  - lib/avm/projects/stereotypes/ruby_gem.rb
296
286
  - lib/avm/projects/stereotypes/ruby_gem/local_project_mixin.rb
297
287
  - lib/avm/projects/stereotypes/ruby_gem/publish.rb
298
- - lib/avm/stereotypes.rb
299
288
  - lib/avm/tools.rb
300
289
  - lib/avm/tools/core_ext.rb
301
290
  - lib/avm/tools/runner.rb
@@ -337,10 +326,7 @@ files:
337
326
  - lib/avm/tools/runner/source/version_bump.rb
338
327
  - lib/avm/tools/runner/source_generate.rb
339
328
  - lib/avm/tools/self.rb
340
- - lib/avm/tools/source.rb
341
329
  - lib/avm/tools/version.rb
342
- - locale/en.yml
343
- - locale/pt-BR.yml
344
330
  - template/avm/self/docker_image/Dockerfile
345
331
  - template/avm/self/docker_image/entrypoint.sh
346
332
  homepage:
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/launcher/errors/base'
4
- require 'avm/launcher/instances/base'
5
- require 'avm/launcher/instances/runner_helper'
6
- require 'avm/launcher/instances/settings'
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/launcher/paths/logical'
4
- require 'avm/launcher/paths/real'
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Launcher
5
- class Project
6
- attr_reader :name, :instances
7
-
8
- def initialize(name, instances)
9
- @name = name
10
- @instances = instances.to_a
11
- end
12
-
13
- def to_s
14
- name
15
- end
16
- end
17
- end
18
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/launcher/publish/base'
4
- require 'avm/launcher/publish/check_result'
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/tools/self'
4
- require 'i18n'
5
-
6
- module Avm
7
- module Patches
8
- module I18n
9
- class << self
10
- def setup_i18n
11
- ::I18n.load_path += locale_files_paths.map(&:to_path)
12
- end
13
-
14
- def locale_files_paths
15
- ::Avm::Tools::Self.root.join('locale').glob('*.yml')
16
- end
17
- end
18
- end
19
- end
20
- end
21
-
22
- ::Avm::Patches::I18n.setup_i18n
data/lib/avm/patches.rb DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
5
-
6
- module Avm
7
- module Patches
8
- end
9
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Projects
7
- module Stereotype
8
- class JobComparator
9
- common_constructor :job1, :job2
10
-
11
- def result
12
- return -1 if run_before?(job1, job2)
13
- return 1 if run_before?(job2, job1)
14
-
15
- job1.object_id <=> job2.class.name
16
- end
17
-
18
- private
19
-
20
- def run_before?(a_job, other_job)
21
- return false unless a_job.respond_to?(:run_before)
22
-
23
- a_job.run_before.map(&:to_sym).include?(job_stereotype_key(other_job))
24
- end
25
-
26
- def job_stereotype_key(job)
27
- job.class.name.split('::')[0..-2].join('::').demodulize.variableize.to_sym
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/projects/stereotypes/ruby_gem/local_project_mixin'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Projects
8
- module Stereotypes
9
- class RailsApplication
10
- module LocalProjectMixin
11
- common_concern do
12
- include ::Avm::Projects::Stereotypes::RubyGem::LocalProjectMixin
13
- end
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/projects/stereotype'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Projects
8
- module Stereotypes
9
- class RailsApplication
10
- require_sub __FILE__
11
- include Avm::Projects::Stereotype
12
-
13
- class << self
14
- def match?(path)
15
- File.exist?(path.real.subpath('config.ru')) && path.real.basename != 'dummy'
16
- end
17
-
18
- def color
19
- :magenta
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/projects/stereotype'
4
-
5
- module Avm
6
- module Projects
7
- module Stereotypes
8
- class RedminePlugin
9
- include Avm::Projects::Stereotype
10
-
11
- class << self
12
- def match?(path)
13
- File.exist?(path.real.subpath('init.rb'))
14
- end
15
-
16
- def color
17
- :light_magenta
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
5
-
6
- module Avm
7
- module Stereotypes
8
- end
9
- end
@@ -1,64 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/registry'
4
- require 'avm/sources/configuration'
5
- require 'avm/launcher/paths/real'
6
- require 'avm/projects/stereotype/job_comparator'
7
- require 'eac_ruby_utils/core_ext'
8
- require 'avm/projects/stereotypes'
9
- require 'i18n'
10
-
11
- module Avm
12
- module Tools
13
- class Source
14
- enable_simple_cache
15
- common_constructor :path do
16
- self.path = path.to_pathname
17
- source_stereotypes_mixins
18
- end
19
-
20
- delegate :configuration, to: :avm_instance
21
- delegate :to_s, to: :path
22
-
23
- def locale
24
- configuration.if_present(&:locale) || ::I18n.default_locale
25
- end
26
-
27
- # Backward compatibility with [Avm::Launcher::Paths::Logical].
28
- # @return [Avm::Launcher::Paths::Real].
29
- def real
30
- ::Avm::Launcher::Paths::Real.new(path.to_path)
31
- end
32
-
33
- def run_job(job, job_args = [])
34
- stereotypes_jobs(job, job_args).each(&:run)
35
- end
36
-
37
- private
38
-
39
- def avm_instance_uncached
40
- ::Avm::Registry.sources.detect(path)
41
- end
42
-
43
- def stereotypes_jobs(job, job_args)
44
- job_class_method = "#{job}_class"
45
- r = []
46
- stereotypes.each do |stereotype|
47
- r << stereotype.send(job_class_method).new(self, *job_args) if
48
- stereotype.send(job_class_method).present?
49
- end
50
- r.sort { |a, b| ::Avm::Projects::Stereotype::JobComparator.new(a, b).result }
51
- end
52
-
53
- def stereotypes_uncached
54
- ::Avm::Projects::Stereotypes.list.select { |s| s.match?(self) }
55
- end
56
-
57
- def source_stereotypes_mixins
58
- stereotypes.each do |s|
59
- s.local_project_mixin_module.if_present { |v| singleton_class.include(v) }
60
- end
61
- end
62
- end
63
- end
64
- end
data/locale/en.yml DELETED
@@ -1,7 +0,0 @@
1
- en:
2
- avm:
3
- projects:
4
- stereotypes:
5
- ruby_gem:
6
- version_bump:
7
- git_commit_message: Bump to '%{version}'.
data/locale/pt-BR.yml DELETED
@@ -1,7 +0,0 @@
1
- pt-BR:
2
- avm:
3
- projects:
4
- stereotypes:
5
- ruby_gem:
6
- version_bump:
7
- git_commit_message: Versão para '%{version}'.