yard-minitest-spec 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yard-minitest-spec/handler.rb +9 -6
- data/yard-minitest-spec.gemspec +1 -1
- metadata +1 -2
- data.tar.gz.asc +0 -7
- metadata.gz.asc +0 -7
@@ -1,25 +1,28 @@
|
|
1
1
|
|
2
|
+
# This class handles define statements
|
2
3
|
class YardMiniTestSpecDescribeHandler < YARD::Handlers::Ruby::Base
|
3
4
|
handles method_call(:describe)
|
4
5
|
|
6
|
+
# process the define statement
|
5
7
|
def process
|
6
8
|
meth = statement.method_name(true).to_s
|
7
|
-
mod = register ModuleObject.new(namespace, 'spec')
|
8
9
|
|
9
10
|
name = statement.parameters.first.jump(:string_content).source
|
10
|
-
(
|
11
|
-
parse_block(statement.last.last, owner:
|
12
|
-
|
11
|
+
(namespace[:mtsdh] ||= []).push name
|
12
|
+
parse_block(statement.last.last, owner: namespace)
|
13
|
+
namespace[:mtsdh].pop
|
13
14
|
nil
|
14
|
-
rescue YARD::Handlers::NamespaceMissingError
|
15
|
+
rescue YARD::Handlers::Ruby::NamespaceMissingError
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
19
|
+
# This class handles it statements
|
18
20
|
class YardMiniTestSpecItHandler < YARD::Handlers::Ruby::Base
|
19
21
|
handles method_call(:it)
|
20
22
|
|
23
|
+
# process the it statement
|
21
24
|
def process
|
22
|
-
array = owner[:
|
25
|
+
array = owner[:mtsdh].dup
|
23
26
|
|
24
27
|
return nil unless array
|
25
28
|
if array.size > 1
|
data/yard-minitest-spec.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-minitest-spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -67,4 +67,3 @@ signing_key:
|
|
67
67
|
specification_version: 3
|
68
68
|
summary: YARD plugin to list MiniTest::Spec specifications inside documentation
|
69
69
|
test_files: []
|
70
|
-
has_rdoc:
|
data.tar.gz.asc
DELETED