avm-tools 0.117.2 → 0.119.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/tools/runner/app_src/info.rb +0 -8
  3. data/lib/avm/tools/runner/app_src/subs.rb +71 -0
  4. data/lib/avm/tools/runner/app_src.rb +2 -0
  5. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
  6. data/lib/avm/tools/version.rb +1 -1
  7. data/sub/avm/lib/avm/sources/base/configuration.rb +13 -6
  8. data/sub/avm/lib/avm/sources/base/subs.rb +55 -0
  9. data/sub/avm/lib/avm/sources/base/subs_paths.rb +32 -0
  10. data/sub/avm/lib/avm/sources/base.rb +10 -5
  11. data/sub/avm/lib/avm/version.rb +1 -1
  12. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +1 -1
  13. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +27 -0
  14. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  15. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +1 -0
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb +27 -0
  17. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  18. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
  19. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb +4 -0
  20. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +27 -0
  21. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  22. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -1
  23. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/depends_on.rb +3 -3
  24. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/gem_conflict.rb +11 -6
  25. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/in_gemfile.rb +3 -3
  26. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/line_buffer.rb +3 -3
  27. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/line_factory.rb +4 -4
  28. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/line_parser_base.rb +1 -1
  29. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser/version_requirement.rb +4 -4
  30. data/{lib/avm/ruby → sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1}/bundler/incompatible_parser.rb +2 -2
  31. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundle_command.rb +39 -0
  32. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +39 -0
  33. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +7 -2
  34. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb +76 -0
  35. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb +19 -0
  36. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners.rb +13 -0
  37. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  38. data/sub/avm-eac_ruby_base1/locale/{en.yaml → en.yml} +0 -0
  39. data/sub/avm-eac_ruby_base1/locale/{pt-BR.yaml → pt-BR.yml} +0 -0
  40. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec.rb +7 -0
  41. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.source.out +192 -0
  42. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/1.target.yaml +300 -0
  43. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.source.out +245 -0
  44. data/sub/avm-eac_ruby_base1/spec/lib/avm/eac_ruby_base1/bundler/incompatible_parser_spec_files/2.target.yaml +355 -0
  45. metadata +34 -19
  46. data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35fb18a5736eb65f686b0915a77da3f4e548a64b0ce7e0bd5bc754483c675757
4
- data.tar.gz: 053eeec2795b4cf08660991b06d13127e1a66b112a084642f8213fbe89a82e59
3
+ metadata.gz: e6c5ab539a33cf698f0aa4eaa382e2e23fd408df17185a111ae78983ab1794f1
4
+ data.tar.gz: 6a9762c549ee37c533af5c35dca078ab7ee19158e6398d81f7451fce54de076a
5
5
  SHA512:
6
- metadata.gz: 356218e0b80f21fbd6612ef6f88b49112ee7d97bff1c7b3ef21039964f024dffbcf0944d4ab01b82c6f919384b0bba401319572911599154a418f8a1e3d50c99
7
- data.tar.gz: f290a18803f13ae99202ec10ee6106f267913a27b8537dd2fc3f6156151b6d0f01a34354c980de17885b85dc7614019adb7747c03e91ebe1038aca22c6d898a5
6
+ metadata.gz: 6972527557010d58fefc671e1679f011bb68961fb9ecb3a33378681411f39c7fff9fd68ef54a12f6fecf692bd1539e087ee306e05b437c29e542365a54a1231c
7
+ data.tar.gz: d9f89dbe97cc6ee002566f9b5c1ec806b9f6e9eb33adca54e3473842bf7abb88923fc27e434d428b595d5b1a51281db1f921cd836af0bdc85d6ce2840c49a3db
@@ -14,7 +14,6 @@ module Avm
14
14
  def run
15
15
  show_instance
16
16
  show_source
17
- show_subs
18
17
  end
19
18
 
20
19
  private
@@ -29,13 +28,6 @@ module Avm
29
28
  infov 'SCM', runner_context.call(:subject).scm
30
29
  end
31
30
 
32
- def show_subs
33
- infov 'Sub applications', instance.avm_instance.subs.count
34
- instance.avm_instance.subs.each do |subapp|
35
- infov ' * ', "#{subapp.relative_path} [#{subapp.class}]"
36
- end
37
- end
38
-
39
31
  def instance
40
32
  runner_context.call(:instance)
41
33
  end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/tools/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ class Runner
8
+ class AppSrc
9
+ class Subs
10
+ PADDING = ' '
11
+
12
+ runner_with :help, :output do
13
+ desc 'Output source\'s subs.'
14
+ bool_opt '-i', '--info'
15
+ bool_opt '-R', '--recursive'
16
+ bool_opt '-t', '--tree'
17
+ end
18
+
19
+ def run
20
+ start_banner
21
+ run_output
22
+ end
23
+
24
+ def start_banner
25
+ infov 'Include PATH', runner_context.call(:subject).subs_include_path
26
+ infov 'Exclude PATH', runner_context.call(:subject).subs_exclude_path
27
+ infov 'Count', runner_context.call(:subject).subs.count
28
+ end
29
+
30
+ def output_content
31
+ b = []
32
+ runner_context.call(:subject).subs.each do |sub|
33
+ b += sub_output_content_lines(sub, 0)
34
+ end
35
+ b.map { |line| "#{line}\n" }.join
36
+ end
37
+
38
+ def sub_info_label(sub)
39
+ return '' unless parsed.info?
40
+
41
+ ' [' + {
42
+ 'CLASS' => sub.class.name
43
+ }.map { |k, v| "#{k}: #{v}" }.join(', ') + ']'
44
+ end
45
+
46
+ def sub_label(sub, level)
47
+ sub_self_label(sub, level) + sub_info_label(sub)
48
+ end
49
+
50
+ def sub_self_label(sub, level)
51
+ if parsed.tree?
52
+ (PADDING * level) + sub.relative_path.to_s
53
+ else
54
+ sub.path.relative_path_from(runner_context.call(:subject).path).to_s
55
+ end
56
+ end
57
+
58
+ def sub_output_content_lines(sub, level)
59
+ [sub_label(sub, level)] + sub_subs_output_content_lines(sub, level)
60
+ end
61
+
62
+ def sub_subs_output_content_lines(sub, level)
63
+ return [] unless parsed.recursive?
64
+
65
+ sub.subs.flat_map { |sub_sub| sub_output_content_lines(sub_sub, level + 1) }
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -23,6 +23,8 @@ module Avm
23
23
  instance.avm_instance
24
24
  end
25
25
 
26
+ delegate :extra_available_subcommands, to: :subject
27
+
26
28
  private
27
29
 
28
30
  def instance_uncached
@@ -32,7 +32,7 @@ module Avm
32
32
  end
33
33
 
34
34
  def url
35
- options.fetch('--url') || url_by_version
35
+ parsed.url || url_by_version
36
36
  end
37
37
 
38
38
  def url_by_version
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.117.2'
5
+ VERSION = '0.119.0'
6
6
  end
7
7
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_config/yaml_file_node'
3
4
  require 'eac_ruby_utils/core_ext'
4
5
  require 'eac_ruby_utils/yaml'
5
6
  require 'shellwords'
@@ -10,21 +11,27 @@ module Avm
10
11
  module Configuration
11
12
  # @return [Array<String>, nil]
12
13
  def read_configuration_as_shell_words(key)
13
- configuration[key].if_present do |v|
14
+ configuration.entry(key).value.if_present do |v|
14
15
  v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v.to_s)
15
16
  end
16
17
  end
17
18
 
18
19
  private
19
20
 
20
- # @return [Hash]
21
+ # @return [EacConfig::YamlFileNode]
21
22
  def configuration_uncached
22
23
  ::Avm::Sources::Configuration::FILENAMES.each do |filename|
23
- file_path = path.join(filename)
24
- return ::EacRubyUtils::Yaml.load_file(file_path).with_indifferent_access if
25
- file_path.exist?
24
+ configuration_with_filename(filename, true)
26
25
  end
27
- {}
26
+ configuration_with_filename(::Avm::Sources::Configuration::FILENAMES.first, false)
27
+ end
28
+
29
+ # @return [EacConfig::YamlFileNode, nil]
30
+ def configuration_with_filename(filename, needs_exist)
31
+ file_path = path.join(filename)
32
+ return ::EacConfig::YamlFileNode.new(file_path) if !needs_exist || file_path.exist?
33
+
34
+ nil
28
35
  end
29
36
 
30
37
  # @return [Avm::Sources::Configuration]
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/sources/base/subs_paths'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Sources
8
+ class Base
9
+ module Subs
10
+ CONFIGURATION_SUBS_EXCLUDE_PATHS_KEY = 'subs.exclude_path'
11
+ CONFIGURATION_SUBS_INCLUDE_PATHS_KEY = 'subs.include_path'
12
+ SUBS_EXCLUDE_PATHS_DEFAULT = [].freeze
13
+ SUBS_INCLUDE_PATHS_DEFAULT = ['sub/*'].freeze
14
+
15
+ # @return [Enumerable<Avm::Sources::Base>]
16
+ def subs
17
+ subs_paths_to_search
18
+ .map { |sub_path| ::Avm::Registry.sources.detect_optional(sub_path, parent: self) }
19
+ .reject(&:blank?)
20
+ .sort_by { |sub| [sub.path] }
21
+ end
22
+
23
+ def subs_paths_to_search
24
+ subs_include_paths.flat_map do |subs_include_path|
25
+ ::Pathname.glob(path.join(subs_include_path)).reject do |sub_path|
26
+ subs_exclude_paths.any? do |subs_exclude_path|
27
+ sub_path.fnmatch?(path.join(subs_exclude_path).to_path)
28
+ end
29
+ end
30
+ end
31
+ end
32
+
33
+ %i[include exclude].each do |type|
34
+ %i[path paths configured_paths default_paths].each do |method_suffix|
35
+ obj_method_name = "subs_#{type}_path_obj"
36
+
37
+ define_method "subs_#{type}_#{method_suffix}" do
38
+ send(obj_method_name).send(method_suffix)
39
+ end
40
+
41
+ define_method "#{obj_method_name}_uncached" do
42
+ ::Avm::Sources::Base::SubsPaths.new(
43
+ self,
44
+ self.class.const_get("CONFIGURATION_SUBS_#{type}_PATHS_KEY".upcase),
45
+ self.class.const_get("SUBS_#{type}_PATHS_DEFAULT".upcase)
46
+ )
47
+ end
48
+
49
+ private "#{obj_method_name}_uncached" # rubocop:disable Style/AccessModifierDeclarations
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Sources
7
+ class Base
8
+ class SubsPaths
9
+ SUBS_PATH_SEPARATOR = ':'
10
+
11
+ common_constructor :source, :configuration_key, :default_paths
12
+
13
+ # @return [String]
14
+ def path
15
+ paths.join(SUBS_PATH_SEPARATOR)
16
+ end
17
+
18
+ # @return [Array<String>]
19
+ def paths
20
+ configured_paths || default_paths
21
+ end
22
+
23
+ # @return [Array<String>]
24
+ def configured_paths
25
+ source.configuration.entry(configuration_key).value.if_present do |v|
26
+ v.split(SUBS_PATH_SEPARATOR)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -22,6 +22,16 @@ module Avm
22
22
 
23
23
  delegate :locale, to: :old_configuration
24
24
 
25
+ # @return [EacRubyUtils::Envs::LocalEnv]
26
+ def env
27
+ ::EacRubyUtils::Envs::LocalEnv.new
28
+ end
29
+
30
+ # @return [Hash<String, Class>]
31
+ def extra_available_subcommands
32
+ {}
33
+ end
34
+
25
35
  # @return [Pathname]
26
36
  def relative_path
27
37
  return path if parent.blank?
@@ -33,11 +43,6 @@ module Avm
33
43
  "#{self.class}[#{path}]"
34
44
  end
35
45
 
36
- # @return [Enumerable<Avm::Sources::Base>]
37
- def subs
38
- scm.subs.map { |subrepo| ::Avm::Registry.sources.detect(subrepo.path, parent: self) }
39
- end
40
-
41
46
  private
42
47
 
43
48
  # @return [Avm::Scms::Base]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.19.0'
4
+ VERSION = '0.21.0'
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_rails_base1', '~> 0.2'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.3'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.80', '>= 0.80.2'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/sources/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase0
8
+ module Sources
9
+ class Base < ::Avm::EacRailsBase1::Sources::Base
10
+ CONFIG_RU_SUBPATH = 'config.ru'
11
+ SUBS_PATHS_DEFAULT = ['sub/*/*'].freeze
12
+
13
+ def config_ru_path
14
+ path.join(CONFIG_RU_SUBPATH)
15
+ end
16
+
17
+ def subs_paths_default
18
+ SUBS_PATHS_DEFAULT
19
+ end
20
+
21
+ def valid?
22
+ super && config_ru_path.exist?
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
+ s.add_dependency 'avm-eac_ruby_base1', '~> 0.6'
15
16
  s.add_dependency 'avm-eac_webapp_base0', '~> 0.3'
16
17
  s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '>= 0.9.9'
17
18
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ruby_base1/sources/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module Sources
9
+ class Base < ::Avm::EacRubyBase1::Sources::Base
10
+ CONFIG_RU_SUBPATH = 'config.ru'
11
+ SUBS_PATHS_DEFAULT = ['sub/*/*'].freeze
12
+
13
+ def config_ru_path
14
+ path.join(CONFIG_RU_SUBPATH)
15
+ end
16
+
17
+ def subs_paths_default
18
+ SUBS_PATHS_DEFAULT
19
+ end
20
+
21
+ def valid?
22
+ super && config_ru_path.exist?
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.2.1'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_rails_base1', '~> 0.2'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.3'
16
16
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.2'
17
17
  s.add_dependency 'curb', '~> 0.9.10'
18
18
  s.add_dependency 'eac_fs', '~> 0.4'
@@ -36,6 +36,10 @@ module Avm
36
36
  infov 'Package size', source_package.path.size
37
37
  end
38
38
 
39
+ def fs_object_id
40
+ [instance.id, version].join('_').variableize
41
+ end
42
+
39
43
  private
40
44
 
41
45
  attr_reader :tempdir
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/sources/base'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRedmineBase0
8
+ module Sources
9
+ class Base < ::Avm::EacRailsBase1::Sources::Base
10
+ REDMINE_LIB_SUBPATH = 'lib/redmine.rb'
11
+ SUBS_PATHS_DEFAULT = ['plugins/*'].freeze
12
+
13
+ def redmine_lib_path
14
+ path.join(REDMINE_LIB_SUBPATH)
15
+ end
16
+
17
+ def subs_paths_default
18
+ SUBS_PATHS_DEFAULT
19
+ end
20
+
21
+ def valid?
22
+ super && redmine_lib_path.exist?
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.5.1'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
@@ -12,10 +12,11 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.9'
15
+ s.add_dependency 'avm', '~> 0.21'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.2'
17
17
  s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '>= 0.9.8'
18
18
  s.add_dependency 'eac_ruby_utils', '~> 0.80'
19
19
 
20
+ s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
20
21
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
22
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/line_parser_base'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base'
5
5
 
6
6
  module Avm
7
- module Ruby
7
+ module EacRubyBase1
8
8
  module Bundler
9
9
  class IncompatibleParser
10
- class DependsOn < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
10
+ class DependsOn < ::Avm::EacRubyBase1::Bundler::IncompatibleParser::LineParserBase
11
11
  LINE_PARSER = /(.+) was resolved to (.+), which depends on/
12
12
  .to_parser { |m| new(m[1], m[2]) }
13
13
 
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/line_parser_base'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base'
5
5
 
6
6
  module Avm
7
- module Ruby
7
+ module EacRubyBase1
8
8
  module Bundler
9
9
  class IncompatibleParser
10
- class GemConflict < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
10
+ class GemConflict < ::Avm::EacRubyBase1::Bundler::IncompatibleParser::LineParserBase
11
11
  LINE_PARSER = /Bundler could not find compatible versions for gem "(.+)":/
12
12
  .to_parser { |m| new(m[1]) }
13
13
 
@@ -15,12 +15,11 @@ module Avm
15
15
  common_constructor :gem_name
16
16
 
17
17
  def add_depends_on(depends_on)
18
- @depends_on_stack ||= []
19
- @depends_on_stack << depends_on
18
+ depends_on_stack << depends_on
20
19
  end
21
20
 
22
21
  def add_version_requirement(version_requirement)
23
- version_requirement.stack = @depends_on_stack
22
+ version_requirement.stack = depends_on_stack
24
23
  versions_requirements << version_requirement
25
24
  @depends_on_stack = nil
26
25
  end
@@ -32,6 +31,12 @@ module Avm
32
31
  def versions_requirements
33
32
  @versions_requirements ||= []
34
33
  end
34
+
35
+ private
36
+
37
+ def depends_on_stack
38
+ @depends_on_stack ||= []
39
+ end
35
40
  end
36
41
  end
37
42
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/line_parser_base'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base'
5
5
 
6
6
  module Avm
7
- module Ruby
7
+ module EacRubyBase1
8
8
  module Bundler
9
9
  class IncompatibleParser
10
- class InGemfile < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
10
+ class InGemfile < ::Avm::EacRubyBase1::Bundler::IncompatibleParser::LineParserBase
11
11
  LINE_PARSER = /In Gemfile:/
12
12
  .to_parser { |_m| new }
13
13
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/gem_conflict'
5
- require 'avm/ruby/bundler/incompatible_parser/line_factory'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict'
5
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/line_factory'
6
6
 
7
7
  module Avm
8
- module Ruby
8
+ module EacRubyBase1
9
9
  module Bundler
10
10
  class IncompatibleParser
11
11
  class LineBuffer
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/depends_on'
5
- require 'avm/ruby/bundler/incompatible_parser/gem_conflict'
6
- require 'avm/ruby/bundler/incompatible_parser/in_gemfile'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/depends_on'
5
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/gem_conflict'
6
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/in_gemfile'
7
7
 
8
8
  module Avm
9
- module Ruby
9
+ module EacRubyBase1
10
10
  module Bundler
11
11
  class IncompatibleParser
12
12
  class LineFactory
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module Ruby
6
+ module EacRubyBase1
7
7
  module Bundler
8
8
  class IncompatibleParser
9
9
  class LineParserBase
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'avm/ruby/bundler/incompatible_parser/line_parser_base'
4
+ require 'avm/eac_ruby_base1/bundler/incompatible_parser/line_parser_base'
5
5
 
6
6
  module Avm
7
- module Ruby
7
+ module EacRubyBase1
8
8
  module Bundler
9
9
  class IncompatibleParser
10
- class VersionRequirement < ::Avm::Ruby::Bundler::IncompatibleParser::LineParserBase
11
- LINE_PARSER = /\A([a-z][a-z_0-9]*)(?: \((.+)\))?\z/
10
+ class VersionRequirement < ::Avm::EacRubyBase1::Bundler::IncompatibleParser::LineParserBase
11
+ LINE_PARSER = /\A([a-z][a-z\-_0-9]*)(?: \((.+)\))?\z/
12
12
  .to_parser { |m| new(m[1], m[2]) }
13
13
 
14
14
  enable_simple_cache
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
- module Ruby
6
+ module EacRubyBase1
7
7
  module Bundler
8
8
  class IncompatibleParser
9
9
  require_sub __FILE__
@@ -12,7 +12,7 @@ module Avm
12
12
  attr_reader :gems_in_conflict
13
13
 
14
14
  def initialize(path)
15
- @gems_in_conflict = ::Avm::Ruby::Bundler::IncompatibleParser::LineBuffer
15
+ @gems_in_conflict = ::Avm::EacRubyBase1::Bundler::IncompatibleParser::LineBuffer
16
16
  .from_file(path).gems_in_conflict.freeze
17
17
  end
18
18