]> projects.mako.cc - selectricity/log
selectricity
17 years agoAdd a fix for a NoMethodError when WHOIS/DNS server(s) time out.
John Dong [Tue, 21 Aug 2007 17:49:04 +0000 (13:49 -0400)]
Add a fix for a NoMethodError when WHOIS/DNS server(s) time out.

17 years agoFinished organzing preferential vote tables into one partial. Also changed RubyVote...
<jlsharps@mit.edu> [Tue, 21 Aug 2007 16:57:40 +0000 (12:57 -0400)]
Finished organzing preferential vote tables into one partial. Also changed RubyVote's victories_and_ties method to return a hash of hashes which stores both victories and ties.

17 years agoMerged from jdong; lots of escaping fixes
John Dong [Mon, 20 Aug 2007 21:32:57 +0000 (17:32 -0400)]
Merged from jdong; lots of escaping fixes

17 years agoMerge from head
John Dong [Mon, 20 Aug 2007 21:32:37 +0000 (17:32 -0400)]
Merge from head

17 years agoClose tables
John Dong [Mon, 20 Aug 2007 21:29:51 +0000 (17:29 -0400)]
Close tables

17 years agoAdd a bunch of fixes to HTML escaping, and a test case for it
John Dong [Mon, 20 Aug 2007 21:25:50 +0000 (17:25 -0400)]
Add a bunch of fixes to HTML escaping, and a test case for it

17 years agoAdded logic to pref_table.rhtml to prevent it from throwing an error on an empty...
<jlsharps@mit.edu> [Mon, 20 Aug 2007 21:02:14 +0000 (17:02 -0400)]
Added logic to pref_table.rhtml to prevent it from throwing an error on an empty results page.

17 years agoStreamlined some graphign contorller methods and took out the 'voters_per_day' method...
<jlsharps@mit.edu> [Mon, 20 Aug 2007 20:46:41 +0000 (16:46 -0400)]
Streamlined some graphign contorller methods and took out the 'voters_per_day' method in the results page. Merge from mako.

17 years agoMerge jdong; mostly functional testing work
John Dong [Mon, 20 Aug 2007 20:10:48 +0000 (16:10 -0400)]
Merge jdong; mostly functional testing work

17 years agoFix error when getting a quickvote result of nonexistent ident
John Dong [Mon, 20 Aug 2007 20:05:46 +0000 (16:05 -0400)]
Fix error when getting a quickvote result of nonexistent ident

17 years agoAdd test case for attempting to cast another vote with same sessid
John Dong [Mon, 20 Aug 2007 20:02:42 +0000 (16:02 -0400)]
Add test case for attempting to cast another vote with same sessid

17 years ago* Fix the session_id accessor. Previous version looks for wrong method
John Dong [Mon, 20 Aug 2007 19:56:39 +0000 (15:56 -0400)]
* Fix the session_id accessor. Previous version looks for wrong method
* Added new testcases
  - Creating same-name quickvote
  - Test retrieving results of quickvotes with 0, 1, and 5 votes
  - Test casting a quickvote

17 years agoAdd some empty request testcases.
John Dong [Mon, 20 Aug 2007 19:05:04 +0000 (15:05 -0400)]
Add some empty request testcases.

BREAKAGE: Justin, your new graphs break the results page on empty stuff again (see rake output). Fix.

17 years agoRemove deprecated start_form_tag and end_form_tags. Now you're supposed to do form_ta...
John Dong [Mon, 20 Aug 2007 18:58:30 +0000 (14:58 -0400)]
Remove deprecated start_form_tag and end_form_tags. Now you're supposed to do form_tag() do / end blocks.

17 years agoAdd a few more testcases
John Dong [Mon, 20 Aug 2007 18:43:15 +0000 (14:43 -0400)]
Add a few more testcases

17 years agoOh oops, left in some test cruft in quickvote_controller
John Dong [Mon, 20 Aug 2007 18:36:59 +0000 (14:36 -0400)]
Oh oops, left in some test cruft in quickvote_controller

17 years agoBlarg, finally got functional testing framework working. Had to override the TestSess...
John Dong [Mon, 20 Aug 2007 18:32:52 +0000 (14:32 -0400)]
Blarg, finally got functional testing framework working. Had to override the TestSession class

17 years agoMerged from Mako.
<jlsharps@mit.edu> [Mon, 20 Aug 2007 17:38:35 +0000 (13:38 -0400)]
Merged from Mako.

17 years agoMerge mako
John Dong [Mon, 20 Aug 2007 16:03:05 +0000 (12:03 -0400)]
Merge mako

17 years agoCleaned up some of the test cases.
<mako@atdot.cc> [Mon, 20 Aug 2007 15:51:47 +0000 (11:51 -0400)]
Cleaned up some of the test cases.

17 years agoimported new version of ruby vote
<mako@atdot.cc> [Sat, 18 Aug 2007 00:08:06 +0000 (20:08 -0400)]
imported new version of ruby vote

17 years agoCheck in a bit of partial work on controller testcases, but I'm calling it a day...
John Dong [Fri, 17 Aug 2007 23:53:12 +0000 (19:53 -0400)]
Check in a bit of partial work on controller testcases, but I'm calling it  a day...

17 years agoMerge from jdong
John Dong [Fri, 17 Aug 2007 23:45:32 +0000 (19:45 -0400)]
Merge from jdong

17 years agoFix more DeprecationWarnings
John Dong [Fri, 17 Aug 2007 23:44:48 +0000 (19:44 -0400)]
Fix more DeprecationWarnings

17 years agoMerge head
John Dong [Fri, 17 Aug 2007 23:35:41 +0000 (19:35 -0400)]
Merge head

17 years agoMerge from jdong, XMLRPC changes and testcases
John Dong [Fri, 17 Aug 2007 23:34:05 +0000 (19:34 -0400)]
Merge from jdong, XMLRPC changes and testcases

17 years agoAdd several testcases for casting quickvotes with invalid information
John Dong [Fri, 17 Aug 2007 23:33:00 +0000 (19:33 -0400)]
Add several testcases for casting quickvotes with invalid information

17 years ago* Add a few testcases for checking for nonexistent things
John Dong [Fri, 17 Aug 2007 23:18:05 +0000 (19:18 -0400)]
* Add a few testcases for checking for nonexistent things
* Change helpers to be a bit more streamlined in the way they handle assertions failures vs unexpected exceptions.

17 years agoImprove consistency of XMLRPC error reporting. Now, all error conditions will raise...
John Dong [Fri, 17 Aug 2007 23:16:34 +0000 (19:16 -0400)]
Improve consistency of XMLRPC error reporting. Now, all error conditions will raise an exception. Before, there was an inconsistent mix between raising exceptions and returning nil objects. Nil objects are much less desirable because the client must explicitly check for errors and some errors might silently pass through and produce incorrect results

17 years agoAdd assert_cast_quickvote_succeeds/fails helper, and changed the fails helpers to...
John Dong [Fri, 17 Aug 2007 22:46:01 +0000 (18:46 -0400)]
Add assert_cast_quickvote_succeeds/fails helper, and changed the fails helpers to instead check that the _succeeds  helper doesn't really succeed.

17 years agoAlso expose voter's Session ID
John Dong [Fri, 17 Aug 2007 22:25:53 +0000 (18:25 -0400)]
Also expose voter's Session ID

17 years agoAdded Sparklines controller and dependency, see README. Created method and table...
<jlsharps@mit.edu> [Fri, 17 Aug 2007 22:07:59 +0000 (18:07 -0400)]
Added Sparklines controller and dependency, see README. Created method and table for margins of victory (i.e won by how much) and ties, in rubyvote, has already been svn'd.

17 years agoMerge from jdong; all testcases should succeed at this point, and all deprecations...
John Dong [Fri, 17 Aug 2007 22:00:31 +0000 (18:00 -0400)]
Merge from jdong; all testcases should succeed at this point, and all deprecations should be gone

17 years agoFix validation of candidate names
John Dong [Fri, 17 Aug 2007 21:57:17 +0000 (17:57 -0400)]
Fix validation of candidate names

17 years agoFixed all triggerable DeprecationWarnings. BE ON LOOKOUT FOR REGRESSIONS.
John Dong [Fri, 17 Aug 2007 21:31:45 +0000 (17:31 -0400)]
Fixed all triggerable DeprecationWarnings. BE ON LOOKOUT FOR REGRESSIONS.

17 years agoAdd testcase for checking validity of vote results
John Dong [Fri, 17 Aug 2007 21:13:18 +0000 (17:13 -0400)]
Add testcase for checking validity of vote results

17 years agoMerged changes from jdong's branch into HEAD.
<mako@atdot.cc> [Fri, 17 Aug 2007 20:49:15 +0000 (16:49 -0400)]
Merged changes from jdong's branch into HEAD.

17 years ago* Refactor checking proper quickvote creation to helper assert_create_quickvote_succeeds
John Dong [Fri, 17 Aug 2007 20:25:31 +0000 (16:25 -0400)]
* Refactor checking proper quickvote creation to helper assert_create_quickvote_succeeds
* Remove a crufty assertion from XML checker -- it is redundant
* Add testcase for a description with binary characters

17 years ago* Add one more assertion in testcase for dupe candidates
John Dong [Fri, 17 Aug 2007 20:15:45 +0000 (16:15 -0400)]
* Add one more assertion in testcase for dupe candidates
* Remove test_create_quickvote_description_htmlescape. As I thought earlier, I actually want the DB to properly store HTML elements. It's the job of the view to make sure it doesn't clobber itself displaying the element.
  - Change the test instead to a test for proper XML escaping. An appended </string> element should be stored properly and not trip hell

17 years agoCorrect a bunch of the testcases. Poor copy-and-paste led to description => nil where...
John Dong [Fri, 17 Aug 2007 20:10:25 +0000 (16:10 -0400)]
Correct a bunch of the testcases. Poor copy-and-paste led to description => nil where it shouldn't have been. Now a bunch more testcases FAIL. Yay me.

17 years ago* Refactor testcase code -- create_quickvote_fails assertion -- was using same block...
John Dong [Fri, 17 Aug 2007 20:02:31 +0000 (16:02 -0400)]
* Refactor testcase code -- create_quickvote_fails assertion -- was using same block of code repetivitely

Add more testcases for improper data
  * Passing in a nil ElectionStruct to quickvotes
  * Passing in only nil {name, description, candidates}
  * Passing in whitespace for name, description, candidates
  * Passing in duplicate candidates
  * Passing in dirty HTML in description field
    - IMO this may not be a "bug" -- we should rather assert that the view will not be injected with HTML. It may be desirable (a feature) to store HTML-ish text in the database.

17 years ago* Validate that quickvote.name is not nil
John Dong [Fri, 17 Aug 2007 20:02:13 +0000 (16:02 -0400)]
* Validate that quickvote.name is not nil

17 years agoCaught error from testcase! Quickvote creation errors weren't being properly returned.
John Dong [Fri, 17 Aug 2007 18:17:19 +0000 (14:17 -0400)]
Caught error from testcase! Quickvote creation errors weren't being properly returned.

17 years agoAdded more testcases:
John Dong [Fri, 17 Aug 2007 18:16:36 +0000 (14:16 -0400)]
Added more testcases:
 * Cast large # of votes
 * Create large # of quickvotes
 * Test creation of quickvote with a bad name

17 years agoAdd some testcases:
John Dong [Fri, 17 Aug 2007 18:04:04 +0000 (14:04 -0400)]
Add some testcases:
  * Create a new quickvote
  * Retrieve a quickvote
  * Casting a quickvote

17 years agoAdd a way to get the votes list from a quickvote votes XMLRPC call
John Dong [Fri, 17 Aug 2007 18:03:19 +0000 (14:03 -0400)]
Add a way to get the votes list from a quickvote votes XMLRPC call

17 years agoStarted implementing XMLRPC test cases
John Dong [Fri, 17 Aug 2007 17:16:53 +0000 (13:16 -0400)]
Started implementing XMLRPC test cases

