ctodo 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.
- data/README.md +64 -6
- data/lib/ctodo/localfs.rb +7 -2
- metadata +46 -72
data/README.md
CHANGED
@@ -1,8 +1,20 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
ctodo
|
2
|
+
=====
|
3
|
+
|
4
|
+
ctodo provides *combined* listing of "issues" or "todos" from different Issue
|
5
|
+
Providers (like a Github or Google Code project) with color output support.
|
6
|
+
|
7
|
+
The intended use case is that *you* as e.g. a developer have the source code of
|
8
|
+
a software project (maybe under version control with Mercurial or Git) located
|
9
|
+
in a single root directory and that you want to have an quick overview from
|
10
|
+
the command line which issues you have to face in your software.
|
11
|
+
|
12
|
+
Another example would be somebody with some documents that belong to a larger
|
13
|
+
(maybe academic) project with some "issues" in these documents that he wants
|
14
|
+
an overview of via cli.
|
15
|
+
|
16
|
+
ctodo is written in Ruby.
|
3
17
|
|
4
|
-
todo provides combined listing of "issues" or "todos" from different Issue
|
5
|
-
Providers with color support.
|
6
18
|
|
7
19
|
Provider
|
8
20
|
--------
|
@@ -10,17 +22,62 @@ Provider
|
|
10
22
|
- LocalFS -- grep-like local file system provider
|
11
23
|
- Github -- issues from identically named github.com/<gh_user> repo
|
12
24
|
- Google Project Hosting -- issues from identically named code.google.com/p/ project
|
13
|
-
- Redmine -- issues from identically named project on your.redmine.com
|
25
|
+
- Redmine -- issues from identically named project on your.redmine.com instance
|
26
|
+
|
14
27
|
|
15
28
|
Setup
|
16
29
|
-----
|
17
30
|
|
18
31
|
gem install ctodo
|
19
32
|
|
33
|
+
|
34
|
+
Basic Usage
|
35
|
+
-----------
|
36
|
+
|
37
|
+
You are supposed to run ctodo from cli simply via `ctodo`.
|
38
|
+
|
39
|
+
Now ctodo will search and list all found issues for your current project.
|
40
|
+
|
41
|
+
### How ctodo knows what your "current project" is
|
42
|
+
|
43
|
+
There are several automatisms currently built in:
|
44
|
+
|
45
|
+
If from the current working directory on any of the parent directories
|
46
|
+
contains a *.git* or *.hg* directory this is taken as an indicator that
|
47
|
+
this containing directory is the root directory of your project.
|
48
|
+
|
49
|
+
If you're not in a Mercurial or Git repository, the current working
|
50
|
+
directory is assumed to be the root directory of your project.
|
51
|
+
|
52
|
+
The name of the root directory is assumed to be your project's name
|
53
|
+
or an appropriate identifier for your project.
|
54
|
+
|
55
|
+
### Issue Providers
|
56
|
+
|
57
|
+
Without further configuration ctodo will simply search all files and directories
|
58
|
+
beneath the root directory recursively line by line for strings like
|
59
|
+
|
60
|
+
TODO: something
|
61
|
+
|
62
|
+
or
|
63
|
+
|
64
|
+
XXX fix bug
|
65
|
+
|
66
|
+
etc. by using the most basic Issue Provider called `localfs`.
|
67
|
+
|
68
|
+
If you decide to give ctodo some hints about where you usually share your
|
69
|
+
project's (version controlled) files like your Github account name or the
|
70
|
+
credentials to some Redmine instance ctodo will be capable to locate and display
|
71
|
+
more issues than from local files: e.g. when you have created a Github
|
72
|
+
repository "blub" with attached issues ctodo will assume that these issues
|
73
|
+
belong to a project "blub" (located in the root directory "blub") on your
|
74
|
+
hard disk and display them accordingly.
|
75
|
+
|
76
|
+
|
20
77
|
Template for ~/.todo
|
21
78
|
--------------------
|
22
79
|
|
23
|
-
# config for
|
80
|
+
# config for ctodo
|
24
81
|
#
|
25
82
|
# If you don't want to use some of these services just
|
26
83
|
# remove the corresponding lines below:
|
@@ -31,6 +88,7 @@ Template for ~/.todo
|
|
31
88
|
:red2_uri: <another-redmine-base-uri>
|
32
89
|
:red2_key: <another-redmine-api-key>
|
33
90
|
|
91
|
+
|
34
92
|
Links
|
35
93
|
-----
|
36
94
|
|
data/lib/ctodo/localfs.rb
CHANGED
@@ -30,7 +30,12 @@ module CTodo
|
|
30
30
|
if File.directory?(path) and not File.symlink?(path)
|
31
31
|
traverse(path, issues)
|
32
32
|
elsif File.file?(path)
|
33
|
-
|
33
|
+
begin
|
34
|
+
grep_for_todo(path, issues)
|
35
|
+
rescue => e
|
36
|
+
# ignore errors silently
|
37
|
+
#puts "#{path}: #{e}"
|
38
|
+
end
|
34
39
|
end
|
35
40
|
end
|
36
41
|
end
|
@@ -47,7 +52,7 @@ module CTodo
|
|
47
52
|
m = line.match("[\\W](#{@todo_labels})\\(([\\w]+)\\):[\\W]+(.*)$")
|
48
53
|
if not m.nil?
|
49
54
|
loc = "#{spath}:#{linenr}"
|
50
|
-
tags = [Tag.new(m[1], tag_color(m[1])), Tag.new(m[2], rgb4string(m[2]))]
|
55
|
+
tags = [Tag.new(m[1], tag_color(m[1])), Tag.new(m[2], ColorUtils.rgb4string(m[2]))]
|
51
56
|
issues << Issue.new(m[3], loc, nil, tags)
|
52
57
|
next
|
53
58
|
end
|
metadata
CHANGED
@@ -1,73 +1,57 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ctodo
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Christian Nicolai
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-02-02 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: httparty
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70253283514520 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: inifile
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: *70253283514520
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: inifile
|
27
|
+
requirement: &70253283513460 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
46
33
|
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: json
|
50
34
|
prerelease: false
|
51
|
-
|
35
|
+
version_requirements: *70253283513460
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: json
|
38
|
+
requirement: &70253283512540 !ruby/object:Gem::Requirement
|
52
39
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
60
44
|
type: :runtime
|
61
|
-
|
62
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70253283512540
|
47
|
+
description: Searches for issues on Github/Google Code/custom Redmine instances/local
|
48
|
+
files for current project or folder.
|
63
49
|
email: chrnicolai@gmail.com
|
64
|
-
executables:
|
50
|
+
executables:
|
65
51
|
- todo
|
66
52
|
extensions: []
|
67
|
-
|
68
53
|
extra_rdoc_files: []
|
69
|
-
|
70
|
-
files:
|
54
|
+
files:
|
71
55
|
- bin/todo
|
72
56
|
- lib/ctodo/color.rb
|
73
57
|
- lib/ctodo/gcode.rb
|
@@ -79,36 +63,26 @@ files:
|
|
79
63
|
- .todo
|
80
64
|
homepage: https://github.com/cmur2/todo
|
81
65
|
licenses: []
|
82
|
-
|
83
66
|
post_install_message:
|
84
67
|
rdoc_options: []
|
85
|
-
|
86
|
-
require_paths:
|
68
|
+
require_paths:
|
87
69
|
- lib
|
88
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
71
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
95
|
-
- 0
|
96
|
-
version: "0"
|
97
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
77
|
none: false
|
99
|
-
requirements:
|
100
|
-
- -
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
|
103
|
-
segments:
|
104
|
-
- 0
|
105
|
-
version: "0"
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
106
82
|
requirements: []
|
107
|
-
|
108
83
|
rubyforge_project: ctodo
|
109
|
-
rubygems_version: 1.8.
|
84
|
+
rubygems_version: 1.8.15
|
110
85
|
signing_key:
|
111
86
|
specification_version: 3
|
112
87
|
summary: Combined Todo
|
113
88
|
test_files: []
|
114
|
-
|