Flowdock
method

lockfile_contents

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: BundlerVersionFinder
lockfile_contents() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/bundler_version_finder.rb, line 74
  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.untaint

    return unless File.file?(lockfile)

    [lockfile, File.read(lockfile)]
  end
Register or log in to add new notes.