-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced ActsAsMappable#in_bounds to allow the query to include thing… #139
Enhanced ActsAsMappable#in_bounds to allow the query to include thing… #139
Conversation
…s that are located on the rectangular bounds, via an "inclusive" option (defaults to false).
bounds = [sw,ne] | ||
locations = Location.in_bounds(bounds, :inclusive => false) | ||
assert_equal 0, locations.count | ||
locations = Location.in_bounds(bounds, :inclusive => true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would, but I followed the style in the existing code.
sw = Geokit::LatLng.new(@loc_a.lat,@loc_a.lng) | ||
ne = sw | ||
bounds = [sw,ne] | ||
locations = Location.in_bounds(bounds, :inclusive => false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would, but I followed the style in the existing code.
def test_find_within_bounds_with_inclusive | ||
sw = Geokit::LatLng.new(@loc_a.lat,@loc_a.lng) | ||
ne = sw | ||
bounds = [sw,ne] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceAfterComma: Space missing after comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would, but I followed the style in the existing code.
@@ -389,6 +389,16 @@ def test_find_within_bounds | |||
assert_equal 2, locations.count | |||
end | |||
|
|||
def test_find_within_bounds_with_inclusive | |||
sw = Geokit::LatLng.new(@loc_a.lat,@loc_a.lng) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceAfterComma: Space missing after comma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I would, but I followed the style in the existing code.
Just checking to see if this PR can get merged into this project? Thanks. |
@denisahearn - Sorry I haven't responded timely. I think I'll need to find help amongst people contributing to review PRs going forward and I no longer use geokit so it's best to be done by those using geokit. So if you were available to occasionally review geokit PRs (given they'll affect you, generally positively as the tests are fairly comprehensive) then please accept the invite to become a committer and feel free to merge this PR. |
@mnoack Thanks for responding, I've accepted your invitation. Yes, I would be willing to help review PRs for |
You're welcome to release gems, I think the process was a standard process like updating the version.rb file and then "bundle exec rake release" or something, feel free to "rake -T" and look for the obvious one. My general approach was not to release after every PR, but generally as people requested it, as after-all people can point their gemfiles to the github master, this way I felt it got a bit of "testing" that way before publishing, but it really is your call now. |
…s that are located on the rectangular bounds, via an "inclusive" option (defaults to false).