bin/checkps in wizardwerdna-pokerstats-1.0.14 vs bin/checkps in wizardwerdna-pokerstats-1.0.15

- old
+ new

@@ -3,14 +3,14 @@ require "rubygems" require "activesupport" require "open-uri" # ENV['RAILS_ENV'] = ENV['RAILS_ENV'] || 'development' # require File.expand_path(File.dirname(__FILE__) + "/../config/environment") -# require File.expand_path(File.dirname(__FILE__) + "/pokerstats/pokerstars_file") -# require File.expand_path(File.dirname(__FILE__) + '/pokerstats/player_statistics') -require 'pokerstats/pokerstars_file' -require 'pokerstats/player_statistics' +require File.expand_path(File.dirname(__FILE__) + "/../lib/pokerstats/pokerstars_file") +require File.expand_path(File.dirname(__FILE__) + '/../lib/pokerstats/player_statistics') +# require 'pokerstats/pokerstars_file' +# require 'pokerstats/player_statistics' def search_poker_edge(playername, players_shown = {}) return if players_shown[playername] escaped_playername = URI.escape(playername).gsub(/["'\[\]]/,'\\\\\&').gsub(/[\[\]]/,'\\\\\\\\\&') result = `curl -s http://www.poker-edge.com/whoami.php?site=Stars\\&name=#{escaped_playername}` @@ -50,12 +50,12 @@ def dopsfile(file, players_shown) return if File.directory?(file) players = {} last = nil - statistics = PlayerStatistics.new - PokerstarsFile.open(file).each do |handrecord| + statistics = Pokerstats::PlayerStatistics.new + Pokerstats::PokerstarsFile.open(file).each do |handrecord| begin handrecord.parse statistics.record(handrecord) last = handrecord rescue Exception => e @@ -160,11 +160,10 @@ printf "%-20s %s\n", playername, players_shown[playername] puts "="*80 end end - opts = GetoptLong.new( [ "--help", "-h", GetoptLong::NO_ARGUMENT], [ "--version", "-v", GetoptLong::NO_ARGUMENT], [ "--user", "-u", GetoptLong::OPTIONAL_ARGUMENT] ) @@ -186,6 +185,6 @@ if $*.empty? display_recent_pokerstars_results user else display_poker_edge_results -end +end \ No newline at end of file