This is a membership application app written by members of Double Union, a feminist hacker/makerspace for women in San Francisco.
This application has a lot of cool features, including:
- Prospective members can apply for membership
- Current members can vote and comment on applications
- Current members can see a directory of members
- Current members can pay dues via Stripe
- Membership coordinators can manage member status
The application supports three levels of membership: members, key members, and voting members, where any member can see and comment on an application, but only voting members can vote. Membership coordinators can set whether the app is accepting applications, accept or reject individual applications, manage membership levels, and review dues status.
It is currently very Double Union specific, but we'd like to extract the Double Union things out of it, so that other feminist hacker/makerspaces can use it, too! We open sourced the app so that we can work with other hacker/makerspaces on that process. This app supports an application process that helps us maintain a safe space for our members, and we want this app to help other groups that have the same goal.
To check out a couple of screenshots, see our Arooo announcement post.
If you're interested in using Arooo for your org and want to get in touch, make an issue and we can chat. 💃
We use GitHub issues for feature development and bug tracking, so take a look for things that you can work on, and comment with any questions you have.
If you're a Double Union member, you can chat with the maintainers in our #du-app chat channel. Ask us how you can help!
If you are new to Rails, follow the RailsBridge Installfest instructions for getting your environment set up.
- You must follow the Railsbridge Installfest instructions if you do not have
ruby
,bundler
, orrails
installed before continuing.
-
Fork the repo (click the Fork button above), and clone your fork to your local machine. Here's a GitHub tutorial about how to do so.
-
Run
bundle install
- Bundle may fail on pg; run
brew install postgresql
if it does - If you get
FATAL: role “postgres” does not exist
, run/usr/local/Cellar/postgresql/<version>/bin/createuser -s postgres
- Bundle may fail on pg; run
-
Standard Rails app setup
cp config/database.example.yml config/database.yml
- Optional: edit database.yml if you want to change advanced things
rake db:create
rake db:migrate
rake db:test:prepare
-
Set up an application for OAuth: http://github.com/settings/applications/new
- Application name: Whatever you want
- Homepage URL: http://localhost:3000
- Authorization callback URL: http://localhost:3000/auth/github/callback
-
cp config/application.example.yml config/application.yml
-
Edit config/application.yml
- Set
GITHUB_CLIENT_KEY
andGITHUB_CLIENT_SECRET
to the Client ID and Client Secret from your Github application - Don't forget to restart your Rails server so it can see your shiny new GitHub key & secret
- Set
Write specs! Yay! Especially for anything involving authorization walls.
Run rake db:test:prepare
after you pull or make any changes to the app, generally.
Make sure bundle exec rspec
passes before pushing your changes.
Development: $ bundle exec rails console
Production: $ heroku run rails console
To add a bunch of users to your dev database, you can use bundle exec rake populate:users
. They will have random states.
The current User state machine can be found in app/models/user.rb
, but since
it probably won't change much and it's the main moving piece of the
application, here's a quick summary.
Valid states:
visitor
: default state, no admin access, no application accessapplicant
: not yet a member, no admin access, can only view/edit/save/submit their applicationmember
: access to member admin section, cannot votekey_member
: access to member admin section, cannot vote, has keys to the spacevoting_member
: access to member admin section, can vote, has keys to the space
First, open a Rails console in a terminal window, from the same directory as the app:
rails console
Now you can update any user:
> user = User.find_by_username('someusername')
> user.state # => "visitor"
> user.make_applicant! # => true
> user.make_member! # => true
> user.make_key_member! # => true
> user.make_voting_member! # => true
> user.make_applicant! # => raises invalid state transition error
> user.update_attribute(:state, 'applicant') # bypasses normal checks & succeeds
If you need a user that has admin access:
> user = User.find_by_username('cool_user')
> user.update_attributes(is_admin: true)
Admins can accept/reject applications, update any member's status, see current member's dues, open and close applications, and manage new member setup.
If you are new to GitHub, you can use this guide for help making a pull request.
- Fork it
- Get it running
- Create your feature branch
git checkout -b my-new-feature
- Write your code and specs
- Commit your changes
git commit -am 'Add some feature'
- Push to the branch
git push origin my-new-feature
- Create a new Pull Request, linking to the GitHub issue url the Pull Request is fixing in the description
- If you find bugs, have feature requests or questions, please file an issue.
This section only pertains if you have doubleunion/arooo write/push access.
- Read through the GitHub issue that the Pull Request is fixing
- Code review the Pull Request, commenting on any potential issues, improvements, or telling the person how awesome their code is
- After the Pull Request is reviewed & fixed (if necessary) and the Travis CI build is passing, merge the Pull Request into
master
- Note: We like to have a short, linear history, so manually squash the PR into one commit, and rebase.
- Delete the branch, and close the relevant issue if not referenced in the Pull Request already
- Deploy! (see below)
This section only pertains if you have Heroku & Deployment access.
- Add Heroku remotes to your
.git/config
(typegit remote --help
for more instructions on how to configure git remote.)
Note: Only maintainers have heroku access and can deploy.
[remote "production"]
url = git@heroku.com:du-arooo.git
fetch = +refs/heads/*:refs/remotes/heroku/*
[remote "staging"]
url = git@heroku.com:doubleunion-staging.git
fetch = +refs/heads/*:refs/remotes/heroku/*
- Pull down the latest code from
master
git checkout master
git pull --rebase origin master
- If Travis CI tests are passing, push to the
staging
environment
git checkout master
git pull --rebase origin master
git push staging master
- If needed, perform rake tasks or set ENV variable settings on
staging
- Test staging!
username: doubleunion
password: meritocracyisajoke
- After confirming that the code works on
staging
, push it toproduction
!
git checkout master
git pull --rebase origin master
git push production master
- If needed, perform rake tasks or set ENV variable settings on
production
This app is named after a famous Virginia Woolf essay. You can learn more about it on Wikipedia!
Also, here is a puppy that is saying "arooo":
If you find a security vulnerability with Arooo, please let us know at admin@doubleunion.org. Thank you!
Copyright (C) 2014 Double Union
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENSE.txt file for the full license.