Class: InvocaGems::Bundler

Inherits:
Object
  • Object
show all
Defined in:
lib/invoca_gems/bundler.rb

Defined Under Namespace

Classes: GitSource, PathSource

Instance Method Summary collapse

Instance Method Details

#dependants(gem_name) ⇒ Object



17
18
19
# File 'lib/invoca_gems/bundler.rb', line 17

def dependants(gem_name)
  dependant_hash[gem_name]
end

#dependencies_yuml_urlObject



21
22
23
# File 'lib/invoca_gems/bundler.rb', line 21

def dependencies_yuml_url
  "http://yuml.me/diagram/class/#{URI::encode(invoca_dependencies.join(','))}"
end

#find_git_source(gem_name) ⇒ Object



4
5
6
7
8
# File 'lib/invoca_gems/bundler.rb', line 4

def find_git_source(gem_name)
  if source = definition.send(:sources).git_sources.find { |gs| source_name(gs) == gem_name }
    GitSource.new(source_name(source), source.uri, source.ref, source.version)
  end
end

#find_path_source(gem_name) ⇒ Object



11
12
13
14
15
# File 'lib/invoca_gems/bundler.rb', line 11

def find_path_source(gem_name)
  if (spec = find_spec(gem_name)) && spec.source.respond_to?(:path)
    PathSource.new(spec.name, spec.source.path, spec.version.to_s)
  end
end

#invoca_source_namesObject



25
26
27
28
29
30
31
# File 'lib/invoca_gems/bundler.rb', line 25

def invoca_source_names
  @invoca_source_names ||= definition.send(:sources).all_sources.map do |source|
    if is_invoca_github_source?(source) || is_edited_source?(source)
      source_name(source)
    end
  end.compact
end