dnote 1.6.1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,5 +9,6 @@ file://<%= file %>
9
9
 
10
10
  <% list.each do |note| %>
11
11
  * <%= note %> (<%= note.line %>)
12
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
12
13
  <% end; end %>
13
14
 
@@ -14,5 +14,6 @@
14
14
 
15
15
  <% line_notes.each do |note| %>
16
16
  * <%= note %> (<%= note.line %>)
17
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
17
18
  <% end; end; end %>
18
19
 
@@ -5,5 +5,6 @@
5
5
 
6
6
  <% notes.each_with_index do |note, index| %>
7
7
  <%= "%s" % [index+1] %>. <%= note.label %>: <%= h note.textline %> (<%= note.file %>: <%= note.line %>)
8
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
8
9
  <% end %>
9
10
 
@@ -7,5 +7,6 @@
7
7
 
8
8
  <% line_notes.each do |note| %>
9
9
  * <%= note %> (<%= note.line %>)
10
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
10
11
  <% end; end; end %>
11
12
 
@@ -5,5 +5,6 @@
5
5
 
6
6
  <% list.each do |note| %>
7
7
  * <%= note %> (<%= note.line %>)
8
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
8
9
  <% end; end %>
9
10
 
@@ -7,5 +7,6 @@
7
7
 
8
8
  <% line_notes.each do |note| %>
9
9
  * <%= note %> (<%= note.line %>)
10
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
10
11
  <% end; end; end %>
11
12
 
@@ -2,5 +2,6 @@
2
2
 
3
3
  <% notes.each_with_index do |note, index| %>
4
4
  * <%= note.label %>: <%= h note.textline %> (<%= note.file %>: <%= note.line %>)
5
+ <% if note.code? %><%= "\n" + note.code.tabset(4).rstrip + "\n\n" %><% end %>
5
6
  <% end %>
6
7
 
@@ -7,5 +7,6 @@
7
7
 
8
8
  <% line_notes.each_with_index do |note, i| %>
9
9
  <%= note.text.indent(6).sub(' ' * 6,(" %3s. " % [i+1])) %> (<%= note.file %>:<%= note.line %>)
10
+ <% if note.code? %><%= "\n" + note.code.tabset(8) + "\n" %><% end %>
10
11
  <% end; end %>
11
12
 
@@ -5,6 +5,7 @@
5
5
  <%= file %>:
6
6
 
7
7
  <% line_notes.sort!{ |a,b| a.line <=> b.line } %><% line_notes.each do |note| %>
8
- <%= note.to_s.indent(10).sub(' ' * 10,' * ') %> (<%= note.line %>)
8
+ <%= note.to_s.indent(4).sub(' ' * 4,' * ') %> (<%= note.line %>)
9
+ <% if note.code? %><%= "\n" + note.code.tabset(10) + "\n" %><% end %>
9
10
  <% end; end %>
10
11
 
@@ -3,5 +3,6 @@
3
3
 
4
4
  <% notes.each_with_index do |note, index| %>
5
5
  <%= "%4s %s %s" % [index+1, note.label, note.text.gsub("\n", ' ')] %> (<%= note.file %>:<%= note.line %>)
6
+ <% if note.code? %><%= "\n" + note.code.tabset(8) + "\n" %><% end %>
6
7
  <% end %>
7
8
 
@@ -1,15 +1,23 @@
1
1
  <?xml version="1.0" ?>
2
2
  <notes>
3
3
  <% notes.by_label_file.each do |label, per_file| %>
4
- <label name="<%= label %>">
4
+ <label name="<%= label %>">
5
5
  <% per_file.each do |file, line_notes| %>
6
- <file src="<%= file %>">
6
+ <file src="<%= file %>">
7
7
  <% line_notes.sort!{ |a,b| a.line <=> b.line } %>
8
8
  <% line_notes.each do |note| %>
9
- <note line="<%= note.line %>" type="<%= label %>"><%= h note.textline %></note>
9
+ <note line="<%= note.line %>" type="<%= label %>">
10
+ <%= h note.textline %>
11
+ <% if note.code? %>
12
+
13
+ <![CDATA[
14
+ <%= note.code %>
15
+ ]]>
10
16
  <% end %>
11
- </file>
17
+ </note>
12
18
  <% end %>
13
- </label>
19
+ </file>
20
+ <% end %>
21
+ </label>
14
22
  <% end %>
15
23
  </notes>
@@ -1,15 +1,23 @@
1
1
  <?xml version="1.0" ?>
2
2
  <notes>
3
3
  <% notes.by_file_label.each do |file, per_label| %>
4
- <file src="<%= file %>">
4
+ <file src="<%= file %>">
5
5
  <% per_label.each do |label, lnotes| %>
6
- <label name="<%= label %>">
6
+ <label name="<%= label %>">
7
7
  <% line_notes.sort!{ |a,b| a.line <=> b.line } %>
8
8
  <% line_notes.each do |note| %>
9
- <note line="<%= note.line %>" type="<%= label %>"><%= h note.textline %></note>
9
+ <note line="<%= note.line %>" type="<%= label %>">
10
+ <%= h note.textline %>
11
+ <% if note.code? %>
12
+
13
+ <![CDATA[
14
+ <%= note.code %>
15
+ ]]>
10
16
  <% end %>
11
- </label>
17
+ </note>
12
18
  <% end %>
13
- </file>
19
+ </label>
20
+ <% end %>
21
+ </file>
14
22
  <% end %>
15
23
  </notes>
@@ -1,12 +1,20 @@
1
1
  <?xml version="1.0" ?>
2
2
  <notes>
3
3
  <% notes.by_label_file.each do |label, per_file| %>
4
- <label name="<%= label %>">
4
+ <label name="<%= label %>">
5
5
  <% per_file.each do |file, line_notes| %>
6
- <file src="<%= file %>">
6
+ <file src="<%= file %>">
7
7
  <% line_notes.sort!{ |a,b| a.line <=> b.line } %>
8
8
  <% line_notes.each do |note| %>
9
- <note line="<%= note.line %>" type="<%= label %>"><%= h note.textline %></note>
9
+ <note line="<%= note.line %>" type="<%= label %>">
10
+ <%= h note.textline %>
11
+ <% if note.code? %>
12
+
13
+ <![CDATA[
14
+ <%= note.code %>
15
+ ]]>
16
+ <% end %>
17
+ </note>
10
18
  <% end %>
11
19
  </file>
12
20
  <% end %>
@@ -1,6 +1,14 @@
1
1
  <?xml version="1.0" ?>
2
2
  <notes>
3
3
  <% notes.each do |note| %>
4
- <note file="<%= note.file %>" line="<%= note.line %>" type="<%= label %>"><%= h note.textline %></note>
4
+ <note file="<%= note.file %>" line="<%= note.line %>" type="<%= label %>">
5
+ <%= h note.textline %>
6
+ <% if note.code? %>
7
+
8
+ <![CDATA[
9
+ <%= note.code %>
10
+ ]]>
11
+ <% end %>
12
+ </note>
5
13
  <% end %>
6
14
  </notes>
@@ -1,3 +1,16 @@
1
1
  module DNote
2
- VERSION = '1.5.0'
2
+
3
+ #
4
+ def self.metadata
5
+ @metadata ||= (
6
+ require 'yaml'
7
+ YAML.load_file(File.dirname(__FILE__) + '/../dnote.yml')
8
+ )
9
+ end
10
+
11
+ #
12
+ def self.const_missing(name)
13
+ metadata[name.to_s.downcase] || super(name)
14
+ end
15
+
3
16
  end
@@ -1,44 +1,64 @@
1
+ require 'lemon'
2
+ require 'ae'
1
3
  require 'dnote/notes'
