cpp_dependency_graph 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/docs/README.md +19 -5
- data/docs/_config.yml +1 -0
- data/{examples → docs/examples}/leveldb_cyclic_deps.svg +0 -0
- data/{examples → docs/examples}/leveldb_overall.png +0 -0
- data/{examples → docs/examples}/leveldb_overall.svg +0 -0
- data/{examples → docs/examples}/leveldb_overall_d3.png +0 -0
- data/{examples → docs/examples}/leveldb_overall_d3.svg +0 -0
- data/{examples → docs/examples}/rethinkdb_cyclic_deps.svg +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_component.png +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_component.svg +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_component_d3.png +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_component_d3.svg +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_include.png +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_include.svg +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_include_d3.png +0 -0
- data/{examples → docs/examples}/rethinkdb_queue_include_d3.svg +0 -0
- data/{examples → docs/examples}/rocksdb_overall_d3.svg +0 -0
- data/{examples → docs/examples}/rocksdb_table_component.png +0 -0
- data/docs/index.md +43 -0
- data/lib/cpp_dependency_graph/dir_tree.rb +1 -1
- data/lib/cpp_dependency_graph/source_file.rb +7 -1
- data/lib/cpp_dependency_graph/version.rb +1 -1
- metadata +20 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5439e5df96869f8e42239ae1dd7963b1c8f12bb72f66b9931e19ffa7ba8f48f
|
4
|
+
data.tar.gz: 7793b519e5fd0915479f6181b84954cd06525da8b59bc6e1e67d3bb8eb053c5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 834d2e3aa16613a92bc308b726d32bed789fa770e0562cee8aee8ce308bbee69888698ebc276b315c74f62207c0bf7f66163f365eb407170044c865dadc60233
|
7
|
+
data.tar.gz: 0a83134a6ce392d0f582354f21c8a641e0d58fb70b810b136defb0e92236c68db4d4e46cbf12366f2ab07202784936a0750148a36e6c35cb77e1a117967863bf
|
data/README.md
CHANGED
@@ -51,17 +51,17 @@ A huge shout out to the people behind these projects.
|
|
51
51
|
|
52
52
|
### Overall component dependency graph
|
53
53
|
|
54
|
-
To generate the overall component
|
54
|
+
To generate the overall component dependency graph for a project, use it like so -
|
55
55
|
|
56
56
|
`cpp_dependency_graph visualise -r spec\test\example_project\ -o deps.dot -f dot`
|
57
57
|
|
58
58
|
Below is the overall `dot` and `d3` component dependency visualisations for [leveldb](https://github.com/google/leveldb)
|
59
59
|
|
60
|
-

|
60
|
+

|
61
61
|
|
62
|
-

|
62
|
+

|
63
63
|
|
64
|
-

|
64
|
+

|
65
65
|
|
66
66
|
**NOTE** - If your project has a large number of components (> 100 and lots of connections between them), then generation (and subsequent rendering) may take some time.
|
67
67
|
|
@@ -73,9 +73,9 @@ This will highlight the dependencies coming in and going out of a specific compo
|
|
73
73
|
|
74
74
|
Here's a component dependency visualisation generated for the `queue` component in [rethinkdb](https://github.com/rethinkdb/rethinkdb)
|
75
75
|
|
76
|
-

|
76
|
+

|
77
77
|
|
78
|
-

|
78
|
+

|
79
79
|
|
80
80
|
### Component include dependency graph
|
81
81
|
|
@@ -85,9 +85,9 @@ This will highlight dependencies of includes within a specific component
|
|
85
85
|
|
86
86
|
Here's a component include dependency visualisation generated for the `queue` component in [rethinkdb](https://github.com/rethinkdb/rethinkdb)
|
87
87
|
|
88
|
-

|
88
|
+

|
89
89
|
|
90
|
-

|
90
|
+

|
91
91
|
|
92
92
|
### Cyclic dependencies only graph
|
93
93
|
|
@@ -97,9 +97,9 @@ This will highlight cyclic dependencies between components within a project. Thi
|
|
97
97
|
|
98
98
|
Here's the cyclic dependencies only visualisation generated for [rethinkdb](https://github.com/rethinkdb/rethinkdb) and [leveldb](https://github.com/google/leveldb)
|
99
99
|
|
100
|
-

|
100
|
+

|
101
101
|
|
102
|
-

|
102
|
+

|
103
103
|
|
104
104
|
## Development
|
105
105
|
|
data/docs/README.md
CHANGED
@@ -3,10 +3,24 @@ layout: home
|
|
3
3
|
title: "Github Pages for Non-Developers: Build Web Portfolios From Scratch"
|
4
4
|
---
|
5
5
|
|
6
|
-
|
7
|
-
This is a very narrowly focused tutorial about web development aimed at novices who have absolutely no web dev experience, nor have used [Github](https://github.com) or [Git](http://git-scm.com/), or even the command line.
|
6
|
+
# Cpp Dependency Graph
|
8
7
|
|
9
|
-
|
8
|
+
Generates useful component dependency visualisations (`dot` or `d3.js`) to study the architecture of C/C++ projects.
|
10
9
|
|
11
|
-
|
12
|
-
|
10
|
+
Why do all the other languages have awesome tools to analyse codebases but C/C++ does not?
|
11
|
+
|
12
|
+
It's time to change that.
|
13
|
+
|
14
|
+
This tool aims to -
|
15
|
+
|
16
|
+
- provide multiple views into the architecture of a codebase
|
17
|
+
- generate views at multiple levels of the architecture
|
18
|
+
- make the resulting views genuinely useful, rich, dynamic and interactive (static views are boring)
|
19
|
+
|
20
|
+
## Inspiration
|
21
|
+
|
22
|
+
This tool is inspired by a number of projects [rubrowser](http://www.emadelsaid.com/rubrowser/), [cpp-dependencies](https://github.com/tomtom-international/cpp-dependencies) and [objc-dependency-visualizer](https://github.com/PaulTaykalo/objc-dependency-visualizer).
|
23
|
+
|
24
|
+
The pretty `d3` visualisations are directly copied from `objc-dependency-visualiser`.
|
25
|
+
|
26
|
+
A huge shout out to the people behind these projects.
|
data/docs/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
theme: jekyll-theme-slate
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/docs/index.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
title: Cpp Dependency Graph
|
4
|
+
tagline: Visualise C/C++ projects with amazing visualisations
|
5
|
+
description: Tutorial on how to use Cpp Dependency Graph
|
6
|
+
---
|
7
|
+
|
8
|
+
# Cpp Dependency Graph
|
9
|
+
|
10
|
+
Generates useful component dependency visualisations (`dot` or `d3.js`) to study the architecture of C/C++ projects.
|
11
|
+
|
12
|
+
Why do all the other languages have awesome tools to analyse codebases but C/C++ does not?
|
13
|
+
|
14
|
+
It's time to change that.
|
15
|
+
|
16
|
+
This tool aims to -
|
17
|
+
|
18
|
+
- provide multiple views into the architecture of a codebase
|
19
|
+
- generate views at multiple levels of the architecture
|
20
|
+
- make the resulting views genuinely useful, rich, dynamic and interactive (static views are boring)
|
21
|
+
|
22
|
+
## Inspiration
|
23
|
+
|
24
|
+
This tool is inspired by a number of projects [rubrowser](http://www.emadelsaid.com/rubrowser/), [cpp-dependencies](https://github.com/tomtom-international/cpp-dependencies) and [objc-dependency-visualizer](https://github.com/PaulTaykalo/objc-dependency-visualizer).
|
25
|
+
|
26
|
+
The pretty `d3` visualisations are directly copied from `objc-dependency-visualiser`.
|
27
|
+
|
28
|
+
A huge shout out to the people behind these projects.
|
29
|
+
|
30
|
+
## Usage tutorial
|
31
|
+
### Overall component dependency graph
|
32
|
+
|
33
|
+
To generate the overall component dependency graph for a project, use it like so -
|
34
|
+
|
35
|
+
`cpp_dependency_graph visualise -r spec\test\example_project\ -o deps.dot -f dot`
|
36
|
+
|
37
|
+
Below is the overall `dot` and `d3` component dependency visualisations for [leveldb](https://github.com/google/leveldb)
|
38
|
+
|
39
|
+

|
40
|
+
|
41
|
+

|
42
|
+
|
43
|
+

|
@@ -47,6 +47,12 @@ class SourceFile
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def file_contents
|
50
|
-
@file_contents ||=
|
50
|
+
@file_contents ||= sanitised_file_contents
|
51
|
+
end
|
52
|
+
|
53
|
+
def sanitised_file_contents
|
54
|
+
contents = File.read(@path)
|
55
|
+
return contents if contents.valid_encoding?
|
56
|
+
contents.encode('UTF-16be', invalid: :replace, replace: '?').encode('UTF-8')
|
51
57
|
end
|
52
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpp_dependency_graph
|
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
|
- Shreyas Balakrishna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -217,22 +217,24 @@ files:
|
|
217
217
|
- bin/setup
|
218
218
|
- cpp_dependency_graph.gemspec
|
219
219
|
- docs/README.md
|
220
|
-
-
|
221
|
-
- examples/
|
222
|
-
- examples/leveldb_overall.
|
223
|
-
- examples/
|
224
|
-
- examples/leveldb_overall_d3.
|
225
|
-
- examples/
|
226
|
-
- examples/
|
227
|
-
- examples/rethinkdb_queue_component.
|
228
|
-
- examples/
|
229
|
-
- examples/rethinkdb_queue_component_d3.
|
230
|
-
- examples/
|
231
|
-
- examples/rethinkdb_queue_include.
|
232
|
-
- examples/
|
233
|
-
- examples/rethinkdb_queue_include_d3.
|
234
|
-
- examples/
|
235
|
-
- examples/
|
220
|
+
- docs/_config.yml
|
221
|
+
- docs/examples/leveldb_cyclic_deps.svg
|
222
|
+
- docs/examples/leveldb_overall.png
|
223
|
+
- docs/examples/leveldb_overall.svg
|
224
|
+
- docs/examples/leveldb_overall_d3.png
|
225
|
+
- docs/examples/leveldb_overall_d3.svg
|
226
|
+
- docs/examples/rethinkdb_cyclic_deps.svg
|
227
|
+
- docs/examples/rethinkdb_queue_component.png
|
228
|
+
- docs/examples/rethinkdb_queue_component.svg
|
229
|
+
- docs/examples/rethinkdb_queue_component_d3.png
|
230
|
+
- docs/examples/rethinkdb_queue_component_d3.svg
|
231
|
+
- docs/examples/rethinkdb_queue_include.png
|
232
|
+
- docs/examples/rethinkdb_queue_include.svg
|
233
|
+
- docs/examples/rethinkdb_queue_include_d3.png
|
234
|
+
- docs/examples/rethinkdb_queue_include_d3.svg
|
235
|
+
- docs/examples/rocksdb_overall_d3.svg
|
236
|
+
- docs/examples/rocksdb_table_component.png
|
237
|
+
- docs/index.md
|
236
238
|
- exe/cpp_dependency_graph
|
237
239
|
- lib/cpp_dependency_graph.rb
|
238
240
|
- lib/cpp_dependency_graph/bidirectional_hash.rb
|