avm-tools 0.94.0 → 0.96.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/app_src.rb +60 -0
  3. data/lib/avm/core_ext.rb +4 -0
  4. data/lib/avm/eac_webapp_base0/instance.rb +5 -2
  5. data/lib/avm/eac_webapp_base0/instance/subcommand_parent.rb +24 -0
  6. data/lib/avm/eac_webapp_base0/runner/data.rb +1 -0
  7. data/lib/avm/eac_webapp_base0/runner/data/dump.rb +1 -1
  8. data/lib/avm/eac_webapp_base0/runner/data/load.rb +1 -1
  9. data/lib/avm/git/file_auto_fixup.rb +12 -2
  10. data/lib/avm/instances/base.rb +6 -12
  11. data/lib/avm/instances/base/entry_keys.rb +17 -0
  12. data/lib/{eac_launcher → avm/launcher}/instances/error.rb +0 -0
  13. data/lib/avm/launcher/instances/runner_helper.rb +42 -0
  14. data/lib/avm/patches/class.rb +4 -0
  15. data/lib/avm/patches/eac_ruby_gems_utils.rb +4 -0
  16. data/lib/avm/patches/object.rb +4 -0
  17. data/lib/avm/patches/object/fs_cache.rb +16 -0
  18. data/lib/avm/ruby/bundler.rb +11 -0
  19. data/lib/avm/ruby/bundler/incompatible_parser.rb +25 -0
  20. data/lib/avm/ruby/bundler/incompatible_parser/depends_on.rb +25 -0
  21. data/lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb +39 -0
  22. data/lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb +19 -0
  23. data/lib/avm/ruby/bundler/incompatible_parser/line_buffer.rb +73 -0
  24. data/lib/avm/ruby/bundler/incompatible_parser/line_factory.rb +31 -0
  25. data/lib/avm/ruby/bundler/incompatible_parser/line_parser_base.rb +19 -0
  26. data/lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb +26 -0
  27. data/lib/avm/ruby/gems/generator.rb +1 -5
  28. data/lib/avm/tools/runner/{local_project.rb → app_src.rb} +3 -3
  29. data/lib/avm/tools/runner/{local_project → app_src}/eac_asciidoctor_base0.rb +1 -1
  30. data/lib/avm/tools/runner/{local_project → app_src}/eac_asciidoctor_base0/build.rb +2 -3
  31. data/lib/avm/tools/runner/{local_project → app_src}/eac_writings_base0.rb +1 -1
  32. data/lib/avm/tools/runner/{local_project → app_src}/eac_writings_base0/build_chapters.rb +1 -1
  33. data/lib/avm/tools/runner/{local_project → app_src}/eac_writings_base0/build_single.rb +1 -1
  34. data/lib/avm/tools/runner/{local_project → app_src}/eac_writings_base0/info.rb +1 -1
  35. data/lib/avm/tools/runner/{local_project → app_src}/info.rb +1 -1
  36. data/lib/avm/tools/runner/{local_project → app_src}/ruby.rb +3 -7
  37. data/lib/avm/tools/runner/{local_project → app_src}/ruby/bundler.rb +4 -8
  38. data/lib/avm/tools/runner/{local_project → app_src}/ruby/bundler/gemfile_lock.rb +11 -14
  39. data/lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb +84 -0
  40. data/lib/avm/tools/runner/{local_project → app_src}/test.rb +1 -1
  41. data/lib/avm/tools/runner/{local_project → app_src}/update.rb +1 -1
  42. data/lib/avm/tools/runner/{local_project → app_src}/version_bump.rb +1 -1
  43. data/lib/avm/tools/runner/git/subrepo/fix.rb +1 -1
  44. data/lib/avm/tools/runner/launcher.rb +3 -6
  45. data/lib/avm/tools/runner/launcher/instances.rb +10 -21
  46. data/lib/avm/tools/runner/launcher/projects.rb +10 -18
  47. data/lib/avm/tools/runner/launcher/publish.rb +18 -26
  48. data/lib/avm/tools/runner/ruby/rubocop.rb +9 -25
  49. data/lib/avm/tools/runner/self.rb +7 -15
  50. data/lib/avm/tools/runner/self/docker.rb +1 -1
  51. data/lib/avm/tools/version.rb +1 -1
  52. data/lib/eac_launcher/instances.rb +1 -1
  53. data/template/avm/ruby/gems/generator/static/spec/rubocop_spec.rb +1 -5
  54. data/template/avm/ruby/gems/generator/static/spec/spec_helper.rb +2 -0
  55. data/vendor/avm-apps/avm-apps.gemspec +1 -1
  56. data/vendor/avm-apps/lib/avm/apps/version.rb +1 -1
  57. data/vendor/avm-apps/spec/rubocop_spec.rb +1 -5
  58. data/vendor/avm-apps/spec/spec_helper.rb +3 -0
  59. data/vendor/eac_cli/eac_cli.gemspec +1 -1
  60. data/vendor/eac_cli/lib/eac_cli/core_ext.rb +2 -0
  61. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +5 -1
  62. data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +3 -1
  63. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +4 -2
  64. data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +2 -1
  65. data/vendor/eac_cli/lib/eac_cli/runner/context.rb +2 -1
  66. data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +8 -1
  67. data/vendor/eac_cli/lib/eac_cli/runner_with_set.rb +50 -0
  68. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  69. data/vendor/eac_cli/spec/rubocop_spec.rb +1 -5
  70. data/vendor/eac_cli/spec/spec_helper.rb +3 -0
  71. data/vendor/eac_docker/eac_docker.gemspec +1 -1
  72. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  73. data/vendor/eac_docker/spec/rubocop_spec.rb +1 -5
  74. data/vendor/eac_docker/spec/spec_helper.rb +3 -0
  75. data/vendor/eac_git/eac_git.gemspec +2 -1
  76. data/vendor/eac_git/lib/eac_git/local.rb +4 -0
  77. data/vendor/eac_git/lib/eac_git/local/commit.rb +53 -0
  78. data/vendor/eac_git/lib/eac_git/local/commit/changed_file.rb +46 -0
  79. data/vendor/eac_git/lib/eac_git/local/commit/diff_tree_line.rb +32 -0
  80. data/vendor/eac_git/lib/eac_git/local/dirty_files.rb +2 -3
  81. data/vendor/eac_git/lib/eac_git/rspec.rb +6 -1
  82. data/{lib/avm/git/spec_helper.rb → vendor/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb} +16 -13
  83. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  84. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb +13 -0
  85. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out +1 -0
  86. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
  87. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out +1 -0
  88. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
  89. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out +1 -0
  90. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
  91. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out +2 -0
  92. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
  93. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
  94. data/vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
  95. data/vendor/eac_git/spec/lib/eac_git/local/commit_spec.rb +58 -0
  96. data/vendor/eac_git/spec/rubocop_spec.rb +1 -5
  97. data/vendor/eac_git/spec/spec_helper.rb +3 -0
  98. data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  99. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +4 -0
  100. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +31 -0
  101. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +4 -0
  102. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +4 -0
  103. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +10 -0
  104. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +5 -0
  105. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +5 -0
  106. data/{lib/avm/local_projects.rb → vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb} +2 -2
  107. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +36 -0
  108. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +52 -0
  109. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb +36 -0
  110. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb +58 -0
  111. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  112. data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +42 -0
  113. data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb +81 -0
  114. data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +1 -5
  115. data/vendor/eac_ruby_base0/spec/spec_helper.rb +3 -0
  116. data/vendor/eac_ruby_gems_utils/eac_ruby_gems_utils.gemspec +1 -1
  117. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb +7 -10
  118. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +9 -2
  119. data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
  120. data/vendor/eac_ruby_gems_utils/spec/code/rubocop_check_spec.rb +1 -5
  121. data/vendor/eac_ruby_gems_utils/spec/spec_helper.rb +3 -0
  122. data/vendor/eac_ruby_utils/eac_ruby_utils.gemspec +2 -1
  123. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/filesystem_cache.rb +6 -0
  124. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/logs.rb +63 -0
  125. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +9 -1
  126. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/list.rb +3 -2
  127. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +8 -2
  128. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
  129. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +4 -2
  130. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
  131. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb +10 -0
  132. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +4 -2
  133. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
  134. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb +34 -0
  135. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb +10 -29
  136. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb +69 -0
  137. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +18 -5
  138. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  139. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb +8 -0
  140. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb +9 -0
  141. data/vendor/eac_ruby_utils/spec/rubocop_check_spec.rb +1 -5
  142. data/vendor/eac_ruby_utils/spec/spec_helper.rb +3 -0
  143. metadata +77 -32
  144. data/lib/avm/local_projects/instance.rb +0 -62
  145. data/lib/eac_launcher/instances/runner_helper.rb +0 -42
  146. data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +0 -30
  147. data/vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb +0 -53
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Object
4
+ # @return +block.call(self)+ if +self+ is not nil, +default_value+ otherwise.
5
+ def if_not_nil(default_value = nil)
6
+ return default_value if nil?
7
+
8
+ block_given? ? yield(self) : self
9
+ end
10
+
11
+ # @return +yield+ if +self+ is nil, +self+ otherwise.
12
+ def if_nil
13
+ return yield if nil? && block_given?
14
+
15
+ self
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/regexp_parser'
4
+
5
+ class Regexp
6
+ # @return [::EacRubyUtils::RegexpParser]
7
+ def to_parser(&block)
8
+ ::EacRubyUtils::RegexpParser.new(self, &block)
9
+ end
10
+ end
@@ -3,7 +3,9 @@
3
3
  require 'eac_ruby_utils/inflector'
4
4
 
5
5
  class String
6
- def variableize
7
- ::EacRubyUtils::Inflector.variableize(self)
6
+ # Shortcut to `EacRubyUtils::Inflector.variableize(self, ...)`.
7
+ # @see EacRubyUtils::Inflector.variableize
8
+ def variableize(validate = true)
9
+ ::EacRubyUtils::Inflector.variableize(self, validate)
8
10
  end
9
11
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/local_time_zone'
4
+
5
+ class Time
6
+ class << self
7
+ def required_zone
8
+ zone || ::EacRubyUtils::LocalTimeZone.auto || raise('No zone set or discovered')
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRubyUtils
4
+ class RegexpParser
5
+ attr_reader :pattern, :builder_proc
6
+
7
+ def initialize(pattern, &builder_proc)
8
+ @pattern = pattern
9
+ @builder_proc = builder_proc
10
+ end
11
+
12
+ def parse(string)
13
+ internal_parse(string)[1]
14
+ end
15
+
16
+ def parse!(string)
17
+ match, result = internal_parse(string)
18
+ return result if match
19
+
20
+ raise ::ArgumentError, "String \"#{string}\" does not match pattern \"#{pattern}\""
21
+ end
22
+
23
+ private
24
+
25
+ def internal_parse(string)
26
+ m = pattern.match(string)
27
+ if m
28
+ [true, builder_proc ? builder_proc.call(m) : m]
29
+ else
30
+ [false, nil]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/string/inflections'
4
- require 'eac_ruby_utils/options_consumer'
3
+ require 'eac_ruby_utils/require_sub'
5
4
 
