Sha256: 36957f5571caf377c396cd807f6bbc8c1c54121329681b8eaf7c5d1bb40e4e49
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 KB
Contents
#!/usr/bin/env ruby require 'cgi' require 'yaml' require 'bio-publisci' require 'slop' require 'sinatra/base' require "sinatra/linkeddata" require "sinatra/cross_origin" require 'rack-flash' class PubliSciServer < Sinatra::Base configure do enable :sessions enable :cross_origin end set :views, File.dirname(__FILE__) + '/../server/views' # set :repository, RDF::Repository.new set :sudo_pass, nil use Rack::Flash require_relative '../server/helpers.rb' if ARGV[0] opts = Slop.parse do banner 'Usage: bio-publisci-server [options]' on 'uri', 'Store URI', argument: :optional on 't', 'type', 'The repository type', argument: :optional on 'a', 'sudo_pass', 'Password for sudo (currently needed to clear 4store)', argument: :optional on 'p', 'port', 'Sinatra port', argument: :optional on 'o', 'bind', 'Bind address ', argument: :optional end configure_server(opts) else # set :repository, RDF::FourStore::Repository.new('http://localhost:8080') set :repository, RDF::Repository.new settings.repository.load(File.dirname(__FILE__) + '/../resources/primer.ttl') end require_relative '../server/routes.rb' run! end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
publisci-0.1.2 | bin/bio-publisci-server |
bio-publisci-0.1.0 | bin/bio-publisci-server |