Skip to content

Commit

Permalink
Finish 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed May 30, 2020
2 parents afbccd7 + dd9b443 commit 390633a
Show file tree
Hide file tree
Showing 1,243 changed files with 81,062 additions and 85,499 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Gemfile.lock
/.rbx/
/.pryrc
/coverage/
*.html
*.haml
*.byebug_history
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee

This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.

* create or respond to an issue on the [Github Repository](http://github.com/ruby-rdf/sparql/issues)
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/sparql/issues)
* Fork and clone the repo:
`git clone git@github.com:your-username/sparql.git`
* Install bundle:
Expand All @@ -30,7 +30,7 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage devel
of thumb, additions larger than about 15 lines of code), we need an
explicit [public domain dedication][PDD] on record from you.

[YARD]: http://yardoc.org/
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
[pr]: https://github.com/ruby-rdf/sparql/compare/
252 changes: 183 additions & 69 deletions README.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ namespace :doc do
end
end

desc "Create concatenated test manifests"
file "etc/manifest-cache.nt" do
require 'rdf'
require 'json/ld'
require 'rdf/ntriples'
graph = RDF::Graph.new do |g|
Dir.glob("spec/dawg/**/manifest.jsonld").each do |man|
puts "load #{man}"
g.load(man, unique_bnodes: true)
end
end
puts "write"
RDF::NTriples::Writer.open("etc/manifest-cache.nt", unique_bnodes: true, validate: false) {|w| w << graph}
end

desc 'Create versions of ebnf files in etc'
task etc: %w{etc/sparql11.sxp etc/sparql11.html etc/sparql11.ll1.sxp}

Expand Down
2 changes: 1 addition & 1 deletion UNLICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
For more information, please refer to <https://unlicense.org/>
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.1.1
29 changes: 20 additions & 9 deletions bin/sparql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
require 'rubygems'
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", 'lib')))
$:.unshift("../../lib", __FILE__)
require 'sparql'
begin
require 'linkeddata'
Expand All @@ -12,9 +12,17 @@ require 'getoptlong'
def display_results(res, **options)
puts res.inspect if options[:verbose]
puts case res
when RDF::Graph then res.dump(:ttl, base_uri: query.base_uri, prefixes: query.prefixes, standard_prefixes: true)
when RDF::Graph then res.dump(options.fetch(:format, :ttl), base_uri: query.base_uri, prefixes: query.prefixes, standard_prefixes: true)
when RDF::Literal then res.inspect
else res.map {|s| s.bindings.map {|k,v| "#{k}: #{v}"}}.join("\n")
else
case options[:format]
when :json then res.to_json
when :html then res.to_html
when :xml then res.to_xml
when :csv then res.to_csv
when :tsv then res.to_tsv
else res.map {|s| s.bindings.map {|k,v| "#{k}: #{v}"}}.join("\n")
end
end
end

Expand Down Expand Up @@ -81,12 +89,13 @@ def usage
puts " #{$0} query [options] end-point query-file Run the query against a remote end-point"
puts " #{$0} server [options] dataset-file Start a server initialized from the specified dataset"
puts "Options:"
puts " --execute,-e: Use option argument as the SPARQL input if no query-file given"
puts " --dataset: File containing RDF graph or dataset"
puts " --debug: Display detailed debug output"
puts " --debug: Display detailed debug output"
puts " --execute,-e: Use option argument as the SPARQL input if no query-file given"
puts " --format: Output format for results"
puts " --port,-p Port on which to run server; defaults to 9292"
puts " --sse: Query input is in SSE format"
puts " --debug: Display detailed debug output"
puts " --update: Process query as a SPARQL Update"
puts " --verbose: Display details of processing"
puts " --help,-?: This message"
Expand All @@ -98,11 +107,12 @@ cmd, input = ARGV.shift, nil
opts = GetoptLong.new(
["--dataset", GetoptLong::REQUIRED_ARGUMENT],
["--debug", GetoptLong::NO_ARGUMENT],
["--execute", "-e", GetoptLong::REQUIRED_ARGUMENT],
["--format", GetoptLong::REQUIRED_ARGUMENT],
["--port", "-p", GetoptLong::REQUIRED_ARGUMENT],
["--verbose", GetoptLong::NO_ARGUMENT],
["--sse", GetoptLong::NO_ARGUMENT],
["--update", GetoptLong::NO_ARGUMENT],
["--execute", "-e", GetoptLong::REQUIRED_ARGUMENT],
["--verbose", GetoptLong::NO_ARGUMENT],
["--help", "-?", GetoptLong::NO_ARGUMENT]
)