6
5
  module EacRubyUtils
7
6
  # Provide a option by constant, method or options object.
8
7
  module SettingsProvider
8
+ ::EacRubyUtils.require_sub __FILE__, base: self
9
+
9
10
  def setting_constant_name(key, fullname = false)
10
- name = key.to_s.underscore.upcase
11
- name = "#{self.class.name}::#{name}" if fullname
12
- name
11
+ setting_value_instance(key).constant_name(fullname)
13
12
  end
14
13
 
15
14
  def setting_search_order
@@ -25,41 +24,23 @@ module EacRubyUtils
25
24
  end
26
25
 
27
26
  def setting_value(key, options = {})
28
- options = parse_setting_value_options(options)
29
- options.order.each do |method|
30
- value = send("setting_value_by_#{method}", key)
31
- return value if value
32
- end
33
- return nil unless options.required
34
-
35
- raise "Setting \"#{key}\" not found. Supply in #{settings_object_name}, implement a " \
36
- "\"#{key}\" method or declare a #{setting_constant_name(key, true)} constant."
27
+ setting_value_instance(key, options).value
37
28
  end
38
29
 
39
30
  def setting_value_by_constant(key)
40
- constant_name = setting_constant_name(key)
41
- begin
42
- self.class.const_get(constant_name)
43
- rescue NameError
44
- nil
45
- end
31
+ setting_value_instance(key).value_by_constant
46
32
  end
