avm-eac_ruby_base1 0.37.1 → 0.38.1
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/eac_ruby_base1/launcher/gem/specification.rb +1 -1
- data/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/internal_check.rb +70 -0
- data/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/local_gem.rb +31 -0
- data/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/remote_gem.rb +45 -0
- data/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +3 -93
- data/lib/avm/eac_ruby_base1/rubygems/gem_search_parser.rb +34 -0
- data/lib/avm/eac_ruby_base1/rubygems/providers/base.rb +46 -0
- data/lib/avm/eac_ruby_base1/rubygems/providers/nexus.rb +32 -0
- data/lib/avm/eac_ruby_base1/rubygems/providers/rubygems_org.rb +40 -0
- data/lib/avm/eac_ruby_base1/rubygems/remote.rb +5 -7
- data/lib/avm/eac_ruby_base1/rubygems/version_file.rb +1 -1
- data/lib/avm/eac_ruby_base1/sources/base/gem_provider.rb +46 -0
- data/lib/avm/eac_ruby_base1/sources/tests/base.rb +35 -33
- data/lib/avm/eac_ruby_base1/sources/update/sub_update.rb +1 -1
- data/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/lib/avm/eac_ruby_base1.rb +1 -0
- data/locale/en.yml +7 -0
- data/locale/pt-BR.yml +7 -0
- metadata +36 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62c735c11556c0729a7606c3316e089eedc880eaee4bc4cc595c180f58fc65c8
|
4
|
+
data.tar.gz: eff8cfd7e946a0e102a145040240455fc0800d7ab351d2e5598ff75ca5da4e5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78c231d6e36b29c50c3ea78c7e694b34c2b853691a919100c6c943b05b5503724434d00df1d93fc15379ce06fd01c111e5e546143810935f65afbe2c273af03e
|
7
|
+
data.tar.gz: c6adadcfa50ab6b936de770097acae40ec87b5dbc2a40684e77a6b9fc5c098863d9a1e13574fa6d09cca80f7d8466fc47f1d2e40b9a9d79da50a511e585854d3
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module LauncherStereotypes
|
6
|
+
class Base
|
7
|
+
class Publish < ::Avm::Launcher::Publish::Base
|
8
|
+
class InternalCheck
|
9
|
+
acts_as_instance_method
|
10
|
+
|
11
|
+
common_constructor :publish
|
12
|
+
delegate :gem_provider, :gem_published?, :gem_spec, :gem_version_max,
|
13
|
+
:outdated_version?, :version_published?, to: :publish
|
14
|
+
|
15
|
+
def result
|
16
|
+
gem_published? ? internal_check_gem_published : internal_check_gem_unpublished
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def internal_check_gem_published
|
22
|
+
if version_published?
|
23
|
+
outdated_version? ? outdated_version_check_result : version_published_check_result
|
24
|
+
else
|
25
|
+
version_unpublished_check_result
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def internal_check_gem_unpublished
|
30
|
+
if new_gem_allowed?
|
31
|
+
version_unpublished_check_result
|
32
|
+
else
|
33
|
+
new_gem_disallowed_check_result
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def new_gem_allowed?
|
38
|
+
::Avm::Launcher::Context.current.publish_options[:new]
|
39
|
+
end
|
40
|
+
|
41
|
+
def new_gem_disallowed_check_result
|
42
|
+
::Avm::Launcher::Publish::CheckResult.blocked(
|
43
|
+
publish.i18n_translate(__method__, gem: gem_spec.full_name, provider: gem_provider)
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def version_published_check_result
|
48
|
+
::Avm::Launcher::Publish::CheckResult.updated(
|
49
|
+
publish.i18n_translate(__method__, gem: gem_spec.full_name)
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
def outdated_version_check_result
|
54
|
+
::Avm::Launcher::Publish::CheckResult.outdated(
|
55
|
+
publish.i18n_translate(__method__, gem: gem_spec.full_name,
|
56
|
+
max_version: gem_version_max)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
def version_unpublished_check_result
|
61
|
+
::Avm::Launcher::Publish::CheckResult.pending(
|
62
|
+
publish.i18n_translate(__method__, gem: gem_spec.name, provider: gem_provider)
|
63
|
+
)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module LauncherStereotypes
|
6
|
+
class Base
|
7
|
+
class Publish < ::Avm::Launcher::Publish::Base
|
8
|
+
module LocalGem
|
9
|
+
protected
|
10
|
+
|
11
|
+
def gem_build_uncached
|
12
|
+
::Avm::EacRubyBase1::Launcher::Gem::Build.new(source)
|
13
|
+
end
|
14
|
+
|
15
|
+
def gem_spec_uncached
|
16
|
+
::Avm::EacRubyBase1::LauncherStereotypes::Base.load_gemspec(gemspec)
|
17
|
+
end
|
18
|
+
|
19
|
+
def gemspec_uncached
|
20
|
+
source.find_file_with_extension('.gemspec')
|
21
|
+
end
|
22
|
+
|
23
|
+
def source_uncached
|
24
|
+
instance.warped
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module LauncherStereotypes
|
6
|
+
class Base
|
7
|
+
class Publish < ::Avm::Launcher::Publish::Base
|
8
|
+
module RemoteGem
|
9
|
+
def gem_provider
|
10
|
+
instance.source.gem_provider
|
11
|
+
end
|
12
|
+
|
13
|
+
def gem_published?
|
14
|
+
gem_versions.any?
|
15
|
+
end
|
16
|
+
|
17
|
+
def gem_version_max
|
18
|
+
remote_gem.maximum_number
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [Array]
|
22
|
+
def gem_versions
|
23
|
+
remote_gem.versions
|
24
|
+
end
|
25
|
+
|
26
|
+
def outdated_version?
|
27
|
+
gem_version_max.present? && ::Gem::Version.new(gem_spec.version) < gem_version_max
|
28
|
+
end
|
29
|
+
|
30
|
+
def version_published?
|
31
|
+
gem_versions.any? { |v| v['number'] == gem_spec.version }
|
32
|
+
end
|
33
|
+
|
34
|
+
protected
|
35
|
+
|
36
|
+
# @return [Avm::EacRubyBase1::Rubygems::Remote]
|
37
|
+
def remote_gem_uncached
|
38
|
+
::Avm::EacRubyBase1::Rubygems::Remote.new(gem_spec.name, gem_provider)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -6,65 +6,11 @@ module Avm
|
|
6
6
|
class Base
|
7
7
|
class Publish < ::Avm::Launcher::Publish::Base
|
8
8
|
include ::EacRubyUtils::SimpleCache
|
9
|
-
enable_speaker
|
10
|
-
|
11
|
-
protected
|
12
9
|
|
13
|
-
|
14
|
-
gem_published? ? internal_check_gem_published : internal_check_gem_unpublished
|
15
|
-
end
|
10
|
+
enable_speaker
|
16
11
|
|
17
12
|
private
|
18
13
|
|
19
|
-
def internal_check_gem_published
|
20
|
-
if version_published?
|
21
|
-
outdated_version? ? outdated_version_check_result : version_published_check_result
|
22
|
-
else
|
23
|
-
version_unpublished_check_result
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def internal_check_gem_unpublished
|
28
|
-
if new_gem_allowed?
|
29
|
-
version_unpublished_check_result
|
30
|
-
else
|
31
|
-
new_gem_disallowed_check_result
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def new_gem_disallowed_check_result
|
36
|
-
::Avm::Launcher::Publish::CheckResult.blocked(
|
37
|
-
"#{gem_spec.full_name} does not exist in RubyGems"
|
38
|
-
)
|
39
|
-
end
|
40
|
-
|
41
|
-
def version_published_check_result
|
42
|
-
::Avm::Launcher::Publish::CheckResult.updated("#{gem_spec.full_name} already pushed")
|
43
|
-
end
|
44
|
-
|
45
|
-
def outdated_version_check_result
|
46
|
-
::Avm::Launcher::Publish::CheckResult.outdated(
|
47
|
-
"#{gem_spec.full_name} is outdated (Max: #{gem_version_max})"
|
48
|
-
)
|
49
|
-
end
|
50
|
-
|
51
|
-
def version_unpublished_check_result
|
52
|
-
::Avm::Launcher::Publish::CheckResult.pending("#{gem_spec.full_name} not found " \
|
53
|
-
'in RubyGems')
|
54
|
-
end
|
55
|
-
|
56
|
-
def source_uncached
|
57
|
-
instance.warped
|
58
|
-
end
|
59
|
-
|
60
|
-
def gem_spec_uncached
|
61
|
-
::Avm::EacRubyBase1::LauncherStereotypes::Base.load_gemspec(gemspec)
|
62
|
-
end
|
63
|
-
|
64
|
-
def gem_build_uncached
|
65
|
-
::Avm::EacRubyBase1::Launcher::Gem::Build.new(source)
|
66
|
-
end
|
67
|
-
|
68
14
|
def publish
|
69
15
|
gem_build.build
|
70
16
|
push_gem
|
@@ -72,49 +18,13 @@ module Avm
|
|
72
18
|
gem_build.close
|
73
19
|
end
|
74
20
|
|
75
|
-
def new_gem_allowed?
|
76
|
-
::Avm::Launcher::Context.current.publish_options[:new]
|
77
|
-
end
|
78
|
-
|
79
|
-
def gem_published?
|
80
|
-
gem_versions.any?
|
81
|
-
end
|
82
|
-
|
83
|
-
def version_published?
|
84
|
-
gem_versions.any? { |v| v['number'] == gem_spec.version }
|
85
|
-
end
|
86
|
-
|
87
|
-
def outdated_version?
|
88
|
-
gem_version_max.present? && ::Gem::Version.new(gem_spec.version) < gem_version_max
|
89
|
-
end
|
90
|
-
|
91
|
-
# @return [Array]
|
92
|
-
def gem_versions
|
93
|
-
remote_gem.versions
|
94
|
-
end
|
95
|
-
|
96
|
-
def gem_version_max
|
97
|
-
remote_gem.maximum_number
|
98
|
-
end
|
99
|
-
|
100
|
-
# @return [Avm::EacRubyBase1::Rubygems::Remote]
|
101
|
-
def remote_gem_uncached
|
102
|
-
::Avm::EacRubyBase1::Rubygems::Remote.new(gem_spec.name)
|
103
|
-
end
|
104
|
-
|
105
21
|
def push_gem
|
106
22
|
info("Pushing gem #{gem_spec}...")
|
107
|
-
|
108
|
-
unless ::Avm::Launcher::Context.current.publish_options[:confirm]
|
109
|
-
command = %w[echo] + command + %w[(Dry-run)]
|
110
|
-
end
|
111
|
-
EacRubyUtils::Envs.local.command(command).system
|
23
|
+
gem_provider.push_gem(gem_build.output_file)
|
112
24
|
info('Pushed!')
|
113
25
|
end
|
114
26
|
|
115
|
-
|
116
|
-
source.find_file_with_extension('.gemspec')
|
117
|
-
end
|
27
|
+
require_sub __FILE__, include_modules: true, require_mode: :kernel
|
118
28
|
end
|
119
29
|
end
|
120
30
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module Rubygems
|
6
|
+
class GemSearchParser < ::Aranha::Parsers::Base
|
7
|
+
GEM_STRUCT = ::Struct.new(:name, :versions)
|
8
|
+
LINE_PARSER = /\A\s*(\S+)\s*\(([^)]+)\)\s*\z/.to_parser do |m|
|
9
|
+
GEM_STRUCT.new(m[1], m[2].split(',').map(&:strip).reject(&:blank?))
|
10
|
+
end
|
11
|
+
|
12
|
+
# @return [Hash<String, Enumerable<String>]
|
13
|
+
def data
|
14
|
+
r = {}
|
15
|
+
content.each_line do |line|
|
16
|
+
parse_line(line).then do |line_parsed|
|
17
|
+
next if line.blank?
|
18
|
+
|
19
|
+
r[line_parsed.name] = line_parsed.versions
|
20
|
+
end
|
21
|
+
end
|
22
|
+
r
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param line [String]
|
26
|
+
# @return [GEM_STRUCT]
|
27
|
+
def parse_line(line)
|
28
|
+
stripped_line = line.to_s.strip
|
29
|
+
stripped_line.if_present(nil) { |v| LINE_PARSER.parse!(v) }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module Rubygems
|
6
|
+
module Providers
|
7
|
+
class Base
|
8
|
+
acts_as_abstract
|
9
|
+
|
10
|
+
common_constructor :root_http_url do
|
11
|
+
self.root_http_url = root_http_url.to_uri
|
12
|
+
root_http_url.assert_argument(::Addressable::URI, 'root_http_url')
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param gem_name [String]
|
16
|
+
# @return [Enumerable<Hash>]
|
17
|
+
def gem_versions(gem_name)
|
18
|
+
raise_abstract __method__, gem_name
|
19
|
+
end
|
20
|
+
|
21
|
+
# @param gem_package_path [Pathname]
|
22
|
+
# @return [Boolean]
|
23
|
+
def push_gem(gem_package_path)
|
24
|
+
command_args = push_gem_command_args(gem_package_path)
|
25
|
+
command_args = %w[echo] + command_args + %w[(Dry-run)] unless
|
26
|
+
::Avm::Launcher::Context.current.publish_options[:confirm]
|
27
|
+
::EacRubyUtils::Ruby.on_clean_environment do
|
28
|
+
EacRubyUtils::Envs.local.command(*command_args).system
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# @param gem_package_path [Pathname]
|
33
|
+
# @return [Enumerable<String>]
|
34
|
+
def push_gem_command_args(gem_package_path)
|
35
|
+
raise_abstract __method__, gem_package_path
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [String]
|
39
|
+
def to_s
|
40
|
+
"#{self.class.name.demodulize}[#{root_http_url}]"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_envs/http/request'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRubyBase1
|
8
|
+
module Rubygems
|
9
|
+
module Providers
|
10
|
+
class Nexus < ::Avm::EacRubyBase1::Rubygems::Providers::Base
|
11
|
+
# @return [Enumerable<String>]
|
12
|
+
def gem_versions(gem_name)
|
13
|
+
search_result = ::Avm::EacRubyBase1::Rubygems::GemSearchParser.from_string(
|
14
|
+
EacRubyUtils::Envs.local.command(
|
15
|
+
'gem', 'search', '--quiet', '--exact', '--all',
|
16
|
+
'--remote', '--clear-sources', '--source', root_http_url, gem_name
|
17
|
+
).execute!
|
18
|
+
).data
|
19
|
+
(search_result.key?(gem_name) ? search_result.fetch(gem_name) : [])
|
20
|
+
.map { |e| { 'number' => e } }
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param gem_package_path [Pathname]
|
24
|
+
# @return [Enumerable<String>]
|
25
|
+
def push_gem_command_args(gem_package_path)
|
26
|
+
['gem', 'nexus', '--clear-repo', '--url', root_http_url, gem_package_path]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_envs/http/request'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRubyBase1
|
8
|
+
module Rubygems
|
9
|
+
module Providers
|
10
|
+
class RubygemsOrg < ::Avm::EacRubyBase1::Rubygems::Providers::Base
|
11
|
+
DEFAULT_ROOT_HTTP_URL = 'https://rubygems.org'.to_uri
|
12
|
+
|
13
|
+
# @param root_http_url [Pathname]
|
14
|
+
def initialize(root_http_url = DEFAULT_ROOT_HTTP_URL)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [Enumerable<Hash>]
|
19
|
+
def gem_versions(gem_name)
|
20
|
+
::EacEnvs::Http::Request.new
|
21
|
+
.url(root_http_url + "/api/v1/versions/#{gem_name}.json")
|
22
|
+
.response.body_data_or_raise
|
23
|
+
rescue EacEnvs::Http::Response => e
|
24
|
+
e.status == 404 ? [] : raise(e)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @param gem_package_path [Pathname]
|
28
|
+
# @return [Enumerable<String>]
|
29
|
+
def push_gem_command_args(gem_package_path)
|
30
|
+
command = ['gem', 'push', gem_package_path]
|
31
|
+
unless ::Avm::Launcher::Context.current.publish_options[:confirm]
|
32
|
+
command = %w[echo] + command + %w[(Dry-run)]
|
33
|
+
end
|
34
|
+
command
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -5,7 +5,9 @@ module Avm
|
|
5
5
|
module Rubygems
|
6
6
|
class Remote
|
7
7
|
enable_simple_cache
|
8
|
-
common_constructor :name
|
8
|
+
common_constructor :name, :provider, default: [nil] do
|
9
|
+
self.provider ||= ::Avm::EacRubyBase1::Rubygems::Providers::RubygemsOrg.new
|
10
|
+
end
|
9
11
|
|
10
12
|
# @return [Gem::Version, nil]
|
11
13
|
def maximum_number
|
@@ -19,13 +21,9 @@ module Avm
|
|
19
21
|
|
20
22
|
protected
|
21
23
|
|
22
|
-
# @return [Array<
|
24
|
+
# @return [Array<String>]
|
23
25
|
def versions_uncached
|
24
|
-
|
25
|
-
.url("https://rubygems.org/api/v1/versions/#{name}.json")
|
26
|
-
.response.body_data_or_raise
|
27
|
-
rescue EacEnvs::Http::Response => e
|
28
|
-
e.status == 404 ? [] : raise(e)
|
26
|
+
provider.gem_versions(name)
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
@@ -6,7 +6,7 @@ module Avm
|
|
6
6
|
class VersionFile
|
7
7
|
common_constructor :path
|
8
8
|
|
9
|
-
VERSION_LINE_PATTERN = /\A(\s*)VERSION\s*=\s*[
|
9
|
+
VERSION_LINE_PATTERN = /\A(\s*)VERSION\s*=\s*['"]([^'"]+)['"](\s*)\z/.freeze
|
10
10
|
|
11
11
|
def value
|
12
12
|
return nil unless path.file?
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacRubyBase1
|
5
|
+
module Sources
|
6
|
+
class Base < ::Avm::EacGenericBase0::Sources::Base
|
7
|
+
module GemProvider
|
8
|
+
DEFAULT_GEM_PROVIDER_TYPE = 'rubygems_org'
|
9
|
+
GEM_PROVIDER_CONFIG_ROOT_KEY = 'ruby.gem_provider'
|
10
|
+
GEM_PROVIDER_CONFIG_TYPE_SUBKEY = 'type'
|
11
|
+
GEM_PROVIDER_CONFIG_URL_SUBKEY = 'url'
|
12
|
+
|
13
|
+
# @return [Avm::EacRubyBase1::Rubygems::Providers::Base]
|
14
|
+
def default_gem_provider
|
15
|
+
::Avm::EacRubyBase1::Rubygems::Providers::RubygemsOrg.new
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param subkey [String]
|
19
|
+
# @return [String]
|
20
|
+
def gem_provider_key(subkey)
|
21
|
+
key = [GEM_PROVIDER_CONFIG_ROOT_KEY, subkey].join('.')
|
22
|
+
r = nil
|
23
|
+
[application, configuration].each do |provider|
|
24
|
+
value = provider.entry(key).value
|
25
|
+
if value.present?
|
26
|
+
r = value
|
27
|
+
break
|
28
|
+
end
|
29
|
+
end
|
30
|
+
r
|
31
|
+
end
|
32
|
+
|
33
|
+
def gem_provider
|
34
|
+
::Avm::EacRubyBase1::Rubygems::Providers.const_get(
|
35
|
+
(gem_provider_key(GEM_PROVIDER_CONFIG_TYPE_SUBKEY) || DEFAULT_GEM_PROVIDER_TYPE).to_s
|
36
|
+
.camelize
|
37
|
+
).new(
|
38
|
+
gem_provider_key(GEM_PROVIDER_CONFIG_URL_SUBKEY) ||
|
39
|
+
::Avm::EacRubyBase1::Rubygems::Providers::RubygemsOrg::DEFAULT_ROOT_HTTP_URL
|
40
|
+
)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -3,51 +3,53 @@
|
|
3
3
|
module Avm
|
4
4
|
module EacRubyBase1
|
5
5
|
module Sources
|
6
|
-
|
7
|
-
|
6
|
+
module Tests
|
7
|
+
class Base
|
8
|
+
include ::EacRubyUtils::Listable
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
enable_simple_cache
|
11
|
+
lists.add_string :result, :failed, :nonexistent, :successful
|
11
12
|
|
12
|
-
|
13
|
+
common_constructor :gem
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
def elegible?
|
16
|
+
dependency_present? && gem.root.join(test_directory).exist?
|
17
|
+
end
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
def dependency_present?
|
20
|
+
gem.gemfile_path.exist? && gem.gemfile_lock_gem_version(dependency_gem).present?
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
def name
|
24
|
+
self.class.name.demodulize.gsub(/Test\z/, '')
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
def to_s
|
28
|
+
"#{gem}[#{name}]"
|
29
|
+
end
|
29
30
|
|
30
|
-
|
31
|
+
private
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
def logs_uncached
|
34
|
+
::EacFs::Logs.new.add(:stdout).add(:stderr)
|
35
|
+
end
|
35
36
|
|
36
|
-
|
37
|
-
|
37
|
+
def result_uncached
|
38
|
+
return RESULT_NONEXISTENT unless elegible?
|
38
39
|
|
39
|
-
|
40
|
-
|
40
|
+
exec_run_with_log ? RESULT_SUCCESSFUL : RESULT_FAILED
|
41
|
+
end
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
43
|
+
def exec_run
|
44
|
+
gem.bundle('exec', *bundle_exec_args).chdir_root.execute
|
45
|
+
end
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
def exec_run_with_log # rubocop:disable Naming/PredicateMethod
|
48
|
+
r = exec_run
|
49
|
+
logs[:stdout].write(r[:stdout])
|
50
|
+
logs[:stderr].write(r[:stderr])
|
51
|
+
r[:exit_code].zero?
|
52
|
+
end
|
51
53
|
end
|
52
54
|
end
|
53
55
|
end
|
data/lib/avm/eac_ruby_base1.rb
CHANGED
data/locale/en.yml
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
en:
|
2
2
|
avm:
|
3
3
|
eac_ruby_base1:
|
4
|
+
launcher_stereotypes:
|
5
|
+
base:
|
6
|
+
publish:
|
7
|
+
new_gem_disallowed_check_result: "%{gem} does not exist in %{provider}"
|
8
|
+
outdated_version_check_result: "%{gem} is outdated (Max: %{max_version})"
|
9
|
+
version_published_check_result: "%{gem} already pushed"
|
10
|
+
version_unpublished_check_result: "%{gem} not found in %{provider}"
|
4
11
|
sources:
|
5
12
|
base:
|
6
13
|
update_self_commit_message: 'All gems: update.'
|
data/locale/pt-BR.yml
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
pt-BR:
|
2
2
|
avm:
|
3
3
|
eac_ruby_base1:
|
4
|
+
launcher_stereotypes:
|
5
|
+
base:
|
6
|
+
publish:
|
7
|
+
new_gem_disallowed_check_result: "%{gem} não existe em %{provider}"
|
8
|
+
outdated_version_check_result: "%{gem} está desatualizada (Máx.: %{max_version})"
|
9
|
+
version_published_check_result: "%{gem} já enviada"
|
10
|
+
version_unpublished_check_result: "%{gem} não encontrada em %{provider}."
|
4
11
|
sources:
|
5
12
|
base:
|
6
13
|
update_self_commit_message: 'Todas as gems: atualiza.'
|
metadata
CHANGED
@@ -1,35 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-eac_ruby_base1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.38.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: 2025-
|
11
|
+
date: 2025-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aranha-parsers
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.26'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.26.1
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.26'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.26.1
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: avm
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
16
36
|
requirements:
|
17
37
|
- - "~>"
|
18
38
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
39
|
+
version: '0.98'
|
20
40
|
- - ">="
|
21
41
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
42
|
+
version: 0.98.1
|
23
43
|
type: :runtime
|
24
44
|
prerelease: false
|
25
45
|
version_requirements: !ruby/object:Gem::Requirement
|
26
46
|
requirements:
|
27
47
|
- - "~>"
|
28
48
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
49
|
+
version: '0.98'
|
30
50
|
- - ">="
|
31
51
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
52
|
+
version: 0.98.1
|
33
53
|
- !ruby/object:Gem::Dependency
|
34
54
|
name: avm-eac_generic_base0
|
35
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +93,7 @@ dependencies:
|
|
73
93
|
version: '0.128'
|
74
94
|
- - ">="
|
75
95
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.128.
|
96
|
+
version: 0.128.4
|
77
97
|
type: :runtime
|
78
98
|
prerelease: false
|
79
99
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,7 +103,7 @@ dependencies:
|
|
83
103
|
version: '0.128'
|
84
104
|
- - ">="
|
85
105
|
- !ruby/object:Gem::Version
|
86
|
-
version: 0.128.
|
106
|
+
version: 0.128.4
|
87
107
|
- !ruby/object:Gem::Dependency
|
88
108
|
name: eac_ruby_gem_support
|
89
109
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,6 +145,9 @@ files:
|
|
125
145
|
- lib/avm/eac_ruby_base1/launcher_stereotypes/base.rb
|
126
146
|
- lib/avm/eac_ruby_base1/launcher_stereotypes/base/local_project_mixin.rb
|
127
147
|
- lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb
|
148
|
+
- lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/internal_check.rb
|
149
|
+
- lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/local_gem.rb
|
150
|
+
- lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish/remote_gem.rb
|
128
151
|
- lib/avm/eac_ruby_base1/preferred_version_requirements.rb
|
129
152
|
- lib/avm/eac_ruby_base1/rspec.rb
|
130
153
|
- lib/avm/eac_ruby_base1/rspec/setup.rb
|
@@ -134,9 +157,13 @@ files:
|
|
134
157
|
- lib/avm/eac_ruby_base1/rubocop/envvar.rb
|
135
158
|
- lib/avm/eac_ruby_base1/rubocop/gemfile.rb
|
136
159
|
- lib/avm/eac_ruby_base1/rubygems.rb
|
160
|
+
- lib/avm/eac_ruby_base1/rubygems/gem_search_parser.rb
|
137
161
|
- lib/avm/eac_ruby_base1/rubygems/gemspec.rb
|
138
162
|
- lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb
|
139
163
|
- lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb
|
164
|
+
- lib/avm/eac_ruby_base1/rubygems/providers/base.rb
|
165
|
+
- lib/avm/eac_ruby_base1/rubygems/providers/nexus.rb
|
166
|
+
- lib/avm/eac_ruby_base1/rubygems/providers/rubygems_org.rb
|
140
167
|
- lib/avm/eac_ruby_base1/rubygems/remote.rb
|
141
168
|
- lib/avm/eac_ruby_base1/rubygems/version_file.rb
|
142
169
|
- lib/avm/eac_ruby_base1/runners.rb
|
@@ -152,6 +179,7 @@ files:
|
|
152
179
|
- lib/avm/eac_ruby_base1/sources/base.rb
|
153
180
|
- lib/avm/eac_ruby_base1/sources/base/bundle_command.rb
|
154
181
|
- lib/avm/eac_ruby_base1/sources/base/bundler.rb
|
182
|
+
- lib/avm/eac_ruby_base1/sources/base/gem_provider.rb
|
155
183
|
- lib/avm/eac_ruby_base1/sources/base/rake.rb
|
156
184
|
- lib/avm/eac_ruby_base1/sources/base/rubocop.rb
|
157
185
|
- lib/avm/eac_ruby_base1/sources/base/rubocop_command.rb
|