1 ===============================================
2 === Getting Selectricity ======================
3 ===============================================
5 Selectricity is free software and is distributed under the MIT or
6 BSD-like ExPat license. You are free to use, modify, and distribute, or
7 rework Selectricity. Of course, we'd sure like it if you would send
8 fixes back to us and tell us about cool stuff you do with our software!
10 The best way to get Selectricity is just to download it from our source
11 source repository. You'll need the Bazaar version control system or
12 source control manager to check it. You can get it here:
16 Once you have it, getting the source code is pretty easy. You just need
17 to check out a branch with a command like this:
19 bzr branch http://projects.mako.cc/source/selectricity
21 This will give you the latest *development* version of our code. If you
22 want the latest production version (i.e., what we're running on the
23 site), you can grab that here:
25 bzr branch http://projects.mako.cc/source/selectricity-live
27 ===============================================
28 === Dependencies ==============================
29 ===============================================
31 To use Selectricity, you'll need to install the following gems in
32 addition to Ruby on Rails, MySQL, and its dependencies:
35 * gruff (http://nubyonrails.com/pages/gruff)
36 * sparklines (http://nubyonrails.com/pages/sparklines)
38 To use Selectricity in development mode, you'll need to install the
43 Also, you will need install the other applications installed first:
45 * imagemagick (http://www.imagemagick.org/)
47 On Ubuntu, you can install install the dependencies with:
48 apt-get install imagemagick libmagick9-dev ruby1.8-dev libwmf-bin
50 Our server configuration uses Mongrel (installed from gems) behind an
51 Apache2 load balancing proxy using mod_proxy.
54 ===============================================
55 === Contributors to Selectricity Include ======
56 ===============================================
58 * Benjamin Mako Hill <mako@atdot.cc>
59 * John Dong <jdong@ubuntu.com>
60 * Justin Sharps <jlsharps@mit.edu>
62 =====================================
64 ======================================
66 The XML-RPC API is still under development, but is somewhat functional already:
68 To instantiate a client in Ruby, try something like:
69 client=ActionWebService::Client::XmlRpc.new(SelectricityAPI,"http://localhost:3000/selectricity_service/vote")
72 Getting the results of a quickvote is quite simple:
73 ?> client.get_quickvote_results("test")
74 => #<VoteResultStruct:0x336f92c @approval_winners=[1, 2], @borda_winners=[1], @plurality_winners=[1], @ssd_winners=[1], @errors=[], @condorcet_winners=[1]>
77 client.cast_quickvote("test",1,[[1,2]])
79 To figure out what you're voting for:
80 >> client.get_quickvote_candidate_map("test")=> #<CandidateMap:0x335bbc0 @errors=[], @candidate_names=["test", "test2"], @candidate_ids=[1, 2]>