From 6b9e012576857fbc6c51cd86581cca792f367cdf Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 15 Jun 2011 16:46:12 +0200 Subject: smarts escape fixed --- lib/compound.rb | 6 +++--- opentox-ruby.gemspec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/compound.rb b/lib/compound.rb index a85507b..f631ca9 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -159,9 +159,9 @@ module OpenTox # @param [Array] deactivating Array with deactivating Smarts strings # @return [String] URI for compound image with highlighted fragments def matching_smarts_image_uri(activating, deactivating) - activating_smarts = URI.encode "\"#{activating.join("\"/\"")}\"" - deactivating_smarts = URI.encode "\"#{deactivating.join("\"/\"")}\"" - File.join @uri, "smarts/activating", URI.encode(activating_smarts),"deactivating", URI.encode(deactivating_smarts) + activating_smarts = "\"#{activating.collect{|smarts| CGI.escape(smarts)}.join("\"/\"")}\"" + deactivating_smarts = "\"#{deactivating.collect{|smarts| CGI.escape(smarts)}.join("\"/\"")}\"" + File.join @uri, "smarts/activating", activating_smarts, "deactivating", deactivating_smarts end diff --git a/opentox-ruby.gemspec b/opentox-ruby.gemspec index e62eec5..d316689 100644 --- a/opentox-ruby.gemspec +++ b/opentox-ruby.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{opentox-ruby} - s.version = "2.0.0" + s.version = "2.0.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Christoph Helma, Martin Guetlein, Andreas Maunz, Micha Rautenberg, David Vorgrimmler"] - s.date = %q{2011-05-23} + s.date = %q{2011-06-15} s.description = %q{Ruby wrapper for the OpenTox REST API (http://www.opentox.org)} s.email = %q{helma@in-silico.ch} s.executables = ["opentox-install-debian.sh", "opentox-install-ubuntu.sh"] -- cgit v1.2.3