emp_json 1.5.0.pre.gc39510214 → 1.5.0.pre.gcbfeca403
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/empathy/emp_json/helpers/slices.rb +3 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d19955ed6b61ccd7b3267b375cf66fe3c0f449108f1b626c36942a1d476d73ae
|
4
|
+
data.tar.gz: 5598736227a1e5ec56307cd6f8a5566dbe73fc7d0fe59b4d3dc3e4d311d6710e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bc905c8410946c95ad9b082e5277ab3ba2617b4d8c267eacf5461f0a76eb46e63a6479e08cde1c51592bb8e9e4fba7c76cd3a44890628898e005fa1529dc4a9
|
7
|
+
data.tar.gz: 962d2b00c9028124d38344a49f294e0faf44e24350182dec33d45aaa9a7966a46e51fd53dbab6ea2624a2c7b5f55061940cf01f33a372d0fab0785ee3430f5c5
|
data/Gemfile.lock
CHANGED
@@ -46,7 +46,7 @@ module Empathy
|
|
46
46
|
|
47
47
|
# Returns a record from a slice.
|
48
48
|
def record_from_slice(slice, id, website_iri = nil)
|
49
|
-
slice[absolutized_id(
|
49
|
+
slice[absolutized_id(retrieve_id(id), website_iri)] || slice[retrieve_id(id)]
|
50
50
|
end
|
51
51
|
|
52
52
|
def field_from_record(record, field)
|
@@ -61,14 +61,10 @@ module Empathy
|
|
61
61
|
resource.try(:iri) || resource.try(:subject) || resource.try(:id) || resource
|
62
62
|
end
|
63
63
|
|
64
|
-
def retrieve_id_string(resource)
|
65
|
-
retrieve_id(resource).to_s
|
66
|
-
end
|
67
|
-
|
68
64
|
def absolutized_id(id, website_iri = nil)
|
69
|
-
return id.delete_prefix(website_iri) if website_iri.present?
|
65
|
+
return id.to_s.delete_prefix(website_iri) if website_iri.present?
|
70
66
|
|
71
|
-
id
|
67
|
+
id.to_s
|
72
68
|
end
|
73
69
|
|
74
70
|
def normalise_slice_values(values)
|