google_maps_service_ruby 0.6.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 +7 -0
- data/CHANGELOG.md +72 -0
- data/CODE_OF_CONDUCT.md +133 -0
- data/LICENSE +202 -0
- data/README.md +375 -0
- data/lib/google_maps_service/apis/directions.rb +99 -0
- data/lib/google_maps_service/apis/distance_matrix.rb +83 -0
- data/lib/google_maps_service/apis/elevation.rb +56 -0
- data/lib/google_maps_service/apis/geocoding.rb +82 -0
- data/lib/google_maps_service/apis/roads.rb +183 -0
- data/lib/google_maps_service/apis/time_zone.rb +39 -0
- data/lib/google_maps_service/apis.rb +5 -0
- data/lib/google_maps_service/client.rb +255 -0
- data/lib/google_maps_service/convert.rb +174 -0
- data/lib/google_maps_service/errors.rb +52 -0
- data/lib/google_maps_service/polyline.rb +89 -0
- data/lib/google_maps_service/url.rb +62 -0
- data/lib/google_maps_service/validator.rb +38 -0
- data/lib/google_maps_service/version.rb +23 -0
- data/lib/google_maps_service.rb +40 -0
- data/lib/google_maps_service_ruby.rb +3 -0
- metadata +210 -0
@@ -0,0 +1,174 @@
|
|
1
|
+
module GoogleMapsService
|
2
|
+
# Converts Ruby types to string representations suitable for Maps API server.
|
3
|
+
module Convert
|
4
|
+
module_function
|
5
|
+
|
6
|
+
# Converts a lat/lon pair to a comma-separated string.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
# >> GoogleMapsService::Convert.latlng({"lat": -33.8674869, "lng": 151.2069902})
|
10
|
+
# => "-33.867487,151.206990"
|
11
|
+
#
|
12
|
+
# @param [Hash, Array] arg The lat/lon hash or array pair.
|
13
|
+
#
|
14
|
+
# @return [String] Comma-separated lat/lng.
|
15
|
+
#
|
16
|
+
# @raise [ArgumentError] When argument is not lat/lng hash or array.
|
17
|
+
def latlng(arg)
|
18
|
+
"%f,%f" % normalize_latlng(arg)
|
19
|
+
end
|
20
|
+
|
21
|
+
# Take the various lat/lng representations and return a tuple.
|
22
|
+
#
|
23
|
+
# Accepts various representations:
|
24
|
+
#
|
25
|
+
# 1. Hash with two entries - `lat` and `lng`
|
26
|
+
# 2. Array or list - e.g. `[-33, 151]`
|
27
|
+
#
|
28
|
+
# @param [Hash, Array] arg The lat/lon hash or array pair.
|
29
|
+
#
|
30
|
+
# @return [Array] Pair of lat and lng array.
|
31
|
+
def normalize_latlng(arg)
|
32
|
+
if arg.is_a?(Hash)
|
33
|
+
lat = arg[:lat] || arg[:latitude] || arg["lat"] || arg["latitude"]
|
34
|
+
lng = arg[:lng] || arg[:longitude] || arg["lng"] || arg["longitude"]
|
35
|
+
return lat, lng
|
36
|
+
elsif arg.is_a?(Array)
|
37
|
+
return arg[0], arg[1]
|
38
|
+
end
|
39
|
+
|
40
|
+
raise ArgumentError, "Expected a lat/lng Hash or Array, but got #{arg.class}"
|
41
|
+
end
|
42
|
+
|
43
|
+
# If arg is list-like, then joins it with sep.
|
44
|
+
#
|
45
|
+
# @param [String] sep Separator string.
|
46
|
+
# @param [Array, String] arg Value to coerce into a list.
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
def join_list(sep, arg)
|
50
|
+
as_list(arg).join(sep)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Coerces arg into a list. If arg is already list-like, returns arg.
|
54
|
+
# Otherwise, returns a one-element list containing arg.
|
55
|
+
#
|
56
|
+
# @param [Object] arg
|
57
|
+
#
|
58
|
+
# @return [Array]
|
59
|
+
def as_list(arg)
|
60
|
+
if arg.is_a?(Array)
|
61
|
+
return arg
|
62
|
+
end
|
63
|
+
[arg]
|
64
|
+
end
|
65
|
+
|
66
|
+
# Converts the value into a unix time (seconds since unix epoch).
|
67
|
+
#
|
68
|
+
# @example
|
69
|
+
# >> GoogleMapsService::Convert.time(datetime.now())
|
70
|
+
# => "1409810596"
|
71
|
+
#
|
72
|
+
# @param [Time, Date, DateTime, Integer] arg The time.
|
73
|
+
#
|
74
|
+
# @return [String] String representation of epoch time
|
75
|
+
def time(arg)
|
76
|
+
if arg.is_a?(DateTime)
|
77
|
+
arg = arg.to_time
|
78
|
+
end
|
79
|
+
arg.to_i.to_s
|
80
|
+
end
|
81
|
+
|
82
|
+
# Converts a dict of components to the format expected by the Google Maps
|
83
|
+
# server.
|
84
|
+
#
|
85
|
+
# @example
|
86
|
+
# >> GoogleMapsService::Convert.components({"country": "US", "postal_code": "94043"})
|
87
|
+
# => "country:US|postal_code:94043"
|
88
|
+
#
|
89
|
+
# @param [Hash] arg The component filter.
|
90
|
+
#
|
91
|
+
# @return [String]
|
92
|
+
def components(arg)
|
93
|
+
if arg.is_a?(Hash)
|
94
|
+
arg = arg.sort.map { |k, v| "#{k}:#{v}" }
|
95
|
+
return arg.join("|")
|
96
|
+
end
|
97
|
+
|
98
|
+
raise ArgumentError, "Expected a Hash for components, but got #{arg.class}"
|
99
|
+
end
|
100
|
+
|
101
|
+
# Converts a lat/lon bounds to a comma- and pipe-separated string.
|
102
|
+
#
|
103
|
+
# Accepts two representations:
|
104
|
+
#
|
105
|
+
# 1. String: pipe-separated pair of comma-separated lat/lon pairs.
|
106
|
+
# 2. Hash with two entries - "southwest" and "northeast". See {.latlng}
|
107
|
+
# for information on how these can be represented.
|
108
|
+
#
|
109
|
+
# For example:
|
110
|
+
#
|
111
|
+
# >> sydney_bounds = {
|
112
|
+
# ?> "northeast": {
|
113
|
+
# ?> "lat": -33.4245981,
|
114
|
+
# ?> "lng": 151.3426361
|
115
|
+
# ?> },
|
116
|
+
# ?> "southwest": {
|
117
|
+
# ?> "lat": -34.1692489,
|
118
|
+
# ?> "lng": 150.502229
|
119
|
+
# ?> }
|
120
|
+
# ?> }
|
121
|
+
# >> GoogleMapsService::Convert.bounds(sydney_bounds)
|
122
|
+
# => '-34.169249,150.502229|-33.424598,151.342636'
|
123
|
+
#
|
124
|
+
# @param [Hash] arg The bounds.
|
125
|
+
#
|
126
|
+
# @return [String]
|
127
|
+
def bounds(arg)
|
128
|
+
if arg.is_a?(Hash)
|
129
|
+
southwest = arg[:southwest] || arg["southwest"]
|
130
|
+
northeast = arg[:northeast] || arg["northeast"]
|
131
|
+
return "#{latlng(southwest)}|#{latlng(northeast)}"
|
132
|
+
end
|
133
|
+
|
134
|
+
raise ArgumentError, "Expected a bounds (southwest/northeast) Hash, but got #{arg.class}"
|
135
|
+
end
|
136
|
+
|
137
|
+
# Converts a waypoints to the format expected by the Google Maps server.
|
138
|
+
#
|
139
|
+
# Accept two representation of waypoint:
|
140
|
+
#
|
141
|
+
# 1. String: Name of place or comma-separated lat/lon pair.
|
142
|
+
# 2. Hash/Array: Lat/lon pair.
|
143
|
+
#
|
144
|
+
# @param [Array, String, Hash] waypoint Path.
|
145
|
+
#
|
146
|
+
# @return [String]
|
147
|
+
def waypoint(waypoint)
|
148
|
+
if waypoint.is_a?(String)
|
149
|
+
return waypoint
|
150
|
+
end
|
151
|
+
GoogleMapsService::Convert.latlng(waypoint)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Converts an array of waypoints (path) to the format expected by the Google Maps
|
155
|
+
# server.
|
156
|
+
#
|
157
|
+
# Accept two representation of waypoint:
|
158
|
+
#
|
159
|
+
# 1. String: Name of place or comma-separated lat/lon pair.
|
160
|
+
# 2. Hash/Array: Lat/lon pair.
|
161
|
+
#
|
162
|
+
# @param [Array, String, Hash] waypoints Path.
|
163
|
+
#
|
164
|
+
# @return [String]
|
165
|
+
def waypoints(waypoints)
|
166
|
+
if waypoints.is_a?(Array) && (waypoints.length == 2) && waypoints[0].is_a?(Numeric) && waypoints[1].is_a?(Numeric)
|
167
|
+
waypoints = [waypoints]
|
168
|
+
end
|
169
|
+
|
170
|
+
waypoints = as_list(waypoints)
|
171
|
+
join_list("|", waypoints.map { |k| waypoint(k) })
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module GoogleMapsService
|
2
|
+
# Specific Google Maps Service error
|
3
|
+
module Error
|
4
|
+
# Base error, capable of wrapping another
|
5
|
+
class BaseError < StandardError
|
6
|
+
# HTTP response object
|
7
|
+
# @return [Net::HTTPResponse]
|
8
|
+
attr_reader :response
|
9
|
+
|
10
|
+
# Initialize error
|
11
|
+
#
|
12
|
+
# @param [Net::HTTPResponse] response HTTP response.
|
13
|
+
def initialize(response = nil)
|
14
|
+
@response = response
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# The response redirects to another URL.
|
19
|
+
class RedirectError < BaseError
|
20
|
+
end
|
21
|
+
|
22
|
+
# A 4xx class HTTP error occurred.
|
23
|
+
# The request is invalid and should not be retried without modification.
|
24
|
+
class ClientError < BaseError
|
25
|
+
end
|
26
|
+
|
27
|
+
# A 5xx class HTTP error occurred.
|
28
|
+
# An error occurred on the server and the request can be retried.
|
29
|
+
class ServerError < BaseError
|
30
|
+
end
|
31
|
+
|
32
|
+
# An unknown error occured.
|
33
|
+
class UnknownError < BaseError
|
34
|
+
end
|
35
|
+
|
36
|
+
# General Google Maps Web Service API error occured.
|
37
|
+
class ApiError < BaseError
|
38
|
+
end
|
39
|
+
|
40
|
+
# Requiered query is missing
|
41
|
+
class InvalidRequestError < ApiError
|
42
|
+
end
|
43
|
+
|
44
|
+
# The quota for the credential is over limit.
|
45
|
+
class RateLimitError < ApiError
|
46
|
+
end
|
47
|
+
|
48
|
+
# An unathorized error occurred. It might be caused by invalid key/secret or invalid access.
|
49
|
+
class RequestDeniedError < ApiError
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require "google_maps_service/convert"
|
2
|
+
|
3
|
+
module GoogleMapsService
|
4
|
+
# Encoder/decoder for [Google Encoded Polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
|
5
|
+
module Polyline
|
6
|
+
module_function
|
7
|
+
|
8
|
+
# Decodes a Polyline string into a list of lat/lng hash.
|
9
|
+
#
|
10
|
+
# See the developer docs for a detailed description of this encoding:
|
11
|
+
# https://developers.google.com/maps/documentation/utilities/polylinealgorithm
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# encoded_path = '_p~iF~ps|U_ulLnnqC_mqNvxq`@'
|
15
|
+
# path = GoogleMapsService::Polyline.decode(encoded_path)
|
16
|
+
# #=> [{:lat=>38.5, :lng=>-120.2}, {:lat=>40.7, :lng=>-120.95}, {:lat=>43.252, :lng=>-126.45300000000002}]
|
17
|
+
#
|
18
|
+
# @param [String] polyline An encoded polyline
|
19
|
+
#
|
20
|
+
# @return [Array] Array of hash with lat/lng keys
|
21
|
+
def decode(polyline)
|
22
|
+
points = []
|
23
|
+
index = lat = lng = 0
|
24
|
+
|
25
|
+
while index < polyline.length
|
26
|
+
result = 1
|
27
|
+
shift = 0
|
28
|
+
while true
|
29
|
+
b = polyline[index].ord - 63 - 1
|
30
|
+
index += 1
|
31
|
+
result += b << shift
|
32
|
+
shift += 5
|
33
|
+
break if b < 0x1f
|
34
|
+
end
|
35
|
+
lat += (result & 1) != 0 ? (~result >> 1) : (result >> 1)
|
36
|
+
|
37
|
+
result = 1
|
38
|
+
shift = 0
|
39
|
+
loop do
|
40
|
+
b = polyline[index].ord - 63 - 1
|
41
|
+
index += 1
|
42
|
+
result += b << shift
|
43
|
+
shift += 5
|
44
|
+
break if b < 0x1f
|
45
|
+
end
|
46
|
+
lng += (result & 1) != 0 ? ~(result >> 1) : (result >> 1)
|
47
|
+
|
48
|
+
points << {lat: lat * 1e-5, lng: lng * 1e-5}
|
49
|
+
end
|
50
|
+
|
51
|
+
points
|
52
|
+
end
|
53
|
+
|
54
|
+
# Encodes a list of points into a polyline string.
|
55
|
+
#
|
56
|
+
# See the developer docs for a detailed description of this encoding:
|
57
|
+
# https://developers.google.com/maps/documentation/utilities/polylinealgorithm
|
58
|
+
#
|
59
|
+
# @param [Array<Hash>, Array<Array>] points A list of lat/lng pairs.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def encode(points)
|
63
|
+
last_lat = last_lng = 0
|
64
|
+
result = ""
|
65
|
+
|
66
|
+
points.each do |point|
|
67
|
+
ll = GoogleMapsService::Convert.normalize_latlng(point)
|
68
|
+
lat = (ll[0] * 1e5).round.to_i
|
69
|
+
lng = (ll[1] * 1e5).round.to_i
|
70
|
+
d_lat = lat - last_lat
|
71
|
+
d_lng = lng - last_lng
|
72
|
+
|
73
|
+
[d_lat, d_lng].each do |v|
|
74
|
+
v = v < 0 ? ~(v << 1) : (v << 1)
|
75
|
+
while v >= 0x20
|
76
|
+
result += ((0x20 | (v & 0x1f)) + 63).chr
|
77
|
+
v >>= 5
|
78
|
+
end
|
79
|
+
result += (v + 63).chr
|
80
|
+
end
|
81
|
+
|
82
|
+
last_lat = lat
|
83
|
+
last_lng = lng
|
84
|
+
end
|
85
|
+
|
86
|
+
result
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require "base64"
|
2
|
+
require "uri"
|
3
|
+
|
4
|
+
module GoogleMapsService
|
5
|
+
# Helper for handling URL.
|
6
|
+
module Url
|
7
|
+
module_function
|
8
|
+
|
9
|
+
# Returns a base64-encoded HMAC-SHA1 signature of a given string.
|
10
|
+
#
|
11
|
+
# @param [String] secret The key used for the signature, base64 encoded.
|
12
|
+
# @param [String] payload The payload to sign.
|
13
|
+
#
|
14
|
+
# @return [String] Base64-encoded HMAC-SHA1 signature
|
15
|
+
def sign_hmac(secret, payload)
|
16
|
+
secret = secret.encode("ASCII")
|
17
|
+
payload = payload.encode("ASCII")
|
18
|
+
|
19
|
+
# Decode the private key
|
20
|
+
raw_key = Base64.urlsafe_decode64(secret)
|
21
|
+
|
22
|
+
# Create a signature using the private key and the URL
|
23
|
+
digest = OpenSSL::Digest.new("sha1")
|
24
|
+
raw_signature = OpenSSL::HMAC.digest(digest, raw_key, payload)
|
25
|
+
|
26
|
+
# Encode the signature into base64 for url use form.
|
27
|
+
Base64.urlsafe_encode64(raw_signature)
|
28
|
+
end
|
29
|
+
|
30
|
+
# URL encodes the parameters.
|
31
|
+
# @param [Hash, Array<Array>] params The parameters
|
32
|
+
# @return [String]
|
33
|
+
def urlencode_params(params)
|
34
|
+
unquote_unreserved(URI.encode_www_form(params))
|
35
|
+
end
|
36
|
+
|
37
|
+
# Un-escape any percent-escape sequences in a URI that are unreserved
|
38
|
+
# characters. This leaves all reserved, illegal and non-ASCII bytes encoded.
|
39
|
+
#
|
40
|
+
# @param [String] uri
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def unquote_unreserved(uri)
|
44
|
+
parts = uri.split("%")
|
45
|
+
|
46
|
+
(1..parts.length - 1).each do |i|
|
47
|
+
h = parts[i][0..1]
|
48
|
+
|
49
|
+
parts[i] = if h =~ (/^(\h{2})(.*)/) && (c = $1.to_i(16).chr) && UNRESERVED_SET.include?(c)
|
50
|
+
c + $2
|
51
|
+
else
|
52
|
+
"%" + parts[i]
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
parts.join
|
57
|
+
end
|
58
|
+
|
59
|
+
# The unreserved URI characters (RFC 3986)
|
60
|
+
UNRESERVED_SET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative "./convert"
|
2
|
+
|
3
|
+
module GoogleMapsService
|
4
|
+
# Validate value that is accepted by Google Maps.
|
5
|
+
module Validator
|
6
|
+
module_function
|
7
|
+
|
8
|
+
# Validate travel mode. The valid value of travel mode are `driving`, `walking`, `bicycling` or `transit`.
|
9
|
+
#
|
10
|
+
# @param [String, Symbol] mode Travel mode to be validated.
|
11
|
+
#
|
12
|
+
# @raise ArgumentError The travel mode is invalid.
|
13
|
+
#
|
14
|
+
# @return [String] Valid travel mode.
|
15
|
+
def travel_mode(mode)
|
16
|
+
# NOTE(broady): the mode parameter is not validated by the Maps API
|
17
|
+
# server. Check here to prevent silent failures.
|
18
|
+
unless [:driving, :walking, :bicycling, :transit].include?(mode.to_sym)
|
19
|
+
raise ArgumentError, "Invalid travel mode."
|
20
|
+
end
|
21
|
+
mode
|
22
|
+
end
|
23
|
+
|
24
|
+
# Validate route restriction. The valid value of route restriction are `tolls`, `highways` or `ferries`.
|
25
|
+
#
|
26
|
+
# @param [String, Symbol] avoid Route restriction to be validated.
|
27
|
+
#
|
28
|
+
# @raise ArgumentError The route restriction is invalid.
|
29
|
+
#
|
30
|
+
# @return [String] Valid route restriction.
|
31
|
+
def avoid(avoid)
|
32
|
+
unless [:tolls, :highways, :ferries].include?(avoid.to_sym)
|
33
|
+
raise ArgumentError, "Invalid route restriction."
|
34
|
+
end
|
35
|
+
avoid
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module GoogleMapsService
|
2
|
+
# GoogleMapsService gem version
|
3
|
+
VERSION = "0.6.0"
|
4
|
+
|
5
|
+
# Current operating system
|
6
|
+
# @private
|
7
|
+
OS_VERSION = begin
|
8
|
+
if RUBY_PLATFORM.match?(/mswin|win32|mingw|bccwin|cygwin/)
|
9
|
+
`ver`.sub(/\s*\[Version\s*/, "/").sub("]", "").strip
|
10
|
+
elsif RUBY_PLATFORM.match?(/darwin/i)
|
11
|
+
"Mac OS X/#{`sw_vers -productVersion`}".strip
|
12
|
+
elsif RUBY_PLATFORM == "java"
|
13
|
+
require "java"
|
14
|
+
name = java.lang.System.getProperty("os.name")
|
15
|
+
version = java.lang.System.getProperty("os.version")
|
16
|
+
"#{name}/#{version}".strip
|
17
|
+
else
|
18
|
+
`uname -sr`.sub(" ", "/").strip
|
19
|
+
end
|
20
|
+
rescue
|
21
|
+
RUBY_PLATFORM
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Google Maps Web Service API.
|
2
|
+
module GoogleMapsService
|
3
|
+
class << self
|
4
|
+
# Global key.
|
5
|
+
# @see Client#key
|
6
|
+
# @return [String]
|
7
|
+
attr_accessor :key
|
8
|
+
|
9
|
+
# Global client_id.
|
10
|
+
# @see Client#client_id
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :client_id
|
13
|
+
|
14
|
+
# Global client_secret.
|
15
|
+
# @see Client#client_secret
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :client_secret
|
18
|
+
|
19
|
+
# Global retry_timeout.
|
20
|
+
# @see Client#retry_timeout
|
21
|
+
# @return [Integer]
|
22
|
+
attr_accessor :retry_timeout
|
23
|
+
|
24
|
+
# Global queries_per_second.
|
25
|
+
# @see Client#queries_per_second
|
26
|
+
# @return [Integer]
|
27
|
+
attr_accessor :queries_per_second
|
28
|
+
|
29
|
+
# Configure global parameters.
|
30
|
+
# @yield [config]
|
31
|
+
def configure
|
32
|
+
yield self
|
33
|
+
true
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
require "google_maps_service/version"
|
38
|
+
require "google_maps_service/client"
|
39
|
+
require "google_maps_service/polyline"
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google_maps_service_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lang Sharpe
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-10-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: multi_json
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: retriable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: coveralls_reborn
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.25.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.25.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redcarpet
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.5.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.11'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.11'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.21'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.21'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: standard
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.16'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.16'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 3.18.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 3.18.1
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: yard
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.9.28
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.9.28
|
153
|
+
description: Google Maps API Client, including the Directions API, Distance Matrix
|
154
|
+
API and Geocoding API. google_maps_service_ruby is a fork of google_maps_service,
|
155
|
+
which is a fork of google-maps-services-python.
|
156
|
+
email:
|
157
|
+
- langer8191@gmail.com
|
158
|
+
executables: []
|
159
|
+
extensions: []
|
160
|
+
extra_rdoc_files: []
|
161
|
+
files:
|
162
|
+
- CHANGELOG.md
|
163
|
+
- CODE_OF_CONDUCT.md
|
164
|
+
- LICENSE
|
165
|
+
- README.md
|
166
|
+
- lib/google_maps_service.rb
|
167
|
+
- lib/google_maps_service/apis.rb
|
168
|
+
- lib/google_maps_service/apis/directions.rb
|
169
|
+
- lib/google_maps_service/apis/distance_matrix.rb
|
170
|
+
- lib/google_maps_service/apis/elevation.rb
|
171
|
+
- lib/google_maps_service/apis/geocoding.rb
|
172
|
+
- lib/google_maps_service/apis/roads.rb
|
173
|
+
- lib/google_maps_service/apis/time_zone.rb
|
174
|
+
- lib/google_maps_service/client.rb
|
175
|
+
- lib/google_maps_service/convert.rb
|
176
|
+
- lib/google_maps_service/errors.rb
|
177
|
+
- lib/google_maps_service/polyline.rb
|
178
|
+
- lib/google_maps_service/url.rb
|
179
|
+
- lib/google_maps_service/validator.rb
|
180
|
+
- lib/google_maps_service/version.rb
|
181
|
+
- lib/google_maps_service_ruby.rb
|
182
|
+
homepage: https://github.com/langsharpe/google-maps-services-ruby
|
183
|
+
licenses:
|
184
|
+
- Apache-2.0
|
185
|
+
metadata:
|
186
|
+
bug_tracker_uri: https://github.com/langsharpe/google-maps-services-ruby/issues
|
187
|
+
changelog_uri: https://raw.githubusercontent.com/langsharpe/google-maps-services-ruby/master/CHANGELOG.md
|
188
|
+
documentation_uri: https://www.rubydoc.info/gems/google_maps_service_ruby
|
189
|
+
homepage_uri: https://github.com/langsharpe/google-maps-services-ruby
|
190
|
+
source_code_uri: https://github.com/langsharpe/google-maps-services-ruby
|
191
|
+
post_install_message:
|
192
|
+
rdoc_options: []
|
193
|
+
require_paths:
|
194
|
+
- lib
|
195
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: 2.7.0
|
200
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
requirements: []
|
206
|
+
rubygems_version: 3.1.4
|
207
|
+
signing_key:
|
208
|
+
specification_version: 4
|
209
|
+
summary: Google Maps API Client
|
210
|
+
test_files: []
|