dependabot-hex 0.106.46 → 0.106.47

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: 9f03aec7f7cade1982e13fcdfbe6053f9ab038f2addfc542c7c73f54f3cc6ace
4
- data.tar.gz: 18accba6a9a55baaa808c1c9deaea4e71e793a9d35670ac5d06ae38a383d82d9
3
+ metadata.gz: 941a5e39bf8d90e0e502b56e10ec92e93e7bbd2166f25d872c6c306882af5d5c
4
+ data.tar.gz: 4e967842ec266f75098d7d102aa8be37706a7db3529d63c9ea6feca76bee9278
5
5
  SHA512:
6
- metadata.gz: 6cf8fa9dbcd2fe8e64329abbca478baf3b125716cc4341795538f95bf95b1348a1f190095165c927519b855aa857abaff103aa68b99c6731d5598900696e7b2b
7
- data.tar.gz: 6128633522a8408a1d5d4823ac240e311ef8a18ea8ed26ac1487c152ea1cf303d48db5ba3a50b254a052b897bb5814400b21e360ece0b38531f289e089a86b0f
6
+ metadata.gz: d974eb6ab5d89d217a84ad8fbeb2bbdac3322df0ba89b8d957d27b56e6f63fc4f893f5b9a62cb3c65c9efce70a0923b9a5bbf50702010aa70b413077cba948d0
7
+ data.tar.gz: 5b4f8012c0c03923d03ad2a1a112c211fc89953c959198dc4f50a9eb0ad093afdb16ca085ba710ec572e672cf46511f2d234b3f89cb6d94acdbaf924cd9c6cef
@@ -3,6 +3,7 @@
3
3
  require "dependabot/dependency"
4
4
  require "dependabot/file_parsers"
5
5
  require "dependabot/file_parsers/base"
6
+ require "dependabot/hex/file_updater/mixfile_sanitizer"
6
7
  require "dependabot/hex/native_helpers"
7
8
  require "dependabot/shared_helpers"
8
9
  require "dependabot/errors"
@@ -81,9 +82,9 @@ module Dependabot
81
82
  end
82
83
 
83
84
  def sanitize_mixfile(content)
84
- content.
85
- gsub(/File\.read!\(.*?\)/, '"0.0.1"').
86
- gsub(/File\.read\(.*?\)/, '{:ok, "0.0.1"}')
85
+ Hex::FileUpdater::MixfileSanitizer.new(
86
+ mixfile_content: content
87
+ ).sanitized_content
87
88
  end
88
89
 
89
90
  def mix_env
@@ -14,7 +14,8 @@ module Dependabot
14
14
  def sanitized_content
15
15
  mixfile_content.
16
16
  gsub(/File\.read!\(.*?\)/, '"0.0.1"').
17
- gsub(/File\.read\(.*?\)/, '{:ok, "0.0.1"}')
17
+ gsub(/File\.read\(.*?\)/, '{:ok, "0.0.1"}').
18
+ gsub(/config_path:.*(?:,|$)/, "")
18
19
  end
19
20
 
20
21
  private
@@ -3,6 +3,7 @@
3
3
  require "dependabot/hex/version"
4
4
  require "dependabot/hex/update_checker"
5
5
  require "dependabot/hex/native_helpers"
6
+ require "dependabot/hex/file_updater/mixfile_sanitizer"
6
7
  require "dependabot/shared_helpers"
7
8
  require "dependabot/errors"
8
9
 
@@ -134,10 +135,21 @@ module Dependabot
134
135
  files.each do |file|
135
136
  path = file.name
136
137
  FileUtils.mkdir_p(Pathname.new(path).dirname)
137
- File.write(path, file.content)
138
+
139
+ if file.name.end_with?("mix.exs")
140
+ File.write(path, sanitize_mixfile(file.content))
141
+ else
142
+ File.write(path, file.content)
143
+ end
138
144
  end
139
145
  end
140
146
 
147
+ def sanitize_mixfile(content)
148
+ Hex::FileUpdater::MixfileSanitizer.new(
149
+ mixfile_content: content
150
+ ).sanitized_content
151
+ end
152
+
141
153
  def version_class
142
154
  Hex::Version
143
155
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-hex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.106.46
4
+ version: 0.106.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-10 00:00:00.000000000 Z
11
+ date: 2019-05-12 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.106.46
19
+ version: 0.106.47
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.106.46
26
+ version: 0.106.47
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement