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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e1b5c2e069f8f02090a5c009799d19620d2aad3
4
- data.tar.gz: a7db7cbf70c542ea3b7069229d83083e47cdd6c0
3
+ metadata.gz: 4b7a7134e68d9d7baa188c888b3ec5e5d336d531
4
+ data.tar.gz: 910dc9d7be3a27c4574c4f4992c7142943f12434
5
5
  SHA512:
6
- metadata.gz: 8a3652a5c7d05d52f0e87dda7409abf4ae3c2de794ac4a4c3d6efd46702f7318314927b991b99679dbeac18153c37614c9e2ed304e7e05875d83775cbc294a44
7
- data.tar.gz: 116715344d7289cfe57e38ade7b7eb77b0a984129705d79b2a4a4a4189c157faaa2a074420dc2aa01a9b8c08d1295d4155fac9e875a5b8dde416edadd4cdab7b
6
+ metadata.gz: 35d505ca00c27e7c4b39aeda1298964b4b7bfab295ef183184e067c172ff2c3b8f755e4fd242a85b88469e55dd7c1ffcdb338523303f7c34a74d2fd05f40c1fd
7
+ data.tar.gz: d1048edc6452a3414e4ff01c185dbe8e90a1cbbf88bcd59bdcb50874e4e924733d96196e912c947bbba913ed9cace5d871651f0a1d07c1cd2577d4b6719f2332
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.3 (2016-09-04)
2
+
3
+ Features:
4
+ * Allow clients to set the directory they want for the graphs to be generated into
5
+
1
6
  ## 0.1.2 (2016-09-04)
2
7
 
3
8
  Fixes:
@@ -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
- FileUtils.mkdir_p('app') unless File.directory?('app')
85
- FileUtils.mkdir_p('app/assets') unless File.directory?('app/assets')
86
- FileUtils.mkdir_p('app/assets/images') unless File.directory?('app/assets/images')
87
- FileUtils.mkdir_p(directory_name) unless File.directory?(directory_name)
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
 
@@ -1,3 +1,3 @@
1
1
  module GemDependenciesVisualizer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-03 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler