active-triples 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_triples/rdf_source.rb +2 -2
- data/lib/active_triples/version.rb +1 -1
- data/spec/active_triples/rdf_source_spec.rb +13 -4
- 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: 4211199204d0b1d410ac02abd11ab7d19360f6d6
|
4
|
+
data.tar.gz: d479f68659c59b2185e6e483a4b6ad5a221c3895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ff3ded00cf253552059ff204c38bfbfac65eb7ef9bcddb0d9534d01c29bc2378e97389fe09e16c9c7d05700372640a6a7ff304cc3cd9fbe914f630f431bd486
|
7
|
+
data.tar.gz: c41b056cd6ce538577aefbdcc71d2a4378193072b81522dbb0f96c215c11288e38e7c89b99ab345973ded65577ee19e5ff9c74ee5c2d21c67df3679e8c467e10
|
@@ -1,10 +1,19 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe ActiveTriples::RDFSource do
|
4
|
-
let(:
|
4
|
+
let(:source_class) { Class.new { include ActiveTriples::RDFSource } }
|
5
5
|
|
6
6
|
subject { source_class.new }
|
7
7
|
|
8
|
+
describe "#fetch" do
|
9
|
+
it "passes extra arguments to RDF::Reader" do
|
10
|
+
expect(RDF::Reader).to receive(:open).with(subject.rdf_subject,
|
11
|
+
{ base_uri: subject.rdf_subject,
|
12
|
+
headers: { Accept: 'x-humans/as-they-are' } })
|
13
|
+
subject.fetch(headers: { Accept: 'x-humans/as-they-are' })
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
8
17
|
describe ".apply_schema" do
|
9
18
|
before do
|
10
19
|
class MyDataModel < ActiveTriples::Schema
|
@@ -14,10 +23,10 @@ describe ActiveTriples::RDFSource do
|
|
14
23
|
after do
|
15
24
|
Object.send(:remove_const, "MyDataModel")
|
16
25
|
end
|
17
|
-
it "
|
18
|
-
|
26
|
+
it "applies the schema" do
|
27
|
+
source_class.apply_schema MyDataModel
|
19
28
|
|
20
|
-
expect{
|
29
|
+
expect { source_class.new.test_title }.not_to raise_error
|
21
30
|
end
|
22
31
|
end
|
23
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-triples
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Johnson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|