updated docs for git
[selectricity-live] / README
1 ===============================================
2 === Getting Selectricity ======================
3 ===============================================
4
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!
9
10 The best way to get Selectricity is just to download it from our source
11 source repository. You'll need the Git version control system or
12 source control manager to check it. You can get it here:
13
14   http://git-scm.com/
15
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:
18
19   git clone http://projects.mako.cc/source/selectricity/.git
20
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:
24
25   git clone http://projects.mako.cc/source/selectricity-live/.git
26
27 ===============================================
28 === Dependencies ==============================
29 ===============================================
30
31 To use Selectricity, you'll need to install the following gems in
32 addition to Ruby on Rails, MySQL, and its dependencies:
33
34  * rmagick
35  * gruff (http://nubyonrails.com/pages/gruff)
36  * sparklines (http://nubyonrails.com/pages/sparklines)
37
38 To use Selectricity in development mode, you'll need to install the
39 following gems:
40
41  * ruby-debug
42
43 Also, you will need install the other applications installed first:
44
45  * imagemagick (http://www.imagemagick.org/)
46
47 On Ubuntu, you can install install the dependencies with: 
48   apt-get install imagemagick libmagick9-dev ruby1.8-dev libwmf-bin
49
50 Our server configuration uses Mongrel (installed from gems) behind an
51 Apache2 load balancing proxy using mod_proxy.
52
53
54 ===============================================
55 === Contributors to Selectricity Include ======
56 ===============================================
57
58  * Benjamin Mako Hill <mako@atdot.cc>
59  * John Dong          <jdong@ubuntu.com>
60  * Justin Sharps      <jlsharps@mit.edu>
61
62 =====================================
63 === XML-RPC INFO                    ==
64 ======================================
65
66 The XML-RPC API is still under development, but is somewhat functional already:
67
68 To instantiate a client in Ruby, try something like:
69 client=ActionWebService::Client::XmlRpc.new(SelectricityAPI,"http://localhost:3000/selectricity_service/vote")
70
71
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]>
75
76 Casting a quickvote:
77 client.cast_quickvote("test",1,[[1,2]])
78
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]>
81
82
83
84
85

Benjamin Mako Hill || Want to submit a patch?