google_maps_geocoder 0.7.3 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/CONTRIBUTING.md +54 -8
- data/.github/ISSUE_TEMPLATE/bug-report.md +1 -1
- data/.github/ISSUE_TEMPLATE/feature_request.md +1 -0
- data/.github/ISSUE_TEMPLATE/task.md +21 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +32 -6
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/test.yml +40 -0
- data/.simplecov +15 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/Gemfile +13 -1
- data/LICENSE.txt +1 -1
- data/README.md +23 -7
- data/Rakefile +2 -0
- data/SECURITY.md +16 -0
- data/certs/ivanoblomov.pem +25 -0
- data/google_maps_geocoder.gemspec +8 -13
- data/lib/google_maps_geocoder/google_maps_geocoder.rb +16 -8
- data/lib/google_maps_geocoder/version.rb +4 -1
- data/spec/lib/google_maps_geocoder_spec.rb +45 -43
- data/spec/spec_helper.rb +14 -6
- data.tar.gz.sig +0 -0
- metadata +46 -107
- metadata.gz.sig +0 -0
- data/.github/ISSUE_TEMPLATE.md +0 -17
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f254f01eb6a7fcb5cbfbce95205755ed7d0ea918472270b26fe0aa08374445d
|
4
|
+
data.tar.gz: 1c83d7571b95682d7b28e27238455e7719253165b973c5d8e32ad339db42faeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c9fd41fd9c9b90f99f6fe1ffb97f2479c4a922ae0bb48636aed1109beb8516121dbd715bd2df28e344f97670485808eb68a977e94a959267053e5b96342b72
|
7
|
+
data.tar.gz: aa8989ef7f44879b4a09a02562c3cce30dbb5e88911e6c7b24814ee18d636c1bcc2264ed80d7a62fe94dfb5e1ebf6d21a7513f8fa0e27f32dc40897997e50fc5
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/.github/CONTRIBUTING.md
CHANGED
@@ -1,22 +1,68 @@
|
|
1
1
|
# How to contribute
|
2
2
|
|
3
|
-
##
|
3
|
+
## Background
|
4
4
|
|
5
|
-
|
5
|
+
### Branches and pull requests
|
6
6
|
|
7
|
-
|
7
|
+
To make a contribution:
|
8
|
+
|
9
|
+
1. create a new branch for a given set of logical changes
|
10
|
+
|
11
|
+
2. open a pull request for the main branch
|
12
|
+
|
13
|
+
3. request a review
|
14
|
+
1. click Reviewers from the main tab of the PR
|
15
|
+
2. select one or more contributors
|
16
|
+
|
17
|
+
4. wait for feedback
|
18
|
+
|
19
|
+
For more information, see GitHub's documentation on [creating branches](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository) and [pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
|
20
|
+
|
21
|
+
### How we handle proposals
|
22
|
+
|
23
|
+
We use GitHub to track proposed changes via its [issue tracker](https://github.com/FoveaCentral/google_maps_geocoder/issues) and [pull requests](https://github.com/FoveaCentral/google_maps_geocoder/pulls). Specific changes are proposed using those mechanisms. Issues are assigned to an individual, who works it, and then marks it complete. If there are questions or objections, the conversation area of that issue or pull request is used to resolve it.
|
24
|
+
|
25
|
+
### Two-person review
|
26
|
+
|
27
|
+
Our policy is that at least 50% of all proposed modifications will be reviewed before release by a person other than the author, to determine if it is a worthwhile modification and free of known issues which would argue against its inclusion.
|
28
|
+
|
29
|
+
We achieve this by splitting proposals into two kinds:
|
30
|
+
|
31
|
+
1. Low-risk modifications. These modifications are being proposed by people authorized to commit directly, pass all tests, and are unlikely to have problems. These include documentation/text updates and/or updates to existing gems (especially minor updates) where no risks (such as a security risk) have been identified. The project lead can decide whenther any particular modification is low-risk.
|
32
|
+
|
33
|
+
2. Other modifications. These other modifications need to be reviewed by someone else or the project lead can decide to accept the modification. Typically this is done by creating a branch and a pull request so that it can be reviewed before accepting it.
|
34
|
+
|
35
|
+
### Developer Certificate of Origin (DCO)
|
36
|
+
|
37
|
+
All contributions (including pull requests) must agree to the [Developer Certificate of Origin (DCO) version 1.1](https://developercertificate.org). This is a developer's certification that he or she has the right to submit the patch for inclusion into the project.
|
38
|
+
|
39
|
+
Simply submitting a contribution implies this agreement, however, please include a `Signed-off-by` tag in the PR (this tag is a conventional way to confirm that you agree to the DCO).
|
40
|
+
|
41
|
+
It's not practical to fix old contributions in git, so if one is forgotten, do not try to fix them. We presume that if someone sometimes used a DCO, a commit without a DCO is an accident and the DCO still applies.
|
42
|
+
|
43
|
+
## Types of contributions
|
44
|
+
|
45
|
+
### **New to open-source?**
|
46
|
+
|
47
|
+
Try your hand at one of the small tasks ideal for new or casual contributors that are [up-for-grabs](https://github.com/FoveaCentral/google_maps_geocoder/issues?q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs). Welcome to the community!
|
48
|
+
|
49
|
+
### **Did you find a bug?**
|
50
|
+
|
51
|
+
1. **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/FoveaCentral/google_maps_geocoder/issues).
|
52
|
+
|
53
|
+
2. If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/FoveaCentral/google_maps_geocoder/issues/new/choose). Be sure to include:
|
8
54
|
1. a **title and clear description**
|
9
55
|
2. as much **relevant information** as possible
|
10
56
|
3. a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
|
11
57
|
|
12
|
-
|
58
|
+
### **Did you write a patch that fixes a bug or adds a new feature?**
|
13
59
|
|
14
|
-
1. **Add specs** that either
|
60
|
+
1. **Add specs** that either *reproduce the bug* or *cover the new feature*. In the former's case, *make sure it fails without the fix!*
|
15
61
|
|
16
|
-
2. **Confirm your last build passes** on
|
62
|
+
2. **Confirm your last build passes** on your GitHub branch or PR.
|
17
63
|
|
18
|
-
3. **Update the inline documentation.** Format it with [YARD](
|
64
|
+
3. **Update the inline documentation.** Format it with [YARD](https://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md). For example, see [`GoogleMapsGeocoder.new`](../lib/google_maps_geocoder/google_maps_geocoder.rb).
|
19
65
|
|
20
|
-
4. [Open a pull request](https://github.com/
|
66
|
+
4. [Open a pull request](https://github.com/FoveaCentral/google_maps_geocoder/compare) with the patch or feature. Follow the template's directions.
|
21
67
|
|
22
68
|
## Thanks for contributing!
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
name: Task
|
3
|
+
about: Define a task to complete
|
4
|
+
title: ''
|
5
|
+
labels: 'task'
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
# Task
|
10
|
+
|
11
|
+
## Goal
|
12
|
+
|
13
|
+
Explain the goal of this task.
|
14
|
+
|
15
|
+
## Description
|
16
|
+
|
17
|
+
Provide whatever background the assignee would need to complete the task. This can include screenshots or links to other issues or pull requests.
|
18
|
+
|
19
|
+
## Success Criteria
|
20
|
+
|
21
|
+
How can stakeholders tell whether the task was completed successfully or not?
|
@@ -1,9 +1,35 @@
|
|
1
|
-
Closes: #
|
1
|
+
# Closes: #
|
2
2
|
|
3
|
-
|
3
|
+
## Goal
|
4
4
|
What problem does this pull request solve? This should be close to the goal of the issue this pull request addresses.
|
5
5
|
|
6
|
-
|
7
|
-
1. Describe the approach you chose to solve the above problem.
|
8
|
-
|
9
|
-
|
6
|
+
## Approach
|
7
|
+
1. **Describe, in numbered steps, the approach you chose** to solve the above problem.
|
8
|
+
1. This will help code reviewers get oriented quickly.
|
9
|
+
2. It will also document for future maintainers exactly what changed (and why) when this PR was merged.
|
10
|
+
2. **Add specs** that either *reproduce the bug* or *cover the new feature*. In the former's case, *make sure it fails without the fix!*
|
11
|
+
3. Document any new public methods using standard RDoc syntax, or update the existing RDoc for any modified public methods. As an example, see the RDoc for `GoogleMapsGeocoder.new`:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
# Geocodes the specified address and wraps the results in a GoogleMapsGeocoder
|
15
|
+
# object.
|
16
|
+
#
|
17
|
+
# @param address [String] a geocodable address
|
18
|
+
# @return [GoogleMapsGeocoder] the Google Maps result for the specified
|
19
|
+
# address
|
20
|
+
# @example
|
21
|
+
# chez_barack = GoogleMapsGeocoder.new '1600 Pennsylvania DC'
|
22
|
+
def initialize(address)
|
23
|
+
@json = address.is_a?(String) ? google_maps_response(address) : address
|
24
|
+
status = @json && @json['status']
|
25
|
+
raise RuntimeError if status == 'OVER_QUERY_LIMIT'
|
26
|
+
raise GeocodingError, @json if @json.blank? || status != 'OK'
|
27
|
+
|
28
|
+
set_attributes_from_json
|
29
|
+
Logger.new($stderr).info('GoogleMapsGeocoder') do
|
30
|
+
"Geocoded \"#{address}\" => \"#{formatted_address}\""
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
Signed-off-by: YOUR NAME <YOUR.EMAIL@EXAMPLE.COM>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "daily"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Download the latest Ruby patch versions, install dependencies, and run tests.
|
2
|
+
name: test
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
paths-ignore:
|
6
|
+
- '**.md'
|
7
|
+
- '**.txt'
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
environment: staging
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
name: Ruby ${{ matrix.ruby-version }}
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: [2.5, 2.6, 2.7, '3.0']
|
16
|
+
steps:
|
17
|
+
- name: Checkout code
|
18
|
+
uses: actions/checkout@v2
|
19
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
23
|
+
bundler-cache: true # 'bundle install' and cache
|
24
|
+
- name: Run tests
|
25
|
+
env:
|
26
|
+
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
|
27
|
+
run: bundle exec rake
|
28
|
+
- name: Send Code Climate coverage
|
29
|
+
uses: aktions/codeclimate-test-reporter@v1
|
30
|
+
with:
|
31
|
+
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
32
|
+
command: after-build --coverage-input-type lcov
|
33
|
+
- name: Send Coveralls coverage
|
34
|
+
uses: coverallsapp/github-action@master
|
35
|
+
with:
|
36
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
37
|
+
- name: Run RuboCop
|
38
|
+
run: bundle exec rubocop
|
39
|
+
- name: Run Inch
|
40
|
+
run: bundle exec inch --pedantic
|
data/.simplecov
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'simplecov-lcov'
|
4
|
+
|
5
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
6
|
+
c.report_with_single_file = true
|
7
|
+
c.single_report_path = 'coverage/lcov.info'
|
8
|
+
end
|
9
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
|
10
|
+
[
|
11
|
+
SimpleCov::Formatter::HTMLFormatter,
|
12
|
+
SimpleCov::Formatter::LcovFormatter
|
13
|
+
]
|
14
|
+
)
|
15
|
+
SimpleCov.start
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# The Ruby Community Conduct Guideline
|
2
|
+
|
3
|
+
We have picked the following conduct guideline based on an early proposed draft of the PostgreSQL CoC, for Ruby developers community for safe, productive collaboration. Each Ruby related community (conference etc.) may pick their own Code of Conduct.
|
4
|
+
|
5
|
+
This document provides community guidelines for a safe, respectful, productive, and collaborative place for any person who is willing to contribute to the Ruby community. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.).
|
6
|
+
|
7
|
+
* Participants will be tolerant of opposing views.
|
8
|
+
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
9
|
+
* When interpreting the words and actions of others, participants should always assume good intentions.
|
10
|
+
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
data/Gemfile
CHANGED
@@ -1,2 +1,14 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
2
4
|
gemspec
|
5
|
+
|
6
|
+
gem 'inch', '~> 0.8'
|
7
|
+
gem 'pry', '~> 0.14.1'
|
8
|
+
gem 'rake', ['>= 12.3.3', '~> 13.0']
|
9
|
+
gem 'rspec', '~> 3'
|
10
|
+
gem 'rubocop', '< 1.26'
|
11
|
+
gem 'rubocop-rake', '~> 0'
|
12
|
+
gem 'rubocop-rspec', '~> 2'
|
13
|
+
gem 'simplecov', '~> 0.18'
|
14
|
+
gem 'simplecov-lcov', '~> 0.8'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# GoogleMapsGeocoder
|
2
2
|
|
3
|
-
[![Build
|
4
|
-
[![Code Climate](https://codeclimate.com/github/
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/github/
|
6
|
-
[![
|
3
|
+
[![Build status](https://github.com/FoveaCentral/google_maps_geocoder/workflows/test/badge.svg)](https://github.com/FoveaCentral/google_maps_geocoder/actions/workflows/test.yml)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/FoveaCentral/google_maps_geocoder.svg)](https://codeclimate.com/github/FoveaCentral/google_maps_geocoder)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/FoveaCentral/google_maps_geocoder/badge.svg?branch=master)](https://coveralls.io/github/FoveaCentral/google_maps_geocoder?branch=master)
|
6
|
+
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/92/badge)](https://bestpractices.coreinfrastructure.org/projects/92)
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/google_maps_geocoder.svg)](https://rubygems.org/gems/google_maps_geocoder)
|
8
|
-
[![security](https://hakiri.io/github/ivanoblomov/google_maps_geocoder/master.svg)](https://hakiri.io/github/ivanoblomov/google_maps_geocoder/master)
|
9
8
|
|
10
9
|
A simple Plain Old Ruby Object wrapper for geocoding with Google Maps.
|
11
10
|
|
@@ -29,6 +28,15 @@ A simple Plain Old Ruby Object wrapper for geocoding with Google Maps.
|
|
29
28
|
require './lib/google_maps_geocoder/google_maps_geocoder'
|
30
29
|
```
|
31
30
|
|
31
|
+
### Security note
|
32
|
+
|
33
|
+
`GoogleMapsGeocoder` is cryptographically signed. To insure the gem you install hasn’t been tampered with, add my public key as a trusted certificate and then install:
|
34
|
+
|
35
|
+
```sh
|
36
|
+
gem cert --add <(curl -Ls https://raw.github.com/FoveaCentral/google_maps_geocoder/master/certs/ivanoblomov.pem)
|
37
|
+
gem install google_maps_geocoder -P HighSecurity
|
38
|
+
```
|
39
|
+
|
32
40
|
## Ready to Go in One Step
|
33
41
|
|
34
42
|
```ruby
|
@@ -94,8 +102,16 @@ For compatibility with [Geocoder](https://github.com/alexreisner/geocoder), the
|
|
94
102
|
* `GoogleMapsGeocoder#state`
|
95
103
|
* `GoogleMapsGeocoder#state_code`
|
96
104
|
|
97
|
-
##
|
105
|
+
## Documentation
|
106
|
+
|
107
|
+
Complete RDoc documentation is available at [RubyDoc.info](https://www.rubydoc.info/gems/google_maps_geocoder).
|
108
|
+
|
109
|
+
## [Contributing to GoogleMapsGeocoder](.github/CONTRIBUTING.md)
|
110
|
+
|
111
|
+
## Cheers!
|
112
|
+
|
113
|
+
<a href="https://www.buymeacoffee.com/oblomov" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-green.png" alt="Buy Me A Coffee" height="41" width="174" ></a>
|
98
114
|
|
99
115
|
## Copyright
|
100
116
|
|
101
|
-
Copyright © 2011-
|
117
|
+
Copyright © 2011-2022 Roderick Monje. See [LICENSE.txt](LICENSE.txt) for further details.
|
data/Rakefile
CHANGED
data/SECURITY.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
[Dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates) automatically [patches known vulnerabilities](https://github.com/FoveaCentral/google_maps_geocoder/pulls?q=is%3Apr+is%3Aclosed+author%3Aapp%2Fdependabot).
|
6
|
+
|
7
|
+
| Version | Supported |
|
8
|
+
| ------- | ------------------ |
|
9
|
+
| 0.7.7 | :white_check_mark: |
|
10
|
+
| < 0.7.7 | :x: |
|
11
|
+
|
12
|
+
## Reporting a Vulnerability
|
13
|
+
|
14
|
+
1. To report a security vulnerability, [open an issue](https://github.com/FoveaCentral/google_maps_geocoder/issues/new/choose).
|
15
|
+
2. Updates are made within 48 hours.
|
16
|
+
3. If the vulnerability is accepted, we'll try to patch it within a week.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIEQDCCAqigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyb2Qv
|
3
|
+
REM9Zm92ZWFjZW50cmFsL0RDPWNvbTAeFw0yMTExMTUwMzEwMTRaFw0yMjExMTUw
|
4
|
+
MzEwMTRaMCUxIzAhBgNVBAMMGnJvZC9EQz1mb3ZlYWNlbnRyYWwvREM9Y29tMIIB
|
5
|
+
ojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsMm8RdCTuhYTnbH5a8pesLYn
|
6
|
+
BD7cLPkeNfPWp8ohGVXL3988lRBYHwI/LRhxKXncmwmjYFWjuyR1m3e+EgmpBO3e
|
7
|
+
gCn4G9paWlwvPF+dSBF4pjhPtYBSXMFDfoeUTyHuNCcQOFJUMSAxo1pg9S9KvslC
|
8
|
+
Y1fpstOJtVnUjoeT8BRQAqV0WZuzFhgj74oSoHP/ETEd7Uzw/ST/kKgtNGcxoIYu
|
9
|
+
FEqAfEsqEpV0d6FbExYmVTR12288MaGGrfc6Y/QC1VC6RhEYG8Sn8a3utqkn7y47
|
10
|
+
0J6SROECo5x9TWU0s3HDco06jYb5sV1cGsDYXFpEczxJ9i1YVX2IDvYrpZsSJLzq
|
11
|
+
tfCdJ2jIj4rnMjGMg/kschfDnBKRIt8p7LlDhc0p/m0fYO4JQpWbvCc/F5vmUzpF
|
12
|
+
kRbiNr30dkYqDbfvcdQUWBOa5rSyZOIQiW6kfK9ZbLjBGFeP8pwSNME+yfJsZObS
|
13
|
+
AIiSqYtcP4mMriBLi+x981z1kpjTGZSWOpZrgAELAgMBAAGjezB5MAkGA1UdEwQC
|
14
|
+
MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQzajljgeoJIjO/4h4X7ve/jYWVSDAf
|
15
|
+
BgNVHREEGDAWgRRyb2RAZm92ZWFjZW50cmFsLmNvbTAfBgNVHRIEGDAWgRRyb2RA
|
16
|
+
Zm92ZWFjZW50cmFsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAqqybBWM9gIPn8Quj
|
17
|
+
R8L0HPEE/1NjNLrlNG1DhJ8MAbYFA7mo4bWp4kjXwVdw+TMQZfrLjXLgmfiTvzxV
|
18
|
+
cE10liYjCWQNxectkkYmOsCBlEDfOngNKdl3QJ+Y5+SEsqfKYhZXZypn+SwuXx8F
|
19
|
+
LuVPsP7/R6VlrI8WbtPU1oSfM+rmdpUZzDcvmtvy1S+tPfFWalo8tSXPg0gE3Nis
|
20
|
+
UZAwHu8x3v5N7lxtjJa+s9ARkH/BO5Uytz1XrUmUWLQqo9ZJtqbZ/iV9HEWhG+xx
|
21
|
+
lR8SnXcsohvP/eIY2BTyBay0eOb9BwGHmnAVRiiAfLvCftzHtBEBr6jCKESSYDuc
|
22
|
+
bUIRDNLzRjl2KOoNLjKymicWrBdz1roBpy8cFIDzi6ebE45ve/xoZbsGJ3zaLo9T
|
23
|
+
G5iWAeYsmSjJxz7iOZOsx+vPCwMy7j6nWF2CDbaxioGR/hIqNbVBveCCRyjyunD3
|
24
|
+
kvv576EuULmQcLpOKwB3RlxAG7j8JJl4ueqjF+rz7x1lBqEU
|
25
|
+
-----END CERTIFICATE-----
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require File.expand_path('lib/google_maps_geocoder/version', __dir__)
|
2
4
|
Gem::Specification.new do |s|
|
3
5
|
s.name = 'google_maps_geocoder'
|
@@ -7,22 +9,15 @@ Gem::Specification.new do |s|
|
|
7
9
|
s.description = 'Geocode a location without worrying about parsing Google '\
|
8
10
|
"Maps' response. GoogleMapsGeocoder wraps it in a plain-old "\
|
9
11
|
'Ruby object.'
|
10
|
-
s.homepage = 'https://github.com/
|
12
|
+
s.homepage = 'https://github.com/FoveaCentral/google_maps_geocoder'
|
11
13
|
s.authors = ['Roderick Monje']
|
14
|
+
s.cert_chain = ['certs/ivanoblomov.pem']
|
12
15
|
s.email = 'rod@foveacentral.com'
|
16
|
+
s.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $PROGRAM_NAME =~ /gem\z/
|
13
17
|
|
14
|
-
s.
|
15
|
-
s.add_development_dependency 'coveralls', '~> 0'
|
16
|
-
s.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
17
|
-
s.add_development_dependency 'rspec', '~> 3'
|
18
|
-
s.add_development_dependency 'rubocop', '~> 0.49.0'
|
19
|
-
|
20
|
-
s.add_runtime_dependency 'activesupport', '~> 4.1', '>= 4.1.11'
|
21
|
-
s.add_runtime_dependency 'rack', '~> 2.1.4'
|
18
|
+
s.add_runtime_dependency 'rack', '>= 2.1.4', '< 2.3.0'
|
22
19
|
|
23
|
-
s.files
|
24
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split "\n"
|
25
|
-
s.executables = `git ls-files -- bin/*`.split("\n")
|
26
|
-
.map { |f| File.basename f }
|
20
|
+
s.files = `git ls-files`.split "\n"
|
27
21
|
s.require_paths = ['lib']
|
22
|
+
s.required_ruby_version = '>= 2.5'
|
28
23
|
end
|
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
# Copyright the GoogleMapsGeocoder contributors.
|
2
|
+
# SPDX-License-Identifier: MIT
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'json'
|
2
6
|
require 'logger'
|
3
7
|
require 'net/http'
|
4
8
|
require 'rack'
|
@@ -10,16 +14,19 @@ require 'rack'
|
|
10
14
|
# chez_barack.formatted_address
|
11
15
|
# => "1600 Pennsylvania Avenue Northwest, President's Park,
|
12
16
|
# Washington, DC 20500, USA"
|
17
|
+
# rubocop:disable Metrics/ClassLength
|
13
18
|
class GoogleMapsGeocoder
|
14
19
|
GOOGLE_ADDRESS_SEGMENTS = %i[
|
15
20
|
city country_long_name country_short_name county lat lng postal_code
|
16
21
|
state_long_name state_short_name
|
17
22
|
].freeze
|
18
|
-
|
19
|
-
|
23
|
+
private_constant :GOOGLE_ADDRESS_SEGMENTS
|
24
|
+
GOOGLE_MAPS_API = 'https://maps.googleapis.com/maps/api/geocode/json'
|
25
|
+
private_constant :GOOGLE_MAPS_API
|
20
26
|
ALL_ADDRESS_SEGMENTS = (
|
21
27
|
GOOGLE_ADDRESS_SEGMENTS + %i[formatted_address formatted_street_address]
|
22
28
|
).freeze
|
29
|
+
private_constant :ALL_ADDRESS_SEGMENTS
|
23
30
|
|
24
31
|
# Returns the complete formatted address with standardized abbreviations.
|
25
32
|
#
|
@@ -67,10 +74,10 @@ class GoogleMapsGeocoder
|
|
67
74
|
@json = address.is_a?(String) ? google_maps_response(address) : address
|
68
75
|
status = @json && @json['status']
|
69
76
|
raise RuntimeError if status == 'OVER_QUERY_LIMIT'
|
70
|
-
raise GeocodingError, @json if @json.
|
77
|
+
raise GeocodingError, @json if !@json || @json.empty? || status != 'OK'
|
71
78
|
|
72
79
|
set_attributes_from_json
|
73
|
-
Logger.new(
|
80
|
+
Logger.new($stderr).info('GoogleMapsGeocoder') do
|
74
81
|
"Geocoded \"#{address}\" => \"#{formatted_address}\""
|
75
82
|
end
|
76
83
|
end
|
@@ -119,7 +126,7 @@ class GoogleMapsGeocoder
|
|
119
126
|
def initialize(json = {})
|
120
127
|
@json = json
|
121
128
|
if (message = @json['error_message'])
|
122
|
-
Logger.new(
|
129
|
+
Logger.new($stderr).error(message)
|
123
130
|
end
|
124
131
|
super @json['status']
|
125
132
|
end
|
@@ -135,7 +142,7 @@ class GoogleMapsGeocoder
|
|
135
142
|
def google_maps_response(address)
|
136
143
|
uri = URI.parse google_maps_request(address)
|
137
144
|
response = http(uri).request(Net::HTTP::Get.new(uri.request_uri))
|
138
|
-
|
145
|
+
JSON.parse response.body
|
139
146
|
end
|
140
147
|
|
141
148
|
def http(uri)
|
@@ -147,7 +154,7 @@ class GoogleMapsGeocoder
|
|
147
154
|
|
148
155
|
def parse_address_component_type(type, name = 'long_name')
|
149
156
|
address_component = @json['results'][0]['address_components'].detect do |ac|
|
150
|
-
ac['types']
|
157
|
+
ac['types']&.include?(type)
|
151
158
|
end
|
152
159
|
address_component && address_component[name]
|
153
160
|
end
|
@@ -204,3 +211,4 @@ class GoogleMapsGeocoder
|
|
204
211
|
end
|
205
212
|
end
|
206
213
|
end
|
214
|
+
# rubocop:enable Metrics/ClassLength
|
@@ -1,4 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# A simple PORO wrapper for geocoding with Google Maps.
|
2
4
|
class GoogleMapsGeocoder
|
3
|
-
|
5
|
+
# This gem's version.
|
6
|
+
VERSION = '0.7.7' unless defined?(GoogleMapsGeocoder::VERSION)
|
4
7
|
end
|
@@ -1,71 +1,73 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
before(:all) do
|
5
|
-
begin
|
6
|
-
@exact_match = GoogleMapsGeocoder.new('White House')
|
7
|
-
rescue SocketError
|
8
|
-
@no_network = true
|
9
|
-
rescue RuntimeError
|
10
|
-
@query_limit = true
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
before(:each) do
|
15
|
-
pending 'waiting for a network connection' if @no_network
|
16
|
-
pending 'waiting for query limit to pass' if @query_limit
|
17
|
-
end
|
1
|
+
# Copyright the GoogleMapsGeocoder contributors.
|
2
|
+
# SPDX-License-Identifier: MIT
|
3
|
+
# frozen_string_literal: true
|
18
4
|
|
5
|
+
require "#{File.dirname(__FILE__)}/../spec_helper"
|
6
|
+
# rubocop:disable Metrics/BlockLength
|
7
|
+
RSpec.describe GoogleMapsGeocoder do
|
19
8
|
describe '#new' do
|
20
9
|
context 'with "White House"' do
|
21
|
-
subject
|
10
|
+
subject(:geocoder) do
|
11
|
+
GoogleMapsGeocoder.new('White House')
|
12
|
+
rescue SocketError
|
13
|
+
pending 'waiting for a network connection'
|
14
|
+
rescue GoogleMapsGeocoder::GeocodingError
|
15
|
+
pending 'waiting for query limit to pass'
|
16
|
+
end
|
22
17
|
|
23
18
|
it { should be_exact_match }
|
24
19
|
|
25
20
|
context 'address' do
|
26
21
|
it do
|
27
|
-
expect(
|
22
|
+
expect(geocoder.formatted_street_address)
|
28
23
|
.to eq '1600 Pennsylvania Avenue Northwest'
|
29
24
|
end
|
30
|
-
it { expect(
|
31
|
-
it { expect(
|
32
|
-
it { expect(
|
33
|
-
it { expect(
|
34
|
-
it { expect(
|
35
|
-
it { expect(
|
25
|
+
it { expect(geocoder.city).to eq 'Washington' }
|
26
|
+
it { expect(geocoder.state_long_name).to eq 'District of Columbia' }
|
27
|
+
it { expect(geocoder.state_short_name).to eq 'DC' }
|
28
|
+
it { expect(geocoder.postal_code).to eq '20500' }
|
29
|
+
it { expect(geocoder.country_short_name).to eq 'US' }
|
30
|
+
it { expect(geocoder.country_long_name).to eq 'United States' }
|
36
31
|
it do
|
37
|
-
expect(
|
32
|
+
expect(geocoder.formatted_address)
|
38
33
|
.to match(/1600 Pennsylvania Avenue NW, Washington, DC 20500, USA/)
|
39
34
|
end
|
40
35
|
end
|
36
|
+
|
41
37
|
context 'coordinates' do
|
42
|
-
it { expect(
|
43
|
-
it { expect(
|
38
|
+
it { expect(geocoder.lat).to be_within(0.005).of(38.8976633) }
|
39
|
+
it { expect(geocoder.lng).to be_within(0.005).of(-77.0365739) }
|
44
40
|
end
|
41
|
+
|
45
42
|
context 'Geocoder API' do
|
46
|
-
it { expect(
|
47
|
-
it { expect(
|
48
|
-
it { expect(
|
49
|
-
it { expect(
|
50
|
-
it { expect(
|
51
|
-
it { expect(
|
52
|
-
it { expect(
|
53
|
-
it { expect(
|
43
|
+
it { expect(geocoder.address).to eq subject.formatted_address }
|
44
|
+
it { expect(geocoder.coordinates).to eq [subject.lat, subject.lng] }
|
45
|
+
it { expect(geocoder.country).to eq subject.country_long_name }
|
46
|
+
it { expect(geocoder.country_code).to eq subject.country_short_name }
|
47
|
+
it { expect(geocoder.latitude).to eq subject.lat }
|
48
|
+
it { expect(geocoder.longitude).to eq subject.lng }
|
49
|
+
it { expect(geocoder.state).to eq subject.state_long_name }
|
50
|
+
it { expect(geocoder.state_code).to eq subject.state_short_name }
|
54
51
|
end
|
55
52
|
end
|
53
|
+
|
56
54
|
context 'when API key is invalid' do
|
57
|
-
|
58
|
-
|
55
|
+
around do |example|
|
56
|
+
original_key = ENV['GOOGLE_MAPS_API_KEY']
|
59
57
|
ENV['GOOGLE_MAPS_API_KEY'] = 'invalid_key'
|
58
|
+
example.run
|
59
|
+
ENV['GOOGLE_MAPS_API_KEY'] = original_key
|
60
60
|
end
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
subject(:geocoder) do
|
63
|
+
GoogleMapsGeocoder.new('nowhere that comes to mind')
|
64
|
+
rescue SocketError
|
65
|
+
pending 'waiting for a network connection'
|
66
|
+
end
|
65
67
|
|
66
68
|
it do
|
67
|
-
expect {
|
68
|
-
|
69
|
+
expect { geocoder }.to raise_error GoogleMapsGeocoder::GeocodingError,
|
70
|
+
'REQUEST_DENIED'
|
69
71
|
end
|
70
72
|
end
|
71
73
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pry'
|
1
4
|
require 'simplecov'
|
2
|
-
SimpleCov.start
|
3
|
-
require 'coveralls'
|
4
|
-
Coveralls.wear!
|
5
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
6
|
-
Coveralls::SimpleCov::Formatter
|
7
|
-
)
|
8
5
|
require 'rubygems'
|
9
6
|
require 'bundler'
|
10
7
|
begin
|
@@ -17,3 +14,14 @@ end
|
|
17
14
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
18
15
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
19
16
|
require 'google_maps_geocoder/google_maps_geocoder'
|
17
|
+
# silence output
|
18
|
+
RSpec.configure do |config|
|
19
|
+
config.before(:example) do
|
20
|
+
quiet_logger = Logger.new(IO::NULL)
|
21
|
+
allow(Logger).to receive(:new).and_return(quiet_logger)
|
22
|
+
end
|
23
|
+
|
24
|
+
config.after(:example) do
|
25
|
+
allow(Logger).to receive(:new).and_call_original
|
26
|
+
end
|
27
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,125 +1,61 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_maps_geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roderick Monje
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEQDCCAqigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpyb2Qv
|
14
|
+
REM9Zm92ZWFjZW50cmFsL0RDPWNvbTAeFw0yMTExMTUwMzEwMTRaFw0yMjExMTUw
|
15
|
+
MzEwMTRaMCUxIzAhBgNVBAMMGnJvZC9EQz1mb3ZlYWNlbnRyYWwvREM9Y29tMIIB
|
16
|
+
ojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsMm8RdCTuhYTnbH5a8pesLYn
|
17
|
+
BD7cLPkeNfPWp8ohGVXL3988lRBYHwI/LRhxKXncmwmjYFWjuyR1m3e+EgmpBO3e
|
18
|
+
gCn4G9paWlwvPF+dSBF4pjhPtYBSXMFDfoeUTyHuNCcQOFJUMSAxo1pg9S9KvslC
|
19
|
+
Y1fpstOJtVnUjoeT8BRQAqV0WZuzFhgj74oSoHP/ETEd7Uzw/ST/kKgtNGcxoIYu
|
20
|
+
FEqAfEsqEpV0d6FbExYmVTR12288MaGGrfc6Y/QC1VC6RhEYG8Sn8a3utqkn7y47
|
21
|
+
0J6SROECo5x9TWU0s3HDco06jYb5sV1cGsDYXFpEczxJ9i1YVX2IDvYrpZsSJLzq
|
22
|
+
tfCdJ2jIj4rnMjGMg/kschfDnBKRIt8p7LlDhc0p/m0fYO4JQpWbvCc/F5vmUzpF
|
23
|
+
kRbiNr30dkYqDbfvcdQUWBOa5rSyZOIQiW6kfK9ZbLjBGFeP8pwSNME+yfJsZObS
|
24
|
+
AIiSqYtcP4mMriBLi+x981z1kpjTGZSWOpZrgAELAgMBAAGjezB5MAkGA1UdEwQC
|
25
|
+
MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQzajljgeoJIjO/4h4X7ve/jYWVSDAf
|
26
|
+
BgNVHREEGDAWgRRyb2RAZm92ZWFjZW50cmFsLmNvbTAfBgNVHRIEGDAWgRRyb2RA
|
27
|
+
Zm92ZWFjZW50cmFsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAqqybBWM9gIPn8Quj
|
28
|
+
R8L0HPEE/1NjNLrlNG1DhJ8MAbYFA7mo4bWp4kjXwVdw+TMQZfrLjXLgmfiTvzxV
|
29
|
+
cE10liYjCWQNxectkkYmOsCBlEDfOngNKdl3QJ+Y5+SEsqfKYhZXZypn+SwuXx8F
|
30
|
+
LuVPsP7/R6VlrI8WbtPU1oSfM+rmdpUZzDcvmtvy1S+tPfFWalo8tSXPg0gE3Nis
|
31
|
+
UZAwHu8x3v5N7lxtjJa+s9ARkH/BO5Uytz1XrUmUWLQqo9ZJtqbZ/iV9HEWhG+xx
|
32
|
+
lR8SnXcsohvP/eIY2BTyBay0eOb9BwGHmnAVRiiAfLvCftzHtBEBr6jCKESSYDuc
|
33
|
+
bUIRDNLzRjl2KOoNLjKymicWrBdz1roBpy8cFIDzi6ebE45ve/xoZbsGJ3zaLo9T
|
34
|
+
G5iWAeYsmSjJxz7iOZOsx+vPCwMy7j6nWF2CDbaxioGR/hIqNbVBveCCRyjyunD3
|
35
|
+
kvv576EuULmQcLpOKwB3RlxAG7j8JJl4ueqjF+rz7x1lBqEU
|
36
|
+
-----END CERTIFICATE-----
|
37
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
12
38
|
dependencies:
|
13
39
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: coveralls
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
40
|
+
name: rack
|
43
41
|
requirement: !ruby/object:Gem::Requirement
|
44
42
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '12.3'
|
48
43
|
- - ">="
|
49
44
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
51
|
-
|
52
|
-
prerelease: false
|
53
|
-
version_requirements: !ruby/object:Gem::Requirement
|
54
|
-
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '12.3'
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 12.3.3
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rspec
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '3'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '3'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: rubocop
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 0.49.0
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 0.49.0
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: activesupport
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '4.1'
|
96
|
-
- - ">="
|
45
|
+
version: 2.1.4
|
46
|
+
- - "<"
|
97
47
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
48
|
+
version: 2.3.0
|
99
49
|
type: :runtime
|
100
50
|
prerelease: false
|
101
51
|
version_requirements: !ruby/object:Gem::Requirement
|
102
52
|
requirements:
|
103
|
-
- - "~>"
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '4.1'
|
106
53
|
- - ">="
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: 4.1.11
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: rack
|
111
|
-
requirement: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
54
|
- !ruby/object:Gem::Version
|
115
55
|
version: 2.1.4
|
116
|
-
|
117
|
-
prerelease: false
|
118
|
-
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
56
|
+
- - "<"
|
121
57
|
- !ruby/object:Gem::Version
|
122
|
-
version: 2.
|
58
|
+
version: 2.3.0
|
123
59
|
description: Geocode a location without worrying about parsing Google Maps' response.
|
124
60
|
GoogleMapsGeocoder wraps it in a plain-old Ruby object.
|
125
61
|
email: rod@foveacentral.com
|
@@ -129,22 +65,27 @@ extra_rdoc_files: []
|
|
129
65
|
files:
|
130
66
|
- ".document"
|
131
67
|
- ".github/CONTRIBUTING.md"
|
132
|
-
- ".github/ISSUE_TEMPLATE.md"
|
133
68
|
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
134
69
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
70
|
+
- ".github/ISSUE_TEMPLATE/task.md"
|
135
71
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
72
|
+
- ".github/dependabot.yml"
|
73
|
+
- ".github/workflows/test.yml"
|
136
74
|
- ".gitignore"
|
137
|
-
- ".
|
75
|
+
- ".simplecov"
|
76
|
+
- CODE_OF_CONDUCT.md
|
138
77
|
- Gemfile
|
139
78
|
- LICENSE.txt
|
140
79
|
- README.md
|
141
80
|
- Rakefile
|
81
|
+
- SECURITY.md
|
82
|
+
- certs/ivanoblomov.pem
|
142
83
|
- google_maps_geocoder.gemspec
|
143
84
|
- lib/google_maps_geocoder/google_maps_geocoder.rb
|
144
85
|
- lib/google_maps_geocoder/version.rb
|
145
86
|
- spec/lib/google_maps_geocoder_spec.rb
|
146
87
|
- spec/spec_helper.rb
|
147
|
-
homepage: https://github.com/
|
88
|
+
homepage: https://github.com/FoveaCentral/google_maps_geocoder
|
148
89
|
licenses:
|
149
90
|
- MIT
|
150
91
|
metadata: {}
|
@@ -156,17 +97,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
97
|
requirements:
|
157
98
|
- - ">="
|
158
99
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
100
|
+
version: '2.5'
|
160
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
102
|
requirements:
|
162
103
|
- - ">="
|
163
104
|
- !ruby/object:Gem::Version
|
164
105
|
version: '0'
|
165
106
|
requirements: []
|
166
|
-
rubygems_version: 3.1.
|
107
|
+
rubygems_version: 3.1.6
|
167
108
|
signing_key:
|
168
109
|
specification_version: 4
|
169
110
|
summary: A simple PORO wrapper for geocoding with Google Maps.
|
170
|
-
test_files:
|
171
|
-
- spec/lib/google_maps_geocoder_spec.rb
|
172
|
-
- spec/spec_helper.rb
|
111
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Description
|
2
|
-
|
3
|
-
Provide as much background as you need to get the implementer up to speed on the problem to be solved. This can also include screenshots and links to other issues or pull requests.
|
4
|
-
|
5
|
-
# Steps to Reproduce
|
6
|
-
|
7
|
-
Don't forget to point out the difference between what *should* happen and what *does* happen. Here's an example:
|
8
|
-
|
9
|
-
1. Try geocoding "1600 Pennsylvania Ave":
|
10
|
-
```ruby
|
11
|
-
white_house = GoogleMapsGeocoder.new('1600 Pennsylvania Ave')
|
12
|
-
```
|
13
|
-
2. The formatted address doesn't match the White House:
|
14
|
-
```ruby
|
15
|
-
white_house.formatted_address
|
16
|
-
=> "1600 Pennsylvania Ave, Charleston, WV 25302, USA"
|
17
|
-
```
|