Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ addons:
- mongodb-3.2-precise
packages:
- mongodb-org-server

env:
- MONGOID_VERSION=5
- MONGOID_VERSION=6
- MONGOID_VERSION=HEAD

matrix:
allow_failures:
- env: MONGOID_VERSION=HEAD
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 5.1.0 (Next)

* [#59](https://github.com/mongoid/mongoid-geospatial/pull/59): Test against Mongoid 5 and 6 - [@dblock](https://github.com/dblock).
* [#52](https://github.com/mongoid/mongoid-geospatial/pull/52): Added Danger and Rubocop, PR and code linters - [@dblock](https://github.com/dblock).
* Your contribution here.

Expand Down
16 changes: 12 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
source 'http://rubygems.org'

gem 'mongoid', '>=5.0.0'

gemspec # Specify gem's dependencies in mongoid_geospatial.gemspec
case version = ENV['MONGOID_VERSION'] || '6'
when 'HEAD'
gem 'mongoid', github: 'mongodb/mongoid'
when /^6/
gem 'mongoid', '~> 6.0.0'
when /^5/
gem 'mongoid', '~> 5.0'
else
gem 'mongoid', version
end

gem 'rake'
gemspec

group :development, :test do
gem 'rake'
gem 'pry'
gem 'yard'
gem 'fuubar'
Expand Down
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009-2016 Mongoid Geospatial Authors
Copyright (c) 2009-2017 Mongoid Geospatial Authors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ A Mongoid Extension that simplifies the use of MongoDB spatial features.
Quick Start
-----------

This gem focuses on (making helpers for) MongoDB's spatial features.
But you may also use an external Geometric/Spatial gem alongside.
This gem focuses on (making helpers for) MongoDB's spatial features using Mongoid 5 or 6.

```ruby
# Gemfile
gem 'mongoid-geospatial', require: 'mongoid/geospatial'
gem 'mongoid-geospatial'
```

Use version 5.x for Mongoid 5 and version 4.x for Mongoid 4.

A `Place` to illustrate `Point`, `Line` and `Polygon`

```ruby
Expand Down Expand Up @@ -60,7 +57,7 @@ rake db:mongoid:create_indexes

Or programatically:

```
```ruby
Place.create_indexes
```

Expand Down Expand Up @@ -398,7 +395,7 @@ Contributing
License
-------

Copyright (c) 2009-2015 Mongoid Geospatial Authors
Copyright (c) 2009-2017 Mongoid Geospatial Authors

MIT License, see [MIT-LICENSE](MIT-LICENSE).

2 changes: 0 additions & 2 deletions spec/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ def score_with_rescoring=(score)
self.score_without_rescoring = score
end

alias_method_chain :score=, :rescoring

def update_addresses
addresses.each do |address|
address.street = 'Updated Address'
Expand Down