eac_tools 0.5.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +35 -29
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +1 -0
  5. data/sub/avm/lib/avm/registry/with_path/cache.rb +31 -0
  6. data/sub/avm/lib/avm/registry/with_path.rb +25 -5
  7. data/sub/avm/lib/avm/sources/base/configuration.rb +23 -2
  8. data/sub/avm/lib/avm/sources/base/locale.rb +1 -1
  9. data/sub/avm/lib/avm/sources/base/parent.rb +8 -11
  10. data/sub/avm/lib/avm/sources/base/subs_paths.rb +1 -1
  11. data/sub/avm/lib/avm/sources/base/testing.rb +4 -4
  12. data/sub/avm/lib/avm/sources/tests/builder.rb +17 -11
  13. data/sub/avm/lib/avm/version.rb +1 -1
  14. data/sub/avm-eac_rails_base0/Gemfile +3 -0
  15. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +1 -1
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  17. data/sub/avm-eac_redmine_base0/Gemfile +3 -0
  18. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +6 -6
  19. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +8 -0
  20. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  21. data/sub/avm-eac_redmine_plugin_base0/avm-eac_redmine_plugin_base0.gemspec +1 -1
  22. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/sources/base.rb +40 -2
  23. data/sub/avm-eac_redmine_plugin_base0/lib/avm/eac_redmine_plugin_base0/version.rb +1 -1
  24. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +1 -1
  25. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/bundler.rb +1 -1
  26. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb +14 -0
  27. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +18 -4
  28. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  29. data/sub/avm-tools/Gemfile +3 -0
  30. data/sub/avm-tools/Gemfile.lock +17 -22
  31. data/sub/avm-tools/lib/avm/tools/runner/app_src/info.rb +19 -0
  32. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  33. data/sub/eac_cli/Gemfile +3 -0
  34. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  35. data/sub/eac_config/Gemfile +8 -0
  36. data/sub/{avm-tools/sub/eac_config → eac_config}/eac_config.gemspec +0 -0
  37. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/entry.rb +0 -0
  38. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/entry_path.rb +5 -0
  39. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/envvars_node/entry.rb +0 -0
  40. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/envvars_node.rb +0 -0
  41. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/load_nodes_search.rb +0 -0
  42. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/load_path.rb +0 -0
  43. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/node.rb +6 -0
  44. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/node_entry.rb +0 -0
  45. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/node_uri.rb +0 -0
  46. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/old_configs/base.rb +0 -0
  47. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/old_configs/file.rb +0 -0
  48. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/old_configs.rb +0 -0
  49. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/paths_hash/entry_key_error.rb +0 -0
  50. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/paths_hash/node.rb +0 -0
  51. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/paths_hash/path_search.rb +0 -0
  52. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/paths_hash.rb +0 -0
  53. data/sub/eac_config/lib/eac_config/prefixed_path_node/entry.rb +25 -0
  54. data/sub/eac_config/lib/eac_config/prefixed_path_node.rb +19 -0
  55. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/rspec/setup.rb +0 -0
  56. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/rspec.rb +0 -0
  57. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/version.rb +1 -1
  58. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/yaml_file_node/entry.rb +0 -0
  59. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config/yaml_file_node.rb +0 -0
  60. data/sub/{avm-tools/sub/eac_config → eac_config}/lib/eac_config.rb +0 -0
  61. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/entry_path_spec.rb +0 -0
  62. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/envvars_node/entry_spec.rb +0 -0
  63. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/envvars_node_spec.rb +0 -0
  64. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/old_configs_spec.rb +0 -0
  65. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/paths_hash_spec.rb +0 -0
  66. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/yaml_file_node_spec.rb +0 -0
  67. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +0 -0
  68. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +0 -0
  69. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +0 -0
  70. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +0 -0
  71. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/rubocop_spec.rb +0 -0
  72. data/sub/{avm-tools/sub/eac_config → eac_config}/spec/spec_helper.rb +0 -0
  73. data/sub/eac_fs/Gemfile +3 -0
  74. data/sub/eac_fs/lib/eac_fs/version.rb +1 -1
  75. data/sub/eac_ruby_base0/Gemfile +3 -0
  76. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  77. data/sub/eac_ruby_utils/Gemfile +2 -10
  78. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  79. metadata +55 -52
  80. data/sub/avm-tools/sub/eac_config/Gemfile +0 -5
