gull 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b71dcd8c218e39baaffae9d2162bd6e8b1f7f41a
4
- data.tar.gz: d46c989dcfd01455ae509db7577ee1f9ce6e8746
3
+ metadata.gz: 1038a8630e176b254970745e6c16c1ff032ff83c
4
+ data.tar.gz: 8cb441b6d8520162dc499f609bf789b9e2bd1ac1
5
5
  SHA512:
6
- metadata.gz: d4783c7343fe5b92a2e16750f284d08bee542d7704cb0ab44735fbd2f4db4f6d4f1c03108fec976cefd445f0e00514e08cdabc0f5f0fed31d6190a4519b32b87
7
- data.tar.gz: 226fbdd9b111f73411f3818805aeee29a24354a6a65856bf9307ba6f75b314a67acc0559140822095abb49f474cab78e9130fa5ddbfec3755b38f8004b9a8a75
6
+ metadata.gz: b3b372492e761bccd98e13142c4944f9f9f114aa9571c82e3818c36925da3ff006fa7596b9ff4bda3d494aca4b07f551d88094be5ca17f4ccc95fd0038337d30
7
+ data.tar.gz: 0f6d47e866658c2523f7ec5d317decc8ea8ecef6e10a0c45992ee3628613100680c9c0a5e78a2d69f8a7815250f86b5f9391b6be8f654d3658173e31e1824f11
data/README.md CHANGED
@@ -32,7 +32,7 @@ Or install it yourself as:
32
32
  => "http://maps.googleapis.com/maps/api/staticmap?size=640x640&maptype=roadmap&path=color:0xff0000|weight:3|fillcolor:0xff000060|38.73,-94.22|38.75,-94.16|38.57,-93.94|38.4,-93.84|38.4,-93.91|38.73,-94.22&key=your_api_key"
33
33
 
34
34
  #options can be passed for map to override defaults
35
- options = { :width => 600, :height => 300, :color => "0xfbf000", :weight => 4, :fillcolor => "0xfbf00070" }
35
+ options = { :width => 600, :height => 300, :color => "0xfbf000", :weight => 4, :fillcolor => "0xfbf00070", :maptype => "hybrid" }
36
36
 
37
37
  alert.polygon.image_url "your_api_key", options
38
38
 
@@ -37,11 +37,12 @@ module Gull
37
37
  :height => 640,
38
38
  :color => "0xff0000",
39
39
  :weight => 3,
40
- :fillcolor => "0xff000060"
40
+ :fillcolor => "0xff000060",
41
+ :maptype => "roadmap"
41
42
  }.merge(options)
42
43
 
43
44
  url_base = "http://maps.googleapis.com/maps/api/staticmap"
44
- "#{url_base}?size=#{opts[:width]}x#{opts[:height]}&maptype=roadmap&path=color:#{opts[:color]}" +
45
+ "#{url_base}?size=#{opts[:width]}x#{opts[:height]}&maptype=#{opts[:maptype]}&path=color:#{opts[:color]}" +
45
46
  "|weight:#{opts[:weight]}|fillcolor:#{opts[:fillcolor]}|#{coordinates_piped}&key=#{api_key}"
46
47
  end
47
48
 
@@ -1,3 +1,3 @@
1
1
  module Gull
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -12,10 +12,11 @@ describe Gull::Polygon do
12
12
  polygon = Gull::Polygon.new "34.57,-97.56 34.77,-97.38 34.75,-97.17"
13
13
 
14
14
  api_key = "testkey"
15
- options = { :width => 600, :height => 300, :color => "0xfbf000", :weight => 4, :fillcolor => "0xfbf00070" }
15
+ options = { :width => 600, :height => 300, :color => "0xfbf000", :weight => 4, :fillcolor => "0xfbf00070",
16
+ :maptype => "hybrid" }
16
17
  url = polygon.image_url api_key, options
17
18
  expected_url = "http://maps.googleapis.com/maps/api/staticmap?" +
18
- "size=600x300&maptype=roadmap&path=color:0xfbf000" +
19
+ "size=600x300&maptype=hybrid&path=color:0xfbf000" +
19
20
  "|weight:4|fillcolor:0xfbf00070|34.57,-97.56|34.77,-97.38|34.75,-97.17&key=testkey"
20
21
  expect(url).to eq expected_url
21
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gull
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Deckard