2
4
 
3
5
  testcase DNote::Notes do
4
6
 
5
7
  concern "Coverage of DNote::Notes class."
6
8
 
7
- unit :labels => 'returns the list of labels' do
8
- notes = DNote::Notes.new([], :labels=>['TODO'])
9
- notes.labels.assert == ['TODO'] #DNote::Notes::DEFAULT_LABELS
9
+ method :labels do
10
+ test 'returns the list of labels' do
11
+ notes = DNote::Notes.new([], :labels=>['TODO'])
12
+ notes.labels.assert == ['TODO'] #DNote::Notes::DEFAULT_LABELS
13
+ end
10
14
  end
11
15
 
12
- unit :files => 'returns the files attribute' do
13
- notes = DNote::Notes.new(["example1.rb"])
14
- notes.assert.files == ["example1.rb"]
15
- notes = DNote::Notes.new([], :paths => ["example2.rb"])
16
- notes.assert.files == ["example2.rb"]
16
+ method :files do
17
+ test 'returns the files attribute' do
18
+ notes = DNote::Notes.new(["example1.rb"])
19
+ notes.assert.files == ["example1.rb"]
20
+ notes = DNote::Notes.new([], :paths => ["example2.rb"])
21
+ notes.assert.files == ["example2.rb"]
22
+ end
17
23
  end
18
24
 
19
- unit :files= => 'changes the paths attribute' do
20
- notes = DNote::Notes.new([])
21
- notes.files = ["example1.rb"]
22
- notes.assert.files == ["example1.rb"]
25
+ method :files do
26
+ test 'changes the paths attribute' do
27
+ notes = DNote::Notes.new([])
28
+ notes.files = ["example1.rb"]
29
+ notes.assert.files == ["example1.rb"]
30
+ end
23
31
  end
24
32
 
25
- unit :match_general => '' do
26
- notes = DNote::Notes.new([])
27
- line, lineno, file = "# TODO: Do something or another!", 1, "foo.rb"
28
- rec = notes.match_general(line, lineno, file)
29
- rec.to_h.assert == {'label'=>"TODO",'file'=>file,'line'=>lineno,'text'=>"Do something or another!"}
33
+ method :match_general do
34
+ test 'works' do
35
+ notes = DNote::Notes.new([])
36
+ line, lineno, file = "# TODO: Do something or another!", 1, "foo.rb"
37
+ rec = notes.match_general(line, lineno, file)
38
+ rec.to_h.assert == {'label'=>"TODO",'file'=>file,'line'=>lineno,'text'=>"Do something or another!"}
39
+ end
30
40
  end
31
41
 
32
- unit :match_special => '' do
33
- notes = DNote::Notes.new([], :labels=>['TODO'])
34
- line, lineno, file = "# TODO: Do something or another!", 1, "foo.rb"
35
- rec = notes.match_special(line, lineno, file)
36
- rec.to_h.assert == {'label'=>"TODO",'file'=>file,'line'=>lineno,'text'=>"Do something or another!"}
42
+ method :match_special do
43
+ test 'works' do
44
+ notes = DNote::Notes.new([], :labels=>['TODO'])
45
+ line, lineno, file = "# TODO: Do something or another!", 1, "foo.rb"
46
+ rec = notes.match_special(line, lineno, file)
47
+ rec.to_h.assert == {'label'=>"TODO",'file'=>file,'line'=>lineno,'text'=>"Do something or another!"}
48
+ end
37
49
  end
38
50
 
39
- unit :counts
40
- unit :notes
41
- unit :parse
51
+ method :counts do
52
+ test{ raise NotImplementedError }
53
+ end
54
+
55
+ method :notes do
56
+ test{ raise NotImplementedError }
57
+ end
58
+
59
+ method :parse do
60
+ test{ raise NotImplementedError }
61
+ end
42
62
 
43
63
  end
44
64
 
metadata CHANGED
@@ -1,82 +1,82 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dnote
3
- version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 6
9
- - 1
10
- version: 1.6.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thomas Sawyer
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-05-17 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: lemon
16
+ requirement: &13030000 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
23
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: *13030000
25
+ - !ruby/object:Gem::Dependency
26
+ name: ae
27
+ requirement: &13029220 !ruby/object:Gem::Requirement
25
28
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
33
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: redline
37
34
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
35
+ version_requirements: *13029220
36
+ - !ruby/object:Gem::Dependency
37
+ name: detroit
38
+ requirement: &13028580 !ruby/object:Gem::Requirement
39
39
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
47
44
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: reap
51
45
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
46
+ version_requirements: *13028580
47
+ - !ruby/object:Gem::Dependency
48
+ name: reap
49
+ requirement: &13027940 !ruby/object:Gem::Requirement
53
50
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
61
55
  type: :development
62
- version_requirements: *id003
63
- description: DNote makes it easy to extract developer's notes from source code, and supports almost any language.
64
- email: transfire@gmail.com
65
- executables:
56
+ prerelease: false
57
+ version_requirements: *13027940
58
+ description: ! 'DNote makes it easy to extract developer''s notes from source code,
59
+
60
+ and supports almost any language.'
61
+ email:
62
+ - transfire@gmail.com
63
+ executables:
66
64
  - dnote
67
65
  extensions: []
68
-
69
- extra_rdoc_files:
66
+ extra_rdoc_files:
67
+ - HISTORY.rdoc
70
68
  - README.rdoc
71
- files:
69
+ - COPYING.rdoc
70
+ files:
72
71
  - .ruby
72
+ - .yardopts
73
73
  - bin/dnote
74
74
  - lib/dnote/core_ext.rb
75
75
  - lib/dnote/format.rb
76
76
  - lib/dnote/note.rb
77
77
  - lib/dnote/notes.rb
78
+ - lib/dnote/rake/dnotetask.rb
78
79
  - lib/dnote/session.rb
79
- - lib/dnote/string.rb
80
80
  - lib/dnote/templates/html/file.erb
81
81
  - lib/dnote/templates/html/label.erb
82
82
  - lib/dnote/templates/html/list.erb
@@ -115,51 +115,35 @@ files:
115
115
  - lib/dnote/templates/yaml.erb
116
116
  - lib/dnote/version.rb
117
117
  - lib/dnote.rb
118
- - lib/plugins/rake/task.rb
119
- - lib/plugins/redline/dnote.rb
120
118
  - test/notes_case.rb
121
119
  - try/sample.bas
122
120
  - try/sample.js
123
121
  - try/sample.rb
124
122
  - HISTORY.rdoc
125
- - APACHE2.txt
126
123
  - README.rdoc
127
- has_rdoc: true
124
+ - COPYING.rdoc
128
125
  homepage: http://rubyworks.github.com/dnote
129
126
  licenses: []
130
-
131
127
  post_install_message:
132
- rdoc_options:
133
- - --title
134
- - DNote API
135
- - --main
136
- - README.rdoc
137
- require_paths:
128
+ rdoc_options: []
129
+ require_paths:
138
130
  - lib
139
- required_ruby_version: !ruby/object:Gem::Requirement
131
+ required_ruby_version: !ruby/object:Gem::Requirement
140
132
  none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
- version: "0"
148
- required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
138
  none: false
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- hash: 3
154
- segments:
155
- - 0
156
- version: "0"
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
157
143
  requirements: []
158
-
159
- rubyforge_project: dnote
160
- rubygems_version: 1.3.7
144
+ rubyforge_project:
145
+ rubygems_version: 1.8.10
161
146
  signing_key:
162
147
  specification_version: 3
163
- summary: Extract developer's notes from source code
148
+ summary: Extract developer's notes from source code.
164
149
  test_files: []
165
-