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
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
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
John Dong [Fri, 17 Aug 2007 17:16:53 +0000 (13:16 -0400)]
Started implementing XMLRPC test cases
John Dong [Fri, 17 Aug 2007 16:52:40 +0000 (12:52 -0400)]
Removed crufty testcases that fail. Will rewrite them
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)
<jlsharps@mit.edu> [Fri, 17 Aug 2007 00:36:51 +0000 (20:36 -0400)]
Merged from John.
John Dong [Fri, 17 Aug 2007 00:23:05 +0000 (20:23 -0400)]
Import new svn rubyvote (revno 43)
John Dong [Fri, 17 Aug 2007 00:21:43 +0000 (20:21 -0400)]
Throw an ArgumentError if invalid election name is passed to casting
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
John Dong [Fri, 17 Aug 2007 00:05:40 +0000 (20:05 -0400)]
Update TODO list
John Dong [Thu, 16 Aug 2007 23:59:44 +0000 (19:59 -0400)]
Add XMLRPC interface for creating new quickvotes
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
John Dong [Thu, 16 Aug 2007 23:33:49 +0000 (19:33 -0400)]
list_quickvotes XMLRPC returns candidate ID's instead of names
John Dong [Thu, 16 Aug 2007 22:56:55 +0000 (18:56 -0400)]
Add XMLRPC call for getting a list of all QuickVotes
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
John Dong [Thu, 16 Aug 2007 21:15:06 +0000 (17:15 -0400)]
Merge Justin
<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.
<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.
John Dong [Thu, 16 Aug 2007 20:54:46 +0000 (16:54 -0400)]
Add nil-guards to the graphs
John Dong [Thu, 16 Aug 2007 20:38:28 +0000 (16:38 -0400)]
Display IP address on unresolvable hosts
John Dong [Thu, 16 Aug 2007 20:33:40 +0000 (16:33 -0400)]
Add ability to parse RIPE WHOIS too
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
John Dong [Thu, 16 Aug 2007 19:47:21 +0000 (15:47 -0400)]
HTML escape description to prevent code injection onto page
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
John Dong [Thu, 16 Aug 2007 19:35:39 +0000 (15:35 -0400)]
Validate that quickvote name is not an integer -- causes URL clash
John Dong [Thu, 16 Aug 2007 18:28:22 +0000 (14:28 -0400)]
Added XMLRPC API to obtain list of voters
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.
John Dong [Thu, 16 Aug 2007 17:56:41 +0000 (13:56 -0400)]
Also a part of the previous commit
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
John Dong [Thu, 16 Aug 2007 17:09:31 +0000 (13:09 -0400)]
Fix crasher when nil is passed to ident_to_quickvote
John Dong [Wed, 15 Aug 2007 21:59:40 +0000 (17:59 -0400)]
Merge from jdong
John Dong [Wed, 15 Aug 2007 21:56:18 +0000 (17:56 -0400)]
Merge from Justin
Fix runtime errors in RubyVote introduced.
<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.
John Dong [Wed, 15 Aug 2007 21:35:51 +0000 (17:35 -0400)]
Display same in hostname and IP when IP lookup fails
John Dong [Wed, 15 Aug 2007 21:04:30 +0000 (17:04 -0400)]
Merge jdong
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
John Dong [Wed, 15 Aug 2007 20:45:51 +0000 (16:45 -0400)]
Record a junk IP address for XMLRPC'ers
John Dong [Wed, 15 Aug 2007 20:37:21 +0000 (16:37 -0400)]
Merge jdong
John Dong [Wed, 15 Aug 2007 20:37:03 +0000 (16:37 -0400)]
Add some quick info about XMLRPC API
John Dong [Wed, 15 Aug 2007 20:33:31 +0000 (16:33 -0400)]
Merge my branch, which properly implements casting quickvotes
John Dong [Wed, 15 Aug 2007 20:32:54 +0000 (16:32 -0400)]
Merge head
John Dong [Wed, 15 Aug 2007 20:28:05 +0000 (16:28 -0400)]
Merge another cpssd fix
John Dong [Wed, 15 Aug 2007 20:17:33 +0000 (16:17 -0400)]
Merge head
John Dong [Wed, 15 Aug 2007 20:17:11 +0000 (16:17 -0400)]
Pull in svn Rubyvote again
John Dong [Wed, 15 Aug 2007 19:54:13 +0000 (15:54 -0400)]
Merge from head
John Dong [Wed, 15 Aug 2007 19:53:26 +0000 (15:53 -0400)]
Import latest RubyVote svn to fix infinite loop bug
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.
John Dong [Wed, 15 Aug 2007 16:30:25 +0000 (12:30 -0400)]
XMLRPC: Add translator from candidate ID to names
John Dong [Wed, 15 Aug 2007 16:02:21 +0000 (12:02 -0400)]
Merge jdong to pull in new rubyvote
John Dong [Wed, 15 Aug 2007 16:00:58 +0000 (12:00 -0400)]
Import latest subversion RubyVote.
John Dong [Tue, 14 Aug 2007 22:23:47 +0000 (18:23 -0400)]
Merge plurality fix
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
John Dong [Tue, 14 Aug 2007 21:33:07 +0000 (17:33 -0400)]
Merge jdong branch
John Dong [Tue, 14 Aug 2007 21:31:59 +0000 (17:31 -0400)]
* Refactor candidate map over to its own API call
John Dong [Tue, 14 Aug 2007 20:54:00 +0000 (16:54 -0400)]
Merge from my devel branch
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
John Dong [Tue, 14 Aug 2007 20:50:49 +0000 (16:50 -0400)]
Refactor the ident_to_quickvote method as a classmethod of the model
John Dong [Tue, 14 Aug 2007 20:08:17 +0000 (16:08 -0400)]
Merge refactor
John Dong [Tue, 14 Aug 2007 20:06:57 +0000 (16:06 -0400)]
Refactored quickvotes result calculator from the controller to the model. TODO: Run testcases to make sure it still works
John Dong [Tue, 14 Aug 2007 19:41:25 +0000 (15:41 -0400)]
Merge my local branch, bring back xmlrpc
John Dong [Tue, 14 Aug 2007 19:39:18 +0000 (15:39 -0400)]
Introduce XMLRPC API files. It is not currently functional, but it doesn't break anything outside of itself.
<mako@atdot.cc> [Tue, 14 Aug 2007 18:57:26 +0000 (14:57 -0400)]
Added a TODO list.
<mako@atdot.cc> [Tue, 14 Aug 2007 18:56:32 +0000 (14:56 -0400)]
Changed quickvotes so that they take an identifier as opposed to just a
votename. This identifier may be either just a votename or an integer id.
<mako@atdot.cc> [Tue, 14 Aug 2007 11:36:57 +0000 (07:36 -0400)]
fixed the optional/required snafu on the quickvote create page
<jlsharps@mit.edu> [Tue, 14 Aug 2007 09:25:59 +0000 (05:25 -0400)]
Fixed choices_positions to use GruffGraff class. Initialize method now had a way of
dealign with multiple data arrays being passed in. Next need to compensate for giving each set of data it's own name, possible a hash with "name" => data as the key, value pairs...
<jlsharps@mit.edu> [Tue, 14 Aug 2007 08:04:36 +0000 (04:04 -0400)]
Added the choices position and get_posititons_info to graph controller. Right now, since
the graph graphs a different set of data for each candidate, the data function has to be
called multiple times and I'm not sure how to do it/if it's possible within the class
definition. As such, I've defined everything within the choices_position method for now.
I'll be trying to figure out the kinks next. Overall, the graph is very confusing and
might not be very useful in the end, but the data it uses is.
<mako@atdot.cc> [Sat, 11 Aug 2007 00:38:51 +0000 (20:38 -0400)]
Fixed a bug in the graph library.
<mako@atdot.cc> [Sat, 11 Aug 2007 00:33:12 +0000 (20:33 -0400)]
Fixed minor bug in the scruffy code.
<mako@atdot.cc> [Sat, 11 Aug 2007 00:29:22 +0000 (20:29 -0400)]
Refactored code to move it to a more object oriented mode and slimmed
things down. Labels and such are still a little broken.
<jlsharps@mit.edu> [Fri, 10 Aug 2007 23:15:31 +0000 (19:15 -0400)]
Removed the Gruff plugin from vendor/plugins. It seems to be working from the gem version now, which is v 0.2.8.
<jlsharps@mit.edu> [Fri, 10 Aug 2007 22:47:33 +0000 (18:47 -0400)]
Added a new bar graph, that counts how many points the borda system of
voting has asssigned to every candidate, it shows the margins fo victory
and loss clearly. Also had to make modifications to the RubyVote libary.
There was an error in BordaVote that prevented it from working correctly,
which has been fixed. Also added an attr_reader to BordaResult for
ranked_candidates. About to delete the Gruff Plugin v 0.1.2 and replace it
with Gruff gem v 0.2.8.
<jlsharps@mit.edu> [Thu, 9 Aug 2007 22:26:16 +0000 (18:26 -0400)]
Removed the two methods from Application controller which were redundant -
the main version are in the graph controller. Started to add a borda bar
graph results method, when it came to our attention that the borda method
was most likely broken, counting only the most recent vote. Have added an attr_reader :election to Class Electionresults in rubyvote. About to attempt to fix the Borda method.
<mako@atdot.cc> [Thu, 9 Aug 2007 21:38:17 +0000 (17:38 -0400)]
upgraded to latest version of rubyvote in svn
<jlsharps@mit.edu> [Thu, 9 Aug 2007 02:03:49 +0000 (22:03 -0400)]
Updated the "votes_per_day" method in graph controller to work better and
read easier. Also, with Mako's insistence and help, wrote the "votes_per_interval" method (and helpers) in graph controller. The worst part of that
method is when I assign names to the labels_hash, ideas welcome, but it
works for now. Even though the graph uses fixed intervals and is named
"votes_per_interval" it actually shows votes over time (per interval),
so I may rename it in the near future (in fact I would've renamed it for
this commit, but I didn't think till I was writing this statement.)
<mako@atdot.cc> [Wed, 8 Aug 2007 16:27:02 +0000 (12:27 -0400)]
* Renamed graphs_controller to graph_controller.
* Reviewed and fixed up the graph_controller code.
<mako@atdot.cc> [Wed, 8 Aug 2007 16:20:57 +0000 (12:20 -0400)]
Added support for ruby-debug to replace breakpointers.
<mako@atdot.cc> [Wed, 8 Aug 2007 14:51:56 +0000 (10:51 -0400)]
Renamed CSS and layout to move from the old name (HC) to the new name
(Selectricity).
<mako@atdot.cc> [Wed, 8 Aug 2007 14:18:40 +0000 (10:18 -0400)]
Changed properties to remove unecessary exectables.
<mako@atdot.cc> [Tue, 7 Aug 2007 23:23:05 +0000 (19:23 -0400)]
Modified QuickVote table to work by object type and not by the weird
TinyInts so that we can take advantage of the single table inheritence
magic in AR.
<mako@atdot.cc> [Tue, 7 Aug 2007 23:22:45 +0000 (19:22 -0400)]
Updated README to contain a list of dependencies and to offer a little
general cleanup.
<jlsharps@mit.edu> [Tue, 7 Aug 2007 23:16:04 +0000 (19:16 -0400)]
The user model has been modified so that it stores the user object itself in the session[:user]. Session[:user_id] fulfills the purpose of holding the specific id. the test files were also modified to account for the changes. In addition, a couple lines in the SiteController#index method were updated tp utilize new funtionality of ActiveRecord. The changes I made to the Authenitcated user library is available here:technoweenie.stikipad.com/plugins/show/Storing+the+User+Model+in+the+Session.
<jlsharps@mit.edu> [Tue, 7 Aug 2007 21:07:16 +0000 (17:07 -0400)]
Changed the Selectricity header into a link, and modified the config/routes.rb file to include a new named route: "graph." Use graph_url syntax to call a Gruff method from the graphs controller. Currently about to troubleshoot the user system.
<jlsharps@mit.edu> [Mon, 6 Aug 2007 23:56:39 +0000 (19:56 -0400)]
Modified the methods in graphs controller so they would work for Selectricity, but can't get them to successfully display yet. It seems that the 'url_for' helper might not be able to handle a :controller an argument. It doesn't throw an error, just displays nothing. I also removed various deprecated methods and replaced them with their updated counterparts in site_controller, and in some of the views. In addition I modified the confirm method in the QuickVote controller to save the time of the vote. I also changed what the voter.ip was logging because it wasn't working. Currently it says request.env["BLAH"] because I'm trying to vote multiple times in the same election for testing (not sure that jsut cahgnign the ip save feature is allowing that) but it will have to be request.env["REMOTE_ADDR"] in the long run. This is on line 108 of the QuickVote controller.
<jlsharps@mit.edu> [Sat, 4 Aug 2007 06:57:48 +0000 (02:57 -0400)]
Removed the breakpointer from the quickvote create method.
<mako@atdot.cc> [Sat, 4 Aug 2007 06:53:26 +0000 (02:53 -0400)]
Reorganized the README file and added a short list of dependencies.
<mako@atdot.cc> [Sat, 4 Aug 2007 06:47:27 +0000 (02:47 -0400)]
removed save line that was causing the new elections to fail
<jlsharps@mit.edu> [Sat, 4 Aug 2007 04:43:54 +0000 (00:43 -0400)]
Well, it seems I forgot to add the acts_as_authenticated to the repository on my last commit, but they're there now. Also, I recently added the Gruff graphing plugin, and created a new controller for the graphs, with a method I ported from pollarize to chart how many people have voted per day. The basic_login page works, and the create user sstem works, but is unpolished and still points to a poem as the index page, so if you read a poem, it's supposed to happen. The quickvote creation from the homepage is NOT working however, and is about to be investigated. I'm not sure how much else isn't working. I noted details abotu acts_as_authenticated adn Gruff in the README.
<jlsharps@mit.edu> [Tue, 31 Jul 2007 20:03:10 +0000 (16:03 -0400)]
I have added the acts_as_authenticated plugin to code, and have gotten VERY BASIC functionality. This isn't my last addition fortoday but I wanted to commit before my battery died. A lot of the detailed documentation about where to find help with acts_as_authenticated is in the README, the website is here :technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated. The acts_as_authenitcated generator also heavily modifed the user class (model) but I kept theo original lines as well. I havne't begun tothrow anyting out yet, because im using it as a refernce to get the new system running.
John Dong [Fri, 27 Jul 2007 20:16:55 +0000 (16:16 -0400)]
Add my name to README
<jlsharps@mit.edu> [Fri, 27 Jul 2007 20:12:34 +0000 (16:12 -0400)]
Changed the README to include Justin's name.
<mako@atdot.cc> [Fri, 27 Jul 2007 19:43:07 +0000 (15:43 -0400)]
blanked readme file and created a list of contributors inside
<mako@atdot.cc> [Wed, 18 Jul 2007 20:57:49 +0000 (16:57 -0400)]
Updated the system to Rails 1.2.
In the process, I had to completely gut the login engine which means
that parts of the site that require logins will not work at all. This
should be fixed ASAP.
<mako@atdot.cc> [Wed, 18 Jul 2007 18:28:44 +0000 (14:28 -0400)]
changed properties and the name of hyperchad to selectricity
<mako@atdot.cc> [Fri, 30 Mar 2007 14:23:37 +0000 (10:23 -0400)]
Variety of small changes (mostly to properties) plus a few "in the
field" bug fixes.
<mako@atdot.cc> [Tue, 17 Oct 2006 17:07:22 +0000 (13:07 -0400)]
added page for hc-anywhere
<mako@atdot.cc> [Tue, 17 Oct 2006 17:04:37 +0000 (13:04 -0400)]
added links to hyperchad anywhere
<mako@atdot.cc> [Mon, 16 Oct 2006 19:09:30 +0000 (15:09 -0400)]
tiny fix
<mako@atdot.cc> [Mon, 16 Oct 2006 18:47:17 +0000 (14:47 -0400)]
Added a list of recent votes to the homepage.
<mako@atdot.cc> [Mon, 16 Oct 2006 17:36:51 +0000 (13:36 -0400)]
A series of cosmetic improvements to quickvoting and to the general
layout.
Benjamin Mako Hill || Want to submit a patch?