dependabot-gradle 0.128.1 → 0.129.3

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: a807df34a976b1d6805662b0908248fc439c346795d42b8583b0640e7c3e6aba
4
- data.tar.gz: a490375e78f3e3645ed5fa218b6400353e108495d06beb895ec4f24af27ad7c1
3
+ metadata.gz: 52304dd1ce847db147408d7c059e277e5e9ac378791b83ae6541f93773f84639
4
+ data.tar.gz: 6b63e2f958a895e903841215ba951b269f7e15f10c1005e94e2a235285eb7e41
5
5
  SHA512:
6
- metadata.gz: c43d11a72e1598e54c7b00b5f61a9f6eb46afd91ba3b4679f294caab413b637d6f43684c96411732f8b23791d6072f1023f4ce1733ce94f689caae2c5810b588
7
- data.tar.gz: 56cd0829ac61d900f961a380c915f19fe03fd83d8e910adc565e5c5e55d3c03cc0bb679fe7f004833a55346d94f2e12197f8f67c439910faf571171bf901c44e
6
+ metadata.gz: 0e281b5edbedc64f7a96486c377837e8504df3688b18af0b163357a3554cd90f9fad02f1bd18ed31f43b2b169c128fadb4c5d1334d46c74048c4b556b67f035b
7
+ data.tar.gz: e7274c38d3a6255f14df0eafbccd8b3a5a66b69ca4991dd9b0b1628380c44fd35e0f20a1a83aae93d7941f2af593ba6e3d750126173bc5e6b8cace8dcd57a292
@@ -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.128.1
4
+ version: 0.129.3
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-14 00:00:00.000000000 Z
11
+ date: 2021-01-05 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.128.1
19
+ version: 0.129.3
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.128.1
26
+ version: 0.129.3
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