dependabot-gradle 0.129.0 → 0.129.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: ff85aa120e66f0e93c07cc261dccd9ff1ac976144808fa8decdf54e1f28a10e0
4
- data.tar.gz: fe95e2ad6f368e6c4f76977988fa602e856118474aed37c54ae3d005a68a8c34
3
+ metadata.gz: 587863acc72056e23695b37e71d004fa3e52755163cd8a7f410c4b22bb1332f6
4
+ data.tar.gz: 7ec44747f81984b19e8bebf7d40889aafbafc2b3021f15c226046229e57cf7c9
5
5
  SHA512:
6
- metadata.gz: 1cefcf95ed09f06467be0a75f55006d5375a43d115908c2f50751e76b196e1d5573bb51351a4f698f8f81a655b2e57b884524435e1722db5e7ff51955c2d767d
7
- data.tar.gz: fabe2290a0d4e2cfecd321bba595ab5d78e831b2c66455d8c60b9cc90434dce686a151e25439f15bd5875727a5f29142bc30504faa108f6c070e2aaca72c8de3
6
+ metadata.gz: e1d1f58f79c513e12770f43067f218e447bc3f1d312b6ebaab17db145976cae92638f2e0e9bf6c98c5920947168e024b6a67bf133f969acaad0347118a0ecd2c
7
+ data.tar.gz: f9fbca13ea2d9ba77105e678d0afff0212fb656b83336c9bfd0886e0122d86a709427f0f26e344f8afc69b23d20464c1c2b39c2424bc94a5da6d5132263df07b
@@ -31,6 +31,7 @@ module Dependabot
31
31
  fetched_files << buildfile
32
32
  fetched_files += subproject_buildfiles
33
33
  fetched_files += dependency_script_plugins
34
+ check_required_files_present
34
35
  fetched_files
35
36
  end
36
37
 
@@ -38,7 +39,7 @@ module Dependabot
38
39
  @buildfile ||= begin
39
40
  file = supported_build_file
40
41
  @buildfile_name ||= file.name if file
41
- fetch_file_from_host(file.name) if file
42
+ file
42
43
  end
43
44
  end
44
45
 
@@ -58,7 +59,10 @@ module Dependabot
58
59
  end.compact
59
60
  end
60
61
 
62
+ # rubocop:disable Metrics/PerceivedComplexity
61
63
  def dependency_script_plugins
64
+ return [] unless buildfile
65
+
62
66
  dependency_plugin_paths =
63
67
  buildfile.content.
64
68
  scan(/apply from:\s+['"]([^'"]+)['"]/).flatten.
@@ -77,6 +81,15 @@ module Dependabot
77
81
  raise
78
82
  end.compact
79
83
  end
84
+ # rubocop:enable Metrics/PerceivedComplexity
85
+
86
+ def check_required_files_present
87
+ return if buildfile
88
+
89
+ path = Pathname.new(File.join(directory, "build.gradle")).cleanpath.to_path
90
+ path += "(.kts)?"
91
+ raise Dependabot::DependencyFileNotFound, path
92
+ end
80
93
 
81
94
  def file_exists_in_submodule?(path)
82
95
  fetch_file_from_host(path, fetch_submodules: true)
@@ -86,12 +99,7 @@ module Dependabot
86
99
  end
87
100
 
88
101
  def settings_file
89
- @settings_file ||= begin
90
- file = supported_settings_file
91
- fetch_file_from_host(file.name) if file
92
- rescue Dependabot::DependencyFileNotFound
93
- nil
94
- end
102
+ @settings_file ||= supported_settings_file
95
103
  end
96
104
 
97
105
  def supported_build_file
@@ -6,9 +6,6 @@ module Dependabot
6
6
  module Gradle
7
7
  class FileFetcher
8
8
  class SettingsFileParser
9
- INCLUDE_ARGS_REGEX =
10
- /(?:^|\s)include(?:\(|\s)(\s*[^\s,\)]+(?:,\s*[^\s,\)]+)*)/.freeze
11
-
12
9
  def initialize(settings_file:)
13
10
  @settings_file = settings_file
14
11
  end
@@ -49,7 +46,7 @@ module Dependabot
49
46
 
50
47
  def function_regex(function_name)
51
48
  /
52
- (?:^|\s)#{Regexp.quote(function_name)}(?:\(|\s)
49
+ (?:^|\s)#{Regexp.quote(function_name)}(?:\s*\(|\s)
53
50
  (?<args>\s*[^\s,\)]+(?:,\s*[^\s,\)]+)*)
54
51
  /mx
55
52
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-gradle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.129.0
4
+ version: 0.129.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2021-01-07 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.129.0
19
+ version: 0.129.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.129.0
26
+ version: 0.129.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.6.0
103
+ version: 1.7.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.6.0
110
+ version: 1.7.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.20.0
117
+ version: 0.21.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.20.0
124
+ version: 0.21.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov-console
127
127
  requirement: !ruby/object:Gem::Requirement