17 years agoRemoved crufty testcases that fail. Will rewrite them
John Dong [Fri, 17 Aug 2007 16:52:40 +0000 (12:52 -0400)]
Removed crufty testcases that fail. Will rewrite them

17 years agoFix a host of testcase failure issues. Still not done, but this is the end of syntact...
John Dong [Fri, 17 Aug 2007 16:38:19 +0000 (12:38 -0400)]
Fix a host of testcase failure issues. Still not done, but this is the end of syntactical changes. (Rest of fixes will be behavioral)

17 years agoMerged from John.
<jlsharps@mit.edu> [Fri, 17 Aug 2007 00:36:51 +0000 (20:36 -0400)]
Merged from John.

17 years agoImport new svn rubyvote (revno 43)
John Dong [Fri, 17 Aug 2007 00:23:05 +0000 (20:23 -0400)]
Import new svn rubyvote (revno 43)

17 years agoThrow an ArgumentError if invalid election name is passed to casting
John Dong [Fri, 17 Aug 2007 00:21:43 +0000 (20:21 -0400)]
Throw an ArgumentError if invalid election name is passed to casting

17 years agoXMLRPC Vote Casting Validation:
John Dong [Fri, 17 Aug 2007 00:20:16 +0000 (20:20 -0400)]
XMLRPC Vote Casting Validation:
  * Can only vote for candidate_id's within the current election
  * Can only rank each candidate once
  * Must rank all candidates

17 years agoUpdate TODO list
John Dong [Fri, 17 Aug 2007 00:05:40 +0000 (20:05 -0400)]
Update TODO list

17 years agoAdd XMLRPC interface for creating new quickvotes
John Dong [Thu, 16 Aug 2007 23:59:44 +0000 (19:59 -0400)]
Add XMLRPC interface for creating new quickvotes

17 years agoAdd XMLRPC API for getting an individual quickvote object; refactor getting all quick...
John Dong [Thu, 16 Aug 2007 23:41:12 +0000 (19:41 -0400)]
Add XMLRPC API for getting an individual quickvote object; refactor getting all quickvotes with this new method

17 years agolist_quickvotes XMLRPC returns candidate ID's instead of names
John Dong [Thu, 16 Aug 2007 23:33:49 +0000 (19:33 -0400)]
list_quickvotes XMLRPC returns candidate ID's instead of names

17 years agoAdd XMLRPC call for getting a list of all QuickVotes
John Dong [Thu, 16 Aug 2007 22:56:55 +0000 (18:56 -0400)]
Add XMLRPC call for getting a list of all QuickVotes

17 years agoAdd Google Map of voters
John Dong [Thu, 16 Aug 2007 22:26:41 +0000 (18:26 -0400)]
Add Google Map of voters
 * Add rails plugin for google maps
 * Add rails plugin for IP to location mapping

17 years agoMerge Justin
John Dong [Thu, 16 Aug 2007 21:15:06 +0000 (17:15 -0400)]
Merge Justin

17 years agoMerged from John's branch, includs a lot of IP lookup libraries.
<jlsharps@mit.edu> [Thu, 16 Aug 2007 21:09:46 +0000 (17:09 -0400)]
Merged from John's branch, includs a lot of IP lookup libraries.

17 years agoThe defeats lsit partial contains the display logic for the mehtod added to condorcet...
<jlsharps@mit.edu> [Thu, 16 Aug 2007 21:01:38 +0000 (17:01 -0400)]
The defeats lsit partial contains the display logic for the mehtod added to condorcet.rb taht helps print out a list of who defeated who and by how much. I also modified the tab;e in _pref_table.rhtml to use names as the table headers and notcandidate id's. Finally, results.rhtml has been updated to display them.

17 years agoAdd nil-guards to the graphs
John Dong [Thu, 16 Aug 2007 20:54:46 +0000 (16:54 -0400)]
Add nil-guards to the graphs

17 years agoDisplay IP address on unresolvable hosts
John Dong [Thu, 16 Aug 2007 20:38:28 +0000 (16:38 -0400)]
Display IP address on unresolvable hosts

17 years agoAdd ability to parse RIPE WHOIS too
John Dong [Thu, 16 Aug 2007 20:33:40 +0000 (16:33 -0400)]
Add ability to parse RIPE WHOIS too

