googlestaticmap 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -1
- data/README.md +6 -0
- data/lib/googlestaticmap.rb +4 -0
- data/test/tc_google_static_map.rb +6 -0
- metadata +24 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c66d6cc90b1b8cbb408d7a861a9fabf014ddeaf
|
4
|
+
data.tar.gz: 90bb8443774c7d043c93b427422116b91944a3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3757500c3b674623028915da6cd3c6ee10d492f84737bb9074091ec3dcb8af8fe62fa4d12d26078ab16efe04867d145ceb2583c14e05f6519dfa2d90e96b489c
|
7
|
+
data.tar.gz: 7d8fc8956939a7892a9ea93c66cbe354ec048f20046b3749c20caa44a7c0f903593d79fca3b0e8a42827e59893833517d549e99f9ce61ee514aab8861c818691
|
data/History.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
== 1.2.2 / 2014-03-08
|
2
|
+
* Added channel parameter for tracking (thanks dfenniak!)
|
3
|
+
|
1
4
|
== 1.2.1 / 2014-03-03
|
2
|
-
* Fixed bug in the signature generation for business customers from 1.2.0
|
5
|
+
* Fixed bug in the signature generation for business customers from 1.2.0 (thanks nathany!)
|
3
6
|
|
4
7
|
== 1.2.0 / 2014-03-03
|
5
8
|
* Added support for setting an API key for monitoring, and a client ID/private key for business customers (thanks forrest!)
|
data/README.md
CHANGED
@@ -66,6 +66,12 @@ If you are a Maps For Businesses customer with a client ID and private key (http
|
|
66
66
|
|
67
67
|
map = GoogleStaticMap.new(:client_id => "my_client_id", :private_key => "my_private_key")
|
68
68
|
|
69
|
+
You can also specify a channel for better tracking if you are a Maps For Businesses customer (https://developers.google.com/maps/documentation/business/clientside/quota#usage_reports):
|
70
|
+
|
71
|
+
map.channel = "Tracking channel"
|
72
|
+
|
73
|
+
|
74
|
+
|
69
75
|
## Compatibility
|
70
76
|
|
71
77
|
This has been tested and is working with Ruby 1.8.7, 1.9.3, 2.0.0, and 2.1.1, and JRuby 1.7.11.
|
data/lib/googlestaticmap.rb
CHANGED
@@ -74,6 +74,10 @@ class GoogleStaticMap
|
|
74
74
|
attr_accessor :client_id
|
75
75
|
attr_accessor :private_key
|
76
76
|
|
77
|
+
# Channel - identifier channel for tracking API source in enterprise tools
|
78
|
+
# see https://developers.google.com/maps/documentation/business/clientside/quota for details
|
79
|
+
attr_accessor :channel
|
80
|
+
|
77
81
|
# Takes an optional hash of attributes
|
78
82
|
def initialize(attrs={})
|
79
83
|
defaults = {:width => 500, :height => 350, :markers => [],
|
@@ -80,6 +80,12 @@ class GoogleStaticMapTest < Test::Unit::TestCase #:nodoc: all
|
|
80
80
|
assert !f.include?("http://maps.googleapis.com")
|
81
81
|
end
|
82
82
|
|
83
|
+
def test_channel
|
84
|
+
g = default_map
|
85
|
+
g.channel = "CHANNEL"
|
86
|
+
assert g.url.include?("channel=CHANNEL")
|
87
|
+
end
|
88
|
+
|
83
89
|
def test_url_auto
|
84
90
|
g = default_map
|
85
91
|
u = nil
|
metadata
CHANGED
@@ -1,44 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: googlestaticmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brent Sowers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
|
-
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 10.1.1
|
20
|
-
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
23
|
requirements:
|
22
|
-
- -
|
24
|
+
- - ">="
|
23
25
|
- !ruby/object:Gem::Version
|
24
26
|
version: 10.1.1
|
25
|
-
prerelease: false
|
26
|
-
type: :development
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mocha
|
29
|
-
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.0
|
34
|
-
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
35
37
|
requirements:
|
36
|
-
- -
|
38
|
+
- - ">="
|
37
39
|
- !ruby/object:Gem::Version
|
38
40
|
version: 1.0.0
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
description: Easily retrieve single PNG, GIF, or JPG map images from Google with your
|
42
|
+
own custom markers and paths using the Static Maps API service with this gem. Simply
|
43
|
+
set the attributes you want for your map and GoogleStaticMap will take care of getting
|
44
|
+
the map for you, or giving your the URL to retrieve the map.
|
42
45
|
email: brent@coordinatecommons.com
|
43
46
|
executables: []
|
44
47
|
extensions: []
|
@@ -59,24 +62,24 @@ homepage: http://www.coordinatecommons.com/googlestaticmap/
|
|
59
62
|
licenses:
|
60
63
|
- MIT
|
61
64
|
metadata: {}
|
62
|
-
post_install_message:
|
65
|
+
post_install_message:
|
63
66
|
rdoc_options: []
|
64
67
|
require_paths:
|
65
68
|
- lib
|
66
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
67
70
|
requirements:
|
68
|
-
- -
|
71
|
+
- - ">="
|
69
72
|
- !ruby/object:Gem::Version
|
70
73
|
version: '0'
|
71
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
75
|
requirements:
|
73
|
-
- -
|
76
|
+
- - ">="
|
74
77
|
- !ruby/object:Gem::Version
|
75
78
|
version: '0'
|
76
79
|
requirements: []
|
77
|
-
rubyforge_project:
|
80
|
+
rubyforge_project:
|
78
81
|
rubygems_version: 2.2.2
|
79
|
-
signing_key:
|
82
|
+
signing_key:
|
80
83
|
specification_version: 4
|
81
84
|
summary: Class for retrieving maps from the Google Maps Static API service
|
82
85
|
test_files:
|