From 1510d98692c50532b9c0f1919d96228825f40054 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 23 Apr 2012 17:30:08 +0200 Subject: content-type negotiation implemented, url rewriting for puts --- lib/4store.rb | 175 +++++++++++++++++++++++++++++++++++++++++++++++++ lib/opentox-server.rb | 5 +- lib/opentox.rb | 70 ++++++++++++-------- opentox-server.gemspec | 2 + 4 files changed, 225 insertions(+), 27 deletions(-) create mode 100644 lib/4store.rb diff --git a/lib/4store.rb b/lib/4store.rb new file mode 100644 index 0000000..26d3445 --- /dev/null +++ b/lib/4store.rb @@ -0,0 +1,175 @@ +module OpenTox + module Backend + class FourStore + + #TODO: catch 4store errors + + @@mime_format = { + "application/rdf+xml" => :rdfxml, + "text/turtle" => :turtle, + "text/plain" => :ntriples, + "text/uri-list" => :uri_list, + "application/json" => :json, + "application/x-yaml" => :yaml, + "text/x-yaml" => :yaml, + "text/yaml" => :yaml, + "text/html" => :html, + # TODO: compression, forms + #/sparql/ => :sparql #removed to prevent sparql injections + } + + @@format_mime = { + :rdfxml => "application/rdf+xml", + :turtle => "text/turtle", + :ntriples => "text/plain", + :uri_list => "text/uri-list", + :json => "application/json", + :yaml => "text/yaml", + :html => "text/html", + } + + @@accept_formats = [:rdfxml, :turtle, :ntriples, :uri_list, :json, :yaml, :html] + @@content_type_formats = [:rdfxml, :turtle, :ntriples, :json, :yaml] + @@rdf_formats = [:rdfxml, :turtle, :ntriples] + + def self.list mime_type + mime_type = "text/html" if mime_type.match(%r{\*/\*}) + bad_request_error "'#{mime_type}' is not a supported mime type. Please specify one of #{@@accept_formats.collect{|f| @@format_mime[f]}.join(", ")} in the Accept Header." unless @@accept_formats.include? @@mime_format[mime_type] + if mime_type =~ /json|yaml|uri-list/ + sparql = "SELECT ?s WHERE {?s <#{RDF.type}> <#{@@class}>. }" + elsif mime_type =~ /turtle|html|rdf|plain/ + sparql = "CONSTRUCT {?s ?p ?o.} WHERE {?s <#{RDF.type}> <#{@@class}>; ?p ?o. }" + else + end + query sparql, mime_type + end + + def self.get uri, mime_type + mime_type = "text/html" if mime_type.match(%r{\*/\*}) + bad_request_error "'#{mime_type}' is not a supported mime type. Please specify one of #{@@accept_formats.collect{|f| @@format_mime[f]}.join(", ")} in the Accept Header." unless @@accept_formats.include? @@mime_format[mime_type] + not_found_error "#{uri} not found." unless list("text/uri-list").split("\n").include?(uri) + sparql = "CONSTRUCT {?s ?p ?o.} FROM <#{uri}> WHERE { ?s ?p ?o. }" + query sparql, mime_type + end + + def self.post uri, rdf, mime_type + bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.collect{|f| @@format_mime[f]}.join(", ")}." unless @@content_type_formats.include? @@mime_format[mime_type] + rdf = convert rdf, @@mime_format[mime_type], :ntriples, uri unless mime_type == 'text/plain' + RestClient.post File.join(four_store_uri,"data")+"/", :data => rdf, :graph => uri, "mime-type" => "application/x-turtle" # not very consistent in 4store + end + + def self.put uri, rdf, mime_type + bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.collect{|f| @@format_mime[f]}.join(", ")}." unless @@content_type_formats.include? @@mime_format[mime_type] + rdf = convert rdf, @@mime_format[mime_type], :ntriples, uri + rdf = "<#{uri}> <#{RDF.type}> <#{@@class}>." unless rdf + RestClient.put File.join(four_store_uri,"data",uri), rdf, :content_type => "application/x-turtle" # not very consistent in 4store + end + + def self.delete uri + RestClientWrapper.delete data_uri uri + end + + def self.query sparql, mime_type + if sparql =~ /SELECT/i + xml = RestClient.post File.join(four_store_uri,"sparql")+"/", :query => sparql + #TODO request tab delimited format to speed up parsing + list = parse_sparql_xml_results(xml).collect{|hash| hash["s"]} + case mime_type + when /json/ + return list.to_json + when /yaml/ + return list.to_yaml + when /uri-list/ + return list.join "\n" + else + bad_request_error "#{mime_type} is not a supported mime type for SELECT statements. Please use one of text/uri-list, application/json, text/yaml, text/html." + end + elsif sparql =~ /CONSTRUCT/i + nt = RestClient.get(sparql_uri, :params => { :query => sparql }, :accept => "text/plain").body + return nt if mime_type == 'text/plain' + case mime_type + when /turtle/ + return convert(nt,:ntriples, :turtle) + when /html/ + # TODO: fix and improve + html = "" + html += convert(nt,:ntriples, :turtle).gsub(%r{<(.*)>},'<\1>').gsub(/\n/,'
')#.gsub(/ /,' ') + html += "" + return html + when "application/rdf+xml" + return convert(nt,:ntriples, :rdfxml) + end + else + # TODO: check if this prevents SPARQL injections + bad_request_error "Only SELECT and CONSTRUCT are accepted SPARQL statements." + end + end + + private + + def self.convert rdf_string, input_format, output_format, rewrite_uri=nil + serialize(parse(rdf_string,input_format, rewrite_uri), output_format) + end + + def self.parse string, format, rewrite_uri + rdf = RDF::Graph.new + subject = nil + statements = [] # use array instead of graph for performance reasons + RDF::Reader.for(format).new(string) do |reader| + reader.each_statement do |statement| + subject = statement.subject if statement.predicate == RDF.type and statement.object == @@class + statements << statement + end + end + bad_request_error "No class specified with <#{RDF.type}> statement." unless subject + statements.each do |statement| + statement.subject = RDF::URI.new rewrite_uri if rewrite_uri and statement.subject == subject + rdf << statement + end + rdf + end + + def self.serialize rdf, format + if format == :turtle # prefixes seen to need RDF::N3 + string = RDF::N3::Writer.for(format).buffer(:prefixes => {:ot => "http://www.opentox.org/api/1.2#"}) do |writer| + rdf.each{|statement| writer << statement} + end + else + string = RDF::Writer.for(format).buffer do |writer| + rdf.each{|statement| writer << statement} + end + end + string + end + + def self.four_store_uri + $four_store[:uri].sub(%r{//},"//#{$four_store[:user]}:#{$four_store[:password]}@") + end + + def self.sparql_uri + File.join(four_store_uri, "sparql") + '/' + end + + def self.data_uri uri + File.join(four_store_uri, "data","?graph=#{uri}") + end + + def self.parse_sparql_xml_results(xml) + results = [] + doc = REXML::Document.new(REXML::Source.new(xml)) + doc.elements.each("*/results/result") do |result| + result_hash = {} + result.elements.each do |binding| + key = binding.attributes["name"] + value = binding.elements[1].text + type = binding.elements[1].name + result_hash[key] = value + end + results.push result_hash + end + results + end + + end + end +end diff --git a/lib/opentox-server.rb b/lib/opentox-server.rb index 358788b..3e5e68f 100644 --- a/lib/opentox-server.rb +++ b/lib/opentox-server.rb @@ -4,7 +4,10 @@ require 'rack/contrib' require 'sinatra' require 'sinatra/url_for' require 'roo' +require '4store-ruby' +require 'rdf/n3' require File.join(File.dirname(__FILE__),"environment.rb") +require File.join(File.dirname(__FILE__),"4store.rb") +#require File.join(File.dirname(__FILE__),"file-store.rb") require File.join(File.dirname(__FILE__),"opentox.rb") -require File.join(File.dirname(__FILE__),"file-store.rb") require File.join(File.dirname(__FILE__),"authorization-helper.rb") diff --git a/lib/opentox.rb b/lib/opentox.rb index e3c1f3b..f71eaa2 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -1,12 +1,15 @@ require 'sinatra/base' require "sinatra/reloader" +require File.join(ENV["HOME"],".opentox","config","default.rb") + +ENV["RACK_ENV"] ||= "production" module OpenTox # Base class for OpenTox services class Service < Sinatra::Base + include Backend - helpers Sinatra::UrlForHelper # use OpenTox error handling set :raise_errors, false set :show_exceptions, false @@ -16,36 +19,15 @@ module OpenTox register Sinatra::Reloader end - helpers do - def uri - params[:id] ? url_for("/#{params[:id]}", :full) : "#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}" - end - end - before do - @accept = request.env['HTTP_ACCEPT'] - response['Content-Type'] = @accept - # TODO: A+A + request.content_type ? response['Content-Type'] = request.content_type : response['Content-Type'] = request.env['HTTP_ACCEPT'] end + # Attention: Error within tasks are catched by Task.create error do - # TODO: convert to OpenTox::Error and set URI error = request.env['sinatra.error'] - #error.uri = uri if error.respond_to? :report - # Errors are formated according to acccept-header - case @accept - when 'application/rdf+xml' - body = error.report.to_rdfxml - when /html/ - # TODO - # body = error.report.to_html - body = error.report.to_turtle - when "text/n3" - body = error.report.to_ntriples - else - body = error.report.to_turtle - end + body = error.report.to_turtle else response['Content-Type'] = "text/plain" body = error.message @@ -54,6 +36,42 @@ module OpenTox error.respond_to?(:http_code) ? code = error.http_code : code = 500 halt code, body end + + # Default methods, may be overwritten by derived services + # see http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/ + + # Get a list of objects at the server + get '/?' do + FourStore.list request.env['HTTP_ACCEPT'] + end + + # Create a new URI, does not accept a payload (use put for this purpose) + post '/?' do + uri = uri(SecureRandom.uuid) + FourStore.put uri, request.body.read, request.content_type + response['Content-Type'] = "text/uri-list" + uri + end + + # Get resource representation + get '/:id/?' do + FourStore.get(uri("/#{params[:id]}"), request.env['HTTP_ACCEPT']) + end + + # Modify (add rdf) a resource + post '/:id/?' do + FourStore.post uri("/#{params[:id]}"), request.body.read, request.content_type + end + + # Create or updata a resource + put '/:id/?' do + FourStore.put uri("/#{params[:id]}"), request.body.read, request.content_type + end + + # Delete a resource + delete '/:id/?' do + FourStore.delete uri("/#{params[:id]}") + end + end end - diff --git a/opentox-server.gemspec b/opentox-server.gemspec index 08438f0..9a6f1aa 100644 --- a/opentox-server.gemspec +++ b/opentox-server.gemspec @@ -27,4 +27,6 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'emk-sinatra-url-for' s.add_runtime_dependency 'roo' s.add_runtime_dependency 'unicorn' + s.add_runtime_dependency '4store-ruby' + s.add_runtime_dependency 'rdf-n3' end -- cgit v1.2.3 From 4bc73a2190254239742e33830747ff31fb5e431b Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 25 Apr 2012 15:24:04 +0200 Subject: new post/put policy --- lib/4store.rb | 46 ++++++++++++++++++++++++++++++---------------- lib/opentox.rb | 8 +++++--- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/lib/4store.rb b/lib/4store.rb index 26d3445..b20af00 100644 --- a/lib/4store.rb +++ b/lib/4store.rb @@ -9,10 +9,10 @@ module OpenTox "text/turtle" => :turtle, "text/plain" => :ntriples, "text/uri-list" => :uri_list, - "application/json" => :json, - "application/x-yaml" => :yaml, - "text/x-yaml" => :yaml, - "text/yaml" => :yaml, + #"application/json" => :json, + #"application/x-yaml" => :yaml, + #"text/x-yaml" => :yaml, + #"text/yaml" => :yaml, "text/html" => :html, # TODO: compression, forms #/sparql/ => :sparql #removed to prevent sparql injections @@ -23,13 +23,13 @@ module OpenTox :turtle => "text/turtle", :ntriples => "text/plain", :uri_list => "text/uri-list", - :json => "application/json", - :yaml => "text/yaml", + #:json => "application/json", + #:yaml => "text/yaml", :html => "text/html", } - @@accept_formats = [:rdfxml, :turtle, :ntriples, :uri_list, :json, :yaml, :html] - @@content_type_formats = [:rdfxml, :turtle, :ntriples, :json, :yaml] + @@accept_formats = [:rdfxml, :turtle, :ntriples, :uri_list, :html] #, :json, :yaml] + @@content_type_formats = [:rdfxml, :turtle, :ntriples]#, :json, :yaml] @@rdf_formats = [:rdfxml, :turtle, :ntriples] def self.list mime_type @@ -39,7 +39,6 @@ module OpenTox sparql = "SELECT ?s WHERE {?s <#{RDF.type}> <#{@@class}>. }" elsif mime_type =~ /turtle|html|rdf|plain/ sparql = "CONSTRUCT {?s ?p ?o.} WHERE {?s <#{RDF.type}> <#{@@class}>; ?p ?o. }" - else end query sparql, mime_type end @@ -54,15 +53,21 @@ module OpenTox def self.post uri, rdf, mime_type bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.collect{|f| @@format_mime[f]}.join(", ")}." unless @@content_type_formats.include? @@mime_format[mime_type] - rdf = convert rdf, @@mime_format[mime_type], :ntriples, uri unless mime_type == 'text/plain' + rdf = convert rdf, @@mime_format[mime_type], :ntriples#, uri unless mime_type == 'text/plain' RestClient.post File.join(four_store_uri,"data")+"/", :data => rdf, :graph => uri, "mime-type" => "application/x-turtle" # not very consistent in 4store end - def self.put uri, rdf, mime_type + def self.put uri, rdf, mime_type, skip_rewrite=false bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.collect{|f| @@format_mime[f]}.join(", ")}." unless @@content_type_formats.include? @@mime_format[mime_type] - rdf = convert rdf, @@mime_format[mime_type], :ntriples, uri - rdf = "<#{uri}> <#{RDF.type}> <#{@@class}>." unless rdf - RestClient.put File.join(four_store_uri,"data",uri), rdf, :content_type => "application/x-turtle" # not very consistent in 4store + uuid = uri.sub(/\/$/,'').split('/').last + bad_request_error "'#{uri}' is not a valid URI." unless uuid =~ /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/ + if !skip_rewrite + rdf = convert rdf, @@mime_format[mime_type], :ntriples, uri + elsif mime_type != "text/plain" # ntriples are not converted + rdf = convert rdf, @@mime_format[mime_type], :ntriples + end + rdf = "<#{uri}> <#{RDF.type}> <#{@@class}>." unless rdf # create empty resource + RestClient.put File.join(four_store_uri,"data",uri), rdf, :content_type => "application/x-turtle" # content-type not very consistent in 4store end def self.delete uri @@ -108,10 +113,10 @@ module OpenTox private def self.convert rdf_string, input_format, output_format, rewrite_uri=nil - serialize(parse(rdf_string,input_format, rewrite_uri), output_format) + rewrite_uri ? serialize(parse_and_rewrite_uri(rdf_string,input_format, rewrite_uri), output_format) : serialize(parse(rdf_string,input_format), output_format) end - def self.parse string, format, rewrite_uri + def self.parse_and_rewrite_uri string, format, rewrite_uri rdf = RDF::Graph.new subject = nil statements = [] # use array instead of graph for performance reasons @@ -129,8 +134,17 @@ module OpenTox rdf end + def self.parse string, format + rdf = RDF::Graph.new + RDF::Reader.for(format).new(string) do |reader| + reader.each_statement { |statement| rdf << statement } + end + rdf + end + def self.serialize rdf, format if format == :turtle # prefixes seen to need RDF::N3 + # TODO add prefixes string = RDF::N3::Writer.for(format).buffer(:prefixes => {:ot => "http://www.opentox.org/api/1.2#"}) do |writer| rdf.each{|statement| writer << statement} end diff --git a/lib/opentox.rb b/lib/opentox.rb index f71eaa2..9fac2eb 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -45,10 +45,12 @@ module OpenTox FourStore.list request.env['HTTP_ACCEPT'] end - # Create a new URI, does not accept a payload (use put for this purpose) + # Create a new resource + # TODO: handle multipart uploads post '/?' do + rdf = request.body.read uri = uri(SecureRandom.uuid) - FourStore.put uri, request.body.read, request.content_type + FourStore.put(uri, rdf, request.content_type) unless rdf == '' response['Content-Type'] = "text/uri-list" uri end @@ -58,7 +60,7 @@ module OpenTox FourStore.get(uri("/#{params[:id]}"), request.env['HTTP_ACCEPT']) end - # Modify (add rdf) a resource + # Modify (i.e. add rdf statments to) a resource post '/:id/?' do FourStore.post uri("/#{params[:id]}"), request.body.read, request.content_type end -- cgit v1.2.3 From 7823d94600673060d3194cbd70c766486dbd592f Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 26 Apr 2012 15:44:10 +0000 Subject: environment.rb removed --- lib/environment.rb | 41 ----------------------------------------- lib/opentox-server.rb | 4 +--- lib/opentox.rb | 4 +++- opentox-server.gemspec | 1 - 4 files changed, 4 insertions(+), 46 deletions(-) delete mode 100644 lib/environment.rb diff --git a/lib/environment.rb b/lib/environment.rb deleted file mode 100644 index 3889dfb..0000000 --- a/lib/environment.rb +++ /dev/null @@ -1,41 +0,0 @@ -# set default environment -ENV['RACK_ENV'] = 'production' unless ENV['RACK_ENV'] - -# load/setup configuration -basedir = File.join(ENV['HOME'], ".opentox") -config_dir = File.join(basedir, "config") -config_file = File.join(config_dir, "#{ENV['RACK_ENV']}.yaml") - -TMP_DIR = File.join(basedir, "tmp") -LOG_DIR = File.join(basedir, "log") - -=begin -if File.exist?(config_file) - CONFIG = YAML.load_file(config_file) - not_found_error "Could not load configuration from \"#{config_file.to_s}\"" unless CONFIG -else - FileUtils.mkdir_p TMP_DIR - FileUtils.mkdir_p LOG_DIR - FileUtils.mkdir_p config_dir - puts "Please edit #{config_file} and restart your application." - exit -end -=end - -logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log" -$logger = OTLogger.new(logfile) - -=begin -if CONFIG[:logger] and CONFIG[:logger] == "debug" - $logger.level = Logger::DEBUG -else - $logger.level = Logger::WARN -end - -# TODO: move to opentox-client??? -AA_SERVER = CONFIG[:authorization] ? (CONFIG[:authorization][:server] ? CONFIG[:authorization][:server] : nil) : nil -CONFIG[:authorization][:authenticate_request] = [""] unless CONFIG[:authorization][:authenticate_request] -CONFIG[:authorization][:authorize_request] = [""] unless CONFIG[:authorization][:authorize_request] -CONFIG[:authorization][:free_request] = [""] unless CONFIG[:authorization][:free_request] -=end - diff --git a/lib/opentox-server.rb b/lib/opentox-server.rb index 3e5e68f..35a1224 100644 --- a/lib/opentox-server.rb +++ b/lib/opentox-server.rb @@ -4,10 +4,8 @@ require 'rack/contrib' require 'sinatra' require 'sinatra/url_for' require 'roo' -require '4store-ruby' require 'rdf/n3' -require File.join(File.dirname(__FILE__),"environment.rb") +#require File.join(File.dirname(__FILE__),"environment.rb") require File.join(File.dirname(__FILE__),"4store.rb") -#require File.join(File.dirname(__FILE__),"file-store.rb") require File.join(File.dirname(__FILE__),"opentox.rb") require File.join(File.dirname(__FILE__),"authorization-helper.rb") diff --git a/lib/opentox.rb b/lib/opentox.rb index 9fac2eb..7a73d66 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -1,9 +1,11 @@ require 'sinatra/base' require "sinatra/reloader" -require File.join(ENV["HOME"],".opentox","config","default.rb") ENV["RACK_ENV"] ||= "production" +logfile = File.join(ENV['HOME'], ".opentox","log","#{ENV["RACK_ENV"]}.log") +$logger = OTLogger.new(logfile) + module OpenTox # Base class for OpenTox services diff --git a/opentox-server.gemspec b/opentox-server.gemspec index 9a6f1aa..6746b5a 100644 --- a/opentox-server.gemspec +++ b/opentox-server.gemspec @@ -27,6 +27,5 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'emk-sinatra-url-for' s.add_runtime_dependency 'roo' s.add_runtime_dependency 'unicorn' - s.add_runtime_dependency '4store-ruby' s.add_runtime_dependency 'rdf-n3' end -- cgit v1.2.3 From e762855ecf50d5fe38f556342c7a9947ba3c0b78 Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 27 Apr 2012 17:48:59 +0400 Subject: remove emk-url-for --- opentox-server.gemspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/opentox-server.gemspec b/opentox-server.gemspec index 9a6f1aa..cb09ca9 100644 --- a/opentox-server.gemspec +++ b/opentox-server.gemspec @@ -24,9 +24,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'rack-contrib' s.add_runtime_dependency 'sinatra' s.add_runtime_dependency 'sinatra-contrib' - s.add_runtime_dependency 'emk-sinatra-url-for' s.add_runtime_dependency 'roo' s.add_runtime_dependency 'unicorn' - s.add_runtime_dependency '4store-ruby' s.add_runtime_dependency 'rdf-n3' end -- cgit v1.2.3 From 195015aab03804c7c8a230277230fbdeabf018e2 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 30 Apr 2012 13:10:20 +0400 Subject: removed Gemfile.lock --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4040c6c..6a65a36 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.gem .bundle -Gemfile.lock pkg/* -- cgit v1.2.3 From 5a908ccc43e2b81102cadfac1b54971ce88fbc55 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 30 Apr 2012 13:14:28 +0400 Subject: removed sinatra/url_for --- lib/opentox-server.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/opentox-server.rb b/lib/opentox-server.rb index 3e5e68f..3135048 100644 --- a/lib/opentox-server.rb +++ b/lib/opentox-server.rb @@ -1,10 +1,8 @@ -require "opentox-client" +require 'opentox-client' require 'rack' require 'rack/contrib' require 'sinatra' -require 'sinatra/url_for' require 'roo' -require '4store-ruby' require 'rdf/n3' require File.join(File.dirname(__FILE__),"environment.rb") require File.join(File.dirname(__FILE__),"4store.rb") -- cgit v1.2.3 From a4de970229858e0bcb0427bf70b536f474babaf1 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 30 Apr 2012 13:16:41 +0400 Subject: temporarily included to adjust the right gems --- Gemfile.lock | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..2f9d8a2 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,104 @@ +PATH + remote: . + specs: + opentox-server (0.0.2pre) + opentox-client + rack + rack-contrib + rdf-n3 + roo + sinatra + sinatra-contrib + unicorn + +PATH + remote: ~/opentox-client + specs: + opentox-client (0.0.2pre) + bundler + open4 + rdf + rdf-raptor + rest-client + +GEM + remote: http://rubygems.org/ + specs: + addressable (2.2.7) + backports (2.5.1) + choice (0.1.6) + eventmachine (0.12.10) + faraday (0.8.0) + multipart-post (~> 1.1) + ffi (1.0.11) + google-spreadsheet-ruby (0.1.8) + nokogiri (>= 1.4.3.1) + oauth (>= 0.3.6) + oauth2 (>= 0.5.0) + httpauth (0.1) + kgio (2.7.4) + log4r (1.1.10) + mime-types (1.18) + multi_json (1.3.2) + multipart-post (1.1.5) + nokogiri (1.5.2) + oauth (0.4.6) + oauth2 (0.7.1) + faraday (~> 0.8) + httpauth (~> 0.1) + multi_json (~> 1.0) + rack (~> 1.4) + open4 (1.3.0) + rack (1.4.1) + rack-contrib (1.1.0) + rack (>= 0.9.1) + rack-protection (1.2.0) + rack + rack-test (0.6.1) + rack (>= 1.0) + raindrops (0.8.0) + rdf (0.3.5.2) + addressable (>= 2.2.6) + rdf-n3 (0.3.6) + rdf (>= 0.3.4) + rdf-raptor (0.4.1) + ffi (>= 1.0) + rdf (~> 0.3.0) + rest-client (1.6.7) + mime-types (>= 1.16) + roo (1.10.1) + choice (>= 0.1.4) + google-spreadsheet-ruby (>= 0.1.5) + nokogiri (>= 1.5.0) + rubyzip (>= 0.9.4) + spreadsheet (> 0.6.4) + todonotes (>= 0.1.0) + ruby-ole (1.2.11.3) + rubyzip (0.9.8) + sinatra (1.3.2) + rack (~> 1.3, >= 1.3.6) + rack-protection (~> 1.2) + tilt (~> 1.3, >= 1.3.3) + sinatra-contrib (1.3.1) + backports (>= 2.0) + eventmachine + rack-protection + rack-test + sinatra (~> 1.3.0) + tilt (~> 1.3) + spreadsheet (0.6.8) + ruby-ole (>= 1.0) + tilt (1.3.3) + todonotes (0.1.0) + log4r + unicorn (4.3.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) + +PLATFORMS + ruby + +DEPENDENCIES + opentox-client! + opentox-server! -- cgit v1.2.3 From a7316bfadbab9ca60450b38fc8a417742c47772c Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 7 May 2012 18:08:11 +0200 Subject: remove Gemfile-lock --- Gemfile.lock | 104 ----------------------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 2f9d8a2..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,104 +0,0 @@ -PATH - remote: . - specs: - opentox-server (0.0.2pre) - opentox-client - rack - rack-contrib - rdf-n3 - roo - sinatra - sinatra-contrib - unicorn - -PATH - remote: ~/opentox-client - specs: - opentox-client (0.0.2pre) - bundler - open4 - rdf - rdf-raptor - rest-client - -GEM - remote: http://rubygems.org/ - specs: - addressable (2.2.7) - backports (2.5.1) - choice (0.1.6) - eventmachine (0.12.10) - faraday (0.8.0) - multipart-post (~> 1.1) - ffi (1.0.11) - google-spreadsheet-ruby (0.1.8) - nokogiri (>= 1.4.3.1) - oauth (>= 0.3.6) - oauth2 (>= 0.5.0) - httpauth (0.1) - kgio (2.7.4) - log4r (1.1.10) - mime-types (1.18) - multi_json (1.3.2) - multipart-post (1.1.5) - nokogiri (1.5.2) - oauth (0.4.6) - oauth2 (0.7.1) - faraday (~> 0.8) - httpauth (~> 0.1) - multi_json (~> 1.0) - rack (~> 1.4) - open4 (1.3.0) - rack (1.4.1) - rack-contrib (1.1.0) - rack (>= 0.9.1) - rack-protection (1.2.0) - rack - rack-test (0.6.1) - rack (>= 1.0) - raindrops (0.8.0) - rdf (0.3.5.2) - addressable (>= 2.2.6) - rdf-n3 (0.3.6) - rdf (>= 0.3.4) - rdf-raptor (0.4.1) - ffi (>= 1.0) - rdf (~> 0.3.0) - rest-client (1.6.7) - mime-types (>= 1.16) - roo (1.10.1) - choice (>= 0.1.4) - google-spreadsheet-ruby (>= 0.1.5) - nokogiri (>= 1.5.0) - rubyzip (>= 0.9.4) - spreadsheet (> 0.6.4) - todonotes (>= 0.1.0) - ruby-ole (1.2.11.3) - rubyzip (0.9.8) - sinatra (1.3.2) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) - sinatra-contrib (1.3.1) - backports (>= 2.0) - eventmachine - rack-protection - rack-test - sinatra (~> 1.3.0) - tilt (~> 1.3) - spreadsheet (0.6.8) - ruby-ole (>= 1.0) - tilt (1.3.3) - todonotes (0.1.0) - log4r - unicorn (4.3.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - -PLATFORMS - ruby - -DEPENDENCIES - opentox-client! - opentox-server! -- cgit v1.2.3 From e7dd33d05f111cd25b9fb24e91ebb5f362413eb2 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 7 May 2012 18:09:10 +0200 Subject: add Gemfile.lock to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6a65a36..5a5fa8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.gem .bundle pkg/* +Gemfile.lock +*~ -- cgit v1.2.3 From bacd84fc65f7cb2cd19f6e675f21718bf6032e7b Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 7 May 2012 18:15:43 +0200 Subject: add VERSION and ChangeLog --- ChangeLog | 2 ++ VERSION | 1 + 2 files changed, 3 insertions(+) create mode 100644 ChangeLog create mode 100644 VERSION diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..08d2402 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2 @@ +v0.0.3 2012-05-07 +* switch from v0.0.2pre to v0.0.3 diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..bcab45a --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.3 -- cgit v1.2.3 From 05a640c539455e36355a2ca3b69dcfc08deab1b1 Mon Sep 17 00:00:00 2001 From: rautenberg Date: Mon, 7 May 2012 18:16:03 +0200 Subject: set gemspec version to 0.0.3 --- opentox-server.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentox-server.gemspec b/opentox-server.gemspec index cb09ca9..1074fbf 100644 --- a/opentox-server.gemspec +++ b/opentox-server.gemspec @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__) Gem::Specification.new do |s| s.name = "opentox-server" - s.version = "0.0.2pre" + s.version = "0.0.3" s.authors = ["Christoph Helma, Martin Guetlein, Andreas Maunz, Micha Rautenberg, David Vorgrimmler"] s.email = ["helma@in-silico.ch"] s.homepage = "http://github.com/opentox/opentox-server" -- cgit v1.2.3