17 years ago* Display DNS instead of IP address
John Dong [Thu, 16 Aug 2007 20:11:31 +0000 (16:11 -0400)]
* Display DNS instead of IP address
* Convert old DNS field to WHOIS OrganizationName field.
* Btter handle invalid IP's, including proper display of XMLRPC voters

17 years agoHTML escape description to prevent code injection onto page
John Dong [Thu, 16 Aug 2007 19:47:21 +0000 (15:47 -0400)]
HTML escape description to prevent code injection onto page

17 years agoDisallow identical candidates to be added to a quickvote. Differently cased identical...
John Dong [Thu, 16 Aug 2007 19:45:16 +0000 (15:45 -0400)]
Disallow identical candidates to be added to a quickvote. Differently cased identical strings are still allowed. This of course makes Asdf and asdf impossible to tell apart in the vote, which is kind of a bug. We should think of some way of differentiating those

17 years agoValidate that quickvote name is not an integer -- causes URL clash
John Dong [Thu, 16 Aug 2007 19:35:39 +0000 (15:35 -0400)]
Validate that quickvote name is not an integer -- causes URL clash

17 years agoAdded XMLRPC API to obtain list of voters
John Dong [Thu, 16 Aug 2007 18:28:22 +0000 (14:28 -0400)]
Added XMLRPC API to obtain list of voters

17 years agoUse WHOIS to search up meaningful organizational data about voters. NOTE: Probably...
John Dong [Thu, 16 Aug 2007 17:57:01 +0000 (13:57 -0400)]
Use WHOIS to search up meaningful organizational data about voters. NOTE: Probably destroys performance when there's >= 100 voters.

17 years agoAlso a part of the previous commit
John Dong [Thu, 16 Aug 2007 17:56:41 +0000 (13:56 -0400)]
Also a part of the previous commit

17 years ago* Tighter validation, closed a number of crashes due to invalid data
John Dong [Thu, 16 Aug 2007 17:54:37 +0000 (13:54 -0400)]
* Tighter validation, closed a number of crashes due to invalid data
* Security: Escape HTML to prevent injection of code onto the form
* Prevent empty candidates from passing validation
* Clearer, non Engrishy error messages on quickvote/create
* Prevent quickvote ident names from clashing with reserved controller actions

17 years agoFix crasher when nil is passed to ident_to_quickvote
John Dong [Thu, 16 Aug 2007 17:09:31 +0000 (13:09 -0400)]
Fix crasher when nil is passed to ident_to_quickvote

17 years agoMerge from jdong
John Dong [Wed, 15 Aug 2007 21:59:40 +0000 (17:59 -0400)]
Merge from jdong

17 years agoMerge from Justin
John Dong [Wed, 15 Aug 2007 21:56:18 +0000 (17:56 -0400)]
Merge from Justin
Fix runtime errors in RubyVote introduced.

17 years agoModified graphs to ahve a 4 color scheme, but it isn't the full palette of selectrici...
<jlsharps@mit.edu> [Wed, 15 Aug 2007 21:46:20 +0000 (17:46 -0400)]
Modified graphs to ahve a 4 color scheme, but it isn't the full palette of selectricity yet
, that will be on next commit. LAso modified several voting methods within RubyVote to have
more useful instance variables and accessors available in the results class. the quickvote
results view has been updated to include a partial for displaying a condorcet vote table, w
hich is strangely appearing below the footer on the results page, it seems to be displaying
 the correct data however.

17 years agoDisplay same in hostname and IP when IP lookup fails
John Dong [Wed, 15 Aug 2007 21:35:51 +0000 (17:35 -0400)]
Display same in hostname and IP when IP lookup fails

17 years agoMerge jdong
John Dong [Wed, 15 Aug 2007 21:04:30 +0000 (17:04 -0400)]
Merge jdong

17 years agoRecord "XMLRPC Request" in ipadress field of XML RPC created votes.
John Dong [Wed, 15 Aug 2007 21:03:41 +0000 (17:03 -0400)]
Record "XMLRPC Request" in ipadress field of XML RPC created votes.

