Sha256: bdb0282a634a3888b8645131f75c883e426440ea71e3d29ad611a9cedebfbd6b
Contents?: true
Size: 781 Bytes
Versions: 2
Compression:
Stored size: 781 Bytes
Contents
require 'json' module Hrw module Scanner # # Used to scan gem lock file # class Pipfile # Class constructor # # @param [String] root The path to the project root # @param [String] lockfile # The name for the lock file, default is `Pipfile.lock` def initialize(root = Dir.pwd, lockfile = 'Pipfile.lock') @root = root @lockfile = lockfile end # Scan the lock file # @return [Hash] Dependencies def scan deps = [] lock = JSON.parse(File.read(File.join(@root, @lockfile))) lock['default'].each_pair do |name, info| deps << { name: name, version: info['version'] } end deps end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hrw-0.2.1 | lib/hrw/scanner/pipfile.rb |
hrw-0.2.0 | lib/hrw/scanner/pipfile.rb |