File tree Expand file tree Collapse file tree 6 files changed +27
-14
lines changed Expand file tree Collapse file tree 6 files changed +27
-14
lines changed Original file line number Diff line number Diff line change @@ -21,3 +21,12 @@ addons:
21
21
- mongodb-3.2-precise
22
22
packages :
23
23
- mongodb-org-server
24
+
25
+ env :
26
+ - MONGOID_VERSION=5
27
+ - MONGOID_VERSION=6
28
+ - MONGOID_VERSION=HEAD
29
+
30
+ matrix :
31
+ allow_failures :
32
+ - env : MONGOID_VERSION=HEAD
Original file line number Diff line number Diff line change 1
1
## 5.1.0 (Next)
2
2
3
+ * [ #59 ] ( https://github.com/mongoid/mongoid-geospatial/pull/59 ) : Test against Mongoid 5 and 6 - [ @dblock ] ( https://github.com/dblock ) .
3
4
* [ #52 ] ( https://github.com/mongoid/mongoid-geospatial/pull/52 ) : Added Danger and Rubocop, PR and code linters - [ @dblock ] ( https://github.com/dblock ) .
4
5
* Your contribution here.
5
6
Original file line number Diff line number Diff line change 1
1
source 'http://rubygems.org'
2
2
3
- gem 'mongoid' , '>=5.0.0'
4
-
5
- gemspec # Specify gem's dependencies in mongoid_geospatial.gemspec
3
+ case version = ENV [ 'MONGOID_VERSION' ] || '6'
4
+ when 'HEAD'
5
+ gem 'mongoid' , github : 'mongodb/mongoid'
6
+ when /^6/
7
+ gem 'mongoid' , '~> 6.0.0'
8
+ when /^5/
9
+ gem 'mongoid' , '~> 5.0'
10
+ else
11
+ gem 'mongoid' , version
12
+ end
6
13
7
- gem 'rake'
14
+ gemspec
8
15
9
16
group :development , :test do
17
+ gem 'rake'
10
18
gem 'pry'
11
19
gem 'yard'
12
20
gem 'fuubar'
Original file line number Diff line number Diff line change 1
- Copyright (c) 2009-2016 Mongoid Geospatial Authors
1
+ Copyright (c) 2009-2017 Mongoid Geospatial Authors
2
2
3
3
Permission is hereby granted, free of charge, to any person obtaining
4
4
a copy of this software and associated documentation files (the
Original file line number Diff line number Diff line change @@ -12,16 +12,13 @@ A Mongoid Extension that simplifies the use of MongoDB spatial features.
12
12
Quick Start
13
13
-----------
14
14
15
- This gem focuses on (making helpers for) MongoDB's spatial features.
16
- But you may also use an external Geometric/Spatial gem alongside.
15
+ This gem focuses on (making helpers for) MongoDB's spatial features using Mongoid 5 or 6.
17
16
18
17
``` ruby
19
18
# Gemfile
20
- gem ' mongoid-geospatial' , require: ' mongoid/geospatial '
19
+ gem ' mongoid-geospatial'
21
20
```
22
21
23
- Use version 5.x for Mongoid 5 and version 4.x for Mongoid 4.
24
-
25
22
A ` Place ` to illustrate ` Point ` , ` Line ` and ` Polygon `
26
23
27
24
``` ruby
@@ -60,7 +57,7 @@ rake db:mongoid:create_indexes
60
57
61
58
Or programatically:
62
59
63
- ```
60
+ ``` ruby
64
61
Place .create_indexes
65
62
```
66
63
@@ -398,7 +395,7 @@ Contributing
398
395
License
399
396
-------
400
397
401
- Copyright (c) 2009-2015 Mongoid Geospatial Authors
398
+ Copyright (c) 2009-2017 Mongoid Geospatial Authors
402
399
403
400
MIT License, see [ MIT-LICENSE] ( MIT-LICENSE ) .
404
401
Original file line number Diff line number Diff line change @@ -65,8 +65,6 @@ def score_with_rescoring=(score)
65
65
self . score_without_rescoring = score
66
66
end
67
67
68
- alias_method_chain :score= , :rescoring
69
-
70
68
def update_addresses
71
69
addresses . each do |address |
72
70
address . street = 'Updated Address'
You can’t perform that action at this time.
0 commit comments