bbc_data_service 1.6 → 1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,9 +54,9 @@ module BBCDataService
54
54
  results = []
55
55
  fixtures = query.execute(graph)
56
56
  fixtures.each do |fixture|
57
- current_fixture = BBCDataService::FeedFixture.new(self.instance_eval(self.execute_query(graph, query, values[:mappings])))
58
- current_fixture.rdf_object = fixture
59
- results << current_fixture
57
+ relationship_fixture = BBCDataService::FeedFixture.new(self.instance_eval(self.execute_query(graph, query, values[:mappings])))
58
+ relationship_fixture.rdf_object = fixture
59
+ results << relationship_fixture
60
60
  end
61
61
  current_fixture.add_relationship(key, results)
62
62
  end
@@ -1,3 +1,3 @@
1
1
  module BBCDataService
2
- VERSION = "1.6"
2
+ VERSION = "1.7"
3
3
  end
@@ -74,6 +74,7 @@ describe BBCDataService::FixtureLoader do
74
74
  it "should allow finding of other resources" do
75
75
  object = BBCDataService::FixtureLoader.load_fixture(:relationship_with_foreign_key)
76
76
  object.first.name == "Im Dong-Hyun"
77
+ object.first.surname == "Dong-Hyun"
77
78
  object.first.team.first.team_name.should == "South Korea"
78
79
  end
79
80
 
@@ -154,15 +154,22 @@ BBCDataService::AppFixture.register_fixture :multiple_items_with_filter, {
154
154
  BBCDataService::AppFixture.register_fixture :relationship_with_foreign_key, {
155
155
  :endpoint => "/dsp/sport/olympics/2012/athletes",
156
156
  :type => :rdf,
157
- :feed_url => File.expand_path("../athletes.json", __FILE__),
158
157
  :rdf_type => "sport:Person",
158
+ :feed_url => File.expand_path("../athletes.json", __FILE__),
159
159
  :mappings => {
160
160
  :domain => {
161
- :name => "name"
161
+ :name => "name",
162
+ :url => "document"
163
+ },
164
+ :oly => {
165
+ :gender => "gender"
166
+ },
167
+ :foaf => {
168
+ :surname => "familyName"
162
169
  },
163
170
  :par => {
164
171
  :role_at => "role_at"
165
- }
172
+ }
166
173
  },
167
174
  :relationships => {
168
175
  :team => {
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbc_data_service
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 6
9
- version: "1.6"
8
+ - 7
9
+ version: "1.7"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Crouch