Skip to content

Commit

Permalink
Adding: init setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeoleynik committed Sep 6, 2019
1 parent 8b90bd0 commit e01c889
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 26 deletions.
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
# README
## Getting Started

This README would normally document whatever steps are necessary to get the
application up and running.
This section provides quick start guide.

Things you may want to cover:
### Prerequisites

* Ruby version
- [Ruby](https://www.ruby-lang.org/en/): 2.6.3
- [Ruby on Rails](https://rubyonrails.org/): 2.6.3
- [PostgreSQL](https://www.postgresql.org/) 9.4 or higher.

* System dependencies
### Standard Installation

* Configuration

* Database creation

* Database initialization

* How to run the test suite

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...
1. `bin/setup`
9 changes: 9 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ chdir APP_ROOT do
puts "\n== Preparing database =="
system! 'bin/rails db:setup'

puts "\n== Create database =="
system! 'bin/rails db:create'

puts "\n== Updating database =="
system! 'bin/rails db:migrate'

puts "\n== Fill database =="
system! 'bin/rails db:seed'

puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'

Expand Down
10 changes: 3 additions & 7 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)
User.create(email: '[email protected]',
password: 'qwerty12',
password_confirmation: 'qwerty12')

0 comments on commit e01c889

Please sign in to comment.