47
33
 
48
34
  def setting_value_by_method(key)
49
- respond_to?(key) ? send(key) : nil
35
+ setting_value_instance(key).value_by_method
50
36
  end
51
37
 
52
38
  def setting_value_by_settings_object(key)
53
- settings_object[key.to_s] || settings_object[key.to_sym]
39
+ setting_value_instance(key).value_by_settings_object
54
40
  end
55
41
 
56
- private
57
-
58
- def parse_setting_value_options(options)
59
- r = ::EacRubyUtils::OptionsConsumer.new(options).consume_all(:required, :order, ostruct: true)
60
- r.required = true if r.required.nil?
61
- r.order = setting_search_order if r.order.nil?
62
- r
42
+ def setting_value_instance(key, options = {})
43
+ ::EacRubyUtils::SettingsProvider::SettingValue.new(self, key, options)
63
44
  end
64
45
  end
65
46
  end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/string/inflections'
4
+ require 'eac_ruby_utils/listable'
5
+ require 'eac_ruby_utils/simple_cache'
6
+ require 'eac_ruby_utils/struct'
7
+
8
+ module EacRubyUtils
9
+ module SettingsProvider
10
+ class SettingValue
11
+ include ::EacRubyUtils::Listable
12
+ include ::EacRubyUtils::SimpleCache
13
+
14
+ attr_reader :source, :key, :options
15
+ lists.add_symbol :option, :default, :order, :required
16
+
17
+ def initialize(source, key, options)
18
+ @source = source
19
+ @key = key
20
+ @options = options
21
+ end
22
+
23
+ def constant_name(fullname = false)
24
+ name = key.to_s.underscore.upcase
25
+ name = "#{source.class.name}::#{name}" if fullname
26
+ name
27
+ end
28
+
29
+ def value
30
+ parsed_options.order.each do |method|
31
+ value = send("value_by_#{method}")
32
+ return value if value
33
+ end
34
+ return parsed_options.default if parsed_options.respond_to?(OPTION_DEFAULT)
35
+ return nil unless parsed_options.required
36
+
37
+ raise_key_not_found
38
+ end
39
+
40
+ def value_by_constant
41
+ source.class.const_get(constant_name)
42
+ rescue NameError
43
+ nil
44
+ end
45
+
46
+ def value_by_method
47
+ source.respond_to?(key, true) ? source.send(key) : nil
48
+ end
49
+
50
+ def value_by_settings_object
51
+ source.settings_object[key.to_s] || source.settings_object[key.to_sym]
52
+ end
53
+
54
+ private
55
+
56
+ def parsed_options_uncached
57
+ r = self.class.lists.option.hash_keys_validate!(options.symbolize_keys)
58
+ r[:required] = true unless r.key?(OPTION_REQUIRED)
59
+ r[:order] = source.setting_search_order if r[OPTION_ORDER].nil?
60
+ ::EacRubyUtils::Struct.new(r)
61
+ end
62
+
63
+ def raise_key_not_found
64
+ raise "Setting \"#{key}\" not found. Supply in #{source.settings_object_name}, implement "\
65
+ "a \"#{key}\" method or declare a #{constant_name(true)} constant."
66
+ end
67
+ end
68
+ end
69
+ end
@@ -2,12 +2,18 @@
2
2
 
3
3
  module EacRubyUtils
4
4
  module SimpleCache
5
- UNCACHED_METHOD_PATTERN = /\A(\s+)_uncached\z/.freeze
5
+ UNCACHED_METHOD_NAME_SUFFIX = '_uncached'
6
+ UNCACHED_METHOD_PATTERN = /\A(\s+)_#{::Regexp.quote(UNCACHED_METHOD_NAME_SUFFIX)}\z/.freeze
7
+
8
+ class << self
9
+ def uncached_method_name(method_name)
10
+ "#{method_name}#{UNCACHED_METHOD_NAME_SUFFIX}"
11
+ end
12
+ end
6
13
 
7
14
  def method_missing(method, *args, &block)
8
- uncached_method = "#{method}_uncached"
9
- if respond_to?(uncached_method, true)
10
- call_method_with_cache(uncached_method, args, &block)
15
+ if respond_to?(::EacRubyUtils::SimpleCache.uncached_method_name(method), true)
16
+ call_method_with_cache(method, args, &block)
11
17
  else
12
18
  super
13
19
  end
@@ -35,10 +41,17 @@ module EacRubyUtils
35
41
  raise 'Não é possível realizar o cache de métodos com bloco' if block
36
42
 
37
43
  key = ([method] + args).join('@@@')
38
- cache_keys[key] = send(method, *args) unless cache_keys.key?(key)
44
+ unless cache_keys.key?(key)
45
+ uncached_value = call_uncached_method(method, args)
46
+ cache_keys[key] = uncached_value
47
+ end
39
48
  cache_keys[key]
40
49
  end
41
50
 
51
+ def call_uncached_method(method, args)
52
+ send(::EacRubyUtils::SimpleCache.uncached_method_name(method), *args)
53
+ end
54
+
42
55
  def cache_keys
43
56
  @cache_keys ||= {}
44
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.58.1'
4
+ VERSION = '0.63.0'
5
5
  end
@@ -42,5 +42,13 @@ RSpec.describe ::EacRubyUtils::SettingsProvider do
42
42
  it do
43
43
  expect(stub.setting_value('key_e', required: false)).to eq(nil)
44
44
  end
45
+
46
+ it do
47
+ expect(stub.setting_value('key_e', default: nil)).to eq(nil)
48
+ end
49
+
50
+ it do
51
+ expect(stub.setting_value('key_e', default: 'default_e')).to eq('default_e')
52
+ end
45
53
  end
46
54
  end
@@ -16,6 +16,11 @@ class CacheableObject
16
16
  "#{arg1}/#{@counter2}"
17
17
  end
18
18
 
19
+ def method_with_reset_uncached
20
+ reset_cache
21
+ 'result'
22
+ end
23
+
19
24
  private
20
25
 
21
26
  def private_method_uncached
@@ -39,6 +44,10 @@ RSpec.describe ::EacRubyUtils::SimpleCache do
39
44
  it 'is able to call private uncached as cached' do
40
45
  expect(instance.private_method).to eq(instance.private_method)
41
46
  end
47
+
48
+ it 'return value even if reset cache' do
49
+ expect(instance.method_with_reset).to eq('result')
50
+ end
42
51
  end
43
52
 
44
53
  describe 'cache value with args' do
@@ -1,7 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_gem_support/spec/examples/rubocop_check'
4
-
5
- RSpec.describe ::RuboCop do
6
- include_examples 'rubocop_check', ::File.expand_path('..', __dir__)
7
- end
3
+ ::EacRubyGemSupport::Rspec.default.describe_rubocop
@@ -5,6 +5,9 @@ require 'tmpdir'
5
5
 
6
6
  RSpec.configure do |config|
7
7
  config.example_status_persistence_file_path = ::File.join(::Dir.tmpdir, 'eac_ruby_utils_rspec')
8
+
9
+ require 'eac_ruby_gem_support/rspec'
10
+ ::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__), config)
8
11
  end
9
12
 
10
13
  require 'i18n'
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.94.0
4
+ version: 0.96.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: 2021-02-17 00:00:00.000000000 Z
11
+ date: 2021-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -98,20 +98,14 @@ dependencies:
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: '0.1'
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 0.1.2
101
+ version: '0.2'
105
102
  type: :development
106
103
  prerelease: false
107
104
  version_requirements: !ruby/object:Gem::Requirement
108
105
  requirements:
109
106
  - - "~>"
110
107
  - !ruby/object:Gem::Version
111
- version: '0.1'
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: 0.1.2
108
+ version: '0.2'
115
109
  - !ruby/object:Gem::Dependency
116
110
  name: eac_cli
117
111
  requirement: !ruby/object:Gem::Requirement
@@ -294,8 +288,10 @@ files:
294
288
  - Gemfile
295
289
  - exe/avm
296
290
  - lib/avm.rb
291
+ - lib/avm/app_src.rb
297
292
  - lib/avm/cached_download.rb
298
293
  - lib/avm/configs.rb
294
+ - lib/avm/core_ext.rb
299
295
  - lib/avm/data.rb
300
296
  - lib/avm/data/instance.rb
301
297
  - lib/avm/data/instance/files_unit.rb
@@ -354,6 +350,7 @@ files:
354
350
  - lib/avm/eac_webapp_base0/deploy/version.rb
