dependabot-maven 0.143.0 → 0.143.5

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: ceef68bb9cd96abacaebefb8f54a6a0aa493f1cf01eb6abef56f05c68a15aeeb
4
- data.tar.gz: 0b83dd0fabb5c31cc1eca98ca4688dd0a450eb3082719b434534a6bb4776a615
3
+ metadata.gz: 2beb607c60e38521ade46815f49d949af17e401359ea1e3298449d83475ff08e
4
+ data.tar.gz: 1a3ffaba7bb8386bd3db9978db2bc7fb58f7f72efcef2e92244359caab9de012
5
5
  SHA512:
6
- metadata.gz: 277181d30fddd6aebc0d2f7493b0aca2a0d7590a18a1edf42ee56277ab3d529a3f8d02c79f58e15a063a8d6a43d81554acbc5a6fe1c37a15ce00a3b36211045f
7
- data.tar.gz: 25d7d938d1fece4c7a0d0b3ba6a04166a46aa61c8f9ffce43f5aa10014e8791c43a8dd69a533c3426a19820eb9133d84daed6ac71b023ad4e1a5021fbe7461cc
6
+ metadata.gz: 6780809b2fc20eb7f1339bbe9be75700671f99f1624c985d5081cab4226743a9fcfd5477c458f736d7c1d133b23fa306ba0b56a98f976f1fc1f427fea293d0ca
7
+ data.tar.gz: 7109b4d1c20b8842145263c1b8c48a34c8f23af97490afd3690e796c8fc6de0bb99e1c2abaea7cd0778f85485554c6fbacf7d5453474bbdb46f9529a62d92d2a
@@ -33,14 +33,7 @@ module Dependabot
33
33
 
34
34
  def initialize(*requirements)
35
35
  requirements = requirements.flatten.flat_map do |req_string|
36
- # NOTE: Support ruby-style version requirements that are created from
37
- # PR ignore conditions
38
- version_reqs = req_string.split(",").map(&:strip)
39
- if version_reqs.all? { |s| Gem::Requirement::PATTERN.match?(s) }
40
- version_reqs
41
- else
42
- convert_java_constraint_to_ruby_constraint(req_string)
43
- end
36
+ convert_java_constraint_to_ruby_constraint(req_string)
44
37
  end
45
38
 
46
39
  super(requirements)
@@ -72,9 +65,14 @@ module Dependabot
72
65
  raise "Can't convert multiple Java reqs to a single Ruby one"
73
66
  end
74
67
 
75
- return convert_java_range_to_ruby_range(req_string) if req_string&.include?(",")
76
-
77
- convert_java_equals_req_to_ruby(req_string)
68
+ # NOTE: Support ruby-style version requirements that are created from
69
+ # PR ignore conditions
70
+ version_reqs = req_string.split(",").map(&:strip)
71
+ if req_string.include?(",") && !version_reqs.all? { |s| PATTERN.match?(s) }
72
+ convert_java_range_to_ruby_range(req_string) if req_string.include?(",")
73
+ else
74
+ version_reqs.map { |r| convert_java_equals_req_to_ruby(r) }
75
+ end
78
76
  end
79
77
 
80
78
  def convert_java_range_to_ruby_range(req_string)
@@ -105,10 +103,11 @@ module Dependabot
105
103
  end
106
104
 
107
105
  def convert_wildcard_req(req_string)
108
- version = req_string.gsub(/(?:\.|^)\+/, "")
109
- return ">= 0" if version.empty?
106
+ version = req_string.split("+").first
107
+ return ">= 0" if version.nil? || version.empty?
110
108
 
111
- "~> #{version}.0"
109
+ version += "0" if version.end_with?(".")
110
+ "~> #{version}"
112
111
  end
113
112
  end
114
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-maven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.143.0
4
+ version: 0.143.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-21 00:00:00.000000000 Z
11
+ date: 2021-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.143.0
19
+ version: 0.143.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.143.0
26
+ version: 0.143.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement