Skip to content

mertyildiran/SCOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCOR

Barebones of E-Commerce written on top of Ruby on Rails framework

Screenshot 1 Screenshot 2

Screenshot 3 Screenshot 4

Version

0.5.7

Installation

git clone https://github.com/mertyildiran/SCOR.git
cd SCOR/
bundle install
rake db:migrate
rake db:seed
rails server

Visit: https://localhost:3000/

Admin Panel

Create your first user using this form: https://localhost:3000/users/sign_up

After that, set the first user as the admin:

rails console
u = User.first
u.admin = true
u.save
exit

Make sure you are logged in as admin and visit: https://localhost:3000/admin

Note: If you are not logged in to the system you will get an exception which is extremely normal.

Now you are able to grant whoever you want with Administrative Privileges by marking as Admin: https://localhost:3000/admin/user



Developer

Database Autoloading

Write current state of database to seed:

rake db:seed:dump

After that, whenever you want autoload your dump:

rake db:seed

Rebuilding Your Database (for Testing)

rake db:drop:all
rake db:create:all
rake db:migrate
rake db:test:prepare

Testing

Unit Tests
rake test:units
Functional Tests
rake test:functionals
Integration Tests
rake test:integration
Benchmarking
rake test:benchmark
Profiling
rake test:profile

Alternatively, run all unit, functional and integration tests with profiling and benchmarking:

rake test

CAUTION: Warnings can turn stdout to a mess. On that case use RUBYOPT=W0 option. Example: rake test:benchmark RUBYOPT=W0