• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-rdf / sparql-client / 164
96%

Build:
DEFAULT BRANCH: develop
Ran 07 Jun 2016 08:24AM UTC
Jobs 8
Files 5
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
164

Pull #66

travis-ci

nvdk
raise error when no suitable rdf reader is found

Currently sparql-client will silently fail with a nil if no suitable rdf reader is found. This can lead to the awkward situation where a nil is returned for the query and the user has to find out what is causing it. This pull request tries to quicken this debugging proces by at least indicating the point of failure by raising a descriptive error.
```
[1] pry(main)> require 'sparql/client'
=> true
[2] pry(main)> s = SPARQL::Client.new('http://localhost:8890/sparql')
=> #<SPARQL::Client:0x8fc(http://localhost:8890/sparql)>
[3] pry(main)> s.query("CONSTRUCT  {?s a ?type}  WHERE {?s a ?type}").first
NoMethodError: undefined method `first' for nil:NilClass
from (pry):3:in `<eval>'
[4] pry(main)> require 'rdf/turtle'
=> true
[5] pry(main)> s = SPARQL::Client.new('http://localhost:8890/sparql')
=> #<SPARQL::Client:0x902(http://localhost:8890/sparql)>
[6] pry(main)> s.query("CONSTRUCT  {?s a ?type}  WHERE {?s a ?type}").first
=> [#<RDF::URI:0x906 URI:http://www.openlinksw.com/virtrdf-data-formats#default-iid>, #<RDF::URI:0x908 URI:http://www.w3.org/1999/02/22-rdf-syntax-ns#type>, #<RDF::URI:0x90a URI:http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat>]
```
Pull Request #66: raise error when no suitable rdf reader is found

2 of 2 new or added lines in 1 file covered. (100.0%)

662 of 701 relevant lines covered (94.44%)

2034.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 164.1 (2.0, CI=true, Gemfile) 07 Jun 2016 08:26AM UTC 0
92.72
Travis Job 164.1
2 164.2 (2.0, CI=true, Gemfile-pure) 07 Jun 2016 08:24AM UTC 0
92.87
Travis Job 164.2
3 164.3 (2.1, CI=true, Gemfile) 07 Jun 2016 08:25AM UTC 0
92.72
Travis Job 164.3
4 164.4 (2.1, CI=true, Gemfile-pure) 07 Jun 2016 08:24AM UTC 0
92.87
Travis Job 164.4
5 164.5 (2.2.4, CI=true, Gemfile) 07 Jun 2016 08:26AM UTC 0
92.72
Travis Job 164.5
6 164.6 (2.2.4, CI=true, Gemfile-pure) 07 Jun 2016 08:26AM UTC 0
92.87
Travis Job 164.6
7 164.7 (2.3.0, CI=true, Gemfile) 07 Jun 2016 08:27AM UTC 0
92.72
Travis Job 164.7
8 164.8 (2.3.0, CI=true, Gemfile-pure) 07 Jun 2016 08:27AM UTC 0
92.87
Travis Job 164.8
Source Files on build 164
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #164
  • Pull Request #66
  • PR Base - develop (#161)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc