Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Nature Commitments


## Ruby version

2.6.3
## Node version

## Node version

14.18.1

## Quickstart

1. `bundle install`
2. `yarn install`
3. `bundle exec rails db:create db:migrate rails db:seed`
4. `bundle exec rails s`
5. Obtain a copy of the 'commitments' CSV if not already present in `lib/data/seeds`
3. Obtain a copy of `config/master.key` from lastpass
4. `bundle exec rails db:create db:migrate db:seed`
5. `bundle exec rails s`
6. Run `rake import:commitments`
7. On the Commitments page, you should see a list of commitments.

Expand All @@ -31,6 +34,6 @@ live, true, true

We have an external API, that currently only includes a commitments index. The API only returns commitments created in Nature Commitments via the form or csv import, and which are published.

The API does not use authentication, but is rate limited to 25 requests per minute followed by a 10 minute ban. This is implemented on the server using Cloudflare, and not handled in the Rails app.
The API does not use authentication, but is rate limited to 25 requests per minute followed by a 10 minute ban. This is implemented on the server using Cloudflare, and not handled in the Rails app.

[API Documentation](docs/external_api.md)
[API Documentation](docs/external_api.md)
12 changes: 5 additions & 7 deletions config/database.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
development:
adapter: postgis
encoding: utf-8
database: aa_development
pool: 5

host: localhost
username: postgres

staging:
adapter: postgis
encoding: utf-8
Expand All @@ -21,3 +17,5 @@ test:
encoding: utf-8
database: aa_test
pool: 5
host: localhost
username: postgres
Loading