rspec-apib 0.3.2 → 0.3.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/apib/recorder.rb +5 -5
- data/lib/rspec/apib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 650ebb44b91802bd37d5af30874aff1d1e6aa44a
|
4
|
+
data.tar.gz: 82a51125d8ab6ad9ccb7f45395e79b1a1f49f57f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c3b67dbbe86084d2d24ba459762b0a7cb8e021d1940a34973bc29678fbff113a8a1b55edb6398899b9b0a64f6971f953f96ea08d6ecec709d7c6d8a7015d836
|
7
|
+
data.tar.gz: bfabc867f55cfcd1347a40f2959c861cbb7bfcb7f9f1ece715b59e0568b69dd447b3caf4998b1df0d86eb94e5d86977c320529cd918446470c88ecb6d8873be2
|
data/lib/rspec/apib/recorder.rb
CHANGED
@@ -154,8 +154,8 @@ module RSpec
|
|
154
154
|
return if lines.count < line
|
155
155
|
i = line -2
|
156
156
|
m = false
|
157
|
-
while (i >= 0 && lines[i].match(/\A\
|
158
|
-
if lines[i - 1].match(/\A\
|
157
|
+
while (i >= 0 && lines[i].match(/\A\s*#/)) do
|
158
|
+
if lines[i - 1].match(/\A\s*# --- apib/)
|
159
159
|
m = true
|
160
160
|
break
|
161
161
|
end
|
@@ -163,11 +163,11 @@ module RSpec
|
|
163
163
|
end
|
164
164
|
return unless m
|
165
165
|
result = []
|
166
|
-
while (i < line && lines[i].match(/\A\
|
167
|
-
if lines[i].match(/\A\
|
166
|
+
while (i < line && lines[i].match(/\A\s*#/)) do
|
167
|
+
if lines[i].match(/\A\s*# ---\s*\z/)
|
168
168
|
break
|
169
169
|
end
|
170
|
-
result << lines[i].sub(/^\
|
170
|
+
result << lines[i].sub(/^\s*#\s*/, '').strip
|
171
171
|
i += 1
|
172
172
|
end
|
173
173
|
return result.join("\n")
|
data/lib/rspec/apib/version.rb
CHANGED