lib/hrw/scanner/gemfile.rb in hrw-0.2.1 vs lib/hrw/scanner/gemfile.rb in hrw-0.2.2

- old
+ new

@@ -8,15 +8,18 @@ module Scanner # # Used to scan gem lock file # class Gemfile + attr_reader :package_manager + # Initialize a scanner # # @param [String] root The path to the project root # @param [String] lockfile # The name for the lock file, default is `Gemfile.lock` def initialize(root = Dir.pwd, lockfile = 'Gemfile.lock') + @package_manager = 'rubygems' @root = File.expand_path(root) @lockfile = Bundler::LockfileParser.new( File.read(File.join(@root, lockfile)) ) end \ No newline at end of file