dependabot-dep 0.125.0 → 0.125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 486d82213424aad487d4f3fff1e37e30c9968c354360b58b95874e68882471d6
4
- data.tar.gz: 4fb9e7ee29936e70d4cab3b2427f58cbde986c1b9c10334f727a08db208d3999
3
+ metadata.gz: cd1ce4f2523ca7c2d044f31a753b135aa01d09342e15fd820c05de61751bd42f
4
+ data.tar.gz: 9672a6059603f211b44c3929cf98edd6750c5f2c07c453c49480beeca7887c79
5
5
  SHA512:
6
- metadata.gz: 398136479b3de35eb7df5f93e24099cd5a133838c81173c91e81ee8f0ec9fa4697aa08372668bafcbe02c74443f33962ecb461017eabfbd054817b75dce7d729
7
- data.tar.gz: f72261b8827fa8ab8a3e3ef739571d1e9c3f3bfae07542b5baa44551c8a7b0a6a043c9654dd402120d7c4770f039ef3079159126fe775e90bed117a387a63f34
6
+ metadata.gz: a4fb09b7e9ba5aedba8dd1f33aaa878516deb9962113143d21668580d90cbe1c03e22c167f59bbf76f7847323321972357eaf2df523cc45b2f49eae72955b965
7
+ data.tar.gz: '091d4cd5ea34abed4efc020a3b2449d750bf94326298511d1368fe895f087f28615a9dfc953ab6a7c764c618c12578f7aa1e4ffe40da83982d5180e63c50a1b9'
@@ -76,9 +76,7 @@ module Dependabot
76
76
  end
77
77
 
78
78
  def requirement_from_declaration(declaration)
79
- unless declaration.is_a?(Hash)
80
- raise "Unexpected dependency declaration: #{declaration}"
81
- end
79
+ raise "Unexpected dependency declaration: #{declaration}" unless declaration.is_a?(Hash)
82
80
 
83
81
  return if git_declaration?(declaration)
84
82
 
@@ -137,9 +137,7 @@ module Dependabot
137
137
  parsed_file(lockfile).fetch("projects").
138
138
  find { |p| p["name"] == dep.name }
139
139
 
140
- if original_details["source"]
141
- details["source"] = original_details["source"]
142
- end
140
+ details["source"] = original_details["source"] if original_details["source"]
143
141
 
144
142
  if original_details["version"]
145
143
  details["version"] = dep.version
@@ -162,9 +160,7 @@ module Dependabot
162
160
  overrides << override
163
161
  end
164
162
 
165
- unless override["source"]
166
- override["source"] = "gopkg.in/fsnotify/fsnotify.v1"
167
- end
163
+ override["source"] = "gopkg.in/fsnotify/fsnotify.v1" unless override["source"]
168
164
 
169
165
  overrides
170
166
  end
@@ -91,9 +91,7 @@ module Dependabot
91
91
  def replace_wildcard_in_lower_bound(req_string)
92
92
  after_wildcard = false
93
93
 
94
- if req_string.start_with?("~")
95
- req_string = req_string.gsub(/(?:(?:\.|^)[xX*])(\.[xX*])+/, "")
96
- end
94
+ req_string = req_string.gsub(/(?:(?:\.|^)[xX*])(\.[xX*])+/, "") if req_string.start_with?("~")
97
95
 
98
96
  req_string.split(".").
99
97
  map do |part|
@@ -61,9 +61,7 @@ module Dependabot
61
61
 
62
62
  def requirements_update_strategy
63
63
  # If passed in as an option (in the base class) honour that option
64
- if @requirements_update_strategy
65
- return @requirements_update_strategy.to_sym
66
- end
64
+ return @requirements_update_strategy.to_sym if @requirements_update_strategy
67
65
 
68
66
  # Otherwise, widen ranges for libraries and bump versions for apps
69
67
  library? ? :widen_ranges : :bump_versions
@@ -109,9 +107,7 @@ module Dependabot
109
107
 
110
108
  # Otherwise, if the gem isn't pinned, the latest version is just the
111
109
  # latest commit for the specified branch.
