pragmatic_context 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pragmatic_context/contextualizable.rb +3 -2
- data/lib/pragmatic_context/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3014f90e43fa32d1fc8bbab86e37528f8aca1edd
|
4
|
+
data.tar.gz: cf284529ecca0ba696a1c3401c04dad1cbf5871a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b15e7682115ad0f02ac2edadbb925b0dbefe9d028f1d36cc0d5a7b50e1d233ed55c24a49bab1d1b9f20b97709635d371800434f74c4a16f867578a90c43a17
|
7
|
+
data.tar.gz: 48db73767ecb14747cf0badfd5f1cf03fdd5026d56c9c03cdfb0016a07aaa21b5fe9035285a1ca727365b61e50e350313f70c2e71cfbc4e3e28694beb2b847d5
|
@@ -38,7 +38,8 @@ module PragmaticContext
|
|
38
38
|
# fields (and not the fields in 'as_json') to case on their class. In the
|
39
39
|
# case where we want to serialize directly, we rely on the field value as
|
40
40
|
# sourced from as_json
|
41
|
-
|
41
|
+
context = jsonld_context
|
42
|
+
terms_with_context = context.keys
|
42
43
|
json_results = as_json(opts).slice(*terms_with_context)
|
43
44
|
results = {}
|
44
45
|
results['@type'] = self.class.contextualized_type if self.class.contextualized_type
|
@@ -64,7 +65,7 @@ module PragmaticContext
|
|
64
65
|
results[term] = json_results[term]
|
65
66
|
end
|
66
67
|
end
|
67
|
-
results.merge("@context" =>
|
68
|
+
results.merge("@context" => context)
|
68
69
|
end
|
69
70
|
|
70
71
|
def jsonld_context
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragmatic_context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Trudel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|