grape-dsl 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/grape-dsl/dsl.rb +6 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08ef9da27a9c2af48368055da13388a3cf91c1c7
4
- data.tar.gz: ad675add2489ab8ead52b5b1bbaa930610f49da2
3
+ metadata.gz: c082b667ab1be80b65db4c1f4e851720a3f3dbe5
4
+ data.tar.gz: 8dabf70adebcf63f065c8a6b438c7b61ae1a9673
5
5
  SHA512:
6
- metadata.gz: 568a7b360a75a70d099538af348253afff6347b2cde05aedb77b1ddd9b6370f7bedd0ac0103afbc3440a5ea43686c6f3d21774c5dda905c0e798fea7d3a146cb
7
- data.tar.gz: 93d78d9beabcf5bf9e2e6f34a1ff9fce6858733c29378332ee3ca6fc201752e841f773557d1d75afa56789b842b6b5fee3f4ff8c2fb2ac9d0a3205db6ab93091
6
+ metadata.gz: e2a574f5483751fea3e2ead8cbc7abefdca25b6908c60e5b4f7b2d26f7c1569729cc66635ad26c530333fc6d3a47a76db5194018b8ae639a4f9532e4aa542ae2
7
+ data.tar.gz: 7792e998a3608b9613b1277d636aef4ccedaef55b4d52118a5095ab77e53e0719ca4b62b87eec3b94fec78a040dba8a2e15efeb600e3958615c670de1d020221
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.2
1
+ 2.0.3
@@ -37,7 +37,8 @@ module GrapeDSL
37
37
  # convent_type -> real content type
38
38
  def description(*args)
39
39
 
40
- if desc.class != ::GrapeDSL::Extend::APIMNT::Description
40
+ @last_description ||= {}
41
+ unless @last_description[:desc].class == ::GrapeDSL::Extend::APIMNT::Description
41
42
 
42
43
  var= ::GrapeDSL::Extend::APIMNT::Description.new(*args)
43
44
 
@@ -49,16 +50,17 @@ module GrapeDSL
49
50
  content_type_name ||= element.to_s.upcase
50
51
  end
51
52
  end
52
- var.content_type= content_type_name
53
+
54
+ var.content_type= content_type_name if var.content_type.nil?
53
55
 
54
56
  end
55
57
 
56
58
  var.desc= desc.to_s
57
- desc var
59
+ @last_description[:desc]= var
58
60
 
59
61
  end
60
62
 
61
- return desc
63
+ return @last_description[:desc]
62
64
 
63
65
  end
64
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi