geo_magic 0.2.4.2 → 0.2.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,8 +129,7 @@ Multi Graticule Customization:
129
129
  Geocoder in Rails:
130
130
 
131
131
  <pre>
132
- geocoder = GeoMagic.geo_coder(:env => :rails)
133
- geocoder.configure
132
+ geocoder = GeoMagic.geo_coder(:env => :rails).configure
134
133
 
135
134
  location = geocoder.instance.geocode "Mullerstrasse 9, Munich"
136
135
  location.city.should == 'Munich'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4.2
1
+ 0.2.4.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{geo_magic}
8
- s.version = "0.2.4.2"
8
+ s.version = "0.2.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
@@ -12,6 +12,7 @@ module GeoMagic
12
12
 
13
13
  def configure path, env = :development
14
14
  @config ||= ::YAML.load_file(path)[env.to_s]
15
+ self
15
16
  end
16
17
 
17
18
  def self.services_available
@@ -12,6 +12,7 @@ module GeoMagic
12
12
 
13
13
  def configure file_name = 'map_api_keys.yml'
14
14
  @config ||= ::YAML.load_file("#{::Rails.root}/config/#{file_name}")[env]
15
+ self
15
16
  end
16
17
  end
17
18
  end
@@ -21,16 +21,15 @@ end
21
21
 
22
22
  describe "GeoMagic Geocoder" do
23
23
  it "should geocode for rails" do
24
- @geocoder = GeoMagic.geo_coder(:env => :rails)
25
- @geocoder.configure
24
+ @geocoder = GeoMagic.geo_coder(:env => :rails).configure
26
25
  location = @geocoder.instance.geocode "Mullerstrasse 9, Munich"
27
26
  location.city.should == 'Munich'
28
27
  end
29
28
 
30
-
31
29
  it "should geocode for rails with custom config file" do
32
- @geocoder = GeoMagic.geo_coder(:env => :rails)
33
- @geocoder.configure '../map_api_keys.yaml'
30
+ @geocoder = GeoMagic.geo_coder(:env => :rails).configure '../map_api_keys.yaml'
31
+ puts "config: #{@geocoder.config}"
32
+ puts "google key: #{@geocoder.google_key}"
34
33
  location = @geocoder.instance.geocode "Mullerstrasse 9, Munich"
35
34
  location.city.should == 'Munich'
36
35
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 2
8
8
  - 4
9
- - 2
10
- version: 0.2.4.2
9
+ - 3
10
+ version: 0.2.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristian Mandrup
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - ">="
202
202
  - !ruby/object:Gem::Version
203
- hash: -3203749080952033166
203
+ hash: -1737192752323116859
204
204
  segments:
205
205
  - 0
206
206
  version: "0"