rdepend 0.0.7 → 0.0.8
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 +11 -5
- data/lib/rdepend/printer.rb +9 -0
- data/lib/rdepend/trace.rb +1 -1
- data/lib/rdepend/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: 35f91faec18f2fbaacfc7b0385c2610349f560e6
|
4
|
+
data.tar.gz: 413f719ffe48ad6b305030b2a2b9245588c7c4e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e6511528b6823e7a3d39866cb71a81efa09d9e605708c57260e00951ecd5d64f73dd45287ddbc0c8c43b15988409dc92b1a0cddcf72cfa6f18f9a9647d25f66
|
7
|
+
data.tar.gz: e3edabf3c27a5488cab9eb8a8f39f645b5cf9f9138737517759d7fa8fe24812b2428cba67e3d2d62f447b8b12790d5312fc0848817ecbd818123308cfc198f71
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Ꝛdepend
|
2
2
|
|
3
|
-
Mind that this Gem is
|
3
|
+
Mind that this Gem is experimental, a work in progress. If you happen to
|
4
|
+
encounter bugs or like to discuss the output or it's use cases,
|
5
|
+
please open an issue in the issue tracker.
|
4
6
|
|
5
7
|
It generates a graph visualization of the dependencies in your codebase.
|
6
8
|
|
7
|
-
A lot of incoming links is good, as
|
8
|
-
|
9
|
-
A lot of outgoing links is bad, as that means that that part of the code has
|
10
|
-
a lot of dependencies.
|
9
|
+
A lot of incoming links is good, as it is a sign of code re-use and DRY code.
|
10
|
+
A lot of outgoing links is bad, as that is a sign of a lot of dependencies.
|
11
11
|
|
12
12
|
See http://www.whiteboxtest.com/information-flow-metrics.php
|
13
13
|
|
@@ -42,6 +42,12 @@ Rdepend.trace
|
|
42
42
|
# your code
|
43
43
|
```
|
44
44
|
|
45
|
+
Don't even think about using this Gem in a production environment.
|
46
|
+
You can use it in your integration test suite for instance. But don't use it
|
47
|
+
in a test environment where you use stubs, mocks and doubles etc.
|
48
|
+
|
49
|
+
Oh, and it can take a very long time, even on a simple Rails project.
|
50
|
+
|
45
51
|
## Contributing
|
46
52
|
|
47
53
|
1. Fork it ( https://github.com/suhrawardi/rdepend/fork )
|
data/lib/rdepend/printer.rb
CHANGED
@@ -5,6 +5,8 @@ module Rdepend
|
|
5
5
|
class Printer < RubyProf::AbstractPrinter
|
6
6
|
EDGE_COLOR = '"#666666"'
|
7
7
|
|
8
|
+
PROGGER = ['|','/','-','\\']
|
9
|
+
|
8
10
|
attr_reader :color
|
9
11
|
|
10
12
|
def initialize(result)
|
@@ -79,7 +81,14 @@ module Rdepend
|
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
84
|
+
def print_progress
|
85
|
+
p = PROGGER.delete_at(0)
|
86
|
+
PROGGER.push(p)
|
87
|
+
STDOUT.print "#{p}\r"
|
88
|
+
end
|
89
|
+
|
82
90
|
def add(*args)
|
91
|
+
print_progress
|
83
92
|
@contents = (@contents || []) + [args].flatten
|
84
93
|
end
|
85
94
|
end
|
data/lib/rdepend/trace.rb
CHANGED
@@ -14,7 +14,7 @@ module Rdepend
|
|
14
14
|
result = RubyProf.stop
|
15
15
|
result.eliminate_methods!([/Integer#times/, /Class#new/])
|
16
16
|
puts "Writing Ꝛdepend graph to rdepend/#{$0}.dot.svg"
|
17
|
-
|
17
|
+
Dir.mkdir('rdepend') unless Dir.exist?('rdepend')
|
18
18
|
Rdepend::Printer.new(result).print("rdepend/#{$0}.dot")
|
19
19
|
end
|
20
20
|
|
data/lib/rdepend/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdepend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jarra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-graphviz
|