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.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/travis/client/session.rb +12 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzEyOTliZjJkZjEwZmFkZTdjZTA5NTIyY2I0ODNmNTJiYTcxMTExOQ==
4
+ ZDQ3YmQ3YWExYWVjNTE3NjhhOWZkNjI4MGNkMTFlNDQ0NTQ0NzJmMA==
5
5
  data.tar.gz: !binary |-
6
- ZmE0ODJlOWZmOWY2NzFjNzk3YzJmMmRlZTU3MWM2MDc3M2Y4ZDdmOQ==
6
+ MmU4NjMwZjAzN2FkODhkMzBiMzk3MzI0ZTQwMDQwZTVkNWM4ZjQyMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGE1NWQ4ZWRhZTliZDI0YjViODQzYTk5YTk0NjI1NGE0OTAzZTY0NmZjODNj
10
- OWFmNjIzY2MzMGJmNDIwMjRjOGUxZDZjM2EzOGJmZTU1M2I1YWFlODE1YjU3
11
- NDNlZjE5ZDdlM2VkYmRiYjRkNjdjNWI2YWEzMTMxM2U3MzQ4YTE=
9
+ NmUwNzIzOTExN2E1ZDQ3ZGZmYWIwOTk1M2RjODk2MTE3NjYyYzA2ZjI1NWQw
10
+ NDAzMGM5YmUzZGYzOTc1MDc1NTFhZjA3YmIzYTg4Y2I4ODg2YmFjM2E4ODdk
11
+ NTFkMGRkMzBkNmJkNDhjOGM4ZmVkNDA4OWM0MmRiOWI5MGZkY2Y=
12
12
  data.tar.gz: !binary |-
13
- NmEwYWMwZDQ1Y2IzMDU5MzYwOTkyMWI2YTRmYjRlNjhiZmU0MDRlZTQ3ZWVi
14
- NTI5NDA2MDU3Yjk0MzM1MzE1MjkwN2JlMzYwNDY3OWFhNTQ2N2I5NjIzZmEw
15
- ZjY2MjM4ZDlhZjM0MDYyYjM0NjEzNjFlMDkwOTlmMWIwNjljZmE=
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
- type = Entity.subclass_for(key)
137
- if value.respond_to? :to_ary
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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7.travis.442.6
4
+ version: 1.6.7.travis.443.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase