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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: d302f42dceca0175405ab44866d7aac30a3368b8
4
- data.tar.gz: 498704da8d37c899b33dcc62c3430e3f8bfac109
5
- !binary "U0hBNTEy":
6
- metadata.gz: bc80283b168ad70d0dc1a72a8853aac859e97c8a0c825ec272360f6cb5266b25a40b93d161dc5e60b4f243618b1ff51c3a67f83c71a80600ed7989477314939d
7
- data.tar.gz: 2dde955c834186b5e570a7f5ecea7bf845da62588b6e48225dbbb72db582bdca289df59e94508a30bc7ba0b0f5c4ef10a6b1fd0f065923f1acc8d0ae19452532
2
+ SHA1:
3
+ metadata.gz: b637e967af2f123d9f8d8907f9a9e0dcb23c802a
4
+ data.tar.gz: 0dbbea9a16df2f18d940bb4f0761c8d8fcba9ed9
5
+ SHA512:
6
+ metadata.gz: 48b458e225b7fcbb86374b1760c397a76c5a32c0c9febc303565917f6ea093a804d3f5175903b53a14a3d0033c121b96a0fd205709e45c1f5d1304136c79c029
7
+ data.tar.gz: 569aa48031bb322ba2adeee5d73793527d2a7ee7b4c69e0980385431fbd2df80601b21617186c2cf4ea1a70b4e5c7a8e3a24ccae937968b9a1805548d5e0d148
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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 create.rid file.
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.plugins.delete :rubyforge
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
- extra_deps << ['rdoc', '>= 4.0.0.preview2', '< 5']
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'
@@ -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.pre'
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 = true
68
- options.op_dir = '.'
69
- options.update_output_dir = false
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 from +top_levels+
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 top_levels
144
- when :emacs then generate_emacs top_levels
146
+ when 'vim', :vim then generate_vim
147
+ when 'emacs', :emacs then generate_emacs
145
148
  else
146
- raise RDoc::Error, "Unkown tag format #{@tag_style.inspect}"
149
+ raise RDoc::Error, "Unkown tag style #{@tag_style.inspect}"
147
150
  end
148
151
  end
149
152
 
150
153
  ##
151
- # Generates a TAGS file from +top_levels+ for emacs
154
+ # Generates an emacs TAGS file
152
155
 
153
- def generate_emacs top_levels
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
- top_levels.each do |top_level|
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 from +top_levels+ for vim
197
+ # Generates a vim TAGS file
195
198
 
196
- def generate_vim top_levels
199
+ def generate_vim
197
200
  tags = Hash.new { |h, name| h[name] = [] }
198
201
 
199
- top_levels.each do |top_level|
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
- system ctags_path, *ctags_args
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.each do |(file, address, *field)|
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
@@ -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, @files] do
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
- refute options.update_output_dir
83
+ assert options.update_output_dir
83
84
  end
84
85
 
85
86
  def test_find_ctags
86
- assert_equal '/usr/local/bin/ctags', @g.find_ctags
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 [@top_level]
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 [@top_level]
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 [@top_level]
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.pre
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
- - !binary |-
12
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURlRENDQW1DZ0F3SUJB
13
- Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJCTVJBd0RnWURWUVFEREFka2Nt
14
- SnkKWVdsdU1SZ3dGZ1lLQ1pJbWlaUHlMR1FCR1JZSWMyVm5iV1Z1ZERjeEV6
15
- QVJCZ29Ka2lhSmsvSXNaQUVaRmdOdQpaWFF3SGhjTk1USXdNakk0TVRjMU5E
16
- STFXaGNOTVRNd01qSTNNVGMxTkRJMVdqQkJNUkF3RGdZRFZRUUREQWRrCmNt
17
- SnlZV2x1TVJnd0ZnWUtDWkltaVpQeUxHUUJHUllJYzJWbmJXVnVkRGN4RXpB
18
- UkJnb0praWFKay9Jc1pBRVoKRmdOdVpYUXdnZ0VpTUEwR0NTcUdTSWIzRFFF
19
- QkFRVUFBNElCRHdBd2dnRUtBb0lCQVFDYmJnTHJHTEdJREU3NgpMVi9jdnhk
20
- RXpDdVl1UzNvRzlQclNabnVEd2V5U1VmZHAvc28wY0RxK2o4YnF5Nk96WlN3
21
- MDdnZGp3Rk1TZDZKClU1ZGRaQ1Z5d241bm5BUStVaTdqTVc1NENZdDUvSDZm
22
- MlVTNlUwaFFPakpSNmNwZml5bWd4R2RmeVRpVmN2VG0KR2ovb2tXclFsME5q
23
- WU9ZQnBEaSs5UFBtYUgyUm1MSnUwZEIvTnlsc0RuVzVqNnlOMUJFSThNZkpS
24
- UitIUktaWQptVXRnekJ3RjFWNEtJWlE4RXVMNkkvbkhWdTA3aTZJa3JwQWd4
25
- cFhVZmRKUUppMG9aQXFYdXJBVjN5VHhrRndkCmc2MllyclcyNm1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tLVaGJabtBmJAYFVznDcHiSFybGKBa5n25Egql1t
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.0.0.preview2
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: '5'
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: '0'
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: '0'
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.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.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
- - ".autotest"
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
- - ".gemtest"
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
- - "--main"
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: 1.3.1
123
+ version: '0'
152
124
  requirements: []
153
125
  rubyforge_project: rdoc-tags
154
- rubygems_version: 2.0.0.preview2.2
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