https://github.com/andyw8/digibankdemo
Exercise in modelling a bank
https://github.com/andyw8/digibankdemo
Last synced: 3 months ago
JSON representation
Exercise in modelling a bank
- Host: GitHub
- URL: https://github.com/andyw8/digibankdemo
- Owner: andyw8
- Created: 2015-04-29T18:07:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-27T09:42:42.000Z (about 10 years ago)
- Last Synced: 2025-01-05T19:13:05.863Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 114 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Digibank demo
[](https://codeclimate.com/github/pedrosmmoreira/digibankdemo)
[](https://codeclimate.com/github/pedrosmmoreira/digibankdemo)
[](https://circleci.com/gh/pedrosmmoreira/digibankdemo/tree/master)Digibank is a Rails 4.2.1 app, running on Ruby 2.2.2 and deployed to Heroku.
A simple exercise in modelling a bank.
## Getting Started
After you have cloned this repo, run this setup script to set up your machine
with the necessary dependencies to run and test this app:% ./bin/setup
This command will also seed the development db with an user with an account.
To create a User with an account via the console, run `bundle exec rails c` and
use the following command:```
RegistrationForm.new(name: "user name", email: "user email", password: "user_password").submit
```In order to deposit money into an account, run `bundle exec rails c` and use the
following commands (assumes an user with `[email protected]` exists):```
user = User.find_by(email: "[email protected]")
DepositTeller.new(amount: "1", receiver: user)
```It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up
your machine with [this script].[this script]: https://github.com/thoughtbot/laptop
After setting up, you can run the application using [foreman]:
% foreman start
If you don't have `foreman`, see [Foreman's install instructions][foreman]. It
is [purposefully excluded from the project's `Gemfile`][exclude].[foreman]: https://github.com/ddollar/foreman
[exclude]: https://github.com/ddollar/foreman/pull/437#issuecomment-41110407## Deploying
If you have previously run the `./bin/setup` script,
you can deploy to staging and production with:$ ./bin/deploy staging
$ ./bin/deploy production