Skip to content

Commit

Permalink
native: better error handling & bump to 0.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
asmuth committed Mar 12, 2012
1 parent 96182a8 commit 34308c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lib/recommendify/jaccard_input_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ def run_native(item_id)
raise "error: dirty exit (#{$?})" if $? != 0
res.split("\n").map do |line|
sim = line.match(/OUT: \(([^\)]*)\) \(([^\)]*)\)/)
raise "error: #{res}" if !sim && !(res||"").include?('exit:')
[sim[1], sim[2].to_f]
end
unless sim
raise "error: #{res}" unless (res||"").include?('exit:')
else
[sim[1], sim[2].to_f]
end
end.compact
end

def check_native
Expand Down
2 changes: 1 addition & 1 deletion recommendify.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)

Gem::Specification.new do |s|
s.name = "recommendify"
s.version = "0.3.5"
s.version = "0.3.6"
s.date = Date.today.to_s
s.platform = Gem::Platform::RUBY
s.authors = ["Paul Asmuth"]
Expand Down

0 comments on commit 34308c4

Please sign in to comment.