cbradeps 0.1.0 → 0.1.1
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 +35 -10
- data/bin/cbradeps +6 -2
- data/cbradeps.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84d0bc8abac7615cd7742fde3e869b067abe7f8b
|
|
4
|
+
data.tar.gz: ed5829ba4f8cc78d587471b98ef9bf1aafdba549
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6680de6d79145b20984c00c53397a0e7a701c83156003fe4fa524ce947883d94423988f699bf02d768cda6c6212784e47e320354957f59b9f4f94f200e7ebff
|
|
7
|
+
data.tar.gz: 98e97f8445d30e037b77ec6b968c4bcd18e3e0d58acfcb4ec0d60fbad7840cd331cf4902e98ce8e2e24a9acb3870af36566e30728b4f0a9da5f2ecad3dc70e75
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# cbradeps
|
|
1
|
+
# cbradeps [](https://travis-ci.org/shageman/cbradeps) [](http://badge.fury.io/rb/cbradeps) [](https://codeclimate.com/github/shageman/cbradeps) [](https://gemnasium.com/shageman/cbradeps)
|
|
2
2
|
|
|
3
|
-
Prints and exports the dependencies within component-based Ruby/Rails applications
|
|
3
|
+
Prints and exports the dependencies within component-based Ruby/Rails applications (#cbra)
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -18,16 +18,43 @@ Or install it yourself as:
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
cbradeps [application path]
|
|
22
|
-
|
|
21
|
+
cbradeps [OPTION] [application path]
|
|
22
|
+
|
|
23
23
|
Component-based Ruby/Rails dependency grapher.
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
Options are...
|
|
26
|
+
-t, --text DEFAULT Outputs a textual representation of the dependencies
|
|
27
|
+
-g, --graph Outputs graph.png to the current directory
|
|
28
|
+
-d, --dot Outputs graph.dot to the current directory
|
|
29
|
+
|
|
26
30
|
-h, -H, --help Display this help message.
|
|
27
31
|
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
There are sample #cbra folder structures in `spec/examples`. Here is the graph generated for the letters app structure:
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
## #cbra extension to Gemfile
|
|
39
|
+
|
|
40
|
+
The :path option used for #cbras is typically a relative path. Because of that all gems and apps transitively including a
|
|
41
|
+
gem need to state the relative path to every gem with a path relatuive to their root. For an app, this is the reason why it is
|
|
42
|
+
unclear which gems it really directly depends on. That's why all dependencies of apps are omitted from the output graph.
|
|
43
|
+
|
|
44
|
+
To include direct dependencies of an application, add an additional option to the `gem` line from the Gemfile like so:
|
|
45
|
+
|
|
46
|
+
gem "B", path: "../B", direct: true
|
|
47
|
+
gem "C", path: "../C"
|
|
48
|
+
gem "D", path: "../D"
|
|
49
|
+
gem "E1", path: "../E1"
|
|
50
|
+
gem "E2", path: "../E2"
|
|
51
|
+
gem "F", path: "../F"
|
|
52
|
+
|
|
53
|
+
This is the [Gemfile of app A](https://github.com/shageman/cbradeps/blob/master/spec/examples/letters/A/Gemfile)
|
|
54
|
+
from the letters example of which you see the graph above.
|
|
55
|
+
|
|
28
56
|
##TODOs
|
|
29
57
|
|
|
30
|
-
* optionally output dotfile for all deps
|
|
31
58
|
* support windows folders (searching for a couple slashes)
|
|
32
59
|
* support windows: don't shell out to find gemspecs and gemfiles
|
|
33
60
|
* info if no gem file found for gem
|
|
@@ -39,8 +66,6 @@ Or install it yourself as:
|
|
|
39
66
|
|
|
40
67
|
## License
|
|
41
68
|
|
|
42
|
-
|
|
43
|
-
twitter.com/shageman
|
|
44
|
-
stephan.hagemann@gmail.com
|
|
69
|
+
Copyright (c) 2014 Stephan Hagemann, stephan.hagemann@gmail.com, [@shageman](http://twitter.com/shageman)
|
|
45
70
|
|
|
46
|
-
|
|
71
|
+
Released under the MIT license. See LICENSE file for details.
|
data/bin/cbradeps
CHANGED
|
@@ -23,7 +23,11 @@ path = nil
|
|
|
23
23
|
case ARGV.size
|
|
24
24
|
when 0
|
|
25
25
|
when 1
|
|
26
|
-
|
|
26
|
+
if ARGV[0].start_with? "-"
|
|
27
|
+
option = ARGV[0]
|
|
28
|
+
else
|
|
29
|
+
path = ARGV[0]
|
|
30
|
+
end
|
|
27
31
|
when 2
|
|
28
32
|
option = ARGV[0]
|
|
29
33
|
path = ARGV[1]
|
|
@@ -40,7 +44,7 @@ if option
|
|
|
40
44
|
Cbradeps.output_graph path
|
|
41
45
|
elsif %w(-d --dot).include? option
|
|
42
46
|
Cbradeps.output_dot path
|
|
43
|
-
|
|
47
|
+
elsif %w(-t --text).include? option
|
|
44
48
|
Cbradeps.output_text path
|
|
45
49
|
end
|
|
46
50
|
end
|
data/cbradeps.gemspec
CHANGED
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'cbradeps'
|
|
7
|
-
spec.version = '0.1.
|
|
7
|
+
spec.version = '0.1.1'
|
|
8
8
|
spec.authors = ['Stephan Hagemann']
|
|
9
9
|
spec.email = ['stephan.hagemann@gmail.com']
|
|
10
10
|
spec.summary = %q{Prints and exports the dependencies within component-based Ruby/Rails applications}
|
|
@@ -13,7 +13,7 @@ Component-based Ruby/Rails applications use local 'path' gem references to struc
|
|
|
13
13
|
utilities for printing and exporting such dependencies.
|
|
14
14
|
DOC
|
|
15
15
|
|
|
16
|
-
spec.homepage = ''
|
|
16
|
+
spec.homepage = 'https://github.com/shageman/cbradeps'
|
|
17
17
|
spec.license = 'MIT'
|
|
18
18
|
|
|
19
19
|
spec.files = %w(
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cbradeps
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephan Hagemann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby-graphviz
|
|
@@ -84,7 +84,7 @@ files:
|
|
|
84
84
|
- LICENSE
|
|
85
85
|
- Rakefile
|
|
86
86
|
- README.md
|
|
87
|
-
homepage:
|
|
87
|
+
homepage: https://github.com/shageman/cbradeps
|
|
88
88
|
licenses:
|
|
89
89
|
- MIT
|
|
90
90
|
metadata: {}
|