notes 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.rdoc +7 -0
- data/README.rdoc +6 -13
- data/bin/notes +9 -7
- data/lib/notes/version.rb +1 -1
- metadata +10 -15
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c9cc4b48af2c206ed780d22a8a67d966ffa9a6f0
|
4
|
+
data.tar.gz: 93ad59f62fc50181841ccb939e716a94217a668e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24f353092a443d15642de070217069522ec0b44f5b171e754356226fb5e762b519ae3eec72dd606290669ac2a0bc1c077888847f789a02a4478c07c5d8639c3f
|
7
|
+
data.tar.gz: 1f5b02a64a8f2fc401ebfdcc288dc62c599b18891da6a2f5ce87eb0348d4b2ea55955de16fa9790b3a867a546820bf5163f48dd35299a859f9c745d07b82f925
|
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -36,24 +36,17 @@ notes in every files under version control!
|
|
36
36
|
|
37
37
|
=== Convention over configuration
|
38
38
|
|
39
|
-
No custom output
|
39
|
+
<b>No custom output.</b>
|
40
40
|
|
41
41
|
It uses a grep-style display, which makes it easy to fit your
|
42
42
|
needs. <tt>cut</tt> is great:
|
43
43
|
|
44
44
|
$ notes | cut -d: -f3,4-
|
45
45
|
|
46
|
-
will display
|
46
|
+
will display <tt>TODO: /* add a cool feature */</tt> instead of the normal
|
47
|
+
output <tt>foo.c:42:TODO: /* add a cool feature */</tt>.
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
instead of the normal output:
|
51
|
-
|
52
|
-
foo.c:42:TODO: /* add a cool feature */
|
53
|
-
|
54
|
-
And colors will still be displayed.
|
55
|
-
|
56
|
-
Notes won't filter.
|
49
|
+
<b>Notes won't filter.</b>
|
57
50
|
|
58
51
|
<tt>find</tt>, <tt>xargs</tt> are your friends:
|
59
52
|
|
@@ -88,8 +81,8 @@ Notes can also extend an object to add a new method (see Notes#notes),
|
|
88
81
|
or allow you to create your own scanner (see the Notes::Scanner).
|
89
82
|
|
90
83
|
For usage example of the library, you can have a look at the really basic
|
91
|
-
{Notes plugin}[http://github.com/
|
92
|
-
http://github.com/
|
84
|
+
{Notes plugin}[http://github.com/vivien/redmine_notes] for Redmine, at:
|
85
|
+
http://github.com/vivien/redmine_notes
|
93
86
|
|
94
87
|
== License
|
95
88
|
|
data/bin/notes
CHANGED
@@ -8,6 +8,7 @@ require 'find'
|
|
8
8
|
|
9
9
|
interrupted = false
|
10
10
|
verbose = false
|
11
|
+
color = STDOUT.tty?
|
11
12
|
usage = 'Usage: notes [OPTION]... [FILE]...'
|
12
13
|
tags = Notes::TAGS.dup
|
13
14
|
|
@@ -16,18 +17,18 @@ trap("INT") { interrupted = true }
|
|
16
17
|
ARGV.options do |o|
|
17
18
|
o.version = Notes::VERSION
|
18
19
|
o.banner = usage
|
19
|
-
o.on( '--no-todo',
|
20
|
-
o.on( '--no-fixme',
|
21
|
-
o.on( '--no-xxx',
|
22
|
-
o.on('-a', '--tag=TAG',
|
23
|
-
o.on( '--no-color', 'Do not colorize
|
24
|
-
o.on('-v', '--verbose',
|
20
|
+
o.on( '--no-todo', 'Do not search TODO tags') { tags -= ['TODO'] }
|
21
|
+
o.on( '--no-fixme', 'Do not search FIXME tags') { tags -= ['FIXME'] }
|
22
|
+
o.on( '--no-xxx', 'Do not search XXX tags') { tags -= ['XXX'] }
|
23
|
+
o.on('-a', '--tag=TAG', 'Search TAG tags') { |tag| tags |= [tag] }
|
24
|
+
o.on( '--[no-]color', 'Do [not] colorize output') { |flag| color = flag }
|
25
|
+
o.on('-v', '--verbose', 'Print more messages') { verbose = true }
|
25
26
|
end
|
26
27
|
|
27
28
|
begin
|
28
29
|
ARGV.options.parse!
|
29
30
|
if ARGV.empty?
|
30
|
-
paths =
|
31
|
+
paths = '.'
|
31
32
|
else
|
32
33
|
paths = ARGV.map { |p| File.exist? p or raise Errno::ENOENT, p ; p }
|
33
34
|
end
|
@@ -39,6 +40,7 @@ rescue => e
|
|
39
40
|
end
|
40
41
|
|
41
42
|
# grep-style display
|
43
|
+
color or Paint.mode = 0
|
42
44
|
c = Paint[':', :cyan]
|
43
45
|
format = Paint['%s', :magenta] + c + Paint['%s', :green] + c + '%s' + c + "%s\n"
|
44
46
|
colors = {
|
data/lib/notes/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Vivien Didelot
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: paint
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.8.4
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.8.4
|
30
27
|
description:
|
@@ -40,30 +37,28 @@ files:
|
|
40
37
|
- README.rdoc
|
41
38
|
- CHANGELOG.rdoc
|
42
39
|
- LICENSE
|
43
|
-
-
|
44
|
-
YmluL25vdGVz
|
40
|
+
- bin/notes
|
45
41
|
homepage:
|
46
42
|
licenses: []
|
43
|
+
metadata: {}
|
47
44
|
post_install_message:
|
48
45
|
rdoc_options: []
|
49
46
|
require_paths:
|
50
47
|
- lib
|
51
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
49
|
requirements:
|
54
|
-
- -
|
50
|
+
- - '>='
|
55
51
|
- !ruby/object:Gem::Version
|
56
52
|
version: '0'
|
57
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
54
|
requirements:
|
60
|
-
- -
|
55
|
+
- - '>='
|
61
56
|
- !ruby/object:Gem::Version
|
62
57
|
version: '0'
|
63
58
|
requirements: []
|
64
59
|
rubyforge_project:
|
65
|
-
rubygems_version:
|
60
|
+
rubygems_version: 2.0.3
|
66
61
|
signing_key:
|
67
|
-
specification_version:
|
62
|
+
specification_version: 4
|
68
63
|
summary: Stupidly grep tags in source code.
|
69
64
|
test_files: []
|