yard-heuristics 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/yard-heuristics-1.0.rb +1 -1
- data/lib/yard-heuristics-1.0/version.rb +1 -1
- data/test/unit/yard-heuristics-1.0.rb +26 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66ada068961bcfdec217560a9868a5618caf3e08
|
4
|
+
data.tar.gz: 538070e614dbfd7050ad51a7ce0d0e8d6cd405dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25800d1425228179f67e8b29fb5f49eb2398b487dde72efa0329a21ef74665b9e38ebd65f1c7a4301dcd93c2ab346d34899d9dfbfcc9c4433df1e11c658120fe
|
7
|
+
data.tar.gz: 25480e624c7dc0518aef4ec283ce01ec74555d3b2a5a11bc8f31541cfa850624be014c055d3cf2e0bee1688564fb167ead19caa08fa51e78ef1aa403b4a32a51
|
data/lib/yard-heuristics-1.0.rb
CHANGED
@@ -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
|
@@ -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.
|
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-
|
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.
|
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.
|