Module: GemDependenciesVisualizer

Defined in:
lib/gem_dependencies_visualizer.rb,
lib/gem_dependencies_visualizer/version.rb

Constant Summary collapse

VERSION =
"0.1.5"

Class Method Summary collapse

Class Method Details

.produce_gems_graph(gem_file_content, gem_file_lock_content, graph_name = nil, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/gem_dependencies_visualizer.rb', line 4

def self.produce_gems_graph(gem_file_content, gem_file_lock_content, graph_name = nil, options = {})
   if gem_file_lock_content.nil?
    puts 'Please insert both Gemfile and Gemfile.lock contents to proceed or just Gemfile.lock content.'
   else
    g = GraphViz::new( :G, :type => :digraph )
    g[:rankdir] = rankdir(options)

    data = populate_gem_data gem_file_content, gem_file_lock_content, options
    populate_gem_graph g, data, graph_name, options
	 end
end