eac_tools 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccf0291272ccc68e5bc61d5245c96b17081d42319907a8dd2b242fe0dc0940ba
4
- data.tar.gz: ced016860d0c5583ce85f9ffbe96ad52bbb5fb922dc8297adaa05f809a3c902f
3
+ metadata.gz: d2a2823e5a682fec9ab91720f10d7783faa49fa2015806b7a5d39580bc218001
4
+ data.tar.gz: f5fd98b06fe0fa9d9e31e55d9c9f5ca31f7efef2e78a80cd9a6c4157ed1a06ee
5
5
  SHA512:
6
- metadata.gz: 19a09c17f37b1383f86694deb0c9a465bb952fd6496ab1533fe5888f91f4c009b3c8cabde44d40b7edabdff1b1dfb6540d961e0cd08c9383cb1b75b83bc309dd
7
- data.tar.gz: 1572dd79fde46ab7a10482bae41888bcfae0260a71db83e42ab0b00b14f6d4f290842d32b17de4ddbe53a96ae7bef7b210ece980ba870a53abf05c66ce27e623
6
+ metadata.gz: e8c12e5907f1977602dbaedc5d6bd278d2ff4f34090ca74ce9b5b3bd2ec38e55936412e1cf161c43594d760d940f24f1fcfa90b4a80e871077797c8906241cee
7
+ data.tar.gz: c92d636d848558c31f0b51213e464573a30a70de11ccda7853f0e70f96d8e9853ba9d5298142a939926b65f9f5fe33c906a4fbf22d66dbaca0a2c9fa0dcc13b9
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.6.0)
4
+ eac_tools (0.7.0)
5
5
  avm-eac_generic_base0 (~> 0.3)
6
6
  avm-eac_rails_base0 (~> 0.5)
7
7
  avm-eac_rails_base1 (~> 0.4, >= 0.4.1)
8
8
  avm-eac_redmine_base0 (~> 0.9)
9
- avm-eac_redmine_plugin_base0 (~> 0.1, >= 0.1.1)
10
- avm-eac_ruby_base1 (~> 0.9)
9
+ avm-eac_redmine_plugin_base0 (~> 0.2)
10
+ avm-eac_ruby_base1 (~> 0.10)
11
11
  avm-tools (~> 0.121)
12
12
  eac_ruby_utils (~> 0.95, >= 0.95.2)
13
13
 
@@ -47,14 +47,14 @@ PATH
47
47
  PATH
48
48
  remote: sub/avm-eac_redmine_plugin_base0
49
49
  specs:
50
- avm-eac_redmine_plugin_base0 (0.1.1)
51
- avm-eac_ruby_base1 (~> 0.8, >= 0.8.1)
50
+ avm-eac_redmine_plugin_base0 (0.2.0)
51
+ avm-eac_ruby_base1 (~> 0.10)
52
52
  eac_ruby_utils (~> 0.95, >= 0.95.1)
53
53
 
54
54
  PATH
55
55
  remote: sub/avm-eac_ruby_base1
56
56
  specs:
57
- avm-eac_ruby_base1 (0.9.1)
57
+ avm-eac_ruby_base1 (0.10.0)
58
58
  avm (~> 0.23)
59
59
  avm-eac_generic_base0 (~> 0.2)
60
60
  eac_ruby_utils (~> 0.95, >= 0.95.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -12,7 +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.8', '>= 0.8.1'
15
+ s.add_dependency 'avm-eac_ruby_base1', '~> 0.10'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.95', '>= 0.95.1'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5', '>= 0.5.1'
@@ -1,13 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_rails_base1/sources/base'
3
+ require 'avm/eac_ruby_base1/sources/base'
4
4
  require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
7
7
  module EacRedminePluginBase0
8
8
  module Sources
9
- class Base < ::Avm::EacRailsBase1::Sources::Base
9
+ class Base < ::Avm::EacRubyBase1::Sources::Base
10
10
  DEFAULT_GEMFILE_PATH = 'SelfGemfile'
11
+ RUBOCOP_TEST_NAME = 'rubocop'
12
+ PARENT_RAKE_TASK_TEST_NAME = 'parent_rake_task'
11
13
  INIT_SUBPATH = 'init.rb'
12
14
 
13
15
  # @return [String]
@@ -15,11 +17,36 @@ module Avm
15
17
  DEFAULT_GEMFILE_PATH
16
18
  end
17
19
 
20
+ # @return [Hash<String, EacRubyUtils::Envs::Command>]
21
+ def default_test_commands
22
+ {
23
+ PARENT_RAKE_TASK_TEST_NAME => parent_rake_test_command,
24
+ RUBOCOP_TEST_NAME => rubocop_test_command
25
+ }
26
+ end
27
+
18
28
  # @return [String]
19
29
  def init_path
20
30
  path.join(INIT_SUBPATH)
21
31
  end
22
32
 
33
+ # @return [String]
34
+ def parent_rake_test_task_name
35
+ [gem_name, 'test'].map(&:variableize).join(':')
36
+ end
37
+
38
+ # @return [EacRubyUtils::Envs::Command]
39
+ def parent_rake_test_command
40
+ ruby_parent.rake(parent_rake_test_task_name).chdir_root.envvar('RAILS_ENV', 'test')
41
+ end
42
+
43
+ # @return [EacRubyUtils::Envs::Command]
44
+ def rubocop_test_command
45
+ bundle('exec', 'rubocop', '--ignore-parent-exclusion')
46
+ .envvar('RAILS_ENV', 'test')
47
+ .chdir_root
48
+ end
49
+
23
50
  # @return [Boolean]
24
51
  def valid?
25
52
  init_path.exist?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedminePluginBase0
5
- VERSION = '0.1.1'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
@@ -36,6 +36,18 @@ module Avm
36
36
  self
37
37
  end
38
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
+
39
51
  # @return [EacRubyUtils::Envs::Command]
40
52
  def rspec_test_command
41
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.1'
5
+ VERSION = '0.10.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
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: 2022-07-18 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-eac_generic_base0
@@ -78,34 +78,28 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.1'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 0.1.1
81
+ version: '0.2'
85
82
  type: :runtime
86
83
  prerelease: false
87
84
  version_requirements: !ruby/object:Gem::Requirement
88
85
  requirements:
89
86
  - - "~>"
90
87
  - !ruby/object:Gem::Version
91
- version: '0.1'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 0.1.1
88
+ version: '0.2'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: avm-eac_ruby_base1
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
93
  - - "~>"
100
94
  - !ruby/object:Gem::Version
101
- version: '0.9'
95
+ version: '0.10'
102
96
  type: :runtime
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
100
  - - "~>"
107
101
  - !ruby/object:Gem::Version
108
- version: '0.9'
102
+ version: '0.10'
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: avm-tools
111
105
  requirement: !ruby/object:Gem::Requirement