diesel-api-dsl 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5205a50b3bdbd62a8a5dd19471fe81656a943b82
4
- data.tar.gz: 45e98aae757b989153b9323ec7d670234a14ed83
3
+ metadata.gz: 09fb6c7bd081ec67cae4e38437da922ffb6c1ce5
4
+ data.tar.gz: 9b64c5eaa0fb570a5f59432c2d17fe30f190a8c4
5
5
  SHA512:
6
- metadata.gz: ade33fbdca31713aba34eb525aa4ba89825875b0b9e6a0d073bf58b38762734f886cfe3f2818f80b7efb317440106c148af5cf930c8b9f70744fde7004697717
7
- data.tar.gz: 1d89e1a7bafc5ab3f8ffd4ab3e754ad9a50adcf50e6ca6e757ac6a3c25069363445caa64442b803d711289aa4fc95df11d7a6f58001d28a932b7709798c28035
6
+ metadata.gz: 392364cc807390808496a22150749768b1f25c21d7cf885169a76f5cfafced3e71e1081f527410050c1213cf7de831751422a85033318a56b32ceb95c2b13335
7
+ data.tar.gz: b63314de68a6f27f6abba06b919ae739a931f7544832ca69e5e2279ed553cc12b9d1a2181065266ca52d72c0eb1e7ce5be8ec736886f2ca9d8def19e7d25d574
@@ -81,6 +81,10 @@ module Diesel
81
81
  @errors = []
82
82
  end
83
83
 
84
+ def extensions
85
+ @extensions ||= {}
86
+ end
87
+
84
88
  def validate
85
89
  end
86
90
 
@@ -55,6 +55,12 @@ module Diesel
55
55
  model_class.attribute_names.each do |att|
56
56
  model.send("#{att}=".to_sym, json[camelize(att.to_s, false)])
57
57
  end
58
+ json.each_pair do |key, value|
59
+ if key.match(/^x-/)
60
+ extension_name = underscore(key.sub(/^x-/, '')).to_sym
61
+ model.extensions[extension_name] = value
62
+ end
63
+ end
58
64
  model
59
65
  end
60
66
  end
@@ -12,6 +12,7 @@ module Diesel
12
12
  attribute :flow
13
13
  attribute :authorization_url
14
14
  attribute :token_url
15
+ attribute :scopes
15
16
 
16
17
  def initialize(id)
17
18
  super()
@@ -1,3 +1,3 @@
1
1
  module Diesel
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diesel-api-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Calvin Yu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler