google_static_maps_helper 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{google_static_maps_helper}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thorbj\303\270rn Hermansen"]
@@ -30,7 +30,7 @@ module GoogleStaticMapsHelper
30
30
  params = []
31
31
  (REQUIRED_OPTIONS + OPTIONAL_OPTIONS).each do |key|
32
32
  value = send(key)
33
- params << "#{key}=#{URI.escape(value.to_s)}" if value
33
+ params << "#{key}=#{URI.escape(value.to_s)}" unless value.nil?
34
34
  end
35
35
  out += params.join('&')
36
36
 
@@ -46,7 +46,7 @@ module GoogleStaticMapsHelper
46
46
  def options_to_url_params
47
47
  params = DEFAULT_OPTIONS.keys.map(&:to_s).sort.inject([]) do |params, attr|
48
48
  value = send(attr)
49
- params << "#{attr}:#{URI.escape(value)}" if value
49
+ params << "#{attr}:#{URI.escape(value)}" unless value.nil?
50
50
  params
51
51
  end
52
52
 
data/spec/map_spec.rb CHANGED
@@ -76,7 +76,7 @@ describe GoogleStaticMapsHelper::Map do
76
76
  before :each do
77
77
  @key = 'MY_GOOGLE_KEY'
78
78
  @size = '400x600'
79
- @sensor = true
79
+ @sensor = false
80
80
  @map = GoogleStaticMapsHelper::Map.new(:key => @key, :size => @size, :sensor => @sensor)
81
81
 
82
82
  @marker1 = GoogleStaticMapsHelper::Marker.new(:lng => 1, :lat => 2)
@@ -154,7 +154,7 @@ describe GoogleStaticMapsHelper::Map do
154
154
 
155
155
  [
156
156
  ['key', 'MY_GOOGLE_KEY'],
157
- ['sensor', 'true'],
157
+ ['sensor', 'false'],
158
158
  ['size', '400x600'],
159
159
  ['markers', 'color:green|size:mid|6,5'],
160
160
  ['markers', 'color:red|size:mid|2,1']
@@ -168,6 +168,7 @@ describe GoogleStaticMapsHelper::Map do
168
168
 
169
169
  describe "with markers grouped together" do
170
170
  before :each do
171
+ @map.sensor = true
171
172
  @map << @marker1
172
173
  @map << @marker11
173
174
  @map << @marker2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_static_maps_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Thorbj\xC3\xB8rn Hermansen"