diff --git a/.rubocop.yml b/.rubocop.yml index b827af4..50126d9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,6 +11,7 @@ AllCops: - node_modules/**/* - db/* - vendor/ruby/**/* + - vendor/bundle/**/* - config/initializers/simple_form_bootstrap.rb Rails: Enabled: true diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a673577 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: ruby +rvm: + - 2.4.1 +services: + - postgres +cache: + bundler: true + directories: + - node_modules +before_install: + - nvm install 8.1.0 + - npm install -g yarn +before_script: + - yarn install + - bundle exec rake db:create + - bundle exec rake db:schema:load +script: + - yarn eslint + - bundle exec scss-lint app/assets/stylesheets/ + - bundle exec rubocop + - bundle exec rspec + diff --git a/Gemfile b/Gemfile index 2d4effd..26dd125 100644 --- a/Gemfile +++ b/Gemfile @@ -51,7 +51,7 @@ group :development, :test do gem 'faker' gem 'dotenv-rails' - gem 'rubocop', require: false + gem 'rubocop', '0.49.1', require: false gem 'scss_lint', require: false gem 'timecop' end diff --git a/Gemfile.lock b/Gemfile.lock index c6fb4c0..67661eb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -390,7 +390,7 @@ DEPENDENCIES rails-i18n rspec rspec-rails - rubocop + rubocop (= 0.49.1) sassc-rails scss_lint selenium-webdriver @@ -411,4 +411,4 @@ DEPENDENCIES webpacker BUNDLED WITH - 1.15.1 + 1.15.3 diff --git a/README.md b/README.md index 7db80e4..92147c9 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,56 @@ -# README +Tamashii Clock-in [![Build Status](https://travis-ci.org/tamashii-io/tamashii-clockin.svg?branch=master)](https://travis-ci.org/tamashii-io/tamashii-clockin) +=== -This README would normally document whatever steps are necessary to get the -application up and running. +## Requirements -Things you may want to cover: +* Ruby 2.4.0 +* PostgreSQL 9.5+ +* Redis +* Node.js +* Yarn -* Ruby version +## Usage -* System dependencies +### Install Dependency -* Configuration +``` +$ bundle install +``` -* Database creation +### Prepare Database -* Database initialization +If you didn't have database. -* How to run the test suite +``` +$ rake db:create +``` -* Services (job queues, cache servers, search engines, etc.) +And run migration to create tables. -* Deployment instructions +``` +$ rake db:migrate +``` -* ... +### Rails + +Start Rails server + +``` +$ rails s +``` + +### Webpack + +Make sure running `webpack-dev-server` to building javascript. + +Above require `binstub` setup for your system. + +``` +$ webpack-dev-server +``` + +or + +``` +$ ./bin/webpack-dev-server +```