Expand All @@ -112,11 +122,12 @@ options = {

opts.each do |opt, arg|
case opt
when '--dataset' then options[:dataset].load(arg)
when '--dataset' then options[:dataset].load(arg, rdfstar: :PG)
when '--debug' then options[:debug] = true
when '--execute' then input = arg
when '--format' then options[:format] = arg.to_sym
when '--port' then options[:port] = arg.to_i
when '--sse' then options[:sse] = true
when '--debug' then options[:debug] = true
when '--update' then options[:update] = true
when '--verbose' then options[:verbose] = true
when "--help" then usage
Expand Down
50 changes: 24 additions & 26 deletions etc/doap.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@base <http://rubygems.org/gems/sparql> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
Expand All @@ -7,42 +6,41 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix earl: <http://www.w3.org/ns/earl#> .

<> a doap:Project;
<https://rubygems.org/gems/sparql> a doap:Project;
doap:name "SPARQL";
doap:shortdesc "SPARQL library for Ruby."@en;
doap:description """
Implements SPARQL grammar parsing to SPARQL Algebra, SPARQL Algebra processing
and includes SPARQL Client for accessing remote repositories."""@en;
doap:implements <http://www.w3.org/TR/sparql11-query/>,
<http://www.w3.org/TR/sparql11-update/>,
<http://www.w3.org/TR/sparql11-results-json/>,
<http://www.w3.org/TR/sparql11-results-csv-tsv/>,
<http://www.w3.org/TR/rdf-sparql-XMLres/> ;
doap:developer <http://greggkellogg.net/foaf#me>;
doap:maintainer <http://greggkellogg.net/foaf#me>;
doap:documenter <http://greggkellogg.net/foaf#me>;
dc:creator <http://greggkellogg.net/foaf#me>, <http://ar.to/#self>;
foaf:maker <http://greggkellogg.net/foaf#me>, <http://ar.to/#self>;
doap:blog <http://greggkellogg.net/>, <http://ar.to/>, <http://blog.datagraph.org/>;
doap:bug-database <http://github.com/ruby-rdf/sparql/issues>;
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
<http://dbpedia.org/resource/Ruby_(programming_language)>;
doap:implements <https://www.w3.org/TR/sparql11-query/>,
<https://www.w3.org/TR/sparql11-update/>,
<https://www.w3.org/TR/sparql11-results-json/>,
<https://www.w3.org/TR/sparql11-results-csv-tsv/>,
<https://www.w3.org/TR/rdf-sparql-XMLres/> ;
doap:developer <https://greggkellogg.net/foaf#me>;
doap:maintainer <https://greggkellogg.net/foaf#me>;
doap:documenter <https://greggkellogg.net/foaf#me>;
dc:creator <https://greggkellogg.net/foaf#me>, <https://ar.to/#self>;
foaf:maker <https://greggkellogg.net/foaf#me>, <https://ar.to/#self>;
doap:blog <https://greggkellogg.net/>;
doap:bug-database <https://github.com/ruby-rdf/sparql/issues>;
doap:category <https://dbpedia.org/resource/Resource_Description_Framework>,
<https://dbpedia.org/resource/Ruby_(programming_language)>;
doap:created "2008-07-15"^^xsd:date;
doap:download-page <http://rubygems.org/gems/sparql>;
doap:homepage <http://github.com/ruby-rdf/sparql>;
doap:license <http://creativecommons.org/licenses/publicdomain/>;
doap:platform "Ruby" .
doap:download-page <https://rubygems.org/gems/sparql>;
doap:homepage <https://github.com/ruby-rdf/sparql>;
doap:license <https://unlicense.org/1.0/>;
doap:programming-language "Ruby" .

<http://greggkellogg.net/foaf#me> a foaf:Person;
foaf:homepage <http://greggkellogg.net/>;
<https://greggkellogg.net/foaf#me> a foaf:Person;
foaf:homepage <https://greggkellogg.net/>;
foaf:mbox <mailto:gregg@greggkellogg.net>;
foaf:mbox_sha1sum "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd";
foaf:name "Gregg Kellogg" .

<http://ar.to/#self> a foaf:Person;
rdfs:isDefinedBy <http://datagraph.org/bendiken/foaf>;
foaf:homepage <http://ar.to/>;
foaf:made <http://rubygems.org/gems/rdf>;
<https://ar.to/#self> a foaf:Person;
foaf:homepage <https://ar.to/>;
foaf:made <>;
foaf:mbox <mailto:arto.bendiken@gmail.com>;
foaf:mbox_sha1sum "a033f652c84a4d73b8c26d318c2395699dd2bdfb",
"d0737cceb55eb7d740578d2db1bc0727e3ed49ce";
Expand Down
Loading

0 comments on commit 390633a

Please sign in to comment.