travis 1.6.7.travis.442.6 → 1.6.7.travis.443.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/travis/client/session.rb +12 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDQ3YmQ3YWExYWVjNTE3NjhhOWZkNjI4MGNkMTFlNDQ0NTQ0NzJmMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmU4NjMwZjAzN2FkODhkMzBiMzk3MzI0ZTQwMDQwZTVkNWM4ZjQyMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmUwNzIzOTExN2E1ZDQ3ZGZmYWIwOTk1M2RjODk2MTE3NjYyYzA2ZjI1NWQw
|
10
|
+
NDAzMGM5YmUzZGYzOTc1MDc1NTFhZjA3YmIzYTg4Y2I4ODg2YmFjM2E4ODdk
|
11
|
+
NTFkMGRkMzBkNmJkNDhjOGM4ZmVkNDA4OWM0MmRiOWI5MGZkY2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDNiYmJhNTk5M2U3OGNjYzk3NmY0MmIzMzYyN2FkZjg2MjVhNTMzMjBlN2U3
|
14
|
+
M2IwYThiZDhkNzVlOTE1OTJmY2MwMGJlNjdmODg3NDAwZTgzNGExODI2NGMy
|
15
|
+
OGE5NWMyOGNlZDQwMzVlZGU4YTJmMDUyNjc4ODk3NmFjN2I5YWU=
|
@@ -133,16 +133,22 @@ module Travis
|
|
133
133
|
def load(data)
|
134
134
|
result = {}
|
135
135
|
(data || {}).each_pair do |key, value|
|
136
|
-
|
137
|
-
if
|
138
|
-
result[key] = value.to_ary.map { |e| create_entity(type, e) }
|
139
|
-
else
|
140
|
-
result[key] = create_entity(type, value)
|
141
|
-
end
|
136
|
+
entity = load_entity(key, value)
|
137
|
+
result[key] = entity if entity
|
142
138
|
end
|
143
139
|
result
|
144
140
|
end
|
145
141
|
|
142
|
+
def load_entity(key, value)
|
143
|
+
type = Entity.subclass_for(key)
|
144
|
+
if value.respond_to? :to_ary
|
145
|
+
value.to_ary.map { |e| create_entity(type, e) }
|
146
|
+
else
|
147
|
+
create_entity(type, value)
|
148
|
+
end
|
149
|
+
rescue IndexError
|
150
|
+
end
|
151
|
+
|
146
152
|
def preload(list)
|
147
153
|
list.group_by(&:class).each do |type, instances|
|
148
154
|
next unless type.preloadable?
|