Skip to content

Commit f6f5b9e

Browse files
committed
Improve documentation of how to run tests:
- Document dependency on GEOS - Add example database.yml
1 parent f1a43dd commit f6f5b9e

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

README.rdoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,17 @@ Rails as of Rails 3.0.3, so we hope it will get rectified at some point.
149149

150150
=== Development and support
151151

152-
==== Set-up
152+
==== Setup
153153

154-
Create a test database configuration file <tt>test/database.yml</tt> with the following content (replace with proper dbname/username/password):
154+
To install the most recent supported versions of required gems and run the tests against them,
155+
156+
Install {GEOS}[https://trac.osgeo.org/geos/] as appropriate for your OS.
157+
rgeo works to some extent without GEOS, but this gem's tests require it.
158+
Be sure to install GEOS before installing gems so that it's compiled into rgeo.
159+
160+
Create a test database configuration file <tt>test/database.yml</tt> with the following content.
161+
If you like you can copy <tt>test/database-example.yml</tt> to <tt>test/database.yml</tt>.
162+
Replace the database, username and password with correct values.
155163

156164
adapter: mysql2spatial
157165
encoding: utf8
@@ -161,12 +169,14 @@ Create a test database configuration file <tt>test/database.yml</tt> with the fo
161169
username: YOUR_USER_NAME
162170
password: PASSWORD_OR_NOTHING
163171

164-
Install required gems with <tt>bundle install</tt> (remove Gemfile.lock and then install gems if there are any issues with gem versions).
165-
166-
Run the test suite before committing or publishing any changes:
172+
Then,
167173

174+
bundle install
168175
bundle exec rake test
169176

177+
Always do this before sharing a revision with others.
178+
179+
==== Resources
170180

171181
Documentation is available at http://rgeo.github.com/activerecord-mysql2spatial-adapter/rdoc
172182

test/database-example.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copy this file to database.yml in the same directory and fill in the empty fields
2+
adapter: mysql2spatial
3+
encoding: utf8
4+
reconnect: true
5+
host: localhost
6+
database:
7+
username:
8+
password:

0 commit comments

Comments
 (0)