https://github.com/hangingman/hanami_jruby_rest
JRuby testing for REST API and Hanami framework
https://github.com/hangingman/hanami_jruby_rest
hanami jruby
Last synced: 6 days ago
JSON representation
JRuby testing for REST API and Hanami framework
- Host: GitHub
- URL: https://github.com/hangingman/hanami_jruby_rest
- Owner: hangingman
- Created: 2017-09-07T07:25:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-21T12:18:07.000Z (over 8 years ago)
- Last Synced: 2026-04-08T08:00:48.320Z (20 days ago)
- Topics: hanami, jruby
- Language: Ruby
- Homepage: https://hanami-rest1.herokuapp.com/
- Size: 65.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# generic_dao_jruby
JRuby testing for REST API and Hanami framework
## Run
* Install JRuby at first, then...
```
> cd generic_dao_jruby
> jruby -S bundle install
> jruby -S bundle exec hanami s
```
## Dotenv
* Please create dotenv files like, `.env.development`, `.env.test`, `.env.production`
```
DATABASE_URL="postgres://localhost/..."
```
## DB migration
*
## Compile as jar & Deploy it
* Compile
```
> jruby -S bundle install --path vendor/bundle
> jruby -S bundle exec warble war .
```
Heroku Postgres for testing
* Get your database URL
```
$ heroku pg:info --app
=== DATABASE_URL
```
* Get your database credentials
```
$ heroku pg:credentials:url DATABASE --app
Connection information for default credential.
Connection info string:
"dbname=..."
Connection URL:
postgres://...:5432/...
```
* Set "DATABASE_URL"
* Edit `config/environment.rb`
```
- adapter :sql, ENV['DATABASE_URL']
+ adapter :sql, 'postgres://user:pass@host:5432:schema?sslmode=require'
```