gmaps4rails 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,10 +16,10 @@ if enable_css == true and options[:scripts].nil? %>
16
16
  <% when "bing" %>
17
17
  <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
18
18
  <% else %>
19
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.5&sensor=false&amp;libraries=geometry<%= g_libraries(options[:map_options].try(:[], :libraries)) %>"></script>
20
- <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.5/src/infobox.js"></script>
21
- <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.1/src/markerclusterer.js"></script>
22
- <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker-compiled.js"></script>
19
+ <script type="text/javascript" src="//maps.google.com/maps/api/js?v=3.5&sensor=false&amp;libraries=geometry<%= g_libraries(options[:map_options].try(:[], :libraries)) %>"></script>
20
+ <script type="text/javascript" src="//google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/src/infobox_packed.js"></script>
21
+ <script type="text/javascript" src="//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.5/src/markerclusterer_packed.js"></script>
22
+ <script type="text/javascript" src="//google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker-compiled.js"></script>
23
23
  <% end %>
24
24
 
25
25
  <% if Rails::VERSION::MAJOR >= 3 and Rails::VERSION::MINOR < 1 %>
@@ -12,7 +12,7 @@ module Gmaps4rails
12
12
  return true if gmaps4rails_options[:check_process] == true && self.send(gmaps4rails_options[:checker]) == true
13
13
  #try to geocode
14
14
  begin
15
- coordinates = Gmaps4rails.geocode(self.send(gmaps4rails_options[:address]), gmaps4rails_options[:language])
15
+ coordinates = Gmaps4rails.geocode(self.send(gmaps4rails_options[:address]), gmaps4rails_options[:language], false, gmaps4rails_options[:protocol])
16
16
  rescue GeocodeStatus, GeocodeInvalidQuery => e #address was invalid, add error to base.
17
17
  Rails.logger.warn(e)
18
18
  errors[gmaps4rails_options[:address]] << gmaps4rails_options[:msg] if gmaps4rails_options[:validation]
@@ -63,7 +63,8 @@ module Gmaps4rails
63
63
  :normalized_address => args[:normalized_address],
64
64
  :address => args[:address] || "gmaps4rails_address",
65
65
  :callback => args[:callback],
66
- :language => args[:language] || "en"
66
+ :language => args[:language] || "en",
67
+ :protocol => args[:protocol] || "http"
67
68
  }
68
69
  end
69
70
 
@@ -116,11 +116,11 @@ module Gmaps4rails
116
116
  # * address: string, mandatory
117
117
  # * lang: to set the language one wants the result to be translated (default is english)
118
118
  # * raw: to get the raw response from google, default is false
119
- def Gmaps4rails.geocode(address, lang="en", raw = false)
119
+ def Gmaps4rails.geocode(address, lang="en", raw = false, protocol = "http")
120
120
  if address.nil? || address.empty?
121
121
  raise Gmaps4rails::GeocodeInvalidQuery, "You must provide an address"
122
122
  else #coordinates are valid
123
- geocoder = "http://maps.googleapis.com/maps/api/geocode/json?language=#{lang}&address="
123
+ geocoder = "#{protocol}://maps.googleapis.com/maps/api/geocode/json?language=#{lang}&address="
124
124
  output = "&sensor=false"
125
125
  #send request to the google api to get the lat/lng
126
126
  request = geocoder + address + output
metadata CHANGED
@@ -1,41 +1,49 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gmaps4rails
3
- version: !ruby/object:Gem::Version
4
- version: 1.3.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 2
10
+ version: 1.3.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Benjamin Roth
9
14
  - David Ruyer
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2011-10-21 00:00:00.000000000Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2011-10-31 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
16
22
  name: crack
17
- requirement: &2152935520 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
18
25
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
23
33
  type: :runtime
24
- prerelease: false
25
- version_requirements: *2152935520
26
- description: ! 'Enables easy display of items (taken from a Rails 3 model) on a Google
27
- Maps (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included.
28
- Provides much options: markers customization, infowindows, auto-adjusted zoom, polylines,
29
- polygons, circles etc... See wiki on github for full description and examples.'
30
- email:
34
+ version_requirements: *id001
35
+ description: "Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included. Provides much options: markers customization, infowindows, auto-adjusted zoom, polylines, polygons, circles etc... See wiki on github for full description and examples."
36
+ email:
31
37
  - apnea.diving.deep@gmail.com
32
38
  - david.ruyer@gmail.com
33
39
  executables: []
40
+
34
41
  extensions: []
35
- extra_rdoc_files:
42
+
43
+ extra_rdoc_files:
36
44
  - LICENSE.txt
37
45
  - README.rdoc
38
- files:
46
+ files:
39
47
  - app/assets/javascripts/gmaps4rails/all_apis.js
40
48
  - app/assets/javascripts/gmaps4rails/bing.js
41
49
  - app/assets/javascripts/gmaps4rails/gmaps4rails.base.js.coffee
@@ -66,27 +74,36 @@ files:
66
74
  - README.rdoc
67
75
  homepage: http://github.com/apneadiving/Google-Maps-for-Rails
68
76
  licenses: []
77
+
69
78
  post_install_message:
70
79
  rdoc_options: []
71
- require_paths:
80
+
81
+ require_paths:
72
82
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
83
+ required_ruby_version: !ruby/object:Gem::Requirement
74
84
  none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: '0'
79
- required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
93
  none: false
81
- requirements:
82
- - - ! '>='
83
- - !ruby/object:Gem::Version
84
- version: '0'
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
85
101
  requirements: []
102
+
86
103
  rubyforge_project:
87
104
  rubygems_version: 1.8.6
88
105
  signing_key:
89
106
  specification_version: 3
90
- summary: Enables easy display of items (taken from a Rails 3 model) on a Google Maps
91
- (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included.
107
+ summary: Enables easy display of items (taken from a Rails 3 model) on a Google Maps (JS API V3), OpenLayers, Mapquest and Bing. Geocoding + Directions included.
92
108
  test_files: []
109
+