yard 0.8.2.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

Files changed (72) hide show
  1. data/ChangeLog +246 -0
  2. data/README.md +12 -2
  3. data/Rakefile +19 -51
  4. data/benchmarks/format_args.rb +3 -3
  5. data/benchmarks/pathname_vs_string.rb +4 -4
  6. data/benchmarks/template_format.rb +1 -1
  7. data/docs/Templates.md +21 -21
  8. data/docs/WhatsNew.md +16 -2
  9. data/lib/yard.rb +23 -3
  10. data/lib/yard/autoload.rb +14 -13
  11. data/lib/yard/cli/command.rb +11 -3
  12. data/lib/yard/cli/command_parser.rb +4 -4
  13. data/lib/yard/cli/config.rb +2 -2
  14. data/lib/yard/cli/diff.rb +60 -16
  15. data/lib/yard/cli/graph.rb +5 -2
  16. data/lib/yard/cli/help.rb +1 -1
  17. data/lib/yard/cli/list.rb +2 -2
  18. data/lib/yard/cli/server.rb +80 -13
  19. data/lib/yard/cli/stats.rb +8 -8
  20. data/lib/yard/cli/yardoc.rb +32 -78
  21. data/lib/yard/cli/yardopts_command.rb +109 -0
  22. data/lib/yard/cli/yri.rb +2 -2
  23. data/lib/yard/code_objects/base.rb +3 -1
  24. data/lib/yard/code_objects/extra_file_object.rb +45 -6
  25. data/lib/yard/core_ext/file.rb +1 -1
  26. data/lib/yard/docstring.rb +10 -1
  27. data/lib/yard/i18n/locale.rb +11 -3
  28. data/lib/yard/i18n/message.rb +1 -1
  29. data/lib/yard/logging.rb +32 -7
  30. data/lib/yard/parser/ruby/ruby_parser.rb +8 -3
  31. data/lib/yard/parser/source_parser.rb +1 -2
  32. data/lib/yard/rake/yardoc_task.rb +1 -2
  33. data/lib/yard/registry.rb +20 -1
  34. data/lib/yard/registry_store.rb +15 -1
  35. data/lib/yard/rubygems/backports/gem.rb +6 -5
  36. data/lib/yard/rubygems/backports/source_index.rb +17 -0
  37. data/lib/yard/rubygems/doc_manager.rb +1 -1
  38. data/lib/yard/server/commands/static_file_command.rb +17 -10
  39. data/lib/yard/server/library_version.rb +2 -2
  40. data/lib/yard/server/rack_adapter.rb +3 -3
  41. data/lib/yard/server/templates/default/layout/html/setup.rb +1 -1
  42. data/lib/yard/tags/directives.rb +1 -1
  43. data/lib/yard/templates/helpers/html_helper.rb +6 -4
  44. data/lib/yard/templates/template.rb +13 -1
  45. data/lib/yard/version.rb +3 -0
  46. data/spec/cli/config_spec.rb +2 -2
  47. data/spec/cli/diff_spec.rb +110 -23
  48. data/spec/cli/graph_spec.rb +12 -5
  49. data/spec/cli/help_spec.rb +1 -1
  50. data/spec/cli/server_spec.rb +243 -153
  51. data/spec/cli/stats_spec.rb +1 -1
  52. data/spec/cli/yardoc_spec.rb +36 -0
  53. data/spec/code_objects/base_spec.rb +15 -0
  54. data/spec/code_objects/constants_spec.rb +1 -1
  55. data/spec/code_objects/extra_file_object_spec.rb +15 -3
  56. data/spec/docstring_parser_spec.rb +4 -0
  57. data/spec/docstring_spec.rb +18 -0
  58. data/spec/handlers/module_function_handler_spec.rb +23 -0
  59. data/spec/i18n/locale_spec.rb +7 -1
  60. data/spec/parser/ruby/ruby_parser_spec.rb +26 -0
  61. data/spec/parser/source_parser_spec.rb +18 -6
  62. data/spec/rake/yardoc_task_spec.rb +28 -19
  63. data/spec/registry_spec.rb +34 -0
  64. data/spec/registry_store_spec.rb +10 -0
  65. data/spec/rubygems/doc_manager_spec.rb +1 -1
  66. data/spec/server/commands/static_file_command_spec.rb +3 -3
  67. data/spec/spec_helper.rb +22 -3
  68. data/spec/templates/helpers/html_helper_spec.rb +10 -8
  69. data/templates/default/fulldoc/html/frames.erb +1 -1
  70. data/templates/default/fulldoc/html/setup.rb +1 -1
  71. data/yard.gemspec +24 -0
  72. metadata +7 -5
data/ChangeLog CHANGED
@@ -1,7 +1,253 @@
1
+ 2012-10-15 Loren Segal <lsegal@soen.ca>
2
+
3
+ * ChangeLog, README.md, docs/WhatsNew.md, lib/yard/version.rb: Bump to
4
+ version 0.8.3
5
+
6
+ * lib/yard/server/commands/static_file_command.rb,
7
+ spec/server/commands/static_file_command_spec.rb: StaticFileCommand should
8
+ look in default/fulldoc/html for assets Fixes #598
9
+
10
+ * lib/yard/cli/server.rb: Cleanup Server CLI to only parse options files for
11
+ --db References #589
12
+
13
+ * lib/yard/autoload.rb, lib/yard/cli/command.rb, lib/yard/cli/graph.rb,
14
+ lib/yard/cli/yardoc.rb, lib/yard/cli/yardopts_command.rb,
15
+ spec/cli/graph_spec.rb, spec/cli/server_spec.rb: Add YardoptsCommand to
16
+ abstract commands that read .yardopts Graph and Yardoc commands now subclass
17
+ YardoptsCommand. Moved all yardopts/document handling into that class. Fixes
18
+ #583 Closes #585, #589
19
+
20
+ 2012-10-14 Loren Segal <lsegal@soen.ca>
21
+
22
+ * lib/yard/templates/template.rb: Code formatting fixes and add cache reset
23
+ method Closes #582
24
+
25
+ 2012-07-31 Nikolai Weibull <now@bitwi.se>
26
+
27
+ * lib/yard/templates/template.rb: Cache the result of
28
+ Templates::Template#full_paths Templates::Template#full_paths gets called a
29
+ lot and caching its result shaves off a lot of the total run time of
30
+ documentation generation.
31
+
32
+ 2012-10-14 Loren Segal <lsegal@soen.ca>
33
+
34
+ * Gemfile, Rakefile, spec/spec_helper.rb: Replace rspec rake task and add
35
+ SimpleCov support New specs task avoids printing the lengthy file list only
36
+ if tests fail (or if --trace is used), and sort the file list so there are no
37
+ more env-specific test failures related to file load order. Tests should no
38
+ longer fail due to the way the underlying file system returns globs to Ruby.
39
+
40
+ 2012-10-13 Loren Segal <lsegal@soen.ca>
41
+
42
+ * spec/docstring_parser_spec.rb: Cleanup after docstring parser spec
43
+
44
+ * .travis.yml, Rakefile: Travis no longer supports 1.8.6
45
+
46
+ * templates/default/fulldoc/html/frames.erb: Frames page should use charset
47
+
48
+ * spec/cli/server_spec.rb: Cleanup adapter mocking
49
+
50
+ * spec/templates/helpers/html_helper_spec.rb: Only perform autolinking test
51
+ in redcarpet
52
+
53
+ * Gemfile, spec/spec_helper.rb: Update Gemfile and load deps in tests if
54
+ Bundler is present
55
+
56
+ 2012-10-05 Loren Segal <lsegal@soen.ca>
57
+
58
+ * .../server/templates/default/layout/html/setup.rb: Remove reference to
59
+ live.js in template Fixes #603
60
+
61
+ 2012-09-28 Anton <astyagun@gmail.com>
62
+
63
+ * lib/yard/tags/directives.rb: Fixed backslash escaping in documentation
64
+
65
+ 2012-09-12 Alexander Pepper <alexander.pepper@infopark.de>
66
+
67
+ * templates/default/fulldoc/html/setup.rb: [Bugfix] Only show toggle, when
68
+ visible children are present.
69
+
70
+ 2012-08-08 Loren Segal <lsegal@soen.ca>
71
+
72
+ * yard.gemspec: Package the gemspec file in the gem for tests. Yo dawg, I
73
+ heard you like testing so I put a gemspec in your gemspec so you can test the
74
+ gem while you gem install. Fixes #588
75
+
76
+ 2012-08-08 David Barri <japgolly@gmail.com>
77
+
78
+ * lib/yard/cli/server.rb, spec/cli/server_spec.rb: Updated Server CLI changes
79
+ based on feedback from lsegal. * Removed require_relative * RSpec context =>
80
+ describe * Completely mock out FS for testing
81
+
82
+ 2012-08-06 Loren Segal <lsegal@soen.ca>
83
+
84
+ * lib/yard/parser/ruby/ruby_parser.rb, spec/parser/ruby/ruby_parser_spec.rb:
85
+ Properly insert comment nodes and check for attached comments in proper order
86
+
87
+ * lib/yard/parser/ruby/ruby_parser.rb: Properly handle embedded doc comments
88
+ (=begin/=end) Fixes #577 Closes #578
89
+
90
+ * lib/yard/rubygems/backports/gem.rb: Undef source_index safely
91
+
92
+ * lib/yard/logging.rb: Disable progress indication in Windows (poor ANSI
93
+ support)
94
+
95
+ * lib/yard.rb, lib/yard/templates/helpers/html_helper.rb,
96
+ spec/code_objects/constants_spec.rb,
97
+ spec/code_objects/extra_file_object_spec.rb,
98
+ spec/parser/source_parser_spec.rb,
99
+ spec/templates/helpers/html_helper_spec.rb: Add YARD.windows?, YARD.ruby18?
100
+ and YARD.ruby19? Deprecate RUBY18 and RUBY19 constant usage and replace
101
+ constants with ruby18? and ruby19? calls
102
+
103
+ * lib/yard/rubygems/backports/gem.rb,
104
+ lib/yard/rubygems/backports/source_index.rb: Cleanup warnings in RubyGems
105
+ backports
106
+
107
+ * lib/yard/core_ext/file.rb: Remove Ruby warning
108
+
109
+ * spec/rubygems/doc_manager_spec.rb: Attempt to load yard gemspec properly,
110
+ references #579
111
+
112
+ * lib/yard/cli/diff.rb, spec/cli/diff_spec.rb: Make diff code 1.8 compatible
113
+
114
+ * lib/yard/rubygems/doc_manager.rb: Remove 1.8 warning on loading yard from
115
+ rubygems
116
+
117
+ * spec/cli/server_spec.rb: Fix test failures in server specs Fixes #576
118
+
119
+ 2012-08-02 David Barri <japgolly@gmail.com>
120
+
121
+ * lib/yard/cli/server.rb, spec/cli/server_spec.rb: Server CLI now reads
122
+ .yardopts files, and works with alternate yardoc db paths.
123
+
124
+ 2012-07-15 Loren Segal <lsegal@soen.ca>
125
+
126
+ * lib/yard/logging.rb: Clear progress lines when printing severity messages
127
+
128
+ * lib/yard/code_objects/base.rb, spec/code_objects/base_spec.rb: Handle
129
+ creation of objects with complex object paths when path starts with "::"
130
+ Closes #552
131
+
132
+ * benchmarks/format_args.rb, benchmarks/pathname_vs_string.rb,
133
+ benchmarks/template_format.rb, lib/yard/cli/command.rb,
134
+ lib/yard/cli/command_parser.rb, lib/yard/cli/config.rb, lib/yard/cli/diff.rb,
135
+ lib/yard/cli/help.rb, lib/yard/cli/list.rb, lib/yard/cli/stats.rb,
136
+ lib/yard/cli/yardoc.rb, lib/yard/cli/yri.rb, lib/yard/logging.rb,
137
+ lib/yard/server/rack_adapter.rb, spec/cli/config_spec.rb,
138
+ spec/cli/diff_spec.rb, spec/cli/help_spec.rb, spec/cli/stats_spec.rb,
139
+ spec/spec_helper.rb: Centralize all printing through Logger so progress
140
+ indicator can be properly cleared.
141
+
142
+ 2012-07-15 Benoit Daloze <eregontp@gmail.com>
143
+
144
+ * lib/yard/server/library_version.rb: fix for ruby 2.0.0 with respond_to?
145
+ returning false for protected methods
146
+
147
+ 2012-07-14 Loren Segal <lsegal@soen.ca>
148
+
149
+ * lib/yard/parser/source_parser.rb, spec/parser/source_parser_spec.rb:
150
+ SourceParser should only sort file list on globs Closes #572
151
+
152
+ * lib/yard/cli/yardoc.rb, spec/cli/yardoc_spec.rb: Add --non-transitive-tag
153
+ TAG to mark a tag as not transitive Closes #571
154
+
155
+ * lib/yard/rake/yardoc_task.rb, spec/rake/yardoc_task_spec.rb: Only
156
+ parse_arguments one time in YardocTask Closes #559
157
+
158
+ * spec/rake/yardoc_task_spec.rb: Fix formatting of specs in
159
+ yardoc_task_spec.rb
160
+
161
+ * lib/yard/docstring.rb, spec/docstring_spec.rb: Don't add period to summary
162
+ if entire summary is `{include:...}` expression. Closes #569
163
+
164
+ * spec/handlers/module_function_handler_spec.rb: Test that module function
165
+ properly copies all tags Fix based on
166
+ 72de4e624b466b69b4f4f0a90e64b252cbe82174 Closes #563
167
+
168
+ * lib/yard/docstring.rb, spec/docstring_spec.rb: Fix Docstring#to_raw for
169
+ `@option` tags Implementation by @ConradIrwin
170
+
171
+ 2012-07-08 Loren Segal <lsegal@soen.ca>
172
+
173
+ * lib/yard/cli/diff.rb, spec/cli/diff_spec.rb: Add --query and --no-modified.
174
+ Diff now shows modified objects and allows queries
175
+
176
+ 2012-06-20 yuta yamada <yamada@clear-code.com>
177
+
178
+ * docs/Templates.md: Fix indentation for markdown
179
+
180
+ * docs/WhatsNew.md: Fix a typo (unsed -> used)
181
+
182
+ * lib/yard/i18n/message.rb: Fix a typo (appered -> appeared)
183
+
184
+ * docs/WhatsNew.md: Fix a typo (afformentioned -> aforementioned)
185
+
186
+ * docs/Templates.md: Fix a typo (explcitly -> explicity)
187
+
188
+ * : Add translated document for Japanese
189
+
190
+ 2012-06-19 Kouhei Sutou <kou@clear-code.com>
191
+
192
+ * lib/yard/cli/yardoc.rb, lib/yard/registry.rb, lib/yard/registry_store.rb,
193
+ spec/cli/yardoc_spec.rb, spec/registry_spec.rb, spec/registry_store_spec.rb:
194
+ i18n: add --po-dir option
195
+
196
+ 2012-06-10 Kouhei Sutou <kou@clear-code.com>
197
+
198
+ * lib/yard/cli/yardoc.rb, spec/cli/yardoc_spec.rb: i18n: add --locale option
199
+ to "yard doc" It specifies generated document's locale. For now, extra files
200
+ are only translated with messages in po/#{locale}.po.
201
+
202
+ * lib/yard/code_objects/extra_file_object.rb,
203
+ spec/code_objects/extra_file_object_spec.rb: i18n: support ExtraFileObject
204
+ contents translation Attributes are also translated. Contents are parsed
205
+ lazy. You can change ExtraFileObject's locale by ExtraFileObject#locale=.
206
+
207
+ * lib/yard/registry.rb, spec/registry_spec.rb: i18n: add locale loading
208
+ feature to YARD::Registry
209
+
210
+ * lib/yard/registry_store.rb, spec/registry_store_spec.rb: i18n: add locale
211
+ loading feature to YARD::RegistryStore
212
+
213
+ * lib/yard/i18n/locale.rb: i18n: don't try load .po for the default locale
214
+ name The default locale name is nil.
215
+
216
+ 2012-06-19 Kouhei Sutou <kou@clear-code.com>
217
+
218
+ * lib/yard/i18n/locale.rb: i18n: show help message to enable i18n feature
219
+
220
+ 2012-06-16 Loren Segal <lsegal@soen.ca>
221
+
222
+ * lib/yard/templates/helpers/html_helper.rb: Fix intra-emphasis for redcarpet
223
+ Closes #557
224
+
225
+ 2012-06-15 Andy Caldwell <andy.m.caldwell@googlemail.com>
226
+
227
+ * lib/yard/parser/ruby/ast_node.rb, yard.gemspec: Tidy up pull request
228
+
229
+ 2012-06-14 Andy Caldwell <andy.m.caldwell@googlemail.com>
230
+
231
+ * lib/yard.rb, lib/yard/parser/ruby/ast_node.rb, lib/yard/version.rb,
232
+ yard.gemspec: Allow yard to be launched by 'bundle exec' by separating
233
+ version from yard.rb
234
+
235
+ 2012-06-11 Loren Segal <lsegal@soen.ca>
236
+
237
+ * lib/yard/cli/diff.rb: Ensure dir switching is cleaned up properly in case
238
+ of exception
239
+
240
+ * lib/yard/cli/diff.rb, spec/cli/diff_spec.rb: Add --compact to yard diff
241
+
1
242
  2012-06-10 Loren Segal <lsegal@soen.ca>
