class Hellgrid::Project

Attributes

path[R]
root[R]

Public Class Methods

new(root, path) click to toggle source
# File lib/hellgrid/project.rb, line 5
def initialize(root, path)
  @root = root
  @path = path
end

Public Instance Methods

dependency_matrix() click to toggle source
# File lib/hellgrid/project.rb, line 14
def dependency_matrix
  @dependency_matrix ||= specs.inject(Hash.new) { |h,spec| h.merge!(spec.name.to_s => spec.version.version) }
end
name() click to toggle source
# File lib/hellgrid/project.rb, line 10
def name
  File.expand_path(path).gsub(File.expand_path(root) + '/', '')
end

Private Instance Methods

lockfile() click to toggle source
# File lib/hellgrid/project.rb, line 22
def lockfile
  File.join(path, 'Gemfile.lock')
end
parsed_lockfile() click to toggle source
# File lib/hellgrid/project.rb, line 26
def parsed_lockfile
  Bundler::LockfileParser.new(Bundler.read_file(lockfile))
end
specs() click to toggle source
# File lib/hellgrid/project.rb, line 30
def specs
  parsed_lockfile.specs
end