avm-eac_ruby_base1 0.35.0 → 0.35.1
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: 75ae4a05fafdb585152224ed668dfc184fdba17f9bea157466b19c27c99727ce
|
4
|
+
data.tar.gz: 63feaddcd00e1575670a0700eda92ce26791fa9be4d3c36d655e616695b7bbad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab57f517a99ca8eb34cb6ced2c21f7e955f6adf11fc0ddc78df9a18c0d8df126778abbf0e275e43d236515ce975f8c02cb3240d7ee559633e29c9d893d936049
|
7
|
+
data.tar.gz: 10259c685a4058214929a87eeabec271952a80f005e5c572378d01adf64b7a5861558ee71b67579172aacd2d76a371361d6bb16d9c29aa0b6a8dd367e7c9e5c0
|
@@ -8,13 +8,20 @@ module Avm
|
|
8
8
|
class Gemspec
|
9
9
|
class AddOrReplaceGemLine
|
10
10
|
enable_method_class
|
11
|
-
common_constructor :sender, :gem_name, :gem_specs
|
11
|
+
common_constructor :sender, :gem_name, :gem_specs, :dependency_type do
|
12
|
+
self.dependency_type = ::Avm::EacRubyBase1::Rubygems::Gemspec::Dependency.lists.type
|
13
|
+
.value_validate!(dependency_type)
|
14
|
+
end
|
12
15
|
delegate :lines, to: :sender
|
13
16
|
|
14
|
-
DEPENDENCY_PREFIX = ' s.
|
17
|
+
DEPENDENCY_PREFIX = ' s.add%<dependency_type>s_dependency \'%<gem_name>s\''
|
15
18
|
|
19
|
+
# @return [Integer]
|
16
20
|
def existing_gem_line_index
|
17
|
-
lines.index
|
21
|
+
lines.index do |line|
|
22
|
+
::Avm::EacRubyBase1::Rubygems::Gemspec::DEPENDENCY_LINE_PARSER.parse(line)
|
23
|
+
.if_present(&:first) == gem_name
|
24
|
+
end
|
18
25
|
end
|
19
26
|
|
20
27
|
def result
|
@@ -36,16 +43,18 @@ module Avm
|
|
36
43
|
lines.count
|
37
44
|
end
|
38
45
|
|
46
|
+
# @return [Integer]
|
39
47
|
def gems_lines_start_index
|
40
|
-
|
48
|
+
existing_gem_line_index || (lines.count - 1)
|
41
49
|
end
|
42
50
|
|
43
51
|
def new_gem_line
|
44
52
|
([gem_line_prefix] + quoted_gem_specs).join(', ')
|
45
53
|
end
|
46
54
|
|
55
|
+
# @return [String]
|
47
56
|
def gem_line_prefix
|
48
|
-
|
57
|
+
format(DEPENDENCY_PREFIX, { dependency_type: dependency_type, gem_name: gem_name })
|
49
58
|
end
|
50
59
|
|
51
60
|
def replace_line
|
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.35.
|
4
|
+
version: 0.35.1
|
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: 2024-
|
11
|
+
date: 2024-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -58,20 +58,6 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 0.5.1
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: eac_ruby_gem_support
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.10'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0.10'
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: eac_ruby_utils
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|