项目作者: Dimetriu

项目描述 :
A simple ecommerce application example
高级语言: Ruby
项目地址: git://github.com/Dimetriu/Bookstore.git
创建时间: 2018-03-25T15:56:10Z
项目社区:https://github.com/Dimetriu/Bookstore

开源协议:MIT License

下载


Bookstore App

CircleCI
VersionEye

Ruby version 2.5.0

System dependencies

You may want to use ruby gem capybara-webkit, which depends on qt5.
To make this work open up your shell and type the folowing command:

$ sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x

Configuration

Set up a staging environment if needed additionally to the default test, development and production.

Actually this behaves like a production environment, so the configuration might look like this:

  1. # config/environments/staging.rb
  2. require File.expand_path('../production.rb', __FILE__) # just to copy the production.rb settings

Or alternatively you can specify your own configurations:

  1. Rails.application.configure do
  2. # ...
  3. # Use a different cache store in staging.
  4. config.cache_store = :mem_cache_store
  5. # ...
  6. end

Database creation

This project uses postgresql adapter.

To create a bookstore_test and bookstore_development database simply run:

$ rails db:create

For the staging environment add the folowing lines to config/database.yml:

  1. staging:
  2. <<: *default
  3. database: bookstore_staging

Don`t forget to generate a secret key:

$ rails secret

Clip and paste that line to config/secrets.yml:

  1. # your secret key generated previously
  2. staging:
  3. secret_key_base: 67b62eabff24448643c994fbefe789f1ae1210a37b009f106184ed2777464d121d63da0f8410abe73d566183892ad83cb19502c23cca36c4a8a949b04d6a15e6

And create the staging database:

$ RAILS_ENV=staging rails db:create

Database initialization

To initialize an empty database simply run:

$ rails db:schema:load

TODO

1 How to run the test suite

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

3 Deployment instructions