@@ -9,6 +9,9 @@ module Avm
9
9
  class Base < ::Avm::EacGenericBase0::Sources::Base
10
10
  module Rake
11
11
  RAKEFILE_BASENAME = 'Rakefile'
12
+ RAKE_TASKS_LINE_PARSER = /\Arake\s+(\S+)\s+/.to_parser do |m|
13
+ m[1]
14
+ end
12
15
 
13
16
  # @return [Avm::EacRubyBase1::Sources::Base::BundleCommand]
14
17
  def rake(*args)
@@ -21,6 +24,17 @@ module Avm
21
24
  def rakefile_path
22
25
  path.join(RAKEFILE_BASENAME)
23
26
  end
27
+
28
+ # @return [Boolean]
29
+ def rake_task?(task_name)
30
+ rake_tasks.include?(task_name)
31
+ end
32
+
33
+ # @return [Array<String>]
34
+ def rake_tasks
35
+ rake('--all', '--tasks').execute!.each_line
36
+ .map { |line| RAKE_TASKS_LINE_PARSER.parse!(line) }
37
+ end
24
38
  end
25
39
  end
26
40
  end
@@ -15,10 +15,6 @@ module Avm
15
15
 
16
16
  require_sub __FILE__, include_modules: :prepend
17
17
 
18
- # To-do: dismiss this method at Avm::EacRailsBase1::Instance and remove.
19
- # @return [EacRubyUtils::Envs::BaseEnv]
20
- attr_reader :env
21
-
22
18
  # @return [Hash<String, EacRubyUtils::Envs::Command>]
23
19
  def default_test_commands
24
20
  {
@@ -26,6 +22,12 @@ module Avm
26
22
  }
27
23
  end
28
24
 
25
+ # To-do: dismiss this method at Avm::EacRailsBase1::Instance and remove.
26
+ # @return [EacRubyUtils::Envs::BaseEnv]
27
+ def env
28
+ @env.presence || super
29
+ end
30
+
29
31
  # To-do: dismiss this method at Avm::EacRailsBase1::Instance and remove.
30
32
  # @return [Avm::EacRubyBase1::Sources::Base]
31
33
  def env_set(env)
@@ -34,6 +36,18 @@ module Avm
34
36
  self
35
37
  end
36
38
 
39
+ # @return [Avm::EacRubyBase1::Source::Base]
40
+ def ruby_parent
41
+ a_parent = parent
42
+
43
+ loop do
44
+ raise 'No Ruby parent found' if a_parent.blank?
45
+ return a_parent if a_parent.is_a?(::Avm::EacRubyBase1::Sources::Base)
46
+
47
+ a_parent = a_parent.parent
48
+ end
49
+ end
50
+
37
51
  # @return [EacRubyUtils::Envs::Command]
38
52
  def rspec_test_command
39
53
  bundle('exec', 'rspec', '--fail-fast').chdir_root
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.9.0'
5
+ VERSION = '0.11.0'
6
6
  end
7
7
  end
@@ -10,3 +10,6 @@ Dir["#{gems_subdir}/*"].each do |dir|
10
10
 
11
11
  gem ::File.basename(dir), path: dir
12
12
  end
13
+
14
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
15
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avm-tools (0.121.2)
4
+ avm-tools (0.122.0)
5
5
  aranha-parsers (~> 0.4)
6
6
  avm (~> 0.22)
7
7
  avm-eac_asciidoctor_base0 (~> 0.3, >= 0.3.4)
@@ -59,13 +59,6 @@ PATH
59
59
  eac_git (~> 0.11)
60
60
  eac_ruby_utils (~> 0.76)
61
61
 
62
- PATH
63
- remote: sub/eac_config
64
- specs:
65
- eac_config (0.8.1)
66
- addressable
67
- eac_ruby_utils (~> 0.83)
68
-
69
62
  PATH
70
63
  remote: sub/eac_docker
