avm-eac_ruby_base1 0.31.2 → 0.32.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57127a12221d5e41acf09b5aec5a42c8b88b2d3f510964987bdd4c9fcd21755
|
4
|
+
data.tar.gz: 514710819de15df2bb927f2dd5aef318625747e456db4a8aa59a93b171ba3b0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d241acfa1baac7b6a0526cc6b29b03bf4a5b1cd285f94218ca4f084e4ace8dad266317513f24aab4dd9754945af9c13d35de2645e3c0848bbc168be6d6e4621
|
7
|
+
data.tar.gz: 4061030c7f2137fde8d11eab96c73d8d3f38c5dd3e70a0ebf23a6eced838606c32384548f68f8b7134e25ba304f88811a6370ff2dd882070e97382ac40256d59
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_generic_base0/sources/base'
|
4
|
+
require 'avm/eac_ruby_base1/sources/base/bundle_command'
|
5
|
+
require 'avm/eac_ruby_base1/sources/bundle_update'
|
6
|
+
require 'eac_ruby_utils/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacRubyBase1
|
10
|
+
module Sources
|
11
|
+
class Base < ::Avm::EacGenericBase0::Sources::Base
|
12
|
+
module Rubocop
|
13
|
+
RUBOCOP_CONFIG_SUBPATH = '.rubocop.yml'
|
14
|
+
|
15
|
+
# @return [Avm::EacRubyBase1::Sources::Base::RubocopCommand]
|
16
|
+
def rubocop_command
|
17
|
+
::Avm::EacRubyBase1::Sources::Base::RubocopCommand.new(self)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Pathname]
|
21
|
+
def rubocop_config_path
|
22
|
+
path.join(RUBOCOP_CONFIG_SUBPATH)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_generic_base0/sources/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRubyBase1
|
8
|
+
module Sources
|
9
|
+
class Base < ::Avm::EacGenericBase0::Sources::Base
|
10
|
+
class RubocopCommand
|
11
|
+
acts_as_immutable
|
12
|
+
immutable_accessor :ignore_parent_exclusion, :autocorrect, :autocorrect_all,
|
13
|
+
type: :boolean
|
14
|
+
immutable_accessor :file, type: :array
|
15
|
+
common_constructor :source
|
16
|
+
delegate :execute, :execute!, :system, :system!, to: :bundle_command
|
17
|
+
|
18
|
+
# @return [Enumerable]
|
19
|
+
def immutable_constructor_args
|
20
|
+
[source]
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Gemspec::Version]
|
24
|
+
def version
|
25
|
+
@version ||= ::Gemspec::Version.new(
|
26
|
+
source.bundle('exec', 'rubocop', '--version').execute!
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
# @return [String]
|
33
|
+
def autocorrect_option
|
34
|
+
'--auto-correct'
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [String]
|
38
|
+
def autocorrect_all_option
|
39
|
+
'--auto-correct-all'
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [String]
|
43
|
+
def ignore_parent_exclusion_option
|
44
|
+
'--ignore-parent-exclusion'
|
45
|
+
end
|
46
|
+
|
47
|
+
# @return [Avm::EacRubyBase1::Sources::Base::BundleCommand]
|
48
|
+
def bundle_command
|
49
|
+
source.bundle(*bundle_command_args)
|
50
|
+
end
|
51
|
+
|
52
|
+
# @return [Array<String>]
|
53
|
+
def bundle_command_args
|
54
|
+
%w[exec rubocop] + rubocop_command_args
|
55
|
+
end
|
56
|
+
|
57
|
+
# @return [Array<String>]
|
58
|
+
def rubocop_command_args
|
59
|
+
r = ['--config', source.rubocop_config_path]
|
60
|
+
r << ignore_parent_exclusion_option if ignore_parent_exclusion?
|
61
|
+
if autocorrect_all?
|
62
|
+
r << autocorrect_all_option
|
63
|
+
elsif autocorrect?
|
64
|
+
r << autocorrect_option
|
65
|
+
end
|
66
|
+
r + files
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -24,6 +24,11 @@ module Avm
|
|
24
24
|
__locale: source.locale)
|
25
25
|
end
|
26
26
|
|
27
|
+
def format_gemspec
|
28
|
+
source.rubocop_command.ignore_parent_exclusion(true).autocorrect(true)
|
29
|
+
.file(source.gemspec_path).system!
|
30
|
+
end
|
31
|
+
|
27
32
|
# @return [Array<String>]
|
28
33
|
def requirements_list_uncached
|
29
34
|
::Avm::EacRubyBase1::PreferredVersionRequirements.new(
|
@@ -48,9 +53,7 @@ module Avm
|
|
48
53
|
def update_gemspec
|
49
54
|
gemspec.dependency(gem_name).version_specs = requirements_list
|
50
55
|
gemspec.write(source.gemspec_path)
|
51
|
-
|
52
|
-
source.path, ['-a', '--ignore-parent-exclusion', source.gemspec_path]
|
53
|
-
).run
|
56
|
+
format_gemspec
|
54
57
|
end
|
55
58
|
end
|
56
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.32.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: 2023-
|
11
|
+
date: 2023-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -45,6 +45,9 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.12'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 0.12.1
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,6 +55,9 @@ dependencies:
|
|
52
55
|
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '0.12'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.12.1
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: eac_envs-http
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +87,7 @@ dependencies:
|
|
81
87
|
version: '0.119'
|
82
88
|
- - ">="
|
83
89
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.119.
|
90
|
+
version: 0.119.2
|
85
91
|
type: :runtime
|
86
92
|
prerelease: false
|
87
93
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -91,7 +97,7 @@ dependencies:
|
|
91
97
|
version: '0.119'
|
92
98
|
- - ">="
|
93
99
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.119.
|
100
|
+
version: 0.119.2
|
95
101
|
- !ruby/object:Gem::Dependency
|
96
102
|
name: aranha-parsers
|
97
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,6 +193,8 @@ files:
|
|
187
193
|
- lib/avm/eac_ruby_base1/sources/base/bundle_command.rb
|
188
194
|
- lib/avm/eac_ruby_base1/sources/base/bundler.rb
|
189
195
|
- lib/avm/eac_ruby_base1/sources/base/rake.rb
|
196
|
+
- lib/avm/eac_ruby_base1/sources/base/rubocop.rb
|
197
|
+
- lib/avm/eac_ruby_base1/sources/base/rubocop_command.rb
|
190
198
|
- lib/avm/eac_ruby_base1/sources/base/rubygems.rb
|
191
199
|
- lib/avm/eac_ruby_base1/sources/base/update.rb
|
192
200
|
- lib/avm/eac_ruby_base1/sources/base/version.rb
|