bbc_data_service 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ module BBCDataService
44
44
 
45
45
  def self.generate_query(mappings, rdf_type)
46
46
  query_hash = ""
47
- unless rdf_type.empty?
47
+ if rdf_type
48
48
  rdf_vocabulary, rdf_value = rdf_type.split(":")
49
49
  query_hash << "RDF.type => self.vocabularies[:#{rdf_vocabulary}].#{rdf_value},"
50
50
  end
@@ -1,3 +1,3 @@
1
1
  module BBCDataService
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
@@ -44,4 +44,10 @@ describe BBCDataService::FixtureLoader do
44
44
  object.name.should == "Athletics"
45
45
  end
46
46
 
47
+ it "should allow RDF type to be optional" do
48
+ ServiceConfig[:vocabularies] = [{:domain => RDF::Vocabulary.new("http://www.bbc.co.uk/ontologies/domain/")}]
49
+ object = BBCDataService::FixtureLoader.load_fixture(:no_rdf_type)
50
+ object.name.should == "Athletics"
51
+ end
52
+
47
53
  end
@@ -27,6 +27,17 @@ BBCDataService::AppFixture.register_fixture :custom_vocabulary, {
27
27
  }
28
28
  }
29
29
  }
30
+ BBCDataService::AppFixture.register_fixture :no_rdf_type, {
31
+ :endpoint => "/dsp/sport/olympics/2012/sports",
32
+ :type => :rdf,
33
+ :feed_url => File.expand_path("../sports.xml", __FILE__),
34
+ :mappings => {
35
+ :domain => {
36
+ :document => "document",
37
+ :name => "name"
38
+ }
39
+ }
40
+ }
30
41
  BBCDataService::AppFixture.register_fixture :parent_instance, {
31
42
  :parent => :single_instance
32
43
  }
metadata CHANGED
@@ -1,101 +1,144 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bbc_data_service
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.17
3
+ version: !ruby/object:Gem::Version
4
+ hash: 63
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 18
10
+ version: 0.1.18
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Matthew Crouch
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-10-06 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2011-10-06 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: sinatra
16
- requirement: &2172938920 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
25
+ requirements:
19
26
  - - ~>
20
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 19
29
+ segments:
30
+ - 1
31
+ - 2
32
+ - 6
21
33
  version: 1.2.6
22
34
  type: :runtime
23
- prerelease: false
24
- version_requirements: *2172938920
25
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
26
37
  name: activemodel
27
- requirement: &2172938420 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
28
40
  none: false
29
- requirements:
41
+ requirements:
30
42
  - - ~>
31
- - !ruby/object:Gem::Version
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 3
47
+ - 1
48
+ - 0
32
49
  version: 3.1.0
33
50
  type: :runtime
34
- prerelease: false
35
- version_requirements: *2172938420
36
- - !ruby/object:Gem::Dependency
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
37
53
  name: rdf-rdfxml
38
- requirement: &2172937940 !ruby/object:Gem::Requirement
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
39
56
  none: false
40
- requirements:
57
+ requirements:
41
58
  - - ~>
42
- - !ruby/object:Gem::Version
59
+ - !ruby/object:Gem::Version
60
+ hash: 27
61
+ segments:
62
+ - 0
63
+ - 3
64
+ - 4
43
65
  version: 0.3.4
44
66
  type: :runtime
45
- prerelease: false
46
- version_requirements: *2172937940
47
- - !ruby/object:Gem::Dependency
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
48
69
  name: rdf-json
49
- requirement: &2172937440 !ruby/object:Gem::Requirement
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
50
72
  none: false
51
- requirements:
73
+ requirements:
52
74
  - - ~>
53
- - !ruby/object:Gem::Version
75
+ - !ruby/object:Gem::Version
76
+ hash: 19
77
+ segments:
78
+ - 0
79
+ - 3
80
+ - 0
54
81
  version: 0.3.0
55
82
  type: :runtime
