Skip to content

Commit

Permalink
Merge pull request #23 from dschweisguth/rgeo-compatibility
Browse files Browse the repository at this point in the history
Make tests pass against current rgeo, code cleanup
  • Loading branch information
januszm committed Jul 14, 2017
2 parents 05ffdd4 + 3d15131 commit cfe0bdb
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 34 deletions.
24 changes: 14 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
/doc/
/pkg/
/tmp/
.rbx/
.#*
.DS_Store
*.dSYM
*.bundle
*.class
*.dSYM
*.jar
*.bundle
*.o
*.rbc
.#*
.DS_Store
.rbx/
/.idea
/.rbenv-gemsets
/.ruby-gemset
/.ruby-version
/Gemfile.lock
/doc/
/pkg/
/test/database.yml
/tmp/
Makefile*
mkmf.log
/test/database.yml
/Gemfile.lock
14 changes: 2 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# -----------------------------------------------------------------------------
;

source "https://rubygems.org"

source "http://rubygems.org"

gem 'rgeo-activerecord', github: 'rgeo/rgeo-activerecord', branch: '1.0'
gem 'mysql2', '>= 0.2.13', '< 0.4.0'
gem 'activerecord', '>= 4.0', '< 4.2'

group :test do
gem 'rake', '>= 0.9.2'
gem 'rdoc', '>= 3.12'
gem 'pry'
end
gemspec
5 changes: 5 additions & 0 deletions History.rdoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
=== 0.5.1 / 2017-07-04

* Move dependency on rgeo-activerecord from unreleased 1.0 branch to 1.3.0 release.
* Document how to run tests.

=== 0.5.0 / 2015-08-06

* Compatibility with ActiveRecord >= 4.0, < 4.2 and with rgeo-activerecord 1.x.
Expand Down
20 changes: 15 additions & 5 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,17 @@ Rails as of Rails 3.0.3, so we hope it will get rectified at some point.

=== Development and support

==== Set-up
==== Setup

Create a test database configuration file <tt>test/database.yml</tt> with the following content (replace with proper dbname/username/password):
To install the most recent supported versions of required gems and run the tests against them,

Install {GEOS}[https://trac.osgeo.org/geos/] as appropriate for your OS.
rgeo works to some extent without GEOS, but this gem's tests require it.
Be sure to install GEOS before installing gems so that it's compiled into rgeo.

Create a test database configuration file <tt>test/database.yml</tt> with the following content.
If you like you can copy <tt>test/database-example.yml</tt> to <tt>test/database.yml</tt>.
Replace the database, username and password with correct values.

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

Install required gems with <tt>bundle install</tt> (remove Gemfile.lock and then install gems if there are any issues with gem versions).

Run the test suite before committing or publishing any changes:
Then,

bundle install
bundle exec rake test

Always do this before sharing a revision with others.

==== Resources

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

Expand Down
2 changes: 1 addition & 1 deletion Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
13 changes: 7 additions & 6 deletions activerecord-mysql2spatial-adapter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# -----------------------------------------------------------------------------
;

::Gem::Specification.new do |s_|
s_.name = 'activerecord-mysql2spatial-adapter'
Expand All @@ -40,16 +39,18 @@
s_.version = "#{::File.read('Version').strip}"
s_.author = 'Daniel Azuma'
s_.email = 'dazuma@gmail.com'
s_.homepage = "http://dazuma.github.com/activerecord-mysql2spatial-adapter"
s_.rubyforge_project = 'virtuoso'
s_.required_ruby_version = '>= 1.9.3'
s_.files = ::Dir.glob("lib/**/*.rb") +
s_.files =
::Dir.glob("lib/**/*.rb") +
::Dir.glob("test/**/*.rb") +
::Dir.glob("*.rdoc") +
['Version']
s_.extra_rdoc_files = ::Dir.glob("*.rdoc")
s_.test_files = ::Dir.glob("test/**/tc_*.rb")
s_.platform = ::Gem::Platform::RUBY
s_.add_dependency('rgeo-activerecord', '~> 1.0')
s_.add_dependency('activerecord', '>= 4.0', '< 4.2')
s_.add_dependency('rgeo-activerecord', '~> 1.3')
s_.add_dependency('mysql2', '>= 0.2.13', '< 0.4.0')
s_.add_development_dependency('pry')
s_.add_development_dependency('rake', '>= 0.9.2')
s_.add_development_dependency('rdoc', '>= 3.12')
end
8 changes: 8 additions & 0 deletions test/database-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copy this file to database.yml in the same directory and fill in the empty fields
adapter: mysql2spatial
encoding: utf8
reconnect: true
host: localhost
database:
username:
password:

0 comments on commit cfe0bdb

Please sign in to comment.