rdoc-tags 1.3.pre → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -6
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +4 -2
- data/Rakefile +3 -4
- data/lib/rdoc/generator/tags.rb +30 -19
- data/lib/rdoc/tags_task.rb +4 -4
- data/test/test_rdoc_generator_tags.rb +13 -8
- metadata +43 -71
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b637e967af2f123d9f8d8907f9a9e0dcb23c802a
|
4
|
+
data.tar.gz: 0dbbea9a16df2f18d940bb4f0761c8d8fcba9ed9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 48b458e225b7fcbb86374b1760c397a76c5a32c0c9febc303565917f6ea093a804d3f5175903b53a14a3d0033c121b96a0fd205709e45c1f5d1304136c79c029
|
7
|
+
data.tar.gz: 569aa48031bb322ba2adeee5d73793527d2a7ee7b4c69e0980385431fbd2df80601b21617186c2cf4ea1a70b4e5c7a8e3a24ccae937968b9a1805548d5e0d148
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
=== 1.3
|
1
|
+
=== 1.3 / 2013-06-27
|
2
2
|
|
3
3
|
* Minor enhancements
|
4
|
+
* rdoc-tags will now only re-parse files that have changed.
|
4
5
|
* rdoc-tags now supports outputting emacs-style tags. <tt>rdoc -f tags
|
5
6
|
--tag-style=emacs .</tt> will write an emacs-style tags file.
|
7
|
+
|
6
8
|
* Bug fixes
|
7
9
|
* Set ctags_merge option correctly in option parser
|
8
10
|
* Hoe task no longer removes TAGS on clean
|
@@ -17,7 +19,7 @@
|
|
17
19
|
* Bug Fixes
|
18
20
|
* Fixed Hoe plugin to match RDoc::TagsTask arguments.
|
19
21
|
* Require rdoc/generator/tags first for RDoc::TagsTask.
|
20
|
-
* The tags generator no longer creates a
|
22
|
+
* The tags generator no longer creates a created.rid file.
|
21
23
|
|
22
24
|
=== 1.1 / 2010-12-29
|
23
25
|
|
data/Rakefile
CHANGED
@@ -7,14 +7,13 @@ $:.unshift 'lib' # allow rdoc-tags to tag itself
|
|
7
7
|
|
8
8
|
Hoe.plugin :git
|
9
9
|
Hoe.plugin :minitest
|
10
|
-
Hoe.plugin :rdoc_tags
|
11
|
-
Hoe.
|
10
|
+
Hoe.plugin :rdoc_tags unless ENV['TRAVIS']
|
11
|
+
Hoe.plugin :travis
|
12
12
|
|
13
13
|
Hoe.spec 'rdoc-tags' do
|
14
14
|
developer 'Eric Hodel', 'drbrain@segment7.net'
|
15
15
|
|
16
|
-
|
17
|
-
extra_dev_deps << ['ZenTest']
|
16
|
+
dependency 'rdoc', '~> 4'
|
18
17
|
|
19
18
|
rdoc_locations <<
|
20
19
|
'drbrain@rubyforge.org:/var/www/gforge-projects/rdoc/rdoc-tags'
|
data/lib/rdoc/generator/tags.rb
CHANGED
@@ -11,7 +11,7 @@ class RDoc::Generator::Tags
|
|
11
11
|
##
|
12
12
|
# The version of the tags generator you are using
|
13
13
|
|
14
|
-
VERSION = '1.3
|
14
|
+
VERSION = '1.3'
|
15
15
|
|
16
16
|
RDoc::RDoc.add_generator self
|
17
17
|
|
@@ -64,9 +64,10 @@ class RDoc::Generator::Tags
|
|
64
64
|
# Adds tags-generator options to the RDoc::Options instance +options+
|
65
65
|
|
66
66
|
def self.setup_options options
|
67
|
-
options.force_output =
|
68
|
-
options.
|
69
|
-
options.
|
67
|
+
options.force_output = !File.exist?('TAGS')
|
68
|
+
options.force_update = false
|
69
|
+
options.op_dir = File.expand_path './.rdoc'
|
70
|
+
options.update_output_dir = true
|
70
71
|
|
71
72
|
options.extend Options
|
72
73
|
|
@@ -136,25 +137,27 @@ class RDoc::Generator::Tags
|
|
136
137
|
end
|
137
138
|
|
138
139
|
##
|
139
|
-
# Generates a TAGS file
|
140
|
+
# Generates a TAGS file
|
141
|
+
|
142
|
+
def generate
|
143
|
+
@store.save unless @dry_run
|
140
144
|
|
141
|
-
def generate top_levels
|
142
145
|
case @tag_style
|
143
|
-
when :vim then generate_vim
|
144
|
-
when :emacs then generate_emacs
|
146
|
+
when 'vim', :vim then generate_vim
|
147
|
+
when 'emacs', :emacs then generate_emacs
|
145
148
|
else
|
146
|
-
raise RDoc::Error, "Unkown tag
|
149
|
+
raise RDoc::Error, "Unkown tag style #{@tag_style.inspect}"
|
147
150
|
end
|
148
151
|
end
|
149
152
|
|
150
153
|
##
|
151
|
-
# Generates
|
154
|
+
# Generates an emacs TAGS file
|
152
155
|
|
153
|
-
def generate_emacs
|
156
|
+
def generate_emacs
|
154
157
|
# file_name => [definition, tag_name, line_number, byte_offset]
|
155
158
|
tags = Hash.new { |h, file| h[file] = [] }
|
156
159
|
|
157
|
-
|
160
|
+
@store.all_files.each do |top_level|
|
158
161
|
tags[top_level.relative_name] << ['', top_level.relative_name, 0, 0]
|
159
162
|
end
|
160
163
|
|
@@ -191,12 +194,12 @@ class RDoc::Generator::Tags
|
|
191
194
|
end
|
192
195
|
|
193
196
|
##
|
194
|
-
# Generates a TAGS file
|
197
|
+
# Generates a vim TAGS file
|
195
198
|
|
196
|
-
def generate_vim
|
199
|
+
def generate_vim
|
197
200
|
tags = Hash.new { |h, name| h[name] = [] }
|
198
201
|
|
199
|
-
|
202
|
+
@store.all_files.each do |top_level|
|
200
203
|
tags[top_level.relative_name] << [top_level.relative_name, 0, 'F']
|
201
204
|
end
|
202
205
|
|
@@ -275,14 +278,16 @@ class RDoc::Generator::Tags
|
|
275
278
|
puts "#{ctags_path} #{ctags_args.join ' '}"
|
276
279
|
end
|
277
280
|
|
278
|
-
|
281
|
+
Dir.chdir '..' do
|
282
|
+
system ctags_path, *ctags_args
|
283
|
+
end
|
279
284
|
end
|
280
285
|
|
281
286
|
##
|
282
287
|
# Writes the TAGS file in emacs style using the data in +tags+
|
283
288
|
|
284
289
|
def write_tags_emacs tags
|
285
|
-
open 'TAGS', 'wb' do |io|
|
290
|
+
open '../TAGS', 'wb' do |io|
|
286
291
|
tags.sort.each do |file, definitions|
|
287
292
|
section = []
|
288
293
|
|
@@ -301,7 +306,7 @@ class RDoc::Generator::Tags
|
|
301
306
|
# Writes the TAGS file in vim style using the data in +tags+
|
302
307
|
|
303
308
|
def write_tags_vim tags
|
304
|
-
open 'TAGS', 'w' do |io|
|
309
|
+
open '../TAGS', 'w' do |io|
|
305
310
|
io.write <<-INFO
|
306
311
|
!_TAG_FILE_FORMAT\t2\t/extended format/
|
307
312
|
!_TAG_FILE_SORTED\t1\t/sorted/
|
@@ -312,7 +317,13 @@ class RDoc::Generator::Tags
|
|
312
317
|
INFO
|
313
318
|
|
314
319
|
tags.sort.each do |name, definitions|
|
315
|
-
definitions.uniq
|
320
|
+
definitions = definitions.uniq
|
321
|
+
|
322
|
+
definitions = definitions.sort_by do |(file, address,*_)|
|
323
|
+
[file, address]
|
324
|
+
end
|
325
|
+
|
326
|
+
definitions.each do |(file, address, *field)|
|
316
327
|
io.write "#{name}\t#{file}\t#{address};\"\t#{field.join "\t"}\n"
|
317
328
|
end
|
318
329
|
end
|
data/lib/rdoc/tags_task.rb
CHANGED
@@ -62,7 +62,7 @@ class RDoc::TagsTask < Rake::TaskLib
|
|
62
62
|
attr_accessor :tags_file
|
63
63
|
|
64
64
|
##
|
65
|
-
# Tag style to output. Defaults to vim.
|
65
|
+
# Tag style to output. Defaults to vim, emacs is also supported.
|
66
66
|
|
67
67
|
attr_accessor :tag_style
|
68
68
|
|
@@ -77,8 +77,8 @@ class RDoc::TagsTask < Rake::TaskLib
|
|
77
77
|
@retag_task = names[:retag] || 'retag'
|
78
78
|
@tags_task = names[:tags] || 'tags'
|
79
79
|
|
80
|
-
@files = Rake::FileList.new
|
81
|
-
@tags_dir = '
|
80
|
+
@files = Rake::FileList.new 'lib/**/*.rb'
|
81
|
+
@tags_dir = './.rdoc'
|
82
82
|
@tags_file = 'TAGS'
|
83
83
|
@tag_style = 'vim'
|
84
84
|
|
@@ -141,7 +141,7 @@ class RDoc::TagsTask < Rake::TaskLib
|
|
141
141
|
|
142
142
|
directory @tags_dir
|
143
143
|
|
144
|
-
file @tags_file => [@tags_dir, Rake.application.rakefile,
|
144
|
+
file @tags_file => [@tags_dir, Rake.application.rakefile, *@files] do
|
145
145
|
build_tags
|
146
146
|
end
|
147
147
|
|
@@ -15,11 +15,12 @@ class TestRDocGeneratorTags < MiniTest::Unit::TestCase
|
|
15
15
|
|
16
16
|
@pwd = Dir.pwd
|
17
17
|
|
18
|
-
@tmpdir = File.join Dir.tmpdir, "test_rdoc_generator_tags_#{$$}"
|
18
|
+
@tmpdir = File.join Dir.tmpdir, "test_rdoc_generator_tags_#{$$}/.rdoc"
|
19
19
|
FileUtils.mkdir_p @tmpdir
|
20
20
|
Dir.chdir @tmpdir
|
21
21
|
|
22
22
|
@store = RDoc::Store.new
|
23
|
+
@store.path = @tmpdir
|
23
24
|
@g = RDoc::Generator::Tags.new @store, @options
|
24
25
|
|
25
26
|
@top_level = @store.add_file 'file.rb'
|
@@ -79,21 +80,24 @@ class TestRDocGeneratorTags < MiniTest::Unit::TestCase
|
|
79
80
|
assert_includes op.top.long, 'ctags-path'
|
80
81
|
assert_includes op.top.long, 'ctags-merge'
|
81
82
|
assert_includes op.top.long, 'tag-style'
|
82
|
-
|
83
|
+
assert options.update_output_dir
|
83
84
|
end
|
84
85
|
|
85
86
|
def test_find_ctags
|
86
|
-
|
87
|
+
skip 'no ctags on travis' if ENV['TRAVIS']
|
88
|
+
|
89
|
+
assert_match 'ctags', @g.find_ctags
|
87
90
|
end
|
88
91
|
|
89
92
|
def test_generate_emacs
|
90
93
|
@g.tag_style = :emacs
|
91
94
|
|
92
|
-
@g.generate
|
95
|
+
@g.generate
|
93
96
|
|
94
|
-
tags_file = File.join @tmpdir, 'TAGS'
|
97
|
+
tags_file = File.join @tmpdir, '../TAGS'
|
95
98
|
|
96
99
|
assert File.file? tags_file
|
100
|
+
assert File.file? File.join(@tmpdir, 'cache.ri')
|
97
101
|
|
98
102
|
tags = open tags_file, 'rb' do |io| io.read end.each_line
|
99
103
|
|
@@ -125,11 +129,12 @@ class TestRDocGeneratorTags < MiniTest::Unit::TestCase
|
|
125
129
|
def test_generate_vim
|
126
130
|
@g.tag_style = :vim
|
127
131
|
|
128
|
-
@g.generate
|
132
|
+
@g.generate
|
129
133
|
|
130
|
-
tags_file = File.join @tmpdir, 'TAGS'
|
134
|
+
tags_file = File.join @tmpdir, '../TAGS'
|
131
135
|
|
132
136
|
assert File.file? tags_file
|
137
|
+
assert File.file? File.join(@tmpdir, 'cache.ri')
|
133
138
|
|
134
139
|
tags = File.read(tags_file).each_line
|
135
140
|
|
@@ -178,7 +183,7 @@ class TestRDocGeneratorTags < MiniTest::Unit::TestCase
|
|
178
183
|
@options.dry_run = true
|
179
184
|
@g = RDoc::Generator::Tags.new @store, @options
|
180
185
|
|
181
|
-
@g.generate
|
186
|
+
@g.generate
|
182
187
|
|
183
188
|
refute File.exist? File.join(@tmpdir, 'TAGS')
|
184
189
|
end
|
metadata
CHANGED
@@ -1,107 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
|
-
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|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YOYBpDi+9PPmaH2RmLJu0dB/NylsDnW5j6yN1BEI8MfJRR+HRKZY
|
21
|
+
mUtgzBwF1V4KIZQ8EuL6I/nHVu07i6IkrpAgxpXUfdJQJi0oZAqXurAV3yTxkFwd
|
22
|
+
g62YrrW26mDe+pZBzR6bpLE+PmXCzz7UxUq3AE0gPHbiMXie3EFE0oxnsU3lIduh
|
23
|
+
sCANiQ8BAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
24
|
+
BBS5k4Z75VSpdM0AclG2UvzFA/VW5DAfBgNVHREEGDAWgRRkcmJyYWluQHNlZ21l
|
25
|
+
bnQ3Lm5ldDAfBgNVHRIEGDAWgRRkcmJyYWluQHNlZ21lbnQ3Lm5ldDANBgkqhkiG
|
26
|
+
9w0BAQUFAAOCAQEAOflo4Md5aJF//EetzXIGZ2EI5PzKWX/mMpp7cxFyDcVPtTv0
|
27
|
+
js/6zWrWSbd60W9Kn4ch3nYiATFKhisgeYotDDz2/pb/x1ivJn4vEvs9kYKVvbF8
|
28
|
+
V7MV/O5HDW8Q0pA1SljI6GzcOgejtUMxZCyyyDdbUpyAMdt9UpqTZkZ5z1sicgQk
|
29
|
+
5o2XJ+OhceOIUVqVh1r6DNY5tLVaGJabtBmJAYFVznDcHiSFybGKBa5n25Egql1t
|
30
|
+
KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
|
31
|
+
wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
42
34
|
dependencies:
|
43
35
|
- !ruby/object:Gem::Dependency
|
44
36
|
name: rdoc
|
45
37
|
requirement: !ruby/object:Gem::Requirement
|
46
38
|
requirements:
|
47
|
-
- -
|
39
|
+
- - ~>
|
48
40
|
- !ruby/object:Gem::Version
|
49
|
-
version: 4
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '5'
|
41
|
+
version: '4'
|
53
42
|
type: :runtime
|
54
43
|
prerelease: false
|
55
44
|
version_requirements: !ruby/object:Gem::Requirement
|
56
45
|
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 4.0.0.preview2
|
60
|
-
- - "<"
|
46
|
+
- - ~>
|
61
47
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
48
|
+
version: '4'
|
63
49
|
- !ruby/object:Gem::Dependency
|
64
50
|
name: minitest
|
65
51
|
requirement: !ruby/object:Gem::Requirement
|
66
52
|
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '4.3'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - "~>"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '4.3'
|
77
|
-
- !ruby/object:Gem::Dependency
|
78
|
-
name: ZenTest
|
79
|
-
requirement: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
53
|
+
- - ~>
|
82
54
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
55
|
+
version: '4.7'
|
84
56
|
type: :development
|
85
57
|
prerelease: false
|
86
58
|
version_requirements: !ruby/object:Gem::Requirement
|
87
59
|
requirements:
|
88
|
-
- -
|
60
|
+
- - ~>
|
89
61
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
62
|
+
version: '4.7'
|
91
63
|
- !ruby/object:Gem::Dependency
|
92
64
|
name: hoe
|
93
65
|
requirement: !ruby/object:Gem::Requirement
|
94
66
|
requirements:
|
95
|
-
- -
|
67
|
+
- - ~>
|
96
68
|
- !ruby/object:Gem::Version
|
97
|
-
version: '3.
|
69
|
+
version: '3.5'
|
98
70
|
type: :development
|
99
71
|
prerelease: false
|
100
72
|
version_requirements: !ruby/object:Gem::Requirement
|
101
73
|
requirements:
|
102
|
-
- -
|
74
|
+
- - ~>
|
103
75
|
- !ruby/object:Gem::Version
|
104
|
-
version: '3.
|
76
|
+
version: '3.5'
|
105
77
|
description: |-
|
106
78
|
A TAGS file generator that builds both vim and emacs style tags files. Vim
|
107
79
|
tags are based on http://ctags.sourceforge.net/FORMAT). rdoc-tags is
|
@@ -119,7 +91,7 @@ extra_rdoc_files:
|
|
119
91
|
- Manifest.txt
|
120
92
|
- README.txt
|
121
93
|
files:
|
122
|
-
-
|
94
|
+
- .autotest
|
123
95
|
- History.txt
|
124
96
|
- Manifest.txt
|
125
97
|
- README.txt
|
@@ -129,29 +101,29 @@ files:
|
|
129
101
|
- lib/rdoc/generator/tags.rb
|
130
102
|
- lib/rdoc/tags_task.rb
|
131
103
|
- test/test_rdoc_generator_tags.rb
|
132
|
-
-
|
104
|
+
- .gemtest
|
133
105
|
homepage: https://github.com/rdoc/rdoc-tags
|
134
106
|
licenses: []
|
135
107
|
metadata: {}
|
136
108
|
post_install_message:
|
137
109
|
rdoc_options:
|
138
|
-
-
|
110
|
+
- --main
|
139
111
|
- README.txt
|
140
112
|
require_paths:
|
141
113
|
- lib
|
142
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
143
115
|
requirements:
|
144
|
-
- -
|
116
|
+
- - '>='
|
145
117
|
- !ruby/object:Gem::Version
|
146
118
|
version: '0'
|
147
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
120
|
requirements:
|
149
|
-
- -
|
121
|
+
- - '>='
|
150
122
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
123
|
+
version: '0'
|
152
124
|
requirements: []
|
153
125
|
rubyforge_project: rdoc-tags
|
154
|
-
rubygems_version: 2.0.
|
126
|
+
rubygems_version: 2.0.3
|
155
127
|
signing_key:
|
156
128
|
specification_version: 4
|
157
129
|
summary: A TAGS file generator that builds both vim and emacs style tags files
|
metadata.gz.sig
CHANGED
Binary file
|