diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-02-10 15:49:04 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-02-10 15:49:04 +0100 |
commit | 616bb4b7aefed40cda0e09c88dc35ce1a82f8106 (patch) | |
tree | e6e2a082bc0da159f23de156fd46884e09aa0f71 | |
parent | 1f6625cffbb49ec93f6b4647ca1d11d01c5d11ea (diff) |
small fixes
-rw-r--r-- | lib/parser.rb | 2 | ||||
-rw-r--r-- | lib/rest_client_wrapper.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/parser.rb b/lib/parser.rb index 2f59d15..a2a96be 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -84,7 +84,7 @@ module OpenTox uri = triple[0] end end - File.delete(file) + File.delete(file.path) # load metadata metadata = {} triples.each_line do |line| diff --git a/lib/rest_client_wrapper.rb b/lib/rest_client_wrapper.rb index 7a6ed2a..d3136c7 100644 --- a/lib/rest_client_wrapper.rb +++ b/lib/rest_client_wrapper.rb @@ -62,6 +62,7 @@ module OpenTox waiting_task!=nil and !(waiting_task.is_a?(Task) || waiting_task.is_a?(SubTask)) headers.each{ |k,v| headers.delete(k) if v==nil } if headers #remove keys with empty values, as this can cause problems ## PENDING partner services accept subjectid only in header + headers = {} unless headers headers[:subjectid] = payload.delete(:subjectid) if payload and payload.is_a?(Hash) and payload.has_key?(:subjectid) # PENDING needed for NUTA, until we finally agree on how to send subjectid |