bundler-audit-fix 0.1.2 → 0.1.3

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: fbf158e75f253c904bb0e209e6d04ac1ce862fcbb039dfffdf211669ea5ec994
4
- data.tar.gz: e1a6d66a14ca11db976da0278fd9a5230b122574ceedfc4afddabb9d63109d8c
3
+ metadata.gz: 1180a019a219164828d821470b41d99a924e6944b1d04be67b856097da8cb973
4
+ data.tar.gz: a0c4a4390e46c7472d436f4c832e826a19579ac925455b01d7c2e5f3ab359627
5
5
  SHA512:
6
- metadata.gz: 2dfa6b77f0ab5decca37f425f394aca120f25632c7d3dd928f976dee1b35883a50194550bd932c019a6252fe85fa4356f95b9aec81d4b65a07385f18c9ade218
7
- data.tar.gz: 70e4d05c3de4808846917b569684a4d1a1ff072774306f055ef737891bc05f4436273d2a807ee0b0a1b53c66b41132fb35d15b961c01b9c396b807041a0cee6e
6
+ metadata.gz: 88ec1384360e83ff0b4856a7060a48b6b2e1dc259cac8a622a73697daa3ee1e79bfb3e5833ea34a16199553f1fed5a8768e24d4f279029e8fda41f2992da049e
7
+ data.tar.gz: 49a1a24e6d5f758229b15ddf494e871e7c5e515fd44563159aa4dfb7507c2f668d901f909db71137ed45da1a83d85436e0f224797d4c608351278c37c9e62a9c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bundler-audit-fix (0.1.2)
4
+ bundler-audit-fix (0.1.3)
5
5
  bundler (>= 1.2.0, < 3)
6
6
  bundler-audit (~> 0.9.0)
7
7
  thor (~> 1.0)
@@ -55,6 +55,12 @@ module Bundler
55
55
  Bundler::Audit::CLI.new.invoke(:update, options[:database])
56
56
  end
57
57
 
58
+ gemfile = options[:gemfile_lock].sub(/\.lock$/, '')
59
+ gemfile_path = File.join(dir, gemfile)
60
+
61
+ # for https://github.com/rubygems/bundler/blob/35be6d9a603084f719fec4f4028c18860def07f6/lib/bundler/shared_helpers.rb#L229
62
+ ENV['BUNDLE_GEMFILE'] = gemfile_path
63
+
58
64
  database = Database.new(options[:database])
59
65
  begin
60
66
  scanner = Scanner.new(dir, options[:gemfile_lock], database, options[:config])
@@ -69,9 +75,6 @@ module Bundler
69
75
  patcher = Patcher.new(dir, report, options[:gemfile_lock], options[:config])
70
76
  gems_to_update = patcher.patch
71
77
 
72
- gemfile = options[:gemfile_lock].sub(/\.lock$/, '')
73
- gemfile_path = File.join(dir, gemfile)
74
-
75
78
  Bundler::CLI::Update.new({ gemfile: gemfile_path }, gems_to_update).run
76
79
  rescue Bundler::GemfileNotFound, Bundler::GemfileLockNotFound => e
77
80
  say e.message, :red
@@ -71,7 +71,7 @@ module Bundler
71
71
  #
72
72
  def patch
73
73
  patterns, gems_to_update = build_patterns
74
- gemfile = File.read(gemfile_path)
74
+ gemfile = File.read(gemfile_path, encoding: 'utf-8')
75
75
 
76
76
  patterns.each do |pattern, replace_with|
77
77
  gemfile = gemfile.gsub(pattern, replace_with)
@@ -20,7 +20,7 @@
20
20
  module Bundler
21
21
  module Audit
22
22
  module Fix
23
- VERSION = '0.1.2'
23
+ VERSION = '0.1.3'
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-audit-fix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobuo Takizawa