355
351
  - lib/avm/eac_webapp_base0/deploy/write_on_target.rb
356
352
  - lib/avm/eac_webapp_base0/instance.rb
353
+ - lib/avm/eac_webapp_base0/instance/subcommand_parent.rb
357
354
  - lib/avm/eac_webapp_base0/runner.rb
358
355
  - lib/avm/eac_webapp_base0/runner/apache_host.rb
359
356
  - lib/avm/eac_webapp_base0/runner/apache_path.rb
@@ -437,7 +434,6 @@ files:
437
434
  - lib/avm/git/organize/reference_update.rb
438
435
  - lib/avm/git/organize/repository.rb
439
436
  - lib/avm/git/revision_test.rb
440
- - lib/avm/git/spec_helper.rb
441
437
  - lib/avm/git/subrepo_check.rb
442
438
  - lib/avm/git/subrepo_check/parent.rb
443
439
  - lib/avm/git/subrepo_check/remote.rb
@@ -458,6 +454,7 @@ files:
458
454
  - lib/avm/instances/base/auto_values/system.rb
459
455
  - lib/avm/instances/base/auto_values/web.rb
460
456
  - lib/avm/instances/base/dockerizable.rb
457
+ - lib/avm/instances/base/entry_keys.rb
461
458
  - lib/avm/instances/configuration.rb
462
459
  - lib/avm/instances/configuration/_locale.rb
463
460
  - lib/avm/instances/configuration/_rubocop.rb
@@ -473,13 +470,17 @@ files:
473
470
  - lib/avm/launcher/errors/non_project.rb
474
471
  - lib/avm/launcher/instances/base.rb
475
472
  - lib/avm/launcher/instances/base/cache.rb
473
+ - lib/avm/launcher/instances/error.rb
474
+ - lib/avm/launcher/instances/runner_helper.rb
476
475
  - lib/avm/launcher/instances/settings.rb
477
- - lib/avm/local_projects.rb
478
- - lib/avm/local_projects/instance.rb
479
476
  - lib/avm/patches.rb
477
+ - lib/avm/patches/class.rb
480
478
  - lib/avm/patches/class/i18n.rb
479
+ - lib/avm/patches/eac_ruby_gems_utils.rb
481
480
  - lib/avm/patches/eac_ruby_gems_utils/gem.rb
482
481
  - lib/avm/patches/i18n.rb
482
+ - lib/avm/patches/object.rb
483
+ - lib/avm/patches/object/fs_cache.rb
483
484
  - lib/avm/patches/object/i18n.rb
484
485
  - lib/avm/patches/object/template.rb
485
486
  - lib/avm/path_string.rb
@@ -514,6 +515,15 @@ files:
514
515
  - lib/avm/rails.rb
515
516
  - lib/avm/result.rb
516
517
  - lib/avm/ruby.rb
518
+ - lib/avm/ruby/bundler.rb
519
+ - lib/avm/ruby/bundler/incompatible_parser.rb
520
+ - lib/avm/ruby/bundler/incompatible_parser/depends_on.rb
521
+ - lib/avm/ruby/bundler/incompatible_parser/gem_conflict.rb
522
+ - lib/avm/ruby/bundler/incompatible_parser/in_gemfile.rb
523
+ - lib/avm/ruby/bundler/incompatible_parser/line_buffer.rb
524
+ - lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
525
+ - lib/avm/ruby/bundler/incompatible_parser/line_parser_base.rb
526
+ - lib/avm/ruby/bundler/incompatible_parser/version_requirement.rb
517
527
  - lib/avm/ruby/gems.rb
518
528
  - lib/avm/ruby/gems/generator.rb
519
529
  - lib/avm/ruby/rubocop.rb
@@ -529,6 +539,21 @@ files:
529
539
  - lib/avm/sync.rb
530
540
  - lib/avm/tools.rb
531
541
  - lib/avm/tools/runner.rb
