Skip to content

Commit ba5744f

Browse files
committed
Some additions to the README and travis.yml
1 parent 656cd5c commit ba5744f

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ addons:
55
rvm: 2.7.1
66
cache: bundler
77
before_install: gem install bundler -v 2.1.4
8-
before_script: psql -U postgres -c 'create database sql_spy_test;'
8+
before_script: createdb sql_spy_test
99
env:
1010
- DATABASE_URL=sqlite3:///sql_spy_test.sqlite3
1111
- DATABASE_URL=postgres:///sql_spy_test

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="https://travis-ci.com/github/lipanski/sql-spy"><img src="https://api.travis-ci.com/lipanski/sql-spy.svg?branch=master"></a>
44

5-
A gem to track all SQL queries performed inside a given block.
5+
A gem to track all SQL queries performed inside a block of code.
66

77
You can use **SqlSpy** to test the total amount of queries performed by a piece of code, the amount of queries per table, selects vs. inserts vs. updates vs. deletes, or query duration. You can also use it to validate and debug your SQL or to prevent N+1 queries.
88

@@ -62,6 +62,25 @@ queries_by_model = queries.group_by(&:model_name)
6262
assert queries_by_model.none? { |model_name, queries| queries.count > 1 }
6363
```
6464

65+
## Development
66+
67+
The gem is tested with Postgres 9.6 and SQLite 3.
68+
69+
To run tests with SQLite:
70+
71+
```sh
72+
bundle exec rake
73+
```
74+
75+
To run tests with Postgres:
76+
77+
```sh
78+
# Create a test database
79+
cretedb sql_spy_test
80+
81+
DATABASE_URL=postgres:///sql_spy_test bundle exec rake
82+
```
83+
6584
## License
6685

6786
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)