mongoid-geospatial 5.0.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +8 -0
- data/.travis.yml +26 -20
- data/CHANGELOG.md +23 -0
- data/CONTRIBUTING.md +118 -0
- data/Gemfile +8 -16
- data/Guardfile +2 -2
- data/MIT-LICENSE +2 -2
- data/README.md +202 -212
- data/RELEASING.md +62 -0
- data/Rakefile +4 -1
- data/lib/mongoid/geospatial/config/point.rb +19 -0
- data/lib/mongoid/geospatial/config.rb +29 -0
- data/lib/mongoid/geospatial/fields/circle.rb +3 -3
- data/lib/mongoid/geospatial/fields/point.rb +29 -10
- data/lib/mongoid/geospatial/geometry_field.rb +6 -4
- data/lib/mongoid/geospatial/helpers/sphere.rb +1 -1
- data/lib/mongoid/geospatial/version.rb +1 -1
- data/lib/mongoid/geospatial/wrappers/georuby.rb +1 -0
- data/lib/mongoid/geospatial.rb +107 -30
- data/mongoid-geospatial.gemspec +3 -4
- data/{bench → spec}/bench +1 -1
- data/spec/models/bar.rb +1 -0
- data/spec/models/event.rb +1 -1
- data/spec/models/farm.rb +1 -1
- data/spec/models/person.rb +2 -9
- data/spec/models/river.rb +7 -7
- data/spec/mongoid/geospatial/config_spec.rb +22 -0
- data/spec/mongoid/geospatial/fields/line_string_spec.rb +3 -4
- data/spec/mongoid/geospatial/fields/point_spec.rb +50 -4
- data/spec/mongoid/geospatial/fields/polygon_spec.rb +3 -3
- data/spec/mongoid/geospatial/geospatial_spec.rb +80 -8
- data/spec/mongoid/geospatial/helpers/core_spec.rb +6 -3
- data/spec/mongoid/geospatial/helpers/spatial_spec.rb +3 -3
- data/spec/mongoid/geospatial/helpers/sphere_spec.rb +6 -6
- data/spec/mongoid.yml +298 -0
- data/spec/spec_helper.rb +9 -19
- data/spec/support/authentication.rb +0 -1
- metadata +18 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c175628dbf99da911bb81c3c25b2665b3547506f910366a53d43eaabea99e410
|
4
|
+
data.tar.gz: 8e38f228cc16e9a17cbe44dd2be01bd06e989d5e91d968a9b50a1885cc12eb8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09b65028e7d0b27a88383dac691372e6b456ad0d72b3ef0159e8e9e33d7f6da78cb250038c6d592bbb667d9a6f6f864ac1ae8278eaed41b69277d0290a47399
|
7
|
+
data.tar.gz: 843567a6bbe62c5551cd962c70a927e2dd8e19968c741ea014e384cf942b99aa75fa382969fe139cc07c835249fb7d864421713cb5e324e0495615fc14b7d30e
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,27 +1,33 @@
|
|
1
|
+
sudo: false
|
2
|
+
|
1
3
|
language: ruby
|
2
|
-
|
4
|
+
|
5
|
+
cache: bundler
|
6
|
+
|
7
|
+
services: mongodb
|
8
|
+
|
3
9
|
rvm:
|
4
|
-
-
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1.0
|
7
|
-
- 2.2.0
|
8
|
-
- ruby-head
|
9
|
-
- jruby
|
10
|
-
- jruby-head
|
11
|
-
- rbx-2
|
10
|
+
- 2.5.3
|
12
11
|
|
13
|
-
|
14
|
-
-
|
15
|
-
- openjdk7
|
12
|
+
before_install:
|
13
|
+
- gem update bundler
|
16
14
|
|
17
|
-
|
15
|
+
before_script:
|
16
|
+
- bundle exec danger
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
addons:
|
19
|
+
apt:
|
20
|
+
sources:
|
21
|
+
- mongodb-3.2-precise
|
22
|
+
packages:
|
23
|
+
- mongodb-org-server
|
23
24
|
|
24
|
-
|
25
|
-
-
|
25
|
+
env:
|
26
|
+
- MONGOID_VERSION=5
|
27
|
+
- MONGOID_VERSION=6
|
28
|
+
- MONGOID_VERSION=7
|
29
|
+
- MONGOID_VERSION=HEAD
|
26
30
|
|
27
|
-
|
31
|
+
matrix:
|
32
|
+
allow_failures:
|
33
|
+
- env: MONGOID_VERSION=HEAD
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
## 5.1.1 (Next)
|
2
|
+
|
3
|
+
* Your contribution here.
|
4
|
+
|
5
|
+
## 5.1.0 (2018/11/09)
|
6
|
+
|
7
|
+
* [#61](https://github.com/mongoid/mongoid-geospatial/pull/64): Add global configuration for switching between LngLat and LatLng - [@dblock](https://github.com/dblock).
|
8
|
+
* [#59](https://github.com/mongoid/mongoid-geospatial/pull/59), [#65](https://github.com/mongoid/mongoid-geospatial/pull/65): Test against Mongoid 5, 6 and 7 - [@dblock](https://github.com/dblock).
|
9
|
+
* [#52](https://github.com/mongoid/mongoid-geospatial/pull/52), [#70](https://github.com/mongoid/mongoid-geospatial/pull/70): Added Danger and Rubocop, PR and code linters - [@dblock](https://github.com/dblock).
|
10
|
+
|
11
|
+
## 5.0.0 (2015/07/23)
|
12
|
+
|
13
|
+
* Mongoid 5 support - [@nofxx](https://github.com/nofxx).
|
14
|
+
|
15
|
+
## 4.0.1 (2015/03/04)
|
16
|
+
|
17
|
+
## 4.0.0 (2015/01/11)
|
18
|
+
|
19
|
+
* Mongoid 4 support - [@nofxx](https://github.com/nofxx).
|
20
|
+
|
21
|
+
## 3.9.0 (2014/12/22)
|
22
|
+
|
23
|
+
* Initial public release - [@nofxx](https://github.com/nofxx).
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
Contributing to Mongoid::Geospatial
|
2
|
+
===================================
|
3
|
+
|
4
|
+
Mongoid::Geospatial is work of [many of contributors](https://github.com/mongoid/mongoid-geospatial/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/mongoid/mongoid-geospatial/pulls), [propose features, ask questions and discuss issues](https://github.com/mongoid/mongoid-geospatial/issues).
|
5
|
+
|
6
|
+
#### Fork the Project
|
7
|
+
|
8
|
+
Fork the [project on Github](https://github.com/mongoid/mongoid-geospatial) and check out your copy.
|
9
|
+
|
10
|
+
```
|
11
|
+
git clone https://github.com/contributor/mongoid-geospatial.git
|
12
|
+
cd mongoid-geospatial
|
13
|
+
git remote add upstream https://github.com/mongoid/mongoid-geospatial.git
|
14
|
+
```
|
15
|
+
|
16
|
+
#### Create a Topic Branch
|
17
|
+
|
18
|
+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
19
|
+
|
20
|
+
```
|
21
|
+
git checkout master
|
22
|
+
git pull upstream master
|
23
|
+
git checkout -b my-feature-branch
|
24
|
+
```
|
25
|
+
|
26
|
+
#### Bundle Install and Test
|
27
|
+
|
28
|
+
Ensure that you can build the project and run tests.
|
29
|
+
|
30
|
+
```
|
31
|
+
bundle install
|
32
|
+
bundle exec rake
|
33
|
+
```
|
34
|
+
|
35
|
+
#### Write Tests
|
36
|
+
|
37
|
+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [spec/mongoid-geospatial](spec/mongoid-geospatial).
|
38
|
+
|
39
|
+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
40
|
+
|
41
|
+
#### Write Code
|
42
|
+
|
43
|
+
Implement your feature or bug fix.
|
44
|
+
|
45
|
+
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop), run `bundle exec rubocop` and fix any style issues highlighted.
|
46
|
+
|
47
|
+
Make sure that `bundle exec rake` completes without errors.
|
48
|
+
|
49
|
+
#### Write Documentation
|
50
|
+
|
51
|
+
Document any external behavior in the [README](README.md).
|
52
|
+
|
53
|
+
#### Update Changelog
|
54
|
+
|
55
|
+
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Make it look like every other line, including your name and link to your Github account.
|
56
|
+
|
57
|
+
#### Commit Changes
|
58
|
+
|
59
|
+
Make sure git knows your name and email address:
|
60
|
+
|
61
|
+
```
|
62
|
+
git config --global user.name "Your Name"
|
63
|
+
git config --global user.email "contributor@example.com"
|
64
|
+
```
|
65
|
+
|
66
|
+
Writing good commit logs is important. A commit log should describe what changed and why.
|
67
|
+
|
68
|
+
```
|
69
|
+
git add ...
|
70
|
+
git commit
|
71
|
+
```
|
72
|
+
|
73
|
+
#### Push
|
74
|
+
|
75
|
+
```
|
76
|
+
git push origin my-feature-branch
|
77
|
+
```
|
78
|
+
|
79
|
+
#### Make a Pull Request
|
80
|
+
|
81
|
+
Go to https://github.com/contributor/mongoid-geospatial and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
82
|
+
|
83
|
+
#### Rebase
|
84
|
+
|
85
|
+
If you've been working on a change for a while, rebase with upstream/master.
|
86
|
+
|
87
|
+
```
|
88
|
+
git fetch upstream
|
89
|
+
git rebase upstream/master
|
90
|
+
git push origin my-feature-branch -f
|
91
|
+
```
|
92
|
+
|
93
|
+
#### Update CHANGELOG Again
|
94
|
+
|
95
|
+
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
|
96
|
+
|
97
|
+
```
|
98
|
+
* [#123](https://github.com/mongoid/mongoid-geospatial/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
|
99
|
+
```
|
100
|
+
|
101
|
+
Amend your previous commit and force push the changes.
|
102
|
+
|
103
|
+
```
|
104
|
+
git commit --amend
|
105
|
+
git push origin my-feature-branch -f
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Check on Your Pull Request
|
109
|
+
|
110
|
+
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
111
|
+
|
112
|
+
#### Be Patient
|
113
|
+
|
114
|
+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
|
115
|
+
|
116
|
+
#### Thank You
|
117
|
+
|
118
|
+
Please do know that we really appreciate and value your time and work. We love you, really.
|
data/Gemfile
CHANGED
@@ -1,25 +1,17 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
gem 'mongoid'
|
4
4
|
|
5
|
-
|
5
|
+
gemspec
|
6
6
|
|
7
|
-
group :test do
|
8
|
-
gem 'pry'
|
9
|
-
gem 'yard'
|
10
|
-
gem 'nokogiri'
|
11
|
-
|
12
|
-
gem 'dbf'
|
13
|
-
gem 'rgeo'
|
14
|
-
gem 'georuby'
|
15
|
-
|
16
|
-
gem 'rspec'
|
17
|
-
|
18
|
-
gem 'rubocop'
|
7
|
+
group :development, :test do
|
19
8
|
gem 'fuubar'
|
9
|
+
gem 'rake'
|
20
10
|
gem 'guard'
|
21
|
-
gem 'guard-rubocop'
|
22
11
|
gem 'guard-rspec'
|
12
|
+
gem 'rubocop'
|
13
|
+
end
|
23
14
|
|
15
|
+
group :test do
|
24
16
|
gem 'coveralls', require: false if ENV['CI']
|
25
17
|
end
|
data/Guardfile
CHANGED
@@ -11,6 +11,6 @@ end
|
|
11
11
|
|
12
12
|
guard :rspec, cmd: 'bundle exec rspec', notification: true do
|
13
13
|
watch(/^spec\/.+_spec\.rb$/)
|
14
|
-
watch(/^lib\/(.+)\.rb$/)
|
15
|
-
watch('spec/spec_helper.rb')
|
14
|
+
watch(/^lib\/(.+)\.rb$/) { |m| "spec/#{m[1]}_spec.rb" }
|
15
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
16
16
|
end
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2009-
|
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
|
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
17
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|