56
- prerelease: false
57
- version_requirements: *2172937440
58
- - !ruby/object:Gem::Dependency
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
59
85
  name: rspec
60
- requirement: &2172936980 !ruby/object:Gem::Requirement
86
+ prerelease: false
87
+ requirement: &id005 !ruby/object:Gem::Requirement
61
88
  none: false
62
- requirements:
89
+ requirements:
63
90
  - - ~>
64
- - !ruby/object:Gem::Version
91
+ - !ruby/object:Gem::Version
92
+ hash: 23
93
+ segments:
94
+ - 2
95
+ - 6
96
+ - 0
65
97
  version: 2.6.0
66
98
  type: :development
67
- prerelease: false
68
- version_requirements: *2172936980
69
- - !ruby/object:Gem::Dependency
99
+ version_requirements: *id005
100
+ - !ruby/object:Gem::Dependency
70
101
  name: turn
71
- requirement: &2172936520 !ruby/object:Gem::Requirement
102
+ prerelease: false
103
+ requirement: &id006 !ruby/object:Gem::Requirement
72
104
  none: false
73
- requirements:
105
+ requirements:
74
106
  - - ~>
75
- - !ruby/object:Gem::Version
107
+ - !ruby/object:Gem::Version
108
+ hash: 59
109
+ segments:
110
+ - 0
111
+ - 8
112
+ - 2
76
113
  version: 0.8.2
77
114
  type: :development
78
- prerelease: false
79
- version_requirements: *2172936520
80
- - !ruby/object:Gem::Dependency
115
+ version_requirements: *id006
116
+ - !ruby/object:Gem::Dependency
81
117
  name: rake
82
- requirement: &2172936060 !ruby/object:Gem::Requirement
118
+ prerelease: false
119
+ requirement: &id007 !ruby/object:Gem::Requirement
83
120
  none: false
84
- requirements:
121
+ requirements:
85
122
  - - ~>
86
- - !ruby/object:Gem::Version
123
+ - !ruby/object:Gem::Version
124
+ hash: 63
125
+ segments:
126
+ - 0
127
+ - 9
128
+ - 2
87
129
  version: 0.9.2
88
130
  type: :development
89
- prerelease: false
90
- version_requirements: *2172936060
131
+ version_requirements: *id007
91
132
  description: BBC Data Service for fixture management
92
- email:
133
+ email:
93
134
  - matthew.crouch@bbc.co.uk
94
- executables:
135
+ executables:
95
136
  - bbc_data_service
96
137
  extensions: []
138
+
97
139
  extra_rdoc_files: []
98
- files:
140
+
141
+ files:
99
142
  - .gitignore
100
143
  - Gemfile
101
144
  - Rakefile
@@ -121,29 +164,38 @@ files:
121
164
  - spec/spec_helper.rb
122
165
  homepage: https://github.com/mobzilla/bbc-data-service
123
166
  licenses: []
167
+
124
168
  post_install_message:
125
169
  rdoc_options: []
126
- require_paths:
170
+
171
+ require_paths:
127
172
  - lib
128
- required_ruby_version: !ruby/object:Gem::Requirement
173
+ required_ruby_version: !ruby/object:Gem::Requirement
129
174
  none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ hash: 3
179
+ segments:
180
+ - 0
181
+ version: "0"
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
183
  none: false
136
- requirements:
137
- - - ! '>='
138
- - !ruby/object:Gem::Version
139
- version: '0'
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ hash: 3
188
+ segments:
189
+ - 0
190
+ version: "0"
140
191
  requirements: []
192
+
141
193
  rubyforge_project: bbc-data-service
142
194
  rubygems_version: 1.8.10
143
195
  signing_key:
144
196
  specification_version: 3
145
197
  summary: BBC Data Service
146
- test_files:
198
+ test_files:
147
199
  - spec/fixture_loader_spec.rb
148
200
  - spec/fixtures/countries.rdf.json
149
201
  - spec/fixtures/country.rdf.json