This is amazing Project
This web application shows people who have contributed to Rust.
You need stable Rust to run Thanks.
Get the app set up. You'll need postgres installed. And sqlite3 headers I think.
Clone it:
$ git clone https://github.com/rust-lang-nursery/thanks
$ cd thanksSet up the database URL. Replace this with whatever credentials you need.
$ cp .env.sample .envInspect it to make sure it's set up the right way; only you can know what's up with your local postgres install.
Build it:
$ cargo install diesel_cli --no-default-features --features postgres
$ diesel setup
$ cargo buildClone down the Rust repository somewhere. I put mine in ~/src:
$ cd ~/src
$ git clone https://github.com/rust-lang/rustImport data from the repo:
$ cd - # go back to our app
$ cargo run --bin populate -- \
--name Rust \
--github rust-lang/rust \
--url https://github.com/rust-lang/rust/ \
--path ~/src/rust # or wherever you put the Rust sourceThis will take a few minutes. At the time of writing, Rust has about 61,000 commits that will need to be processed.
Run the server:
$ cargo run --bin thanksOpen your browser to the URL shown.
To access the database from the commannd line:
psql -p 5432 -h localhost -U postgres -d thanksIf you have the database with the old name (rust_contributors or any
other), you have two options:
- use the old name in the above command, or:
- run
psql -p 5432 -h localhost -U postgres, rename the database by runningALTER DATABASE rust_contributors RENAME TO thanksand edit.envfile to use the new name.
If you're working on the populate binary, it's useful to be able to quickly
drop your local database:
$ cargo run --bin the-big-red-button -- --allYou can also delete only one project by passing --name NAME option.
When it's time for a new release,
$ cargo run --bin new-release -- --name Rust --version 1.15.0 --path ~/src/rust # or wherever your Rust is --link http://link/to/changelogAs often as you want to update, run
$ cargo run --bin update-commit-dbThis will hit GitHub's API instead of using a local checkout of Rust, as it is assumed that this will run on the server, and we don't want to do a full git checkout there.
To hide someone from the page, you can run opt-out binary (append an
extra --opt-in option to that if you want to revert the change)):
cargo run --bin opt-out -- --email example@example.com