542
+ - lib/avm/tools/runner/app_src.rb
543
+ - lib/avm/tools/runner/app_src/eac_asciidoctor_base0.rb
544
+ - lib/avm/tools/runner/app_src/eac_asciidoctor_base0/build.rb
545
+ - lib/avm/tools/runner/app_src/eac_writings_base0.rb
546
+ - lib/avm/tools/runner/app_src/eac_writings_base0/build_chapters.rb
547
+ - lib/avm/tools/runner/app_src/eac_writings_base0/build_single.rb
548
+ - lib/avm/tools/runner/app_src/eac_writings_base0/info.rb
549
+ - lib/avm/tools/runner/app_src/info.rb
550
+ - lib/avm/tools/runner/app_src/ruby.rb
551
+ - lib/avm/tools/runner/app_src/ruby/bundler.rb
552
+ - lib/avm/tools/runner/app_src/ruby/bundler/gemfile_lock.rb
553
+ - lib/avm/tools/runner/app_src/ruby/bundler/incompatible.rb
554
+ - lib/avm/tools/runner/app_src/test.rb
555
+ - lib/avm/tools/runner/app_src/update.rb
556
+ - lib/avm/tools/runner/app_src/version_bump.rb
532
557
  - lib/avm/tools/runner/eac_asciidoctor_base0.rb
533
558
  - lib/avm/tools/runner/eac_rails_base0.rb
534
559
  - lib/avm/tools/runner/eac_redmine_base0.rb
@@ -559,20 +584,6 @@ files:
559
584
  - lib/avm/tools/runner/launcher/instances.rb
560
585
  - lib/avm/tools/runner/launcher/projects.rb
561
586
  - lib/avm/tools/runner/launcher/publish.rb
562
- - lib/avm/tools/runner/local_project.rb
563
- - lib/avm/tools/runner/local_project/eac_asciidoctor_base0.rb
564
- - lib/avm/tools/runner/local_project/eac_asciidoctor_base0/build.rb
565
- - lib/avm/tools/runner/local_project/eac_writings_base0.rb
566
- - lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb
567
- - lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb
568
- - lib/avm/tools/runner/local_project/eac_writings_base0/info.rb
569
- - lib/avm/tools/runner/local_project/info.rb
570
- - lib/avm/tools/runner/local_project/ruby.rb
571
- - lib/avm/tools/runner/local_project/ruby/bundler.rb
572
- - lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb
573
- - lib/avm/tools/runner/local_project/test.rb
574
- - lib/avm/tools/runner/local_project/update.rb
575
- - lib/avm/tools/runner/local_project/version_bump.rb
576
587
  - lib/avm/tools/runner/ruby.rb
577
588
  - lib/avm/tools/runner/ruby/gems.rb
578
589
  - lib/avm/tools/runner/ruby/gems/generate.rb
@@ -599,8 +610,6 @@ files:
599
610
  - lib/eac_launcher/git/sub_warp_base.rb
600
611
  - lib/eac_launcher/git/warp_base.rb
601
612
  - lib/eac_launcher/instances.rb
602
- - lib/eac_launcher/instances/error.rb
603
- - lib/eac_launcher/instances/runner_helper.rb
604
613
  - lib/eac_launcher/paths.rb
605
614
  - lib/eac_launcher/paths/logical.rb
606
615
  - lib/eac_launcher/paths/real.rb
@@ -688,15 +697,14 @@ files:
688
697
  - vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb
689
698
  - vendor/eac_cli/lib/eac_cli/runner_with.rb
690
699
  - vendor/eac_cli/lib/eac_cli/runner_with/help.rb
691
- - vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
692
700
  - vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb
701
+ - vendor/eac_cli/lib/eac_cli/runner_with_set.rb
693
702
  - vendor/eac_cli/lib/eac_cli/version.rb
694
703
  - vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb
695
704
  - vendor/eac_cli/spec/lib/eac_cli/docopt/runner_extension_spec.rb
696
705
  - vendor/eac_cli/spec/lib/eac_cli/parser/alternative_spec.rb
697
706
  - vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb
698
707
  - vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
699
- - vendor/eac_cli/spec/lib/eac_cli/runner_with/output_file_spec.rb
700
708
  - vendor/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb
701
709
  - vendor/eac_cli/spec/rubocop_spec.rb
702
710
  - vendor/eac_cli/spec/spec_helper.rb
@@ -725,14 +733,30 @@ files:
725
733
  - vendor/eac_git/lib/eac_git.rb
726
734
  - vendor/eac_git/lib/eac_git/executables.rb
727
735
  - vendor/eac_git/lib/eac_git/local.rb
736
+ - vendor/eac_git/lib/eac_git/local/commit.rb
737
+ - vendor/eac_git/lib/eac_git/local/commit/changed_file.rb
738
+ - vendor/eac_git/lib/eac_git/local/commit/diff_tree_line.rb
728
739
  - vendor/eac_git/lib/eac_git/local/dirty_files.rb
729
740
  - vendor/eac_git/lib/eac_git/local/subrepo.rb
730
741
  - vendor/eac_git/lib/eac_git/local/subrepo/config.rb
731
742
  - vendor/eac_git/lib/eac_git/remote.rb
732
743
  - vendor/eac_git/lib/eac_git/remote/ls_result.rb
733
744
  - vendor/eac_git/lib/eac_git/rspec.rb
745
+ - vendor/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb
734
746
  - vendor/eac_git/lib/eac_git/version.rb
735
747
  - vendor/eac_git/spec/lib/eac_git/executables_spec.rb
748
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb
749
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out
750
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml
751
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out
752
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml
753
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out
754
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml
755
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out
756
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml
757
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out
758
+ - vendor/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml
759
+ - vendor/eac_git/spec/lib/eac_git/local/commit_spec.rb
736
760
  - vendor/eac_git/spec/rubocop_spec.rb
737
761
  - vendor/eac_git/spec/spec_helper.rb
738
762
  - vendor/eac_git/vendor/git-subrepo/Changes
@@ -924,9 +948,23 @@ files:
924
948
  - vendor/eac_ruby_base0/eac_ruby_base0.gemspec
925
949
  - vendor/eac_ruby_base0/lib/eac_ruby_base0.rb
926
950
  - vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb
951
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb
952
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
953
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb
954
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb
955
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb
956
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb
957
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb
927
958
  - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
928
959
  - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb
960
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb
961
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb
962
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb
963
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb
964
+ - vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/output.rb
929
965
  - vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb
966
+ - vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb
967
+ - vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/output_spec.rb
930
968
  - vendor/eac_ruby_base0/spec/rubocop_spec.rb
931
969
  - vendor/eac_ruby_base0/spec/spec_helper.rb
932
970
  - vendor/eac_ruby_gems_utils/Gemfile
@@ -1016,6 +1054,7 @@ files:
1016
1054
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs.rb
1017
1055
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/clearable_directory.rb
1018
1056
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/extname.rb
1057
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/logs.rb
1019
1058
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/temp.rb
1020
1059
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/directory.rb
1021
1060
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/temp/file.rb
@@ -1047,6 +1086,7 @@ files:
1047
1086
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches.rb
1048
1087
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class.rb
1049
1088
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/common_constructor.rb
1089
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb
1050
1090
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable.rb
1051
1091
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerable/boolean_combinations.rb
1052
1092
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/enumerator.rb
@@ -1070,6 +1110,7 @@ files:
1070
1110
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb
1071
1111
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb
1072
1112
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb
1113
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb
1073
1114
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_present.rb
1074
1115
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_respond.rb
1075
1116
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb
@@ -1078,13 +1119,16 @@ files:
1078
1119
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb
1079
1120
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb
1080
1121
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb
1122
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/to_parser.rb
1081
1123
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb
1082
1124
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb
1083
1125
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb
1126
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb
1084
1127
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash.rb
1085
1128
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/entry_key_error.rb
1086
1129
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/node.rb
1087
1130
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/paths_hash/path_search.rb
1131
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/regexp_parser.rb
1088
1132
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/require_sub.rb
1089
1133
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec.rb
1090
1134
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/rspec/conditional.rb
@@ -1093,6 +1137,7 @@ files:
1093
1137
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/ruby/command.rb
1094
1138
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb
1095
1139
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb
1140
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider/setting_value.rb
1096
1141
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb
1097
1142
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb
1098
1143
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/templates.rb
@@ -1176,7 +1221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1176
1221
  - !ruby/object:Gem::Version
1177
1222
  version: '0'
1178
1223
  requirements: []
1179
- rubygems_version: 3.0.8
1224
+ rubygems_version: 3.0.9
1180
1225
  signing_key:
1181
1226
  specification_version: 4
1182
1227
  summary: Tools for AVM.