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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c34e3397c213add2e02123c9d32424db9b24200b
4
- data.tar.gz: 9927b7db8a9ff339a86cad778b33670c678797aa
3
+ metadata.gz: 4211199204d0b1d410ac02abd11ab7d19360f6d6
4
+ data.tar.gz: d479f68659c59b2185e6e483a4b6ad5a221c3895
5
5
  SHA512:
6
- metadata.gz: 1165128481af2d33a2b84cad8ad2d8ddbec664d94b655af45403d41b8c39176d4c1ec035be0b21a079703fabb6f559d3990381a1f7c01a9fcd07cc4aaa0c87f2
7
- data.tar.gz: c1b4c9ddad387f2e04faaf47084184542b13bbba142b90e4482a8e74693caf10a2f64a43fe60a4f9f45abdc19e221dbd6936aeaea3d8656b57eeb84ecf723e2a
6
+ metadata.gz: 1ff3ded00cf253552059ff204c38bfbfac65eb7ef9bcddb0d9534d01c29bc2378e97389fe09e16c9c7d05700372640a6a7ff304cc3cd9fbe914f630f431bd486
7
+ data.tar.gz: c41b056cd6ce538577aefbdcc71d2a4378193072b81522dbb0f96c215c11288e38e7c89b99ab345973ded65577ee19e5ff9c74ee5c2d21c67df3679e8c467e10
@@ -255,8 +255,8 @@ module ActiveTriples
255
255
  # # => "Oregon State University"
256
256
  #
257
257
  # @return [ActiveTriples::Entity] self
258
- def fetch
259
- load(rdf_subject)
258
+ def fetch(*args)
259
+ load(rdf_subject, *args)
260
260
  self
261
261
  end
262
262
 
@@ -1,3 +1,3 @@
1
1
  module ActiveTriples
2
- VERSION = '0.7.4'.freeze
2
+ VERSION = '0.7.5'.freeze
3
3
  end
@@ -1,10 +1,19 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ActiveTriples::RDFSource do
4
- let(:dummy_source) { Class.new { include ActiveTriples::RDFSource } }
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 "should apply the schema" do
18
- dummy_source.apply_schema MyDataModel
26
+ it "applies the schema" do
27
+ source_class.apply_schema MyDataModel
19
28
 
20
- expect{dummy_source.new.test_title}.not_to raise_error
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
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-01-20 00:00:00.000000000 Z
12
+ date: 2016-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf