method
lockfile_contents
v2_6_3 -
Show latest stable
-
0 notes -
Class: BundlerVersionFinder
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
lockfile_contents()
private
Hide source
# File lib/rubygems/bundler_version_finder.rb, line 77 def self.lockfile_contents gemfile = ENV["BUNDLE_GEMFILE"] gemfile = nil if gemfile && gemfile.empty? Gem::Util.traverse_parents Dir.pwd do |directory| next unless gemfile = Gem::GEM_DEP_FILES.find { |f| File.file?(f.untaint) } gemfile = File.join directory, gemfile break end unless gemfile return unless gemfile lockfile = case gemfile when "gems.rb" then "gems.locked" else "#{gemfile}.lock" end.dup.untaint return unless File.file?(lockfile) [lockfile, File.read(lockfile)] end