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: 047b53c01e9863005516d56747f17c0b404f1045ad84c0b87608c0ad4256019d
4
- data.tar.gz: 74bb4e7007c935f345242e36bd2d5c0aa438939322d59250cbbeaaf26b5bd804
3
+ metadata.gz: 75ae4a05fafdb585152224ed668dfc184fdba17f9bea157466b19c27c99727ce
4
+ data.tar.gz: 63feaddcd00e1575670a0700eda92ce26791fa9be4d3c36d655e616695b7bbad
5
5
  SHA512:
6
- metadata.gz: 853d612a021dabb3920c9de969719cad348714a8fb11e3f542abb2cdbcbfe5f5d3caba34ebf572a9ca78c58765487d81d59621c5aca42b9d2d0da46188095c0a
7
- data.tar.gz: 4dc164a18cb11760acaba38b13f9bea3d8515054fec6c76cf777ba8e6d77bd5799b75de1b29c30eef2099635ff8609394a73bcc100497061c02198e95fb41632
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.add_dependency'
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 { |line| line.start_with?(gem_line_prefix) }
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
- lines.index { |line| line.start_with?(DEPENDENCY_PREFIX) } || lines.count
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
- "#{DEPENDENCY_PREFIX} '#{gem_name}'"
57
+ format(DEPENDENCY_PREFIX, { dependency_type: dependency_type, gem_name: gem_name })
49
58
  end
50
59
 
51
60
  def replace_line
@@ -16,7 +16,7 @@ module Avm
16
16
  end
17
17
 
18
18
  def version_specs=(version_specs)
19
- gemspec.add_or_replace_gem_line(gem_name, version_specs)
19
+ gemspec.add_or_replace_gem_line(gem_name, version_specs, type)
20
20
  end
21
21
  end
22
22
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.35.0'
5
+ VERSION = '0.35.1'
6
6
  end
7
7
  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.35.0
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-08-25 00:00:00.000000000 Z
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