Added IPAddr verification of IP Addresses

17 years agoRecord a junk IP address for XMLRPC'ers
John Dong [Wed, 15 Aug 2007 20:45:51 +0000 (16:45 -0400)]
Record a junk IP address for XMLRPC'ers

17 years agoMerge jdong
John Dong [Wed, 15 Aug 2007 20:37:21 +0000 (16:37 -0400)]
Merge jdong

17 years agoAdd some quick info about XMLRPC API
John Dong [Wed, 15 Aug 2007 20:37:03 +0000 (16:37 -0400)]
Add some quick info about XMLRPC API

17 years agoMerge my branch, which properly implements casting quickvotes
John Dong [Wed, 15 Aug 2007 20:33:31 +0000 (16:33 -0400)]
Merge my branch, which properly implements casting quickvotes

17 years agoMerge head
John Dong [Wed, 15 Aug 2007 20:32:54 +0000 (16:32 -0400)]
Merge head

17 years agoMerge another cpssd fix
John Dong [Wed, 15 Aug 2007 20:28:05 +0000 (16:28 -0400)]
Merge another cpssd fix

17 years agoMerge head
John Dong [Wed, 15 Aug 2007 20:17:33 +0000 (16:17 -0400)]
Merge head

17 years agoPull in svn Rubyvote again
John Dong [Wed, 15 Aug 2007 20:17:11 +0000 (16:17 -0400)]
Pull in svn Rubyvote again

17 years agoMerge from head
John Dong [Wed, 15 Aug 2007 19:54:13 +0000 (15:54 -0400)]
Merge from head

17 years agoImport latest RubyVote svn to fix infinite loop bug
John Dong [Wed, 15 Aug 2007 19:53:26 +0000 (15:53 -0400)]
Import latest RubyVote svn to fix infinite loop bug

17 years agoCommit partial implementation of casting quickvotes via xmlrpc. WARNING: Currently...
John Dong [Wed, 15 Aug 2007 19:12:41 +0000 (15:12 -0400)]
Commit partial implementation of casting quickvotes via xmlrpc. WARNING: Currently I think it creates inconsistent objects in the database that'll screw up voting.

17 years agoXMLRPC: Add translator from candidate ID to names
John Dong [Wed, 15 Aug 2007 16:30:25 +0000 (12:30 -0400)]
XMLRPC: Add translator from candidate ID to names

17 years agoMerge jdong to pull in new rubyvote
John Dong [Wed, 15 Aug 2007 16:02:21 +0000 (12:02 -0400)]
Merge jdong to pull in new rubyvote

17 years agoImport latest subversion RubyVote.
John Dong [Wed, 15 Aug 2007 16:00:58 +0000 (12:00 -0400)]
Import latest subversion RubyVote.

17 years agoMerge plurality fix
John Dong [Tue, 14 Aug 2007 22:23:47 +0000 (18:23 -0400)]
Merge plurality fix

17 years agoFix broken Plurality vote by removing a type check in RubyVote. TODO: Figure out...
John Dong [Tue, 14 Aug 2007 22:23:06 +0000 (18:23 -0400)]
Fix broken Plurality vote by removing a type check in RubyVote. TODO: Figure out why it was in there

17 years agoMerge jdong branch
John Dong [Tue, 14 Aug 2007 21:33:07 +0000 (17:33 -0400)]
Merge jdong branch

17 years ago* Refactor candidate map over to its own API call
John Dong [Tue, 14 Aug 2007 21:31:59 +0000 (17:31 -0400)]
* Refactor candidate map over to its own API call

17 years agoMerge from my devel branch
John Dong [Tue, 14 Aug 2007 20:54:00 +0000 (16:54 -0400)]
Merge from my devel branch

17 years ago* Changed XMLRPC API to use arrays of ID's to report results
John Dong [Tue, 14 Aug 2007 20:51:15 +0000 (16:51 -0400)]
* Changed XMLRPC API to use arrays of ID's to report results
* Add a list of names and ID's to the results struct, for future translation purposes to canonical names

Benjamin Mako Hill || Want to submit a patch?