restify 0.1.0.1.b18 → 0.1.0.1.b19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTY0OWIxYmVlNTE1NzRlZGE3M2QwMTkxNzVjOTJjY2QwMWNkMGNlYw==
4
+ YWE0N2M2YmUzZDZkZDk1NTJiYjM2MTlhYTIwN2ZhMTg3NDM3MzU3OQ==
5
5
  data.tar.gz: !binary |-
6
- ZTJkMTE4MzczOTg2N2VjOTY2MTQ4MzgxMDIzYmYwNjQ1NTM4OWIwYQ==
6
+ NjQ0YzU1MDBmM2MyZTkyOGQyOTFiMWI5YTVhMTA4OTkzZTI3NjczNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjljMDFlY2MzMjI3OTg3ZTgyOTRhZWU5ZDE3M2RjMzE5M2JlOWZiYWU0NjI5
10
- Mzk1MjVhNzU3MjJiZDEzN2JhODczYzY0MDI0N2ZmNjkwMTQ0NjM1YzViNjQ1
11
- N2VjMjc5NmNmMGM1MTRhZTliYWM2ZTdhZTVlZmI0NjAxMjc2MWU=
9
+ NjRhOWRmNDBhNzcxN2RkNzlkNGExZDM4YjdhNzI5YjYzOTg5MjgxOWZmYjE1
10
+ MjljZjExZGEyMTU5ZGZjYWYwNTc3ODA2Y2Y5OTQ2M2Q0NjhjMmVjMThhYzM3
11
+ NmFkOTlkMWRhMTgyZmU0ZmY1MTljMmZlNjM4MjM0YTI0NzM4NjY=
12
12
  data.tar.gz: !binary |-
13
- NjIyMWY3ZGEwY2I1N2I1MWZhYzljMWZiYTkxY2Q4Zjk1ZDJmNWQxMTZhOTUx
14
- OGVlYTg3NzI3ZjViNWM2NDhiZTRkZDFlY2MzMzcxOGIzOWEwMTRmYjgyZDNl
15
- OTI0MDdhOTI2MjU1MmQ3NWRmMmIzZjhmMjQ4NDU0ZWU4YzRhMWE=
13
+ ZWViYWYyZGE2ZWZlOTQ0NmZiMDk0N2M4ZWQxOTQwN2E5ZWRmOTQ4OWYwOTU3
14
+ MTdiNDVmNTFjZDExMGZlNDQyMzk5ODUxNTJmYzdlZTc0ODgwNzljZTQwYTU1
15
+ YTEyZGVmMDY3MmQwODRjN2ZmMTExNzI3MTY2OWM1ZDdhNmFkYjA=
@@ -59,7 +59,17 @@ module Restify
59
59
 
60
60
  class << self
61
61
  def create(client, data, response)
62
- data = data.map { |s| Resource.create(client, s, nil) } if data
62
+ data = data.map do |value|
63
+ case value
64
+ when Hash
65
+ Resource.create client, value, nil
66
+ when Array
67
+ create client, value, nil
68
+ else
69
+ value
70
+ end
71
+ end
72
+
63
73
  relations = response ? response.relations(client) : nil
64
74
 
65
75
  new client, relations, data
@@ -28,7 +28,8 @@ describe Restify do
28
28
  [{
29
29
  "name": "John Smith",
30
30
  "url": "http://localhost/base/users/john.smith",
31
- "blurb_url": "http://localhost/base/users/john.smith/blurb"
31
+ "blurb_url": "http://localhost/base/users/john.smith/blurb",
32
+ "languages": ["de", "en"]
32
33
  },
33
34
  {
34
35
  "name": "Jane Smith",
@@ -61,7 +62,8 @@ describe Restify do
61
62
  {
62
63
  "name": "John Smith",
63
64
  "url": "http://localhost/base/users/john.smith",
64
- "blurb_url": "http://localhost/base/users/john.smith/blurb"
65
+ "blurb_url": "http://localhost/base/users/john.smith/blurb",
66
+ "languages": ["de", "en"]
65
67
  }
66
68
  EOF
67
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.1.b18
4
+ version: 0.1.0.1.b19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: obligation