rspec-apidoc 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/apidoc.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1ff0187b5a8c5f96fb7fb0defbe0db044ba5cfff1935c02d4d6117903921d8
|
4
|
+
data.tar.gz: 1148d0d99ad0515247f98553e7fe1e4652f62bc0f363f07016e80e7229993753
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 581a39046185cf4ad93da1d5a42c8cb9f15a088971570d2331d3ff57cfd58a54a55cb658ac8cffdad8207598adfa6c281b684e3171d5b74a6fc5e2148d46d13a
|
7
|
+
data.tar.gz: 8000c199ef6ddaf9832183d7e1b11984f018d0f20d0126ed8df809319cdd49a063356e6030440986ebe56f563af5c6c135679f838fa58acaeeee1e117f727198
|
data/lib/rspec/apidoc.rb
CHANGED
@@ -85,15 +85,15 @@ module RSpec
|
|
85
85
|
action_name = spec.request.controller_instance.action_name
|
86
86
|
action_method = spec.request.controller_instance.method(action_name)
|
87
87
|
# Remove any `@param` or `@return` lines
|
88
|
-
action_comment =
|
89
|
-
|
88
|
+
action_comment = action_method.comment
|
89
|
+
.gsub(/^#(\s+)?$/, "\n").gsub(/^#(\s+)?/, '').gsub(/^@.*$/, '')
|
90
90
|
controller_class = spec.request.controller_class
|
91
91
|
controller_comment = nil
|
92
92
|
|
93
93
|
if action_method.respond_to?(:class_comment)
|
94
94
|
controller_comment = action_method.class_comment.gsub(
|
95
95
|
/.*frozen_string_literal:.*/, ''
|
96
|
-
).
|
96
|
+
).gsub(/^#(\s+)?$/, "\n").gsub(/^#(\s+)?/, '').gsub(/^@.*$/, '')
|
97
97
|
end
|
98
98
|
else
|
99
99
|
action_comment = nil
|