Skip to content

Commit 7ff079d

Browse files
author
MSzweda
committed
simplify dev setup
1 parent cac2a34 commit 7ff079d

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
--color
22
--require spec_helper
3+
-f d

README.md

+22-12
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,41 @@ Introduction to acceptance testing
33

44
FORK THE PROJECT!
55

6-
# Database setup
6+
# Dependencies
7+
**Download and set these up first.**
8+
9+
- ruby 2.1.5
10+
- postgres
711

8-
We're using postgres. Make sure it's running :)
12+
## Gem dependencies
13+
- capybara webkit driver (you will need QT)
14+
[Webkit as js driver for cabypara](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit)
15+
16+
# Database setup
17+
We're using postgres. Make sure it's running :) Then log in to template with this command line:
918

10-
Ubuntu: `sudo -u postgres psql template1`
19+
Ubuntu: `sudo -u postgres psql template1`
1120
OSX: `psql template1`
1221

13-
**Fill in your desired password** in the `db/development_setup_script.sql` - if you leave it empty you might have to [change your hba_conf](https://gist.github.com/p1nox/4953113).
22+
You will now be in psql command line. After that in the console run the development setup script - this script is already filled in with passwords, etc. If you want to change any of the information in there you will need to change it also in database.yml later!
1423

15-
Then in the pql console run: `\i <PATH_TO_PROJECT>/db/development_setup_script.sql`
24+
In the pql console run: `\i <PATH_TO_PROJECT>/db/development_setup_script.sql`
1625
Exit console by typing `\q`
1726

18-
**Copy database.yml.sample to database.yml and fill in the password you chose earlier.**
27+
**Copy database.yml.sample to database.yml**:
28+
`cp config/database.yml.sample config/database.yml`
1929

20-
Run `bundle install`
30+
Run `bundle install`
2131
Then `rake db:reseed` to populate development environment with example data.
32+
Load test database with `rake db:test:load`.
2233

23-
# Gem dependencies
24-
25-
[Webkit as js driver for cabypara](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit)
2634

2735
# Credentials
28-
Seeds have a user already created for you.
36+
**Seeds have a user already created for you.**
2937
`[email protected]` with password `12345678`
3038

3139
# Run
32-
3340
`rails s`
41+
42+
# Run specs (if any)
43+
`rspec spec`

config/database.yml.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defaults: &defaults
22
adapter: postgresql
33
host: localhost
44
username: howdoiqa
5-
password: <YOUR PASSWORD HERE>
5+
password: howdoiqa
66

77
development:
88
<<: *defaults

db/development_setup_script.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CREATE DATABASE "howdoiqa_development";
22
CREATE DATABASE "howdoiqa_test";
33

4-
CREATE USER howdoiqa WITH PASSWORD '<YOUR PASSWORD HERE>';
4+
CREATE USER howdoiqa WITH PASSWORD 'howdoiqa';
55

66
GRANT ALL PRIVILEGES ON DATABASE howdoiqa_development TO howdoiqa;
77
GRANT ALL PRIVILEGES ON DATABASE howdoiqa_test TO howdoiqa;

0 commit comments

Comments
 (0)