grape-dsl 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/grape-dsl/doc.rb +11 -5
- 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: 5d7f0e1da4083899e3f9f29e9f005cd37516fa52
|
4
|
+
data.tar.gz: 65b5b347c5c2d40a0d0c59a7cd544e506e42ac3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec22bd9a3ddb8c4854ca1644c13130bb003f106339ba161afbf22480395e78907cf560ec6dff79c8c4199f8949e88e2670ede0d2a510e515d013c03559c5bcae
|
7
|
+
data.tar.gz: 34ac2f981b70dff8472578453afcec80822f1148411563e0cbd68ca660faa3f87c7417f78bc89c7b6f75c3cca5ace19e65d261e9ba4e7631b41b0b4a969525df
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
data/lib/grape-dsl/doc.rb
CHANGED
@@ -337,14 +337,20 @@ module GrapeDSL
|
|
337
337
|
description_msg ||= route.route_description[sym]
|
338
338
|
end
|
339
339
|
|
340
|
-
if description_msg.class <= String
|
341
|
-
description_msg= [*description_msg.split("\n")]
|
342
|
-
end
|
343
|
-
|
344
340
|
description_msg ||= "No description available for this path"
|
345
341
|
description_msg= [*description_msg]
|
346
342
|
|
347
|
-
|
343
|
+
description_msg.dup.each do |element|
|
344
|
+
next unless element.include?("\n")
|
345
|
+
|
346
|
+
index_n= description_msg.index(element)
|
347
|
+
description_msg.delete(element)
|
348
|
+
new_elements= element.split("\n")
|
349
|
+
new_elements.size.times do |counter_n|
|
350
|
+
description_msg.insert(index_n + counter_n - 1, new_elements[counter_n - 1] )
|
351
|
+
end
|
352
|
+
|
353
|
+
end
|
348
354
|
|
349
355
|
description_msg.each do |one_line|
|
350
356
|
write_out_array.push((uni_tab*2)+htsym+one_line.chomp)
|