yard-heuristics 1.2.0 → 1.2.1

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
2
  SHA1:
3
- metadata.gz: 2ef6b420a250a2fdfea079c60c2fcc989606c887
4
- data.tar.gz: 10858faf20695c998243c94e2b92f4d4e2d4e7b8
3
+ metadata.gz: 66ada068961bcfdec217560a9868a5618caf3e08
4
+ data.tar.gz: 538070e614dbfd7050ad51a7ce0d0e8d6cd405dd
5
5
  SHA512:
6
- metadata.gz: bb2f1c75cafee7dee1e602ed5f7f5aa113e2510c9560cbb408ccc273a73a56efb38a9fb5de3cedc87b23634b74ef2a2c3b77da3380469ad26bcd493b92d93dfd
7
- data.tar.gz: a64b570b41ab01e735dbf4838ca6fae4752db49c416336f0a9ec1cb698945c6f2ea5e3199d151eaef0dfd23dc31ead7db82ee59d164be9b35579623639204cca
6
+ metadata.gz: 25800d1425228179f67e8b29fb5f49eb2398b487dde72efa0329a21ef74665b9e38ebd65f1c7a4301dcd93c2ab346d34899d9dfbfcc9c4433df1e11c658120fe
7
+ data.tar.gz: 25480e624c7dc0518aef4ec283ce01ec74555d3b2a5a11bc8f31541cfa850624be014c055d3cf2e0bee1688564fb167ead19caa08fa51e78ef1aa403b4a32a51
@@ -105,7 +105,7 @@ end
105
105
  module YARD::Templates::Helpers::HtmlHelper
106
106
  alias yardheuristics_saved_htmlify htmlify
107
107
  def htmlify(text, markup = options.markup)
108
- yardheuristics_saved_htmlify(text, markup).gsub(/\b([[:upper:]]+)(th)?\b/){
108
+ yardheuristics_saved_htmlify(text, markup).gsub(/\b([[:upper:]_]+)(th)?\b/){
109
109
  if $`.end_with?('$') or not YARD::CodeObjects::MethodObject === object
110
110
  $&
111
111
  else
@@ -3,7 +3,7 @@
3
3
  require 'inventory-1.0'
4
4
 
5
5
  module YARDHeuristics
6
- Version = Inventory.new(1, 2, 0){
6
+ Version = Inventory.new(1, 2, 1){
7
7
  def dependencies
8
8
  super + Inventory::Dependencies.new{
9
9
  development 'inventory-rake', 1, 4, 0
@@ -108,6 +108,7 @@ EOS
108
108
  YARD::Registry.at('#a').docstring.tags(:param).last.types
109
109
  end
110
110
 
111
+ =begin Disabled due to bug in YARD
111
112
  expect [%w'self'] do
112
113
  YARD::Registry.clear
113
114
  YARD::Parser::SourceParser.parse_string(<<EOS)
@@ -120,6 +121,7 @@ end
120
121
  EOS
121
122
  YARD::Registry.at('#<<').docstring.tags(:return).map{ |e| e.types }
122
123
  end
124
+ =end
123
125
 
124
126
  expect 'Emphasizes <em class="parameter">parameter</em>.' do
125
127
  YARD::Registry.clear
@@ -169,6 +171,30 @@ EOS
169
171
  }
170
172
  end
171
173
 
174
+ expect 'The <em class="parameter">a_b</em> parameter.' do
175
+ YARD::Registry.clear
176
+ YARD::Parser::SourceParser.parse_string(<<EOS)
177
+ # The A_B parameter.
178
+ def a(a_b)
179
+ end
180
+ EOS
181
+ Module.new{
182
+ class << self
183
+ include YARD::Templates::Helpers::HtmlHelper
184
+ def options
185
+ YARD::Templates::TemplateOptions.new{ |o|
186
+ o.reset_defaults
187
+ }
188
+ end
189
+ def object
190
+ YARD::Registry.at('#a')
191
+ end
192
+ end
193
+ }.instance_eval{
194
+ htmlify(YARD::Registry.at('#a').docstring)
195
+ }
196
+ end
197
+
172
198
  expect 'The value of $VERBOSE.' do
173
199
  YARD::Registry.clear
174
200
  YARD::Parser::SourceParser.parse_string(<<EOS)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-heuristics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolai Weibull
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-30 00:00:00.000000000 Z
11
+ date: 2013-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inventory
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  requirements: []
290
290
  rubyforge_project:
291
- rubygems_version: 2.0.0
291
+ rubygems_version: 2.0.3
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: values for YARD documentation that doesn’t explicitly document it.