112
- unless git_commit_checker.pinned?
113
- return latest_resolvable_commit_with_unchanged_git_source
114
- end
110
+ return latest_resolvable_commit_with_unchanged_git_source unless git_commit_checker.pinned?
115
111
 
116
112
  # If the dependency is pinned to a tag that looks like a version then
117
113
  # we want to update that tag.
@@ -129,17 +125,13 @@ module Dependabot
129
125
  def version_from_tag(tag)
130
126
  # To compare with the current version we either use the commit SHA
131
127
  # (if that's what the parser picked up) of the tag name.
132
- if dependency.version&.match?(/^[0-9a-f]{40}$/)
133
- return tag&.fetch(:commit_sha)
134
- end
128
+ return tag&.fetch(:commit_sha) if dependency.version&.match?(/^[0-9a-f]{40}$/)
135
129
 
136
130
  tag&.fetch(:tag)
137
131
  end
138
132
 
139
133
  def latest_resolvable_commit_with_unchanged_git_source
140
- if @commit_lookup_attempted
141
- return @latest_resolvable_commit_with_unchanged_git_source
142
- end
134
+ return @latest_resolvable_commit_with_unchanged_git_source if @commit_lookup_attempted
143
135
 
144
136
  @commit_lookup_attempted = true
145
137
  @latest_resolvable_commit_with_unchanged_git_source ||=
@@ -269,9 +261,7 @@ module Dependabot
269
261
  end
270
262
 
271
263
  def default_source
272
- if modules_dependency?
273
- return { type: "default", source: dependency.name }
274
- end
264
+ return { type: "default", source: dependency.name } if modules_dependency?
275
265
 
276
266
  original_declaration =
277
267
  parsed_file(manifest).
@@ -138,9 +138,7 @@ module Dependabot
138
138
  overrides << override
139
139
  end
140
140
 
141
- unless override["source"]
142
- override["source"] = "gopkg.in/fsnotify/fsnotify.v1"
143
- end
141
+ override["source"] = "gopkg.in/fsnotify/fsnotify.v1" unless override["source"]
144
142
 
145
143
  parsed_manifest["override"] = overrides
146
144
  TomlRB.dump(parsed_manifest)
@@ -33,9 +33,7 @@ module Dependabot
33
33
  :ignored_versions
34
34
 
35
35
  def latest_release_tag_version
36
- if @latest_release_tag_lookup_attempted
37
- return @latest_release_tag_version
38
- end
36
+ return @latest_release_tag_version if @latest_release_tag_lookup_attempted
39
37
 
40
38
  @latest_release_tag_lookup_attempted = true
41
39
 
@@ -90,9 +88,7 @@ module Dependabot
90
88
 
91
89
  # Otherwise, if the gem isn't pinned, the latest version is just the
92
90
  # latest commit for the specified branch.
93
- unless git_commit_checker.pinned?
94
- return git_commit_checker.head_commit_for_current_branch
95
- end
91
+ return git_commit_checker.head_commit_for_current_branch unless git_commit_checker.pinned?
96
92
 
97
93
  # If the dependency is pinned to a tag that looks like a version
98
94
  # then we want to update that tag.
@@ -113,9 +109,7 @@ module Dependabot
113
109
  def version_from_tag(tag)
114
110
  # To compare with the current version we either use the commit SHA
115
111
  # (if that's what the parser picked up) of the tag name.
116
- if dependency.version&.match?(/^[0-9a-f]{40}$/)
117
- return tag&.fetch(:commit_sha)
118
- end
112
+ return tag&.fetch(:commit_sha) if dependency.version&.match?(/^[0-9a-f]{40}$/)
119
113
 
120
114
  tag&.fetch(:tag)
121
115
  end
@@ -22,9 +22,7 @@ module Dependabot
22
22
  end
23
23
 
24
24
  def latest_resolvable_version
25
- if defined?(@latest_resolvable_version)
26
- return @latest_resolvable_version
27
- end
25
+ return @latest_resolvable_version if defined?(@latest_resolvable_version)
28
26
 
29
27
  @latest_resolvable_version = fetch_latest_resolvable_version
30
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-dep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.125.0
4
+ version: 0.125.1
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.125.0
19
+ version: 0.125.1
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.125.0
26
+ version: 0.125.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement