DPoll is a small voting app that is using ruby on rails, angular and responsive mobile design.
User can create events and vote whether they liked/disliked the event eg dius monthly talks.
-
Install ruby version management tool.
Recommend rbenv github.com/sstephenson/rbenv
Note: Rvm is another tool but is messy to uninstall.
-
Install Ruby using your management tool and set for dpoll
version 2.0.0-p576
eg. $ rbenv install 2.0.0-p576 $ rbenv local 2.0.0-p576
-
Check ruby version is correct in dpoll directory
$ ruby -v
-
Install bundler
$ gem install bundler
-
Install mysql database server
$ brew install mysql
-
Start database
mysqld
-
$ bundle install
-
$ bundle update (subsequent runs)
-
Setup development database
$ rake db:create db:migrate
-
Setup test database
$ rake RAILS_ENV=test db:create db:migrate
-
Note: to see all rake tasks
$ rake -T
This is required for cucumber tests
Download latest from chromedriver.storage.googleapis.com/index.html and place on your path
-
Run all jasmine, spec and cuke tests
$ rake precheckin
-
Run only cucumber
$ rake cucumber
-
Run cucumber scenarios tagged with wip
$ rake cucumber:wip
-
Run single scenario
$ rake FEATURE=features/vote_event.feature cucumber
-
run jasmine tests interactively
$ rake jasmine
-
open up localhost:8888
-
run jasmine tests for ci
$ rake jasmine:ci
-
run unicorn
$ bundle exec unicorn
-
run unicorn against production
$ bundle exec unicorn -E production
-
Install chef
$ curl -L www.opscode.com/chef/install.sh | bash
-
Install chefdk (required for bershelf)
-
Install vagrant
www.vagrantup.com/downloads.html
-
Install vagrant omnibus
$ cd ~ $ vagrant plugin install vagrant-omnibus
-
Install vagrant vm workstation
$ vagrant plugin install vagrant-vmware-workstation
-
Install vagrant host manager
$ vagrant plugin install vagrant-hostmanager
-
Install vagrant berkshelf
$ vagrant plugin install vagrant-berkshelf
-
A Vagrant plugin that ensures the desired version of Chef is installed via the platform-specific Omnibus packages.
-
Available as a vagrant plugin install
-
Open a ConEMU shell and install with the following commands. It will take a while.
-
Install Vagrant Omnibus Plugin
-
vagrant plugin install vagrant-omnibus
-
Website: github.com/schisamo/vagrant-omnibus
-
Full List of Vagrant Plugins: github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
A Vagrant plugin that manages the /etc/hosts file on guests within a multi-machine environment Available as a vagrant plugin install Open a ConEMU shell and install with the following commands. It will take a while. Install Vagrant Hostmanager Plugin vagrant plugin install vagrant-hostmanager Website: github.com/smdahlen/vagrant-hostmanager Full List of Vagrant Plugins: github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins
vagrant-berkshelf 2.0.1 A Vagrant plugin to add Berkshelf integration to the Chef provisioners Available as a vagrant plugin install Open a ConEMU shell and install with the following commands. It will take a while. Install Vagrant Berkshelf Plugin vagrant plugin install vagrant-berkshelf Website: github.com/berkshelf/vagrant-berkshelf Full List of Vagrant Plugins: github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins Plugin: If plugin “vagrant-berkshelf” doesn’t work with version 2.0.1, try getting the latest version with “vagrant plugin install vagrant-berkshelf”