swaggard 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc7e15b774e8c15ddf109dfaad4d2b3dd571e6a5527b8d237bcc89e07d5c867f
4
- data.tar.gz: 1889e419f45111899943019b967ecb1ce094331a23b0fcc79fabd7e387c6e7ad
3
+ metadata.gz: b3e1aa159808f0d01c9e6759727b97aff8a0cb4c383f441a3ca602e6b302da8b
4
+ data.tar.gz: 4f3b2511fbd15049e5e8746af31174705544a477b70cc0cbbe30d24563897ee7
5
5
  SHA512:
6
- metadata.gz: 4f86d35cd4362a15b4a93bd9ac2ae4ce4a78d6bdca04823a9b3a8636903c35472944c73cde67d5e8c5ac5c05cf0c85c32aa7a25788173a52487e13aef184cc4c
7
- data.tar.gz: 452ef43b35624b738762e396758dabf284b265d8e81fb0ef15f8e6ce07306a0c2a9204d1c1efc5a59028753c46aba6239d8912a988f7e7f7071d1772fcc30934
6
+ metadata.gz: 244da8fb5d6d234aab95d0b6e1b6bf13fd1dd7f519daf93aa2ff1f21dd05e2d0a886aa1e80f07ae7181d7541fc853b83bf5f711465976577cea725175bb0be36
7
+ data.tar.gz: c82e666367b0555c8d7de02f785c9045aa53c77c591855afa5e1c093f294c8b69cff7cbcc5a9eb70cdda1004f855cf149148fede20be4f4296515878855aa34c
@@ -75,6 +75,7 @@ module Swaggard
75
75
  # Example: [Array] status(required) Filter by status. (e.g. status[]=1&status[]=2&status[]=3)
76
76
  # Example: [Integer] media[media_type_id] ID of the desired media type.
77
77
  def parse(string)
78
+ string.gsub!("\n", ' ')
78
79
  data_type, required, name, options_and_description = string.match(/\A\[(\S*)\](!)?\s*([\w\[\]]*)\s*(.*)\Z/).captures
79
80
  allow_multiple = name.gsub!('[]', '')
80
81
  options, description = options_and_description.match(/\A(\[.*\])?(.*)\Z/).captures
@@ -10,6 +10,7 @@ module Swaggard
10
10
  name = yard_object.name.dup
11
11
  options_and_description = yard_object.text&.dup || ''
12
12
 
13
+ options_and_description.gsub!("\n", ' ')
13
14
  options, description = options_and_description.match(/\A(\[.*\])?(.*)\Z/).captures
14
15
  options = options ? options.gsub(/\[?\]?\s?/, '').split(',') : []
15
16
  description = description.strip
@@ -1,3 +1,3 @@
1
1
  module Swaggard
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swaggard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Gomez