data_kitten 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/data_kitten/publishing_formats/ckan.rb +6 -2
- data/lib/data_kitten/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2ZhMGNkNzFlOWI5NmY5YzU4MDEyZTYzNTZiNzNlM2E1OTgzNTYwMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjE1NDFhMDE3Mzc1ZmEyOTU5MWE0YmYxNjdmMmMwYmEwYjVhZTFjNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDczMTBmYjJiMTVmMWIyYTk3YzNmNWQ5ZTg4ODM1Njc4ZWJiNTZkMzRjYTU4
|
10
|
+
MTRhN2FiOTA5YTAzM2YwZGM3NDk2MWU2NGRiZDJlYTViOTgxMGQ2YjljODBi
|
11
|
+
MzkyMDhlYWI5MTI1YmZmYTc0YjI0YmM4MzIzNWM3YjVkNGY0YTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDNhZjE2YjJlM2Q2MTYyYzkyNmQ5ZGRhYjZkOTM1ZTFmMzNlZTI5ZTM3MWJm
|
14
|
+
ZmU5NTcwZjM1ZjgzZmRkYzQxZmQzZjc2MTdlNDgzYWVhZmI2YTdkNGFiNjUw
|
15
|
+
MmU5OGY0MDNlMDA1ZGQyMzZlMTUzNTkxZDY2M2U3NWE4ODA1MmE=
|
@@ -236,6 +236,10 @@ module DataKitten
|
|
236
236
|
|
237
237
|
private
|
238
238
|
|
239
|
+
def without_empty_values(h)
|
240
|
+
h.reject { |k, v| v.nil? || v.empty? }
|
241
|
+
end
|
242
|
+
|
239
243
|
def select_extras(group, key)
|
240
244
|
extra = group["extras"][key] rescue ""
|
241
245
|
if extra == ""
|
@@ -276,12 +280,12 @@ module DataKitten
|
|
276
280
|
uri = base_uri.merge("api/3/action/organization_show")
|
277
281
|
result = RestClient.get(uri.to_s, params: {id: org['id']})
|
278
282
|
org_data = JSON.parse(result)['result']
|
279
|
-
extras = CKAN3Hash.new(org_data['extras'], "key", "value")
|
283
|
+
extras = CKAN3Hash.new(without_empty_values(org_data['extras']), "key", "value")
|
280
284
|
rescue
|
281
285
|
uri = base_uri.merge("api/rest/group/#{org['id']}")
|
282
286
|
result = RestClient.get(uri.to_s)
|
283
287
|
org_data = JSON.parse(result)
|
284
|
-
extras = org_data['extras']
|
288
|
+
extras = without_empty_values(org_data['extras'])
|
285
289
|
end
|
286
290
|
Agent.new(
|
287
291
|
:name => org_data['title'],
|
data/lib/data_kitten/version.rb
CHANGED