twdeps 0.0.3 → 0.0.4
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/.gitignore +0 -1
- data/Gemfile.lock +58 -0
- data/README.md +11 -4
- data/bin/twdeps +7 -7
- data/lib/twdeps/graph.rb +1 -1
- data/lib/twdeps/version.rb +1 -1
- data/lib/twdeps.rb +9 -10
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb75146e820f05024766512c34e53ca604fa3eb
|
4
|
+
data.tar.gz: cd494cc504e5ea2ae9c5466d5c061176a2d26ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d29ad280f4a7f652635dd9352a6bc7577eb7e73ca6a581d22373d09beea73e54ee1427474e12e2eec766290b8e68ead90c1f089769d4a8cb89b90b255a41dfd
|
7
|
+
data.tar.gz: 8195262c8885e4a0ce1e0c70e1511d4f6f87eae83a30d0d1184f842c092ded77478f0ae9f269fccf40c9c1f536ab172b2721c26ceec7d8d55111e927652184fc
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
twdeps (0.0.4)
|
5
|
+
ruby-graphviz (~> 1.0.7)
|
6
|
+
taskwarrior (~> 0.0.6)
|
7
|
+
trollop (~> 1)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (3.2.13)
|
13
|
+
activesupport (= 3.2.13)
|
14
|
+
builder (~> 3.0.0)
|
15
|
+
activesupport (3.2.13)
|
16
|
+
i18n (= 0.6.1)
|
17
|
+
multi_json (~> 1.0)
|
18
|
+
builder (3.0.4)
|
19
|
+
ffi (1.0.11)
|
20
|
+
guard (1.1.1)
|
21
|
+
listen (>= 0.4.2)
|
22
|
+
thor (>= 0.14.6)
|
23
|
+
guard-bundler (1.0.0)
|
24
|
+
bundler (~> 1.0)
|
25
|
+
guard (~> 1.1)
|
26
|
+
guard-test (0.5.0)
|
27
|
+
guard (>= 1.1.0)
|
28
|
+
test-unit (~> 2.2)
|
29
|
+
i18n (0.6.1)
|
30
|
+
listen (0.4.4)
|
31
|
+
rb-fchange (~> 0.0.5)
|
32
|
+
rb-fsevent (~> 0.9.1)
|
33
|
+
rb-inotify (~> 0.8.8)
|
34
|
+
multi_json (1.7.7)
|
35
|
+
rake (0.9.2.2)
|
36
|
+
rb-fchange (0.0.5)
|
37
|
+
ffi
|
38
|
+
rb-fsevent (0.9.1)
|
39
|
+
rb-inotify (0.8.8)
|
40
|
+
ffi (>= 0.5.0)
|
41
|
+
ruby-graphviz (1.0.9)
|
42
|
+
taskwarrior (0.0.6)
|
43
|
+
activemodel (~> 3.2)
|
44
|
+
multi_json (~> 1.3)
|
45
|
+
test-unit (2.5.0)
|
46
|
+
thor (0.15.3)
|
47
|
+
trollop (1.16.2)
|
48
|
+
twtest (0.0.6)
|
49
|
+
|
50
|
+
PLATFORMS
|
51
|
+
ruby
|
52
|
+
|
53
|
+
DEPENDENCIES
|
54
|
+
guard-bundler (~> 1.0)
|
55
|
+
guard-test (~> 0.5)
|
56
|
+
rake (~> 0.9)
|
57
|
+
twdeps!
|
58
|
+
twtest (~> 0.0.6)
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
Visualizes dependencies between TaskWarrior tasks.
|
4
4
|
|
5
5
|
[](http://travis-ci.org/nerab/twdeps)
|
6
|
+
[](http://badge.fury.io/rb/twdeps)
|
6
7
|
|
7
8
|
## Example
|
8
9
|
|
@@ -16,6 +17,12 @@ Result:
|
|
16
17
|
|
17
18
|

|
18
19
|
|
20
|
+
For the impatient: The JSON export is also available as [party.json](https://raw.github.com/nerab/twdeps/master/test/fixtures/party.json). If you download it, the command
|
21
|
+
|
22
|
+
$ twdeps -f png party.json > party.png
|
23
|
+
|
24
|
+
will generate `party.png` in the current directory.
|
25
|
+
|
19
26
|
## Installation
|
20
27
|
|
21
28
|
$ gem install twdeps
|
@@ -25,27 +32,27 @@ Result:
|
|
25
32
|
# Create a dependency graph as PNG and pipe it to a file
|
26
33
|
# See [Limitations](Limitations) below for why we need the extra task parms
|
27
34
|
task export rc.json.array=on rc.verbose=nothing | twdeps > deps.png
|
28
|
-
|
35
|
+
|
29
36
|
# Same but specify output format
|
30
37
|
task export rc.json.array=on rc.verbose=nothing | twdeps --format svg > deps.svg
|
31
38
|
|
32
39
|
# Create a graph from a previously exported file
|
33
40
|
task export rc.json.array=on rc.verbose=nothing > tasks.json
|
34
41
|
cat tasks.json | twdeps > deps.png
|
35
|
-
|
42
|
+
|
36
43
|
# Display graph in browser without creating an intermediate file
|
37
44
|
# Requires bcat to be installed
|
38
45
|
task export rc.json.array=on rc.verbose=nothing | twdeps --format svg | bcat
|
39
46
|
|
40
47
|
## Dependencies
|
41
48
|
|
42
|
-
The graph is generated with [ruby-graphviz](https://github.com/glejeune/Ruby-Graphviz), which in turn requires a local [Graphviz](http://graphviz.org/) installation (e.g. `brew install graphviz`).
|
49
|
+
The graph is generated with [ruby-graphviz](https://github.com/glejeune/Ruby-Graphviz), which in turn requires a local [Graphviz](http://graphviz.org/) installation (e.g. `brew install graphviz` on a Mac or `sudo apt-get install graphviz` on Ubuntu Linux).
|
43
50
|
|
44
51
|
[bcat](http://rtomayko.github.com/bcat/) is required for piping into a browser.
|
45
52
|
|
46
53
|
## Limitations
|
47
54
|
|
48
|
-
Due to [two](http://taskwarrior.org/issues/1017) [bugs](http://taskwarrior.org/issues/1013) in JSON export, TaskWarrior versions before 2.1 need the additional command line options `rc.json.array=on` and `rc.verbose=nothing`.
|
55
|
+
Due to [two](http://taskwarrior.org/issues/1017) [bugs](http://taskwarrior.org/issues/1013) in its JSON export, TaskWarrior versions before 2.1 need the additional command line options `rc.json.array=on` and `rc.verbose=nothing`.
|
49
56
|
|
50
57
|
## Contributing
|
51
58
|
|
data/bin/twdeps
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require '
|
4
|
-
|
5
|
-
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'twdeps'
|
6
6
|
require 'trollop'
|
7
7
|
|
8
8
|
def log(msg)
|
@@ -14,8 +14,11 @@ def die(msg = nil)
|
|
14
14
|
exit 1
|
15
15
|
end
|
16
16
|
|
17
|
+
include TaskWarrior
|
18
|
+
include TaskWarrior::Dependencies
|
19
|
+
|
17
20
|
opts = Trollop::options do
|
18
|
-
version "#{File.basename($0)} v#{
|
21
|
+
version "#{File.basename($0)} v#{VERSION} (c) 2012 Nicolas E. Rabenau"
|
19
22
|
banner <<-EOS
|
20
23
|
Visualizes dependencies between TaskWarrior tasks.
|
21
24
|
|
@@ -30,9 +33,6 @@ EOS
|
|
30
33
|
opt :trace, "Enable trace output", :default => false
|
31
34
|
end
|
32
35
|
|
33
|
-
include TaskWarrior
|
34
|
-
include TaskWarrior::Dependencies
|
35
|
-
|
36
36
|
Trollop::die :format, "must be one of #{Graph.formats.join(', ')}" unless Graph.formats.include?(opts[:format])
|
37
37
|
|
38
38
|
begin
|
data/lib/twdeps/graph.rb
CHANGED
data/lib/twdeps/version.rb
CHANGED
data/lib/twdeps.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require "twdeps/project_presenter"
|
8
|
-
require "twdeps/null_presenter"
|
1
|
+
require 'twdeps/version'
|
2
|
+
require 'twdeps/graph'
|
3
|
+
require 'twdeps/presenter'
|
4
|
+
require 'twdeps/task_presenter'
|
5
|
+
require 'twdeps/project_presenter'
|
6
|
+
require 'twdeps/null_presenter'
|
9
7
|
|
10
8
|
# dependencies
|
11
|
-
require
|
12
|
-
require
|
9
|
+
require 'taskwarrior'
|
10
|
+
require 'graphviz'
|
11
|
+
require 'json'
|
13
12
|
|
14
13
|
module TaskWarrior
|
15
14
|
module Dependencies
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twdeps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas E. Rabenau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-graphviz
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- .gitignore
|
121
121
|
- .travis.yml
|
122
122
|
- Gemfile
|
123
|
+
- Gemfile.lock
|
123
124
|
- Guardfile
|
124
125
|
- LICENSE
|
125
126
|
- README.md
|