progress
the gridcolo site is progressing, slowly. the holdup is basing everything on webservices. webservices is not object oriented programming so its like being thrown back to 1980s development style. ive hit an activewebservices bug and found a workaround. im now up against a sqlite and/or sqlite-ruby adapter bug. sqlite has been very cool so far, id like to stay on it and away from postgresql for as long as possible but this bug suxorz.
api_method :find_by_openid, :expects => [:string], :returns => [:int] def find_by_openid(openid) User.find_by_openid(openid) end def test_find_by_openid result = invoke :find_by_openid, "http://donpdonp.myopenid.com/" assert_equal nil, result end 1) Error: test_find_by_openid(UserControllerApiTest): ActiveRecord::StatementInvalid: ActiveRecord::StatementInvalid /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ connection_adapters/sqlite_adapter.rb:262:in `table_structure' line 260-263: def table_structure(table_name) returning structure = execute("PRAGMA table_info(#{table_name})") do raise ActiveRecord::StatementInvalid if structure.empty? end end
ive added a puts statement to make sure table_name is "users" and ive run "pragma table_info(users)" from the sqlite3 command line and it works fine.