71
64
  specs:
@@ -115,7 +108,7 @@ GEM
115
108
  ofx-parser (~> 1.1.0)
116
109
  asciidoctor (2.0.17)
117
110
  ast (2.4.2)
118
- avm (0.24.0)
111
+ avm (0.25.0)
119
112
  eac_cli (~> 0.27, >= 0.27.6)
120
113
  eac_docker (~> 0.3)
121
114
  eac_git (~> 0.6)
@@ -130,18 +123,18 @@ GEM
130
123
  avm-eac_rails_base0 (0.4.1)
131
124
  avm-eac_rails_base1 (~> 0.3)
132
125
  eac_ruby_utils (~> 0.80, >= 0.80.2)
133
- avm-eac_rails_base1 (0.3.2)
134
- avm-eac_ruby_base1 (~> 0.8)
126
+ avm-eac_rails_base1 (0.4.1)
127
+ avm-eac_ruby_base1 (~> 0.9, >= 0.9.1)
135
128
  avm-eac_webapp_base0 (~> 0.3)
136
- eac_ruby_utils (~> 0.95, >= 0.95.1)
137
- avm-eac_redmine_base0 (0.8.0)
138
- avm-eac_rails_base1 (~> 0.3)
139
- avm-eac_ubuntu_base0 (~> 0.2)
140
- curb (~> 0.9.10)
141
- eac_fs (~> 0.4)
142
- eac_rest (~> 0.4)
143
- eac_ruby_utils (~> 0.68)
144
- avm-eac_ruby_base1 (0.9.0)
129
+ eac_ruby_utils (~> 0.95, >= 0.95.2)
130
+ avm-eac_redmine_base0 (0.9.0)
131
+ avm-eac_rails_base1 (~> 0.4, >= 0.4.1)
132
+ avm-eac_ubuntu_base0 (~> 0.3)
133
+ curb (~> 0.9.11)
134
+ eac_fs (~> 0.12, >= 0.12.2)
135
+ eac_rest (~> 0.6, >= 0.6.1)
136
+ eac_ruby_utils (~> 0.95, >= 0.95.2)
137
+ avm-eac_ruby_base1 (0.10.0)
145
138
  avm (~> 0.23)
146
139
  avm-eac_generic_base0 (~> 0.2)
147
140
  eac_ruby_utils (~> 0.95, >= 0.95.1)
@@ -162,6 +155,9 @@ GEM
162
155
  colorize (~> 0.8.1)
163
156
  eac_config (~> 0.8)
164
157
  eac_ruby_utils (~> 0.95)
158
+ eac_config (0.8.1)
159
+ addressable
160
+ eac_ruby_utils (~> 0.83)
165
161
  eac_fs (0.12.2)
166
162
  content-type
167
163
  eac_ruby_utils (~> 0.70)
@@ -269,7 +265,7 @@ GEM
269
265
  ruby-filemagic (0.7.3)
270
266
  ruby-progressbar (1.11.0)
271
267
  ruby2_keywords (0.0.5)
272
- tzinfo (2.0.4)
268
+ tzinfo (2.0.5)
273
269
  concurrent-ruby (~> 1.0)
274
270
  unicode-display_width (1.6.1)
275
271
  zeitwerk (2.6.0)
@@ -285,7 +281,6 @@ DEPENDENCIES
285
281
  avm-files!
286
282
  avm-git!
287
283
  avm-tools!
288
- eac_config!
289
284
  eac_docker!
290
285
  eac_git!
291
286
  eac_rest!
@@ -9,11 +9,15 @@ module Avm
9
9
  class Info
10
10
  runner_with :help do
11
11
  desc 'Show information about local project instance.'
12
+ bool_opt '-p', '--parent', 'Show the parent source.'
13
+ bool_opt '-t', '--tests', 'Show test commands.'
12
14
  end
13
15
 
14
16
  def run
15
17
  show_instance
16
18
  show_source
19
+ show_parent
20
+ show_test_commands
17
21
  end
18
22
 
19
23
  private
@@ -23,11 +27,26 @@ module Avm
23
27
  infov 'Launcher stereotypes', instance.stereotypes.map(&:label).join(', ')
24
28
  end
25
29
 
30
+ def show_parent
31
+ return unless parsed.parent?
32
+
33
+ infov 'Parent', runner_context.call(:subject).parent
34
+ end
35
+
26
36
  def show_source
27
37
  infov 'Stereotype', runner_context.call(:subject).class
28
38
  infov 'SCM', runner_context.call(:subject).scm
29
39
  end
30
40
 
41
+ def show_test_commands
42
+ return unless parsed.tests?
43
+
44
+ infov 'Test commands', runner_context.call(:subject).test_commands.count
45
+ runner_context.call(:subject).test_commands.each do |name, command|
46
+ infov " * #{name}", command
47
+ end
48
+ end
49
+
31
50
  def instance
32
51
  runner_context.call(:instance)
33
52
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.121.2'
5
+ VERSION = '0.122.0'
6
6
  end
7
7
  end
data/sub/eac_cli/Gemfile CHANGED
@@ -3,3 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.27.6'
4
+ VERSION = '0.27.7'
5
5
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -34,6 +34,11 @@ module EacConfig
34
34
  @parts = parts.to_a.freeze
35
35
  end
36
36
 
37
+ # @return [EacConfig::EntryPath]
38
+ def +(other)
39
+ self.class.new(parts + self.class.assert(other).parts)
40
+ end
41
+
37
42
  def to_s
38
43
  "#{self.class}[#{parts.join(PART_SEPARATOR)}]"
39
44
  end
@@ -58,6 +58,12 @@ module EacConfig
58
58
  ::EacConfig::LoadNodesSearch.new(self).result
59
59
  end
60
60
 
61
+ # @return [EacConfig::PrefixedPathNode]
62
+ def with_prefix(path_prefix)
63
+ require 'eac_config/prefixed_path_node'
64
+ ::EacConfig::PrefixedPathNode.new(self, path_prefix)
65
+ end
66
+
61
67
  private
62
68
 
63
69
  def load_node(node_path)
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_config/node_entry'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module EacConfig
7
+ class PrefixedPathNode
8
+ class Entry < ::EacConfig::NodeEntry
9
+ enable_simple_cache
10
+ delegate :found?, :found_node, :secret_value, :value, :value=, :writ_node, to: :full_entry
11
+
12
+ # @return [EacConfig::EntryPath]
13
+ def full_path
14
+ node.path_prefix + path
15
+ end
16
+
17
+ private
18
+
19
+ # @return [EacConfig::NodeEntry]
20
+ def full_entry_uncached
21
+ node.from_node.entry(full_path)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_config/entry_path'
4
+ require 'eac_config/paths_hash'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module EacConfig
8
+ class PrefixedPathNode
9
+ require_sub __FILE__
10
+ include ::EacConfig::Node
11
+ common_constructor :from_node, :path_prefix do
12
+ self.path_prefix = ::EacConfig::EntryPath.assert(path_prefix)
13
+ end
14
+
15
+ def entry(path)
16
+ ::EacConfig::Entry.new(self, path)
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.8.1'
4
+ VERSION = '0.9.0'
5
5
  end
data/sub/eac_fs/Gemfile CHANGED
@@ -3,3 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacFs
4
- VERSION = '0.12.2'
4
+ VERSION = '0.12.3'
5
5
  end
@@ -3,3 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
+
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.16.5'
4
+ VERSION = '0.16.6'
5
5
  end
@@ -2,15 +2,7 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- # Declare your gem's dependencies in users_support.gemspec.
6
- # Bundler will treat runtime dependencies like base dependencies, and
7
- # development dependencies will be added by default to the :development group.
8
5
  gemspec
9
6
 
10
- # Declare any dependencies that are still in development here instead of in
11
- # your gemspec. These might include edge Rails or gems from your path or
12
- # Git. Remember to move these dependencies to your gemspec before releasing
13
- # your gem to rubygems.org.
14
-
15
- # To use a debugger
16
- # gem 'byebug', group: [:development, :test]
7
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
8
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.95.2'
4
+ VERSION = '0.95.3'
5
5
  end