2
243
 
3
244
  * ChangeLog, README.md, lib/yard.rb: Bump to 0.8.2.1
4
245
 
246
+ 2012-06-10 Kouhei Sutou <kou@clear-code.com>
247
+
248
+ * lib/yard/i18n/locale.rb, spec/i18n/locale_spec.rb: i18n: make gettext gem
249
+ optional Require gettext related files lazy and ignore LoadError.
250
+
5
251
  2012-06-09 Loren Segal <lsegal@soen.ca>
6
252
 
7
253
  * lib/yard/options.rb, spec/options_spec.rb: Ensure that defaults are
data/README.md CHANGED
@@ -8,8 +8,8 @@ YARD: Yay! A Ruby Documentation Tool
8
8
  **Contributors**: See Contributors section below
9
9
  **Copyright**: 2007-2012
10
10
  **License**: MIT License
11
- **Latest Version**: 0.8.2.1 (codename "Shave It")
12
- **Release Date**: June 10th 2012
11
+ **Latest Version**: 0.8.3 (codename "Rainier")
12
+ **Release Date**: October 15th 2012
13
13
 
14
14
  Synopsis
15
15
  --------
@@ -286,6 +286,16 @@ More options can be seen by typing `yard graph --help`, but here is an example:
286
286
 
287
287
  ## Changelog
288
288
 
289
+ - **October.14.12**: 0.8.3 release
290
+ - Add `--non-transitive-tag` to disable tag transitivity (#571)
291
+ - Support --db inside .yardopts for graph/server commands (#583, #586)
292
+ - Fix handling for =begin/=end docstrings (#577, #578)
293
+ - Parser only sorts file lists when a glob is provided (#572)
294
+ - Fix formatting in `{include:Object#method}` syntax (#569)
295
+ - Fix @option tag inside of module functions (#563)
296
+ - Fix to `--api` and `--no-api` support (#559)
297
+ - Fix class nesting issues when path starts with "::" (#552)
298
+
289
299
  - **June.9.12**: 0.8.2.1 release
290
300
  - Fix a set of regressions in yard server search and dynamic generation
291
301
 
data/Rakefile CHANGED
@@ -19,6 +19,7 @@ end
19
19
  begin
20
20
  require 'rvm-tester'
21
21
  RVM::Tester::TesterTask.new do |t|
22
+ t.rubies = %w(1.8.6 ree jruby 1.8.7 1.9.2 1.9.3)
22
23
  t.bundle_install = false # don't need to do this all the time
23
24
  t.verbose = true
24
25
  end
@@ -26,67 +27,34 @@ rescue LoadError
26
27
  end
27
28
 
28
29
  task :travis_ci do
29
- status = 0
30
30
  ENV['SUITE'] = '1'
31
31
  ENV['CI'] = '1'
32
- system "bundle exec rake specs"
33
- status = 1 if $?.to_i != 0
32
+ ENV['LEGACY'] = nil
33
+ Rake::Task['specs'].execute
34
34
  if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
35
35
  puts ""
36
36
  puts "Running specs with in legacy mode"
37
- system "bundle exec rake specs LEGACY=1"
38
- status = 1 if $?.to_i != 0
37
+ ENV['LEGACY'] = '1'
38
+ Rake::Task['specs'].execute
39
39
  end
40
- exit(status)
41
40
  end
42
41
 
43
- begin
44
- hide = '_spec\.rb$,spec_helper\.rb$,ruby_lex\.rb$,autoload\.rb$'
45
- if YARD::Parser::SourceParser.parser_type == :ruby
46
- hide += ',legacy\/.+_handler'
47
- else
48
- hide += ',ruby_parser\.rb$,ast_node\.rb$,handlers\/ruby\/[^\/]+\.rb$'
49
- end
50
-
51
- require 'rspec'
52
- require 'rspec/core/rake_task'
53
-
54
- desc "Run all specs"
55
- RSpec::Core::RakeTask.new("specs") do |t|
56
- $DEBUG = true if ENV['DEBUG']
57
- t.rspec_opts = ENV['SUITE'] ? [] : ['-c']
58
- t.rspec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
59
- t.rspec_opts += ['-I', YARD::ROOT]
60
- t.pattern = "spec/**/*_spec.rb"
61
- t.verbose = $DEBUG ? true : false
62
-
63
- if ENV['RCOV']
64
- t.rcov = true
65
- t.rcov_opts = ['-x', hide]
66
- end
67
- end
68
- task :spec => :specs
69
- rescue LoadError
70
- begin # Try for rspec 1.x
71
- require 'spec'
72
- require 'spec/rake/spectask'
73
-
74
- Spec::Rake::SpecTask.new("specs") do |t|
75
- $DEBUG = true if ENV['DEBUG']
76
- t.spec_opts = ["--format", "specdoc", "--colour"]
77
- t.spec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
78
- t.pattern = "spec/**/*_spec.rb"
79
-
80
- if ENV['RCOV']
81
- t.rcov = true
82
- t.rcov_opts = ['-x', hide]
83
- end
84
- end
85
- task :spec => :specs
86
- rescue LoadError
87
- warn "warn: RSpec tests not available. `gem install rspec` to enable them."
42
+ desc "Run all specs"
43
+ task :specs do
44
+ opts = ['rspec', '-c']
45
+ opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
46
+ opts += ['-I', YARD::ROOT]
47
+ if ENV['DEBUG']
48
+ $DEBUG = true
49
+ opts += ['-d']
88
50
  end
51
+ opts += FileList["spec/**/*_spec.rb"].sort
52
+ cmd = opts.join(' ')
53
+ puts cmd if Rake.application.options.trace
54
+ system(cmd)
55
+ raise "Command failed with status (#{$?.to_i}): #{cmd}" if $?.to_i != 0
89
56
  end
57
+ task :spec => :specs
90
58
 
91
59
  YARD::Rake::YardocTask.new do |t|
92
60
  t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
@@ -21,9 +21,9 @@ end
21
21
  YARD::Registry.load
22
22
  $object = YARD::Registry.at('YARD::Generators::Base#G')
23
23
 
24
- puts "regex: " + format_args_regex($object)
25
- puts "params: " + format_args_parameters($object)
26
- puts
24
+ log.puts "regex: " + format_args_regex($object)
25
+ log.puts "params: " + format_args_parameters($object)
26
+ log.puts
27
27
 
28
28
  TIMES = 100_000
29
29
  Benchmark.bmbm do |x|
@@ -7,7 +7,7 @@ strobj = "a/b/c"
7
7
 
8
8
  TIMES = 1_000
9
9
 
10
- puts "join:"
10
+ log.puts "join:"
11
11
  Benchmark.bmbm do |x|
12
12
  x.report("pathname") { TIMES.times { Pathname.new("a/b/c").join("d", "e", "f") } }
13
13
  x.report("string ") { TIMES.times { File.join("a/b/c", "d", "e", "f") } }
@@ -15,9 +15,9 @@ Benchmark.bmbm do |x|
15
15
  x.report("string-sameobject ") { TIMES.times { File.join(strobj, "d", "e", "f") } }
16
16
  end
17
17
 
18
- puts
19
- puts
20
- puts "cleanpath:"
18
+ log.puts
19
+ log.puts
20
+ log.puts "cleanpath:"
21
21
  Benchmark.bmbm do |x|
22
22
  x.report("pathname") { TIMES.times { Pathname.new("a/b//.././c").cleanpath } }
23
23
  x.report("string ") { TIMES.times { File.cleanpath("a/b//.././c") } }
@@ -3,4 +3,4 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'yard')
3
3
 
4
4
  YARD::Registry.load_yardoc(File.join(File.dirname(__FILE__), '..', '.yardoc'))
5
5
  obj = YARD::Registry.at("YARD::CodeObjects::Base")
6
- puts Benchmark.measure { obj.format(:format => :html) }
6
+ log.puts Benchmark.measure { obj.format(:format => :html) }
data/docs/Templates.md CHANGED
@@ -138,7 +138,7 @@ Every template should have at least one `setup.rb` file that defines the
138
138
  {YARD::Templates::Template#init #init} method to set the
139
139
  {YARD::Templates::Template#sections #sections} used by the template. If
140
140
  a setup.rb is not defined in the template itself, there should be a template
141
- that is inherited (via parent directory or explcitly) that sets the sections
141
+ that is inherited (via parent directory or explicitly) that sets the sections
142
142
  on a newly created template.
143
143
 
144
144
  A standard setup.rb file looks like:
@@ -347,33 +347,33 @@ field menus) generated from the base `layout` template:
347
347
  1. Define your own custom stylesheet and/or javascript file
348
348
  (default/ is the default template name inside of the /template root directory):
349
349
 
350
- /template/default/:
351
- |-- fulldoc
352
- | |-- html
353
- | | |-- css
354
- | | | |-- custom.css
355
- | | |-- js
356
- | | | |-- custom.js
350
+ /template/default/:
351
+ |-- fulldoc
352
+ | |-- html
353
+ | | |-- css
354
+ | | | |-- custom.css
355
+ | | |-- js
356
+ | | | |-- custom.js
357
357
 
358
358
  2. Create a `setup.rb` in the `layout` template directory and override the methods
359
359
  `stylesheets` and `javascripts`. The path to the template would be:
360
360
 
361
- /template/default/:
362
- |-- layout
363
- | |-- html
364
- | | |-- setup.rb
361
+ /template/default/:
362
+ |-- layout
363
+ | |-- html
364
+ | | |-- setup.rb
365
365
 
366
- And the code would look like:
366
+ And the code would look like:
367
367
 
368
- def stylesheets
369
- # Load the existing stylesheets while appending the custom one
370
- super + %w(css/custom.css)
371
- end
368
+ def stylesheets
369
+ # Load the existing stylesheets while appending the custom one
370
+ super + %w(css/custom.css)
371
+ end
372
372
 
373
- def javascripts
374
- # Load the existing javascripts while appending the custom one
375
- super + %w(js/custom.js)
376
- end
373
+ def javascripts
374
+ # Load the existing javascripts while appending the custom one
375
+ super + %w(js/custom.js)
376
+ end
377
377
 
378
378
 
379
379
  To load additional stylesheets and javascripts for the search menus loaded from