gem_dependencies_visualizer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/gem_dependencies_visualizer.rb +15 -7
- data/lib/gem_dependencies_visualizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b7a7134e68d9d7baa188c888b3ec5e5d336d531
|
4
|
+
data.tar.gz: 910dc9d7be3a27c4574c4f4992c7142943f12434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35d505ca00c27e7c4b39aeda1298964b4b7bfab295ef183184e067c172ff2c3b8f755e4fd242a85b88469e55dd7c1ffcdb338523303f7c34a74d2fd05f40c1fd
|
7
|
+
data.tar.gz: d1048edc6452a3414e4ff01c185dbe8e90a1cbbf88bcd59bdcb50874e4e924733d96196e912c947bbba913ed9cace5d871651f0a1d07c1cd2577d4b6719f2332
|
data/CHANGELOG.md
CHANGED
@@ -7,7 +7,7 @@ module GemDependenciesVisualizer
|
|
7
7
|
g[:rankdir] ='LR'
|
8
8
|
|
9
9
|
data = populate_gem_data string_input, options
|
10
|
-
populate_gem_graph g, data, graph_name
|
10
|
+
populate_gem_graph g, data, graph_name, options
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -67,7 +67,7 @@ module GemDependenciesVisualizer
|
|
67
67
|
gem_list
|
68
68
|
end
|
69
69
|
|
70
|
-
def self.populate_gem_graph(graph, data, graph_name = nil)
|
70
|
+
def self.populate_gem_graph(graph, data, graph_name = nil, options = {})
|
71
71
|
default_node = graph.add_nodes('Default', :label => "<<b>Default</b>>")
|
72
72
|
|
73
73
|
data.each do |dependency_item|
|
@@ -80,11 +80,19 @@ module GemDependenciesVisualizer
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
directory_name = 'app/assets/images/gem_dependencies_graphs'
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
83
|
+
directory_name = options[:specific_directory].nil? ? 'app/assets/images/gem_dependencies_graphs' : "#{options[:specific_directory]}/gem_dependencies_graphs"
|
84
|
+
|
85
|
+
full_path = nil
|
86
|
+
directory_name.split('/').each do |namespace|
|
87
|
+
if full_path.nil?
|
88
|
+
full_path = namespace
|
89
|
+
else
|
90
|
+
full_path = [full_path, namespace].join('/')
|
91
|
+
end
|
92
|
+
|
93
|
+
FileUtils.mkdir_p(full_path) unless File.directory?(full_path)
|
94
|
+
end
|
95
|
+
|
88
96
|
graph.output(:png => "#{directory_name}/#{graph_name.nil? ? "graph_sample" : graph_name }.png" )
|
89
97
|
end
|
90
98
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_dependencies_visualizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasilis Kalligas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|