gmaps4rails 1.5.4 → 1.5.5

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gmaps4rails (1.5.4)
4
+ gmaps4rails (1.5.5)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  <% content_for :scripts do %>
2
- <%= javascript_include_tag *(js_dependencies.map(&:html_safe)) %>
2
+ <%= javascript_include_tag *js_dependencies %>
3
3
 
4
- <script type="text/javascript" charset="utf-8">
4
+ <script type="text/javascript">
5
5
  <%=raw options.to_gmaps4rails %>
6
6
  </script>
7
7
  <% end %>
@@ -22,7 +22,9 @@ module Gmaps4rails
22
22
  autoload :Places, 'gmaps4rails/api_wrappers/places'
23
23
  autoload :ObjectAccessor, 'gmaps4rails/object_accessor'
24
24
 
25
- mattr_accessor :http_proxy
25
+ mattr_accessor :http_proxy, :escape_js_url
26
+
27
+ self.escape_js_url = true
26
28
 
27
29
  # This method geocodes an address using the GoogleMaps webservice
28
30
  # options are:
@@ -16,10 +16,16 @@ module Gmaps4railsHelper
16
16
  options_with_indifferent_access = options.with_indifferent_access
17
17
  view_helper = Gmaps4rails::ViewHelper.new(options_with_indifferent_access)
18
18
 
19
+ js_dependencies = if Gmaps4rails.escape_js_url
20
+ view_helper.js_dependencies_array
21
+ else
22
+ view_helper.js_dependencies_array.map(&:html_safe)
23
+ end
24
+
19
25
  render :partial => '/gmaps4rails/gmaps4rails',
20
26
  :locals => {
21
27
  :options => options_with_indifferent_access,
22
- :js_dependencies => view_helper.js_dependencies_array,
28
+ :js_dependencies => js_dependencies,
23
29
  :dom => view_helper.dom_attributes
24
30
  }
25
31
  end
@@ -1,3 +1,3 @@
1
1
  module Gmaps4rails
2
- VERSION = "1.5.4"
2
+ VERSION = "1.5.5"
3
3
  end
@@ -0,0 +1 @@
1
+ # Gmaps4rails.escape_js_url = false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gmaps4rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-06 00:00:00.000000000 Z
13
+ date: 2012-08-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -314,6 +314,7 @@ files:
314
314
  - spec/dummy/config/environments/production.rb
315
315
  - spec/dummy/config/environments/test.rb
316
316
  - spec/dummy/config/initializers/backtrace_silencers.rb
317
+ - spec/dummy/config/initializers/gmaps4rails.rb
317
318
  - spec/dummy/config/initializers/inflections.rb
318
319
  - spec/dummy/config/initializers/mime_types.rb
319
320
  - spec/dummy/config/initializers/secret_token.rb
@@ -376,7 +377,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
376
377
  version: '0'
377
378
  segments:
378
379
  - 0
379
- hash: -3497814623676724947
380
+ hash: 371063818464557253
380
381
  required_rubygems_version: !ruby/object:Gem::Requirement
381
382
  none: false
382
383
  requirements:
@@ -385,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
385
386
  version: '0'
386
387
  segments:
387
388
  - 0
388
- hash: -3497814623676724947
389
+ hash: 371063818464557253
389
390
  requirements: []
390
391
  rubyforge_project:
391
392
  rubygems_version: 1.8.24
@@ -422,6 +423,7 @@ test_files:
422
423
  - spec/dummy/config/environments/production.rb
423
424
  - spec/dummy/config/environments/test.rb
424
425
  - spec/dummy/config/initializers/backtrace_silencers.rb
426
+ - spec/dummy/config/initializers/gmaps4rails.rb
425
427
  - spec/dummy/config/initializers/inflections.rb
426
428
  - spec/dummy/config/initializers/mime_types.rb
427
429
  - spec/dummy/config/initializers/secret_token.rb