grape-swagger-representable 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 600b0f897d9ce5f916831596c72a07bdd954db6f
4
- data.tar.gz: ac63015e4f7d8ee4399a35fa076a3bc31d316caf
3
+ metadata.gz: a32638e1d76f204f7fedca553383f47649cf8b99
4
+ data.tar.gz: ed4d7d8e9334ed7eeea881178b624b72406508a1
5
5
  SHA512:
6
- metadata.gz: 4d9d68f28b121a4e3621583a08875ba9b5e7c8046acbdd03641bbe3a311b672b510f9f7bc39c7b4cba444bc3b8ccd293678ee152da70105bc8933d81ed5ad495
7
- data.tar.gz: 321f51fa4b473ad134b963703ff69f7366722da67d12e0edee558de12e4f7ea93632995ecf0642b05f4f13efd5f1c6122e0663e68828505f57ec7b1a39edfaf9
6
+ metadata.gz: 439da9af2778912cd95009a3352b91113bee8d04e94b36bfce3fe0586e1b1dc989f384389968669251eca0c0db46cf2bfe3cb3afe72f55c9ae02514a976b801a
7
+ data.tar.gz: 63a8711f3ef43c7f786c52d103f9a9d635ad7c6f26b02e911a7202256974def908a8aa8fbd6819a0cf56577dbd2fffb0961a28ed4748bec6d1ff6377da7f5837
@@ -99,7 +99,8 @@ module GrapeSwagger
99
99
 
100
100
  def parse_representer(representer)
101
101
  representer.map.each_with_object({}) do |value, property|
102
- property[value.name] = parse_representer_property(value)
102
+ property_name = value[:as].try(:call) || value.name
103
+ property[property_name] = parse_representer_property(value)
103
104
  end
104
105
  end
105
106
  end
@@ -1,5 +1,5 @@
1
1
  module GrapeSwagger
2
2
  module Representable
3
- VERSION = '0.1.5'.freeze
3
+ VERSION = '0.1.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-representable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2018-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-swagger