https://github.com/mishina2228/oanda-api-rails
Get exchange data using OANDA API
https://github.com/mishina2228/oanda-api-rails
rails ruby
Last synced: 3 months ago
JSON representation
Get exchange data using OANDA API
- Host: GitHub
- URL: https://github.com/mishina2228/oanda-api-rails
- Owner: mishina2228
- License: mit
- Created: 2019-06-07T23:43:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T09:22:27.000Z (8 months ago)
- Last Synced: 2024-10-29T11:39:06.774Z (8 months ago)
- Topics: rails, ruby
- Language: Ruby
- Homepage:
- Size: 1.74 MB
- Stars: 2
- Watchers: 4
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oanda-api-rails
[](https://github.com/mishina2228/oanda-api-rails/actions)
[](https://codeclimate.com/github/mishina2228/oanda-api-rails/maintainability)
[](https://codecov.io/gh/mishina2228/oanda-api-rails)
[](https://github.com/mishina2228/oanda-api-rails/blob/master/LICENSE)
[](https://standardjs.com)
[](https://github.com/rubocop/rubocop)Get exchange data using OANDA API
## Prerequisites
- Ruby 3.2+
- Node.js 14.17.0+ || 16.0.0+
- Yarn 1.x+## Installation
### Set up Rails app
First, install the gems and javascript packages required by the application:
```sh
bundle
yarn
```Next, execute the database migrations/schema setup:
```sh
bin/rails db:setup
```### Resque settings
Create a configuration file to manage [Resque](https://github.com/resque/resque)
and [resque-scheduler](https://github.com/resque/resque-scheduler)
with [God](http://godrb.com/)```sh
RAILS_ENV=[RAILS_ENV] bundle exec itamae local config/itamae/resque.rb
```Load configuration file
```sh
god -c /etc/god/master.conf
```Resque, resque-scheduler operation with God
- check the status
- start
- restart
- stop```sh
god status resque-oanda_api_rails
god start resque-oanda_api_rails
god restart resque-oanda_api_rails
god stop resque-oanda_api_rails
```### Start the app
#### development
```sh
bin/dev
```#### production
```sh
bin/rails assets:precompile RAILS_ENV=production
bin/rails s -e production
```## Configuration Files
### Notify when Resque job failed
If a Resque job fails, a notification email will be sent.
Please fill in the settings of email to config/mail.yml .
The following is an example when sending from Gmail:```yml
production:
delivery_method: :smtp
smtp_settings:
address: 'smtp.gmail.com'
port: 587
domain: 'gmail.com'
user_name: [USER_NAME]
password: [PASSWORD]
authentication: 'plain'
enable_starttls_auto: true
recipients:
- [EMAIL_ADDRESS]
```## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request