Noisebridge's donation infrastructure
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.git-crypt Add 1 git-crypt collaborator Feb 3, 2015
app swap out noisebridge thanks image at the request of someone in the ol… Jul 20, 2018
bin Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
config Mount the sidekiq web interface at /sidekiq Nov 12, 2017
db Add anonymous flag to the charges table w/ default: false May 2, 2018
lib Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
log Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
public Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
spec Update donor details on successive charges May 2, 2018
test Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
vendor/assets Install secure-headers gem Mar 2, 2016
.env Added .env file w/ secrets Feb 7, 2015
.gitattributes Added .env file w/ secrets Feb 7, 2015
.gitignore Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
.rspec Laying out skeleton models / controllers / migrations Jan 22, 2015
.rubocop.yml Mount the sidekiq web interface at /sidekiq Nov 12, 2017
.ruby-version Bump ruby versions to latest stable; remove Circle configuration Dec 27, 2017
.travis.yml Upgrade rubygems to fix 2.5.0 compat issues Dec 27, 2017
Changelog.md Update changelog w/ yesterday's improvements Mar 14, 2016
Gemfile Add rubocop linting Feb 21, 2017
Gemfile.lock Update rails to latest patch release. Jul 23, 2018
LICENSE Change license to AGPL May 21, 2015
Procfile Added build status & instructions for running w/ foreman Feb 7, 2015
README.md Add notice to README about encrypted .env file Oct 24, 2016
Rakefile Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
config.ru Initial commit of Noisebridge donation app. Empty rails install Jan 22, 2015
deploy.sh Added dotenv-rails dependency May 23, 2015

README.md

Noisebridge-donate

CircleCI

A really simple rails application to accept credit card donations for Noisebridge

Installation

Requirements

  • PostgreSQL
  • Ruby 2.3.0
  • foreman gem install foreman

If you have rbenv and ruby-build installed you should be able to do the following

rbenv install
gem install bundler
rbenv rehash
bundle install

Running with secrets

The secrets for the development environment are kept encrypted in the .env file. git-crypt will unlock them.

NB: You must be aded to the list of secrets users before you can decrypt the .env file

If you don't have access to the decrypted .env file locally you'll likely see an error like so when you attempt to attempt to run the Rails console or server locally.

/home/patrickod/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/dotenv-2.1.1/lib/dotenv/parser.rb:44:in `split': invalid byte sequence in UTF-8 (ArgumentError)

This is because dotenv is attempting to parse a non-ASCII file (the encrypted blob). Simply rm .env to remove the local copy. If you want to run with local development Stripe API credentials for the Noisebridge account ask @patrickod to add you to the list of PGP keys that can decrypt the .env file.

To run the rails server locally with the secrets loaded use foreman start web

Running without secrets

To run the rails server locally without the secrets simply mv .env .env.foo and run as normally foreman start web. Be mindful not to commit this move to git.

Databases

This setup assumes that you have a PostgreSQL user noisebridge locally who is the owner of noisebridge_donate_development and noisebridge_donate_test databases.