dependabot-composer 0.111.58 → 0.111.59

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: 2fc158931a250d076d6b7ff174353f8f0115b1b196632b2e8642c09b53d5d175
4
- data.tar.gz: ae7fd62be9e778f15831ce69fe832d8fca3fb52d1d7cfe8e20c0264b2389bdfd
3
+ metadata.gz: 5c954d53e57a3df2ee6b0de045d5033be3c77ae39e32a986981119038fa630d6
4
+ data.tar.gz: 41549cb2e071ce85c498b013cdafcb40b11b34ef3664de719eb9e29df87777e2
5
5
  SHA512:
6
- metadata.gz: 3a7559d872b22ac98a88ba19c3d36b1344543314b704d589b5a90367aa32c6a92e2232476b5e78a23e00ff7f7b92ddf55fa59bd05101d2dec59f28849a84f3ee
7
- data.tar.gz: a17b642f2f747b3298c0844363fbe07af75cf41b7575abdc267f90221106f11499a27dfeb0999542cc1cd8d9bd9e680f2958046b71483b494c3d527c4f25d902
6
+ metadata.gz: 8cab4dfe7ad7d44df5b9d761cf3360d40ec5a1cf180c7b57b85b1a41082200b589f0fa814fa407b20d8bb72144e1f8004c47b95d7c117cccb7c535e476bcf937
7
+ data.tar.gz: cf31681636aab57392f36294c50c806ab082a8bdcf1682aafd67564f438d95628e127dd9f6e875e1497c1c1b06f55dc776465b986a82a6d40811c3775c91592d
@@ -33,6 +33,7 @@ module Dependabot
33
33
 
34
34
  private
35
35
 
36
+ # rubocop:disable Metrics/CyclomaticComplexity
36
37
  # rubocop:disable Metrics/PerceivedComplexity
37
38
  def convert_php_constraint_to_ruby_constraint(req_string)
38
39
  req_string = req_string.strip.gsub(/v(?=\d)/, "").gsub(/\.$/, "")
@@ -41,18 +42,25 @@ module Dependabot
41
42
  # ensures that the dev-requirement doesn't match anything.
42
43
  return "0-dev-branch-match" if req_string.strip.start_with?("dev-")
43
44
 
44
- if req_string.start_with?("*") then ">= 0"
45
+ if req_string.start_with?("*", "x") then ">= 0"
45
46
  elsif req_string.include?("*") then convert_wildcard_req(req_string)
47
+ elsif req_string.include?(".x") then convert_wildcard_req(req_string)
46
48
  elsif req_string.match?(/^~[^>]/) then convert_tilde_req(req_string)
47
49
  elsif req_string.start_with?("^") then convert_caret_req(req_string)
48
50
  elsif req_string.match?(/\s-\s/) then convert_hyphen_req(req_string)
49
51
  else req_string
50
52
  end
51
53
  end
54
+ # rubocop:enable Metrics/CyclomaticComplexity
52
55
  # rubocop:enable Metrics/PerceivedComplexity
53
56
 
54
57
  def convert_wildcard_req(req_string)
55
- version = req_string.gsub(/^~/, "").gsub(/(?:\.|^)\*/, "")
58
+ if req_string.start_with?(">", "<")
59
+ msg = "Illformed requirement [#{req_string.inspect}]"
60
+ raise Gem::Requirement::BadRequirementError, msg
61
+ end
62
+
63
+ version = req_string.gsub(/^~/, "").gsub(/(?:\.|^)[\*x]/, "")
56
64
  "~> #{version}.0"
57
65
  end
58
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.111.58
4
+ version: 0.111.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.111.58
19
+ version: 0.111.59
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.111.58
26
+ version: 0.111.59
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement