emp_json 1.5.0.pre.g8e529b5e8 → 1.5.0.pre.gc39510214

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2feee6cd265c7bdc83f26b6d19788354c644393a6837e661bdd64d971743992
4
- data.tar.gz: d76ebac0405df69ed5608aa4805f49c7ecf0b24affc42094e398d8f19d9d22f1
3
+ metadata.gz: 7f1cea5d50412191f5721cffbdf87c456a36f3fecc0dfcb4e6d61889149c4749
4
+ data.tar.gz: 5674386c905cc11cb8d80b79e255bf853a062bade5423998e89727bb6e4cb8dc
5
5
  SHA512:
6
- metadata.gz: 165cacc16051ea055664cfa4a67f511e4d3f05111aa7ed62f5e5bdd8291cf3360778d7458e52fa31fbbe871f36875abff1832976a0c21391e387a66d9415f464
7
- data.tar.gz: 5d299408e8dca5a1a4f8f21d0390998ebd0fcfada6eb61c752a76b33989e1f987c756b590ffea58bb7e78459af93ff8fe54699115cab2395bc31921c36c2e4d4
6
+ metadata.gz: f522fafed4a348497e3101c7bf4ec37c8bd03752d0223a5a52f1e047848db71fda9cc064489ef60392590dc56936ff571b73b54335017172749759014c8a36f1
7
+ data.tar.gz: 0200acce059b7e925c75936d0db7ad60f7a002e0fb3070fc6ac8716e3485cf9abd96c99aa1858cda5ff78e1df1d5f94f27912db48c08353abefd5801e64ef201
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- emp_json (1.5.0.pre.g8e529b5e8)
4
+ emp_json (1.5.0.pre.gc39510214)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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(retrieve_id(id), website_iri)] || slice[retrieve_id(id)]
49
+ slice[absolutized_id(retrieve_id_string(id), website_iri)] || slice[retrieve_id_string(id)]
50
50
  end
51
51
 
52
52
  def field_from_record(record, field)
@@ -61,10 +61,14 @@ 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
+
64
68
  def absolutized_id(id, website_iri = nil)
65
- return id.to_s.delete_prefix(website_iri) if website_iri.present?
69
+ return id.delete_prefix(website_iri) if website_iri.present?
66
70
 
67
- id.to_s
71
+ id
68
72
  end
69
73
 
70
74
  def normalise_slice_values(values)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emp_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.pre.g8e529b5e8
4
+ version: 1.5.0.pre.gc39510214
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom van Kalkeren