geokit 1.8.2 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## 1.8.3
2
+
3
+ * Fix MultiGeocoder with geocoders that only have one argument
4
+
1
5
  ## 1.8.2
2
6
 
3
7
  * Fix due to name clash with dependency definitions in geokit 1.8.1
@@ -266,19 +266,19 @@ You must then also require such extenal file back in your main geokit configurat
266
266
  module Geokit
267
267
  module Geocoders
268
268
 
269
- # Should be overriden as Geokit::Geocoders::external_key in your configuration file
270
- @@external_key = 'REPLACE_WITH_YOUR_API_KEY'
271
- __define_accessors
269
+ # and use :my to specify this geocoder in your list of geocoders.
270
+ class MyGeocoder < Geocoder
271
+
272
+ # Use via: Geokit::Geocoders::MyGeocoder.key = 'MY KEY'
273
+ config :key
272
274
 
273
- # Replace name 'External' (below) with the name of your custom geocoder class
274
- # and use :external to specify this geocoder in your list of geocoders.
275
- class ExternalGeocoder < Geocoder
276
275
  private
276
+
277
277
  def self.do_geocode(address, options = {})
278
278
  # Main geocoding method
279
- end
279
+ end
280
280
 
281
- def self.parse_http_resp(body) # :nodoc:
281
+ def self.parse_json(json)
282
282
  # Helper method to parse http response. See geokit/geocoders.rb.
283
283
  end
284
284
  end
@@ -0,0 +1,463 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://maps.google.com/maps/api/geocode/json?language=es&latlng=40.416,-3.703&sensor=false
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: !binary |-
18
+ T0s=
19
+ headers:
20
+ !binary "Q29udGVudC1UeXBl":
21
+ - !binary |-
22
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD1VVEYtOA==
23
+ !binary "RGF0ZQ==":
24
+ - !binary |-
25
+ RnJpLCAyNyBEZWMgMjAxMyAxMToyNDoyMyBHTVQ=
26
+ !binary "RXhwaXJlcw==":
27
+ - !binary |-
28
+ U2F0LCAyOCBEZWMgMjAxMyAxMToyNDoyMyBHTVQ=
29
+ !binary "Q2FjaGUtQ29udHJvbA==":
30
+ - !binary |-
31
+ cHVibGljLCBtYXgtYWdlPTg2NDAw
32
+ !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
33
+ - !binary |-
34
+ Kg==
35
+ !binary "U2VydmVy":
36
+ - !binary |-
37
+ bWFmZQ==
38
+ !binary "WC1Yc3MtUHJvdGVjdGlvbg==":
39
+ - !binary |-
40
+ MTsgbW9kZT1ibG9jaw==
41
+ !binary "WC1GcmFtZS1PcHRpb25z":
42
+ - !binary |-
43
+ U0FNRU9SSUdJTg==
44
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
45
+ - !binary |-
46
+ Y2h1bmtlZA==
47
+ body:
48
+ encoding: ASCII-8BIT
49
+ string: !binary |-
50
+ ewogICAicmVzdWx0cyIgOiBbCiAgICAgIHsKICAgICAgICAgImFkZHJlc3Nf
51
+ Y29tcG9uZW50cyIgOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAg
52
+ ImxvbmdfbmFtZSIgOiAiMTUiLAogICAgICAgICAgICAgICAic2hvcnRfbmFt
53
+ ZSIgOiAiMTUiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAic3RyZWV0
54
+ X251bWJlciIgXQogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAg
55
+ ICAgICAgICAgICJsb25nX25hbWUiIDogIkMvIENhcnJldGFzIiwKICAgICAg
56
+ ICAgICAgICAgInNob3J0X25hbWUiIDogIkMvIENhcnJldGFzIiwKICAgICAg
57
+ ICAgICAgICAgInR5cGVzIiA6IFsgInJvdXRlIiBdCiAgICAgICAgICAgIH0s
58
+ CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAi
59
+ TWFkcmlkIiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIk1hZHJp
60
+ ZCIsCiAgICAgICAgICAgICAgICJ0eXBlcyIgOiBbICJsb2NhbGl0eSIsICJw
61
+ b2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAg
62
+ ICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJNYWRyaWQiLAogICAgICAgICAg
63
+ ICAgICAic2hvcnRfbmFtZSIgOiAiTSIsCiAgICAgICAgICAgICAgICJ0eXBl
64
+ cyIgOiBbICJhZG1pbmlzdHJhdGl2ZV9hcmVhX2xldmVsXzIiLCAicG9saXRp
65
+ Y2FsIiBdCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAg
66
+ ICAgICAgImxvbmdfbmFtZSIgOiAiQ29tdW5pZGFkIGRlIE1hZHJpZCIsCiAg
67
+ ICAgICAgICAgICAgICJzaG9ydF9uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFk
68
+ cmlkIiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgImFkbWluaXN0cmF0
69
+ aXZlX2FyZWFfbGV2ZWxfMSIsICJwb2xpdGljYWwiIF0KICAgICAgICAgICAg
70
+ fSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6
71
+ ICJFc3Bhw7FhIiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIkVT
72
+ IiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgImNvdW50cnkiLCAicG9s
73
+ aXRpY2FsIiBdCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAg
74
+ ICAgICAgICAgImxvbmdfbmFtZSIgOiAiMjgwMTIiLAogICAgICAgICAgICAg
75
+ ICAic2hvcnRfbmFtZSIgOiAiMjgwMTIiLAogICAgICAgICAgICAgICAidHlw
76
+ ZXMiIDogWyAicG9zdGFsX2NvZGUiIF0KICAgICAgICAgICAgfQogICAgICAg
77
+ ICBdLAogICAgICAgICAiZm9ybWF0dGVkX2FkZHJlc3MiIDogIkMvIENhcnJl
78
+ dGFzLCAxNSwgMjgwMTIgTWFkcmlkLCBFc3Bhw7FhIiwKICAgICAgICAgImdl
79
+ b21ldHJ5IiA6IHsKICAgICAgICAgICAgImxvY2F0aW9uIiA6IHsKICAgICAg
80
+ ICAgICAgICAgImxhdCIgOiA0MC40MTU5Njc4LAogICAgICAgICAgICAgICAi
81
+ bG5nIiA6IC0zLjcwMzEyMTUKICAgICAgICAgICAgfSwKICAgICAgICAgICAg
82
+ ImxvY2F0aW9uX3R5cGUiIDogIlJPT0ZUT1AiLAogICAgICAgICAgICAidmll
83
+ d3BvcnQiIDogewogICAgICAgICAgICAgICAibm9ydGhlYXN0IiA6IHsKICAg
84
+ ICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MTczMTY3ODAyOTE0OSwKICAg
85
+ ICAgICAgICAgICAgICAgImxuZyIgOiAtMy43MDE3NzI1MTk3MDg0OTgKICAg
86
+ ICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgInNvdXRod2VzdCIgOiB7
87
+ CiAgICAgICAgICAgICAgICAgICJsYXQiIDogNDAuNDE0NjE4ODE5NzA4NDks
88
+ CiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMuNzA0NDcwNDgwMjkxNTAy
89
+ CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICB9LAog
90
+ ICAgICAgICAidHlwZXMiIDogWyAic3RyZWV0X2FkZHJlc3MiIF0KICAgICAg
91
+ fSwKICAgICAgewogICAgICAgICAiYWRkcmVzc19jb21wb25lbnRzIiA6IFsK
92
+ ICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJD
93
+ YXJyZXRhcyAtIFB1ZXJ0YSBkZWwgU29sIiwKICAgICAgICAgICAgICAgInNo
94
+ b3J0X25hbWUiIDogIkNhcnJldGFzIC0gUHVlcnRhIGRlbCBTb2wiLAogICAg
95
+ ICAgICAgICAgICAidHlwZXMiIDogWyAiYnVzX3N0YXRpb24iLCAidHJhbnNp
96
+ dF9zdGF0aW9uIiwgImVzdGFibGlzaG1lbnQiIF0KICAgICAgICAgICAgfSwK
97
+ ICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJN
98
+ YWRyaWQiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiTWFkcmlk
99
+ IiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgImxvY2FsaXR5IiwgInBv
100
+ bGl0aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAg
101
+ ICAgICAgICAgICJsb25nX25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAg
102
+ ICAgICJzaG9ydF9uYW1lIiA6ICJNIiwKICAgICAgICAgICAgICAgInR5cGVz
103
+ IiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2ZWxfMiIsICJwb2xpdGlj
104
+ YWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAg
105
+ ICAgICAibG9uZ19uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAg
106
+ ICAgICAgICAgICAgInNob3J0X25hbWUiIDogIkNvbXVuaWRhZCBkZSBNYWRy
107
+ aWQiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiYWRtaW5pc3RyYXRp
108
+ dmVfYXJlYV9sZXZlbF8xIiwgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9
109
+ LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDog
110
+ IkVzcGHDsWEiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiRVMi
111
+ LAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiY291bnRyeSIsICJwb2xp
112
+ dGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAg
113
+ ICAgICAgICAibG9uZ19uYW1lIiA6ICIyODAxMiIsCiAgICAgICAgICAgICAg
114
+ ICJzaG9ydF9uYW1lIiA6ICIyODAxMiIsCiAgICAgICAgICAgICAgICJ0eXBl
115
+ cyIgOiBbICJwb3N0YWxfY29kZSIgXQogICAgICAgICAgICB9CiAgICAgICAg
116
+ IF0sCiAgICAgICAgICJmb3JtYXR0ZWRfYWRkcmVzcyIgOiAiQ2FycmV0YXMg
117
+ LSBQdWVydGEgZGVsIFNvbCwgMjgwMTIgTWFkcmlkLCBFc3Bhw7FhIiwKICAg
118
+ ICAgICAgImdlb21ldHJ5IiA6IHsKICAgICAgICAgICAgImxvY2F0aW9uIiA6
119
+ IHsKICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MTY0NiwKICAgICAgICAg
120
+ ICAgICAgImxuZyIgOiAtMy43MDMzOAogICAgICAgICAgICB9LAogICAgICAg
121
+ ICAgICAibG9jYXRpb25fdHlwZSIgOiAiQVBQUk9YSU1BVEUiLAogICAgICAg
122
+ ICAgICAidmlld3BvcnQiIDogewogICAgICAgICAgICAgICAibm9ydGhlYXN0
123
+ IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MTc4MDg5ODAy
124
+ OTE1LAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjcwMjAzMTAxOTcw
125
+ ODQ5NwogICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAic291dGh3
126
+ ZXN0IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MTUxMTEw
127
+ MTk3MDg1LAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjcwNDcyODk4
128
+ MDI5MTUwMgogICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAg
129
+ ICAgfSwKICAgICAgICAgInR5cGVzIiA6IFsgImJ1c19zdGF0aW9uIiwgInRy
130
+ YW5zaXRfc3RhdGlvbiIsICJlc3RhYmxpc2htZW50IiBdCiAgICAgIH0sCiAg
131
+ ICAgIHsKICAgICAgICAgImFkZHJlc3NfY29tcG9uZW50cyIgOiBbCiAgICAg
132
+ ICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiU29sIiwK
133
+ ICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIlNvbCIsCiAgICAgICAg
134
+ ICAgICAgICJ0eXBlcyIgOiBbICJuZWlnaGJvcmhvb2QiLCAicG9saXRpY2Fs
135
+ IiBdCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAg
136
+ ICAgImxvbmdfbmFtZSIgOiAiTWFkcmlkIiwKICAgICAgICAgICAgICAgInNo
137
+ b3J0X25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAgICAgICJ0eXBlcyIg
138
+ OiBbICJsb2NhbGl0eSIsICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfSwK
139
+ ICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJN
140
+ YWRyaWQiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiTWFkcmlk
141
+ IiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgInBvbGl0aWNhbCIgXQog
142
+ ICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJs
143
+ b25nX25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAgICAgICJzaG9ydF9u
144
+ YW1lIiA6ICJNIiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgImFkbWlu
145
+ aXN0cmF0aXZlX2FyZWFfbGV2ZWxfMiIsICJwb2xpdGljYWwiIF0KICAgICAg
146
+ ICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19u
147
+ YW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAgICAgICAgICAgICAg
148
+ InNob3J0X25hbWUiIDogIkNvbXVuaWRhZCBkZSBNYWRyaWQiLAogICAgICAg
149
+ ICAgICAgICAidHlwZXMiIDogWyAiYWRtaW5pc3RyYXRpdmVfYXJlYV9sZXZl
150
+ bF8xIiwgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAgICAg
151
+ ICB7CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDogIkVzcGHDsWEiLAog
152
+ ICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiRVMiLAogICAgICAgICAg
153
+ ICAgICAidHlwZXMiIDogWyAiY291bnRyeSIsICJwb2xpdGljYWwiIF0KICAg
154
+ ICAgICAgICAgfQogICAgICAgICBdLAogICAgICAgICAiZm9ybWF0dGVkX2Fk
155
+ ZHJlc3MiIDogIlNvbCwgTWFkcmlkLCBFc3Bhw7FhIiwKICAgICAgICAgImdl
156
+ b21ldHJ5IiA6IHsKICAgICAgICAgICAgImJvdW5kcyIgOiB7CiAgICAgICAg
157
+ ICAgICAgICJub3J0aGVhc3QiIDogewogICAgICAgICAgICAgICAgICAibGF0
158
+ IiA6IDQwLjQyMDMyNDksCiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMu
159
+ Njk5MzA3CiAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICJzb3V0
160
+ aHdlc3QiIDogewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjQxMzU0
161
+ MjAwMDAwMDAxLAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjcwODY5
162
+ MDEKICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAg
163
+ ICAibG9jYXRpb24iIDogewogICAgICAgICAgICAgICAibGF0IiA6IDQwLjQx
164
+ NjY2MzUsCiAgICAgICAgICAgICAgICJsbmciIDogLTMuNzA0MTY4NwogICAg
165
+ ICAgICAgICB9LAogICAgICAgICAgICAibG9jYXRpb25fdHlwZSIgOiAiQVBQ
166
+ Uk9YSU1BVEUiLAogICAgICAgICAgICAidmlld3BvcnQiIDogewogICAgICAg
167
+ ICAgICAgICAibm9ydGhlYXN0IiA6IHsKICAgICAgICAgICAgICAgICAgImxh
168
+ dCIgOiA0MC40MjAzMjQ5LAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0z
169
+ LjY5OTMwNwogICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAic291
170
+ dGh3ZXN0IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MTM1
171
+ NDIwMDAwMDAwMSwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMy43MDg2
172
+ OTAxCiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICB9
173
+ LAogICAgICAgICAidHlwZXMiIDogWyAibmVpZ2hib3Job29kIiwgInBvbGl0
174
+ aWNhbCIgXQogICAgICB9LAogICAgICB7CiAgICAgICAgICJhZGRyZXNzX2Nv
175
+ bXBvbmVudHMiIDogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJs
176
+ b25nX25hbWUiIDogIjI4MDEyIiwKICAgICAgICAgICAgICAgInNob3J0X25h
177
+ bWUiIDogIjI4MDEyIiwKICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgInBv
178
+ c3RhbF9jb2RlIiBdCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAg
179
+ ICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiTWFkcmlkIiwKICAgICAgICAg
180
+ ICAgICAgInNob3J0X25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAgICAg
181
+ ICJ0eXBlcyIgOiBbICJsb2NhbGl0eSIsICJwb2xpdGljYWwiIF0KICAgICAg
182
+ ICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19u
183
+ YW1lIiA6ICJNYWRyaWQiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIg
184
+ OiAiTSIsCiAgICAgICAgICAgICAgICJ0eXBlcyIgOiBbICJhZG1pbmlzdHJh
185
+ dGl2ZV9hcmVhX2xldmVsXzIiLCAicG9saXRpY2FsIiBdCiAgICAgICAgICAg
186
+ IH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIg
187
+ OiAiQ29tdW5pZGFkIGRlIE1hZHJpZCIsCiAgICAgICAgICAgICAgICJzaG9y
188
+ dF9uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAgICAgICAgICAg
189
+ ICAgInR5cGVzIiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2ZWxfMSIs
190
+ ICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewog
191
+ ICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJFc3Bhw7FhIiwKICAgICAg
192
+ ICAgICAgICAgInNob3J0X25hbWUiIDogIkVTIiwKICAgICAgICAgICAgICAg
193
+ InR5cGVzIiA6IFsgImNvdW50cnkiLCAicG9saXRpY2FsIiBdCiAgICAgICAg
194
+ ICAgIH0KICAgICAgICAgXSwKICAgICAgICAgImZvcm1hdHRlZF9hZGRyZXNz
195
+ IiA6ICIyODAxMiBNYWRyaWQsIEVzcGHDsWEiLAogICAgICAgICAiZ2VvbWV0
196
+ cnkiIDogewogICAgICAgICAgICAiYm91bmRzIiA6IHsKICAgICAgICAgICAg
197
+ ICAgIm5vcnRoZWFzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQiIDog
198
+ NDAuNDE2Njk3NCwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMy42OTEz
199
+ MTAzCiAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICJzb3V0aHdl
200
+ c3QiIDogewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjQwMTI3NTcs
201
+ CiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMuNzA4Njc5Nzk5OTk5OTk5
202
+ CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAg
203
+ ImxvY2F0aW9uIiA6IHsKICAgICAgICAgICAgICAgImxhdCIgOiA0MC40MDkx
204
+ MTA2LAogICAgICAgICAgICAgICAibG5nIiA6IC0zLjcwMTYzMTY5OTk5OTk5
205
+ OQogICAgICAgICAgICB9LAogICAgICAgICAgICAibG9jYXRpb25fdHlwZSIg
206
+ OiAiQVBQUk9YSU1BVEUiLAogICAgICAgICAgICAidmlld3BvcnQiIDogewog
207
+ ICAgICAgICAgICAgICAibm9ydGhlYXN0IiA6IHsKICAgICAgICAgICAgICAg
208
+ ICAgImxhdCIgOiA0MC40MTY2OTc0LAogICAgICAgICAgICAgICAgICAibG5n
209
+ IiA6IC0zLjY5MTMxMDMKICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAg
210
+ ICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQiIDog
211
+ NDAuNDAxMjc1NywKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMy43MDg2
212
+ Nzk3OTk5OTk5OTkKICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAg
213
+ ICAgICAgIH0sCiAgICAgICAgICJ0eXBlcyIgOiBbICJwb3N0YWxfY29kZSIg
214
+ XQogICAgICB9LAogICAgICB7CiAgICAgICAgICJhZGRyZXNzX2NvbXBvbmVu
215
+ dHMiIDogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25h
216
+ bWUiIDogIkNlbnRybyIsCiAgICAgICAgICAgICAgICJzaG9ydF9uYW1lIiA6
217
+ ICJDZW50cm8iLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAic3VibG9j
218
+ YWxpdHkiLCAicG9saXRpY2FsIiBdCiAgICAgICAgICAgIH0sCiAgICAgICAg
219
+ ICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiTWFkcmlkIiwK
220
+ ICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIk1hZHJpZCIsCiAgICAg
221
+ ICAgICAgICAgICJ0eXBlcyIgOiBbICJsb2NhbGl0eSIsICJwb2xpdGljYWwi
222
+ IF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAg
223
+ ICAibG9uZ19uYW1lIiA6ICJNYWRyaWQiLAogICAgICAgICAgICAgICAic2hv
224
+ cnRfbmFtZSIgOiAiTWFkcmlkIiwKICAgICAgICAgICAgICAgInR5cGVzIiA6
225
+ IFsgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAgICAgICB7
226
+ CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDogIk1hZHJpZCIsCiAgICAg
227
+ ICAgICAgICAgICJzaG9ydF9uYW1lIiA6ICJNIiwKICAgICAgICAgICAgICAg
228
+ InR5cGVzIiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2ZWxfMiIsICJw
229
+ b2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAg
230
+ ICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlk
231
+ IiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIkNvbXVuaWRhZCBk
232
+ ZSBNYWRyaWQiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiYWRtaW5p
233
+ c3RyYXRpdmVfYXJlYV9sZXZlbF8xIiwgInBvbGl0aWNhbCIgXQogICAgICAg
234
+ ICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25h
235
+ bWUiIDogIkVzcGHDsWEiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIg
236
+ OiAiRVMiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiY291bnRyeSIs
237
+ ICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfQogICAgICAgICBdLAogICAg
238
+ ICAgICAiZm9ybWF0dGVkX2FkZHJlc3MiIDogIkNlbnRybywgTWFkcmlkLCBF
239
+ c3Bhw7FhIiwKICAgICAgICAgImdlb21ldHJ5IiA6IHsKICAgICAgICAgICAg
240
+ ImJvdW5kcyIgOiB7CiAgICAgICAgICAgICAgICJub3J0aGVhc3QiIDogewog
241
+ ICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjQzMDYxNiwKICAgICAgICAg
242
+ ICAgICAgICAgImxuZyIgOiAtMy42OTAyODkKICAgICAgICAgICAgICAgfSwK
243
+ ICAgICAgICAgICAgICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAg
244
+ ICAgICJsYXQiIDogNDAuNDA1MDQxLAogICAgICAgICAgICAgICAgICAibG5n
245
+ IiA6IC0zLjcyMjg3OAogICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0s
246
+ CiAgICAgICAgICAgICJsb2NhdGlvbiIgOiB7CiAgICAgICAgICAgICAgICJs
247
+ YXQiIDogNDAuNDExNTE2NSwKICAgICAgICAgICAgICAgImxuZyIgOiAtMy43
248
+ MDc2NDQ1CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJsb2NhdGlvbl90
249
+ eXBlIiA6ICJBUFBST1hJTUFURSIsCiAgICAgICAgICAgICJ2aWV3cG9ydCIg
250
+ OiB7CiAgICAgICAgICAgICAgICJub3J0aGVhc3QiIDogewogICAgICAgICAg
251
+ ICAgICAgICAibGF0IiA6IDQwLjQzMDYxNiwKICAgICAgICAgICAgICAgICAg
252
+ ImxuZyIgOiAtMy42OTAyODkKICAgICAgICAgICAgICAgfSwKICAgICAgICAg
253
+ ICAgICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQi
254
+ IDogNDAuNDA1MDQxLAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjcy
255
+ Mjg3OAogICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAg
256
+ fSwKICAgICAgICAgInR5cGVzIiA6IFsgInN1YmxvY2FsaXR5IiwgInBvbGl0
257
+ aWNhbCIgXQogICAgICB9LAogICAgICB7CiAgICAgICAgICJhZGRyZXNzX2Nv
258
+ bXBvbmVudHMiIDogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJs
259
+ b25nX25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAgICAgICJzaG9ydF9u
260
+ YW1lIiA6ICJNYWRyaWQiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAi
261
+ bG9jYWxpdHkiLCAicG9saXRpY2FsIiBdCiAgICAgICAgICAgIH0sCiAgICAg
262
+ ICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiTWFkcmlk
263
+ IiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIk1hZHJpZCIsCiAg
264
+ ICAgICAgICAgICAgICJ0eXBlcyIgOiBbICJwb2xpdGljYWwiIF0KICAgICAg
265
+ ICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19u
266
+ YW1lIiA6ICJNYWRyaWQiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIg
267
+ OiAiTSIsCiAgICAgICAgICAgICAgICJ0eXBlcyIgOiBbICJhZG1pbmlzdHJh
268
+ dGl2ZV9hcmVhX2xldmVsXzIiLCAicG9saXRpY2FsIiBdCiAgICAgICAgICAg
269
+ IH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIg
270
+ OiAiQ29tdW5pZGFkIGRlIE1hZHJpZCIsCiAgICAgICAgICAgICAgICJzaG9y
271
+ dF9uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAgICAgICAgICAg
272
+ ICAgInR5cGVzIiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2ZWxfMSIs
273
+ ICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewog
274
+ ICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJFc3Bhw7FhIiwKICAgICAg
275
+ ICAgICAgICAgInNob3J0X25hbWUiIDogIkVTIiwKICAgICAgICAgICAgICAg
276
+ InR5cGVzIiA6IFsgImNvdW50cnkiLCAicG9saXRpY2FsIiBdCiAgICAgICAg
277
+ ICAgIH0KICAgICAgICAgXSwKICAgICAgICAgImZvcm1hdHRlZF9hZGRyZXNz
278
+ IiA6ICJNYWRyaWQsIEVzcGHDsWEiLAogICAgICAgICAiZ2VvbWV0cnkiIDog
279
+ ewogICAgICAgICAgICAiYm91bmRzIiA6IHsKICAgICAgICAgICAgICAgIm5v
280
+ cnRoZWFzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQiIDogNDAuNTYz
281
+ NTkwMywKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMy41MjQ5MTE2CiAg
282
+ ICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICJzb3V0aHdlc3QiIDog
283
+ ewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjMxMjA2MzksCiAgICAg
284
+ ICAgICAgICAgICAgICJsbmciIDogLTMuODM0MTYxOAogICAgICAgICAgICAg
285
+ ICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJsb2NhdGlvbiIgOiB7
286
+ CiAgICAgICAgICAgICAgICJsYXQiIDogNDAuNDE2Nzc1NCwKICAgICAgICAg
287
+ ICAgICAgImxuZyIgOiAtMy43MDM3OTAyCiAgICAgICAgICAgIH0sCiAgICAg
288
+ ICAgICAgICJsb2NhdGlvbl90eXBlIiA6ICJBUFBST1hJTUFURSIsCiAgICAg
289
+ ICAgICAgICJ2aWV3cG9ydCIgOiB7CiAgICAgICAgICAgICAgICJub3J0aGVh
290
+ c3QiIDogewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjU2MzU5MDMs
291
+ CiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMuNTI0OTExNgogICAgICAg
292
+ ICAgICAgICB9LAogICAgICAgICAgICAgICAic291dGh3ZXN0IiA6IHsKICAg
293
+ ICAgICAgICAgICAgICAgImxhdCIgOiA0MC4zMTIwNjM5LAogICAgICAgICAg
294
+ ICAgICAgICAibG5nIiA6IC0zLjgzNDE2MTgKICAgICAgICAgICAgICAgfQog
295
+ ICAgICAgICAgICB9CiAgICAgICAgIH0sCiAgICAgICAgICJ0eXBlcyIgOiBb
296
+ ICJsb2NhbGl0eSIsICJwb2xpdGljYWwiIF0KICAgICAgfSwKICAgICAgewog
297
+ ICAgICAgICAiYWRkcmVzc19jb21wb25lbnRzIiA6IFsKICAgICAgICAgICAg
298
+ ewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJNYWRyaWQiLAogICAg
299
+ ICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiTWFkcmlkIiwKICAgICAgICAg
300
+ ICAgICAgInR5cGVzIiA6IFsgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9
301
+ LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDog
302
+ Ik1hZHJpZCIsCiAgICAgICAgICAgICAgICJzaG9ydF9uYW1lIiA6ICJNIiwK
303
+ ICAgICAgICAgICAgICAgInR5cGVzIiA6IFsgImFkbWluaXN0cmF0aXZlX2Fy
304
+ ZWFfbGV2ZWxfMiIsICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAg
305
+ ICAgICAgICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJDb211
306
+ bmlkYWQgZGUgTWFkcmlkIiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUi
307
+ IDogIkNvbXVuaWRhZCBkZSBNYWRyaWQiLAogICAgICAgICAgICAgICAidHlw
308
+ ZXMiIDogWyAiYWRtaW5pc3RyYXRpdmVfYXJlYV9sZXZlbF8xIiwgInBvbGl0
309
+ aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAgICAg
310
+ ICAgICAgICJsb25nX25hbWUiIDogIkVzcGHDsWEiLAogICAgICAgICAgICAg
311
+ ICAic2hvcnRfbmFtZSIgOiAiRVMiLAogICAgICAgICAgICAgICAidHlwZXMi
312
+ IDogWyAiY291bnRyeSIsICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfQog
313
+ ICAgICAgICBdLAogICAgICAgICAiZm9ybWF0dGVkX2FkZHJlc3MiIDogIk1h
314
+ ZHJpZCwgRXNwYcOxYSIsCiAgICAgICAgICJnZW9tZXRyeSIgOiB7CiAgICAg
315
+ ICAgICAgICJib3VuZHMiIDogewogICAgICAgICAgICAgICAibm9ydGhlYXN0
316
+ IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0MC42NDMzMzI2OTk5
317
+ OTk5OSwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMy41MTgyMzQ5CiAg
318
+ ICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICJzb3V0aHdlc3QiIDog
319
+ ewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQwLjMxMjA2MzksCiAgICAg
320
+ ICAgICAgICAgICAgICJsbmciIDogLTMuODg4OTU2NgogICAgICAgICAgICAg
321
+ ICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICJsb2NhdGlvbiIgOiB7
322
+ CiAgICAgICAgICAgICAgICJsYXQiIDogNDAuNDE1NzU2OSwKICAgICAgICAg
323
+ ICAgICAgImxuZyIgOiAtMy43MDM3MjE0OTk5OTk5OTkKICAgICAgICAgICAg
324
+ fSwKICAgICAgICAgICAgImxvY2F0aW9uX3R5cGUiIDogIkFQUFJPWElNQVRF
325
+ IiwKICAgICAgICAgICAgInZpZXdwb3J0IiA6IHsKICAgICAgICAgICAgICAg
326
+ Im5vcnRoZWFzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQiIDogNDAu
327
+ NjQzMzMyNjk5OTk5OTksCiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMu
328
+ NTE4MjM0OQogICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAic291
329
+ dGh3ZXN0IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0MC4zMTIw
330
+ NjM5LAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjg4ODk1NjYKICAg
331
+ ICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgIH0sCiAgICAg
332
+ ICAgICJ0eXBlcyIgOiBbICJwb2xpdGljYWwiIF0KICAgICAgfSwKICAgICAg
333
+ ewogICAgICAgICAiYWRkcmVzc19jb21wb25lbnRzIiA6IFsKICAgICAgICAg
334
+ ICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICLDgXJlYSBNZXRy
335
+ b3BvbGl0YWxpdGFuYSB5IENvcnJlZG9yIGRlbCBIZW5hcmVzIiwKICAgICAg
336
+ ICAgICAgICAgInNob3J0X25hbWUiIDogIsOBcmVhIE1ldHJvcG9saXRhbGl0
337
+ YW5hIHkgQ29ycmVkb3IgZGVsIEhlbmFyZXMiLAogICAgICAgICAgICAgICAi
338
+ dHlwZXMiIDogWyAiYWRtaW5pc3RyYXRpdmVfYXJlYV9sZXZlbF8zIiwgInBv
339
+ bGl0aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAgICAgICB7CiAgICAg
340
+ ICAgICAgICAgICJsb25nX25hbWUiIDogIk1hZHJpZCIsCiAgICAgICAgICAg
341
+ ICAgICJzaG9ydF9uYW1lIiA6ICJNIiwKICAgICAgICAgICAgICAgInR5cGVz
342
+ IiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2ZWxfMiIsICJwb2xpdGlj
343
+ YWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAg
344
+ ICAgICAibG9uZ19uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAg
345
+ ICAgICAgICAgICAgInNob3J0X25hbWUiIDogIkNvbXVuaWRhZCBkZSBNYWRy
346
+ aWQiLAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiYWRtaW5pc3RyYXRp
347
+ dmVfYXJlYV9sZXZlbF8xIiwgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9
348
+ LAogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDog
349
+ IkVzcGHDsWEiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAiRVMi
350
+ LAogICAgICAgICAgICAgICAidHlwZXMiIDogWyAiY291bnRyeSIsICJwb2xp
351
+ dGljYWwiIF0KICAgICAgICAgICAgfQogICAgICAgICBdLAogICAgICAgICAi
352
+ Zm9ybWF0dGVkX2FkZHJlc3MiIDogIsOBcmVhIE1ldHJvcG9saXRhbGl0YW5h
353
+ IHkgQ29ycmVkb3IgZGVsIEhlbmFyZXMsIE1hZHJpZCwgRXNwYcOxYSIsCiAg
354
+ ICAgICAgICJnZW9tZXRyeSIgOiB7CiAgICAgICAgICAgICJib3VuZHMiIDog
355
+ ewogICAgICAgICAgICAgICAibm9ydGhlYXN0IiA6IHsKICAgICAgICAgICAg
356
+ ICAgICAgImxhdCIgOiA0MC42NDUzODc1LAogICAgICAgICAgICAgICAgICAi
357
+ bG5nIiA6IC0zLjI4Mzg5NzkKICAgICAgICAgICAgICAgfSwKICAgICAgICAg
358
+ ICAgICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJsYXQi
359
+ IDogNDAuMTk4OTI2OSwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtNC4w
360
+ MDY0NTM4OTk5OTk5OTkKICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9
361
+ LAogICAgICAgICAgICAibG9jYXRpb24iIDogewogICAgICAgICAgICAgICAi
362
+ bGF0IiA6IDQwLjQ5NTU0OTMsCiAgICAgICAgICAgICAgICJsbmciIDogLTMu
363
+ NjYyMzIzOQogICAgICAgICAgICB9LAogICAgICAgICAgICAibG9jYXRpb25f
364
+ dHlwZSIgOiAiQVBQUk9YSU1BVEUiLAogICAgICAgICAgICAidmlld3BvcnQi
365
+ IDogewogICAgICAgICAgICAgICAibm9ydGhlYXN0IiA6IHsKICAgICAgICAg
366
+ ICAgICAgICAgImxhdCIgOiA0MC42NDUzODc1LAogICAgICAgICAgICAgICAg
367
+ ICAibG5nIiA6IC0zLjI4Mzg5NzkKICAgICAgICAgICAgICAgfSwKICAgICAg
368
+ ICAgICAgICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAgICAgICJs
369
+ YXQiIDogNDAuMTk4OTI2OSwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAt
370
+ NC4wMDY0NTM4OTk5OTk5OTkKICAgICAgICAgICAgICAgfQogICAgICAgICAg
371
+ ICB9CiAgICAgICAgIH0sCiAgICAgICAgICJ0eXBlcyIgOiBbICJhZG1pbmlz
372
+ dHJhdGl2ZV9hcmVhX2xldmVsXzMiLCAicG9saXRpY2FsIiBdCiAgICAgIH0s
373
+ CiAgICAgIHsKICAgICAgICAgImFkZHJlc3NfY29tcG9uZW50cyIgOiBbCiAg
374
+ ICAgICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiTWFk
375
+ cmlkIiwKICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIk0iLAogICAg
376
+ ICAgICAgICAgICAidHlwZXMiIDogWyAiYWRtaW5pc3RyYXRpdmVfYXJlYV9s
377
+ ZXZlbF8yIiwgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9LAogICAgICAg
378
+ ICAgICB7CiAgICAgICAgICAgICAgICJsb25nX25hbWUiIDogIkNvbXVuaWRh
379
+ ZCBkZSBNYWRyaWQiLAogICAgICAgICAgICAgICAic2hvcnRfbmFtZSIgOiAi
380
+ Q29tdW5pZGFkIGRlIE1hZHJpZCIsCiAgICAgICAgICAgICAgICJ0eXBlcyIg
381
+ OiBbICJhZG1pbmlzdHJhdGl2ZV9hcmVhX2xldmVsXzEiLCAicG9saXRpY2Fs
382
+ IiBdCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAg
383
+ ICAgImxvbmdfbmFtZSIgOiAiRXNwYcOxYSIsCiAgICAgICAgICAgICAgICJz
384
+ aG9ydF9uYW1lIiA6ICJFUyIsCiAgICAgICAgICAgICAgICJ0eXBlcyIgOiBb
385
+ ICJjb3VudHJ5IiwgInBvbGl0aWNhbCIgXQogICAgICAgICAgICB9CiAgICAg
386
+ ICAgIF0sCiAgICAgICAgICJmb3JtYXR0ZWRfYWRkcmVzcyIgOiAiTWFkcmlk
387
+ LCBFc3Bhw7FhIiwKICAgICAgICAgImdlb21ldHJ5IiA6IHsKICAgICAgICAg
388
+ ICAgImJvdW5kcyIgOiB7CiAgICAgICAgICAgICAgICJub3J0aGVhc3QiIDog
389
+ ewogICAgICAgICAgICAgICAgICAibGF0IiA6IDQxLjE2NTg0NDcwMDAwMDAx
390
+ LAogICAgICAgICAgICAgICAgICAibG5nIiA6IC0zLjA1Mjk4MzMKICAgICAg
391
+ ICAgICAgICAgfSwKICAgICAgICAgICAgICAgInNvdXRod2VzdCIgOiB7CiAg
392
+ ICAgICAgICAgICAgICAgICJsYXQiIDogMzkuODg0NzE5NSwKICAgICAgICAg
393
+ ICAgICAgICAgImxuZyIgOiAtNC41NzkwNzYxCiAgICAgICAgICAgICAgIH0K
394
+ ICAgICAgICAgICAgfSwKICAgICAgICAgICAgImxvY2F0aW9uIiA6IHsKICAg
395
+ ICAgICAgICAgICAgImxhdCIgOiA0MC40MTYyODgzLAogICAgICAgICAgICAg
396
+ ICAibG5nIiA6IC0zLjcwMzM3MjUKICAgICAgICAgICAgfSwKICAgICAgICAg
397
+ ICAgImxvY2F0aW9uX3R5cGUiIDogIkFQUFJPWElNQVRFIiwKICAgICAgICAg
398
+ ICAgInZpZXdwb3J0IiA6IHsKICAgICAgICAgICAgICAgIm5vcnRoZWFzdCIg
399
+ OiB7CiAgICAgICAgICAgICAgICAgICJsYXQiIDogNDEuMTY1ODQ0NzAwMDAw
400
+ MDEsCiAgICAgICAgICAgICAgICAgICJsbmciIDogLTMuMDUyOTgzMwogICAg
401
+ ICAgICAgICAgICB9LAogICAgICAgICAgICAgICAic291dGh3ZXN0IiA6IHsK
402
+ ICAgICAgICAgICAgICAgICAgImxhdCIgOiAzOS44ODQ3MTk1LAogICAgICAg
403
+ ICAgICAgICAgICAibG5nIiA6IC00LjU3OTA3NjEKICAgICAgICAgICAgICAg
404
+ fQogICAgICAgICAgICB9CiAgICAgICAgIH0sCiAgICAgICAgICJ0eXBlcyIg
405
+ OiBbICJhZG1pbmlzdHJhdGl2ZV9hcmVhX2xldmVsXzIiLCAicG9saXRpY2Fs
406
+ IiBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAgImFkZHJlc3NfY29tcG9u
407
+ ZW50cyIgOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdf
408
+ bmFtZSIgOiAiQ29tdW5pZGFkIGRlIE1hZHJpZCIsCiAgICAgICAgICAgICAg
409
+ ICJzaG9ydF9uYW1lIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkIiwKICAgICAg
410
+ ICAgICAgICAgInR5cGVzIiA6IFsgImFkbWluaXN0cmF0aXZlX2FyZWFfbGV2
411
+ ZWxfMSIsICJwb2xpdGljYWwiIF0KICAgICAgICAgICAgfSwKICAgICAgICAg
412
+ ICAgewogICAgICAgICAgICAgICAibG9uZ19uYW1lIiA6ICJFc3Bhw7FhIiwK
413
+ ICAgICAgICAgICAgICAgInNob3J0X25hbWUiIDogIkVTIiwKICAgICAgICAg
414
+ ICAgICAgInR5cGVzIiA6IFsgImNvdW50cnkiLCAicG9saXRpY2FsIiBdCiAg
415
+ ICAgICAgICAgIH0KICAgICAgICAgXSwKICAgICAgICAgImZvcm1hdHRlZF9h
416
+ ZGRyZXNzIiA6ICJDb211bmlkYWQgZGUgTWFkcmlkLCBFc3Bhw7FhIiwKICAg
417
+ ICAgICAgImdlb21ldHJ5IiA6IHsKICAgICAgICAgICAgImJvdW5kcyIgOiB7
418
+ CiAgICAgICAgICAgICAgICJub3J0aGVhc3QiIDogewogICAgICAgICAgICAg
419
+ ICAgICAibGF0IiA6IDQxLjE2NTg0NDcwMDAwMDAxLAogICAgICAgICAgICAg
420
+ ICAgICAibG5nIiA6IC0zLjA1Mjk4MzMKICAgICAgICAgICAgICAgfSwKICAg
421
+ ICAgICAgICAgICAgInNvdXRod2VzdCIgOiB7CiAgICAgICAgICAgICAgICAg
422
+ ICJsYXQiIDogMzkuODg0NzE5NSwKICAgICAgICAgICAgICAgICAgImxuZyIg
423
+ OiAtNC41NzkwNzYxCiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwK
424
+ ICAgICAgICAgICAgImxvY2F0aW9uIiA6IHsKICAgICAgICAgICAgICAgImxh
425
+ dCIgOiA0MC40MTY3NTE1LAogICAgICAgICAgICAgICAibG5nIiA6IC0zLjcw
426
+ MzgzMjIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgImxvY2F0aW9uX3R5
427
+ cGUiIDogIkFQUFJPWElNQVRFIiwKICAgICAgICAgICAgInZpZXdwb3J0IiA6
428
+ IHsKICAgICAgICAgICAgICAgIm5vcnRoZWFzdCIgOiB7CiAgICAgICAgICAg
429
+ ICAgICAgICJsYXQiIDogNDEuMTY1ODQ0NzAwMDAwMDEsCiAgICAgICAgICAg
430
+ ICAgICAgICJsbmciIDogLTMuMDUyOTgzMwogICAgICAgICAgICAgICB9LAog
431
+ ICAgICAgICAgICAgICAic291dGh3ZXN0IiA6IHsKICAgICAgICAgICAgICAg
432
+ ICAgImxhdCIgOiAzOS44ODQ3MTk1LAogICAgICAgICAgICAgICAgICAibG5n
433
+ IiA6IC00LjU3OTA3NjEKICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9
434
+ CiAgICAgICAgIH0sCiAgICAgICAgICJ0eXBlcyIgOiBbICJhZG1pbmlzdHJh
435
+ dGl2ZV9hcmVhX2xldmVsXzEiLCAicG9saXRpY2FsIiBdCiAgICAgIH0sCiAg
436
+ ICAgIHsKICAgICAgICAgImFkZHJlc3NfY29tcG9uZW50cyIgOiBbCiAgICAg
437
+ ICAgICAgIHsKICAgICAgICAgICAgICAgImxvbmdfbmFtZSIgOiAiRXNwYcOx
438
+ YSIsCiAgICAgICAgICAgICAgICJzaG9ydF9uYW1lIiA6ICJFUyIsCiAgICAg
439
+ ICAgICAgICAgICJ0eXBlcyIgOiBbICJjb3VudHJ5IiwgInBvbGl0aWNhbCIg
440
+ XQogICAgICAgICAgICB9CiAgICAgICAgIF0sCiAgICAgICAgICJmb3JtYXR0
441
+ ZWRfYWRkcmVzcyIgOiAiRXNwYcOxYSIsCiAgICAgICAgICJnZW9tZXRyeSIg
442
+ OiB7CiAgICAgICAgICAgICJib3VuZHMiIDogewogICAgICAgICAgICAgICAi
443
+ bm9ydGhlYXN0IiA6IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiA0My43
444
+ OTIzNzk1LAogICAgICAgICAgICAgICAgICAibG5nIiA6IDQuMzI3NzgzOTk5
445
+ OTk5OTk5CiAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICJzb3V0
446
+ aHdlc3QiIDogewogICAgICAgICAgICAgICAgICAibGF0IiA6IDI3LjYzNzc4
447
+ OTQsCiAgICAgICAgICAgICAgICAgICJsbmciIDogLTE4LjE2MDc4ODEKICAg
448
+ ICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICAibG9j
449
+ YXRpb24iIDogewogICAgICAgICAgICAgICAibGF0IiA6IDQwLjQ2MzY2NzAw
450
+ MDAwMDAxLAogICAgICAgICAgICAgICAibG5nIiA6IC0zLjc0OTIyCiAgICAg
451
+ ICAgICAgIH0sCiAgICAgICAgICAgICJsb2NhdGlvbl90eXBlIiA6ICJBUFBS
452
+ T1hJTUFURSIsCiAgICAgICAgICAgICJ2aWV3cG9ydCIgOiB7CiAgICAgICAg
453
+ ICAgICAgICJub3J0aGVhc3QiIDogewogICAgICAgICAgICAgICAgICAibGF0
454
+ IiA6IDQ1LjI0NCwKICAgICAgICAgICAgICAgICAgImxuZyIgOiA1LjA5OAog
455
+ ICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAic291dGh3ZXN0IiA6
456
+ IHsKICAgICAgICAgICAgICAgICAgImxhdCIgOiAzNS4xNzMwMDAwMDAwMDAw
457
+ MSwKICAgICAgICAgICAgICAgICAgImxuZyIgOiAtMTIuNTI0CiAgICAgICAg
458
+ ICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICB9LAogICAgICAgICAi
459
+ dHlwZXMiIDogWyAiY291bnRyeSIsICJwb2xpdGljYWwiIF0KICAgICAgfQog
460
+ ICBdLAogICAic3RhdHVzIiA6ICJPSyIKfQo=
461
+ http_version:
462
+ recorded_at: Fri, 27 Dec 2013 11:24:21 GMT
463
+ recorded_with: VCR 2.8.0
@@ -76,19 +76,6 @@ module Geokit
76
76
  # The Geocoder base class which defines the interface to be used by all
77
77
  # other geocoders.
78
78
  class Geocoder
79
- def self.config(*attrs)
80
- attrs.each do |attr|
81
- class_eval <<-METHOD
82
- @@#{attr} = nil
83
- def self.#{attr}=(value)
84
- @@#{attr} = value
85
- end
86
- def self.#{attr}
87
- @@#{attr}
88
- end
89
- METHOD
90
- end
91
- end
92
79
  # Main method which calls the do_geocode template method which subclasses
93
80
  # are responsible for implementing. Returns a populated GeoLoc or an
94
81
  # empty one with a failed success code.
@@ -104,9 +91,31 @@ module Geokit
104
91
  # Main method which calls the do_reverse_geocode template method which subclasses
105
92
  # are responsible for implementing. Returns a populated GeoLoc or an
106
93
  # empty one with a failed success code.
107
- def self.reverse_geocode(latlng)
108
- logger.debug "#{provider_name} geocoding. latlng: #{latlng}"
109
- do_reverse_geocode(latlng) || GeoLoc.new
94
+ def self.reverse_geocode(latlng, *args)
95
+ logger.debug "#{provider_name} geocoding. latlng: #{latlng}, args #{args}"
96
+ do_reverse_geocode(latlng, *args) || GeoLoc.new
97
+ end
98
+
99
+ protected
100
+
101
+ def self.logger
102
+ Geokit::Geocoders::logger
103
+ end
104
+
105
+ private
106
+
107
+ def self.config(*attrs)
108
+ attrs.each do |attr|
109
+ class_eval <<-METHOD
110
+ @@#{attr} = nil
111
+ def self.#{attr}=(value)
112
+ @@#{attr} = value
113
+ end
114
+ def self.#{attr}
115
+ @@#{attr}
116
+ end
117
+ METHOD
118
+ end
110
119
  end
111
120
 
112
121
  def self.new_loc
@@ -130,14 +139,6 @@ module Geokit
130
139
  GeoLoc.new
131
140
  end
132
141
 
133
- protected
134
-
135
- def self.logger
136
- Geokit::Geocoders::logger
137
- end
138
-
139
- private
140
-
141
142
  # Wraps the geocoder call around a proxy if necessary.
142
143
  def self.do_get(url)
143
144
  uri = URI.parse(url)
@@ -4,18 +4,16 @@ module Geokit
4
4
  config :client_id, :cryptographic_key, :channel
5
5
 
6
6
  private
7
- # Template method which does the reverse-geocode lookup.
8
- def self.do_reverse_geocode(latlng)
7
+ # ==== OPTIONS
8
+ # * :language - See: https://developers.google.com/maps/documentation/geocoding
9
+ def self.do_reverse_geocode(latlng, options = {})
9
10
  latlng=LatLng.normalize(latlng)
10
- url = submit_url("/maps/api/geocode/json?sensor=false&latlng=#{Geokit::Inflector::url_escape(latlng.ll)}")
11
+ url = submit_url("latlng=#{Geokit::Inflector::url_escape(latlng.ll)}", options)
11
12
  process :json, url
12
13
  end
13
14
 
14
- # Template method which does the geocode lookup.
15
- #
16
- # Supports viewport/country code biasing
17
- #
18
15
  # ==== OPTIONS
16
+ # * :language - See: https://developers.google.com/maps/documentation/geocoding
19
17
  # * :bias - This option makes the Google Geocoder return results biased to a particular
20
18
  # country or viewport. Country code biasing is achieved by passing the ccTLD
21
19
  # ('uk' for .co.uk, for example) as a :bias value. For a list of ccTLD's,
@@ -38,13 +36,9 @@ module Geokit
38
36
  # Geokit::Geocoders::GoogleGeocoder.geocode('Winnetka', :bias => bounds).state # => 'CA'
39
37
  def self.do_geocode(address, options = {})
40
38
  bias_str = options[:bias] ? construct_bias_string_from_options(options[:bias]) : ''
41
- language_str = options[:language] ? "&language=#{options[:language]}" : ''
42
39
  address_str = address.is_a?(GeoLoc) ? address.to_geocodeable_s : address
43
- url = submit_url("/maps/api/geocode/json?sensor=false&address=#{Geokit::Inflector::url_escape(address_str)}#{bias_str}#{language_str}")
44
-
45
- res = call_geocoder_service(url)
46
- return GeoLoc.new if !res.is_a?(Net::HTTPSuccess)
47
- parse :json, res.body
40
+ url = submit_url("address=#{Geokit::Inflector::url_escape(address_str)}#{bias_str}", options)
41
+ process :json, url
48
42
  end
49
43
 
50
44
  # This code comes from Googles Examples
@@ -61,7 +55,9 @@ module Geokit
61
55
  end
62
56
 
63
57
 
64
- def self.submit_url(query_string)
58
+ def self.submit_url(query_string, options = {})
59
+ language_str = options[:language] ? "&language=#{options[:language]}" : ''
60
+ query_string = "/maps/api/geocode/json?sensor=false&#{query_string}#{language_str}"
65
61
  if client_id && cryptographic_key
66
62
  channel_string = channel ? "&channel=#{channel}" : ''
67
63
  urlToSign = query_string + "&client=#{client_id}" + channel_string
@@ -22,14 +22,14 @@ module Geokit
22
22
  #
23
23
  # The failover approach is crucial for production-grade apps, but is rarely used.
24
24
  # 98% of your geocoding calls will be successful with the first call
25
- def self.do_geocode(address, options = {})
25
+ def self.do_geocode(address, *args)
26
26
  geocode_ip = /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/.match(address)
27
27
  provider_order = geocode_ip ? Geokit::Geocoders::ip_provider_order : Geokit::Geocoders::provider_order
28
28
 
29
29
  provider_order.each do |provider|
30
30
  klass = geocoder(provider)
31
31
  begin
32
- res = klass.send :geocode, address, options
32
+ res = klass.send :geocode, address, *args
33
33
  return res if res.success?
34
34
  rescue => e
35
35
  logger.error("An error has occurred during geocoding: #{e}\nAddress: #{address}. Provider: #{provider}")
@@ -1,3 +1,3 @@
1
1
  module Geokit
2
- VERSION = '1.8.2'
2
+ VERSION = '1.8.3'
3
3
  end
@@ -30,10 +30,10 @@ class GoogleGeocoderTest < BaseGeocoderTest #:nodoc: all
30
30
  def test_google_signature_and_url
31
31
  Geokit::Geocoders::GoogleGeocoder.client_id = 'clientID'
32
32
  Geokit::Geocoders::GoogleGeocoder.cryptographic_key = 'vNIXE0xscrmjlyV-12Nj_BvUPaw='
33
- url = Geokit::Geocoders::GoogleGeocoder.send(:submit_url, '/maps/api/geocode/json?address=New+York&sensor=false')
33
+ url = Geokit::Geocoders::GoogleGeocoder.send(:submit_url, 'address=New+York')
34
34
  Geokit::Geocoders::GoogleGeocoder.client_id = nil
35
35
  Geokit::Geocoders::GoogleGeocoder.cryptographic_key = nil
36
- assert_equal 'http://maps.googleapis.com/maps/api/geocode/json?address=New+York&sensor=false&client=clientID&signature=KrU1TzVQM7Ur0i8i7K3huiw3MsA=', url
36
+ assert_equal 'http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=New+York&client=clientID&signature=9mevp7SoVsSKzF9nj-vApMYbatg=', url
37
37
  end
38
38
 
39
39
  def test_google_full_address
@@ -189,6 +189,17 @@ class GoogleGeocoderTest < BaseGeocoderTest #:nodoc: all
189
189
  end
190
190
  end
191
191
 
192
+ def test_reverse_geocode_language
193
+ VCR.use_cassette('google_reverse_madrid_es') do
194
+ url = "http://maps.google.com/maps/api/geocode/json?sensor=false&latlng=40.416%2C-3.703&language=es"
195
+ TestHelper.expects(:last_url).with(url)
196
+ language_result = Geokit::Geocoders::GoogleGeocoder.reverse_geocode('40.416,-3.703', :language => 'es')
197
+
198
+ assert_equal 'ES', language_result.country_code
199
+ assert_equal 'Madrid', language_result.city
200
+ end
201
+ end
202
+
192
203
  def test_country_code_biasing
193
204
  VCR.use_cassette('google_country_code_biased_result') do
194
205
  url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=Syracuse&region=it"
@@ -1,6 +1,6 @@
1
1
  require File.join(File.dirname(__FILE__), 'helper')
2
2
 
3
- Geokit::Geocoders::provider_order=[:google,:yahoo,:us]
3
+ Geokit::Geocoders::provider_order=[:google, :bing, :us]
4
4
 
5
5
  class MultiGeocoderTest < BaseGeocoderTest #:nodoc: all
6
6
 
@@ -10,27 +10,27 @@ class MultiGeocoderTest < BaseGeocoderTest #:nodoc: all
10
10
  end
11
11
 
12
12
  def test_successful_first
13
- Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address, {}).returns(@success)
13
+ Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@success)
14
14
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@address)
15
15
  end
16
16
 
17
17
  def test_failover
18
- Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
19
- Geokit::Geocoders::YahooGeocoder.expects(:geocode).with(@address, {}).returns(@success)
18
+ Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@failure)
19
+ Geokit::Geocoders::BingGeocoder.expects(:geocode).with(@address).returns(@success)
20
20
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@address)
21
21
  end
22
22
 
23
23
  def test_double_failover
24
- Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
25
- Geokit::Geocoders::YahooGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
26
- Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address, {}).returns(@success)
24
+ Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@failure)
25
+ Geokit::Geocoders::BingGeocoder.expects(:geocode).with(@address).returns(@failure)
26
+ Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address).returns(@success)
27
27
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@address)
28
28
  end
29
29
 
30
30
  def test_failure
31
- Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
32
- Geokit::Geocoders::YahooGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
33
- Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address, {}).returns(@failure)
31
+ Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@failure)
32
+ Geokit::Geocoders::BingGeocoder.expects(:geocode).with(@address).returns(@failure)
33
+ Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address).returns(@failure)
34
34
  assert_equal @failure, Geokit::Geocoders::MultiGeocoder.geocode(@address)
35
35
  end
36
36
 
@@ -45,7 +45,7 @@ class MultiGeocoderTest < BaseGeocoderTest #:nodoc: all
45
45
  t1, t2 = Geokit::Geocoders.provider_order, Geokit::Geocoders.ip_provider_order # will need to reset after
46
46
  Geokit::Geocoders.provider_order = [:google]
47
47
  Geokit::Geocoders.ip_provider_order = [:geo_plugin]
48
- Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with("", {}).returns(@failure)
48
+ Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with("").returns(@failure)
49
49
  Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).never
50
50
  assert_equal @failure, Geokit::Geocoders::MultiGeocoder.geocode("")
51
51
  Geokit::Geocoders.provider_order, Geokit::Geocoders.ip_provider_order = t1, t2 # reset to orig values
@@ -58,20 +58,20 @@ class MultiGeocoderTest < BaseGeocoderTest #:nodoc: all
58
58
 
59
59
  def test_reverse_geocode_failover
60
60
  Geokit::Geocoders::GoogleGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
61
- Geokit::Geocoders::YahooGeocoder.expects(:reverse_geocode).with(@latlng).returns(@success)
61
+ Geokit::Geocoders::BingGeocoder.expects(:reverse_geocode).with(@latlng).returns(@success)
62
62
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.reverse_geocode(@latlng)
63
63
  end
64
64
 
65
65
  def test_reverse_geocode_double_failover
66
66
  Geokit::Geocoders::GoogleGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
67
- Geokit::Geocoders::YahooGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
67
+ Geokit::Geocoders::BingGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
68
68
  Geokit::Geocoders::UsGeocoder.expects(:reverse_geocode).with(@latlng).returns(@success)
69
69
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.reverse_geocode(@latlng)
70
70
  end
71
71
 
72
72
  def test_reverse_geocode_failure
73
73
  Geokit::Geocoders::GoogleGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
74
- Geokit::Geocoders::YahooGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
74
+ Geokit::Geocoders::BingGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
75
75
  Geokit::Geocoders::UsGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
76
76
  assert_equal @failure, Geokit::Geocoders::MultiGeocoder.reverse_geocode(@latlng)
77
77
  end
@@ -12,19 +12,19 @@ class MultiIpGeocoderTest < BaseGeocoderTest #:nodoc: all
12
12
  end
13
13
 
14
14
  def test_successful_first
15
- Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address, {}).returns(@success)
15
+ Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address).returns(@success)
16
16
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@ip_address)
17
17
  end
18
18
 
19
19
  def test_failover
20
- Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address, {}).returns(@failure)
21
- Geokit::Geocoders::IpGeocoder.expects(:geocode).with(@ip_address, {}).returns(@success)
20
+ Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address).returns(@failure)
21
+ Geokit::Geocoders::IpGeocoder.expects(:geocode).with(@ip_address).returns(@success)
22
22
  assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@ip_address)
23
23
  end
24
24
 
25
25
  def test_failure
26
- Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address, {}).returns(@failure)
27
- Geokit::Geocoders::IpGeocoder.expects(:geocode).with(@ip_address, {}).returns(@failure)
26
+ Geokit::Geocoders::GeoPluginGeocoder.expects(:geocode).with(@ip_address).returns(@failure)
27
+ Geokit::Geocoders::IpGeocoder.expects(:geocode).with(@ip_address).returns(@failure)
28
28
  assert_equal @failure, Geokit::Geocoders::MultiGeocoder.geocode(@ip_address)
29
29
  end
30
30
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Michael Noack
@@ -11,11 +12,12 @@ authors:
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2013-12-26 00:00:00.000000000 Z
15
+ date: 2013-12-31 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: multi_json
18
19
  requirement: !ruby/object:Gem::Requirement
20
+ none: false
19
21
  requirements:
20
22
  - - ! '>='
21
23
  - !ruby/object:Gem::Version
@@ -23,6 +25,7 @@ dependencies:
23
25
  type: :runtime
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
30
  - - ! '>='
28
31
  - !ruby/object:Gem::Version
@@ -30,6 +33,7 @@ dependencies:
30
33
  - !ruby/object:Gem::Dependency
31
34
  name: bundler
32
35
  requirement: !ruby/object:Gem::Requirement
36
+ none: false
33
37
  requirements:
34
38
  - - ! '>'
35
39
  - !ruby/object:Gem::Version
@@ -37,6 +41,7 @@ dependencies:
37
41
  type: :development
38
42
  prerelease: false
39
43
  version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
40
45
  requirements:
41
46
  - - ! '>'
42
47
  - !ruby/object:Gem::Version
@@ -44,6 +49,7 @@ dependencies:
44
49
  - !ruby/object:Gem::Dependency
45
50
  name: simplecov
46
51
  requirement: !ruby/object:Gem::Requirement
52
+ none: false
47
53
  requirements:
48
54
  - - ! '>='
49
55
  - !ruby/object:Gem::Version
@@ -51,6 +57,7 @@ dependencies:
51
57
  type: :development
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
54
61
  requirements:
55
62
  - - ! '>='
56
63
  - !ruby/object:Gem::Version
@@ -58,6 +65,7 @@ dependencies:
58
65
  - !ruby/object:Gem::Dependency
59
66
  name: simplecov-rcov
60
67
  requirement: !ruby/object:Gem::Requirement
68
+ none: false
61
69
  requirements:
62
70
  - - ! '>='
63
71
  - !ruby/object:Gem::Version
@@ -65,6 +73,7 @@ dependencies:
65
73
  type: :development
66
74
  prerelease: false
67
75
  version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
68
77
  requirements:
69
78
  - - ! '>='
70
79
  - !ruby/object:Gem::Version
@@ -72,6 +81,7 @@ dependencies:
72
81
  - !ruby/object:Gem::Dependency
73
82
  name: rake
74
83
  requirement: !ruby/object:Gem::Requirement
84
+ none: false
75
85
  requirements:
76
86
  - - ! '>='
77
87
  - !ruby/object:Gem::Version
@@ -79,6 +89,7 @@ dependencies:
79
89
  type: :development
80
90
  prerelease: false
81
91
  version_requirements: !ruby/object:Gem::Requirement
92
+ none: false
82
93
  requirements:
83
94
  - - ! '>='
84
95
  - !ruby/object:Gem::Version
@@ -86,6 +97,7 @@ dependencies:
86
97
  - !ruby/object:Gem::Dependency
87
98
  name: mocha
88
99
  requirement: !ruby/object:Gem::Requirement
100
+ none: false
89
101
  requirements:
90
102
  - - ! '>='
91
103
  - !ruby/object:Gem::Version
@@ -93,6 +105,7 @@ dependencies:
93
105
  type: :development
94
106
  prerelease: false
95
107
  version_requirements: !ruby/object:Gem::Requirement
108
+ none: false
96
109
  requirements:
97
110
  - - ! '>='
98
111
  - !ruby/object:Gem::Version
@@ -100,6 +113,7 @@ dependencies:
100
113
  - !ruby/object:Gem::Dependency
101
114
  name: coveralls
102
115
  requirement: !ruby/object:Gem::Requirement
116
+ none: false
103
117
  requirements:
104
118
  - - ! '>='
105
119
  - !ruby/object:Gem::Version
@@ -107,6 +121,7 @@ dependencies:
107
121
  type: :development
108
122
  prerelease: false
109
123
  version_requirements: !ruby/object:Gem::Requirement
124
+ none: false
110
125
  requirements:
111
126
  - - ! '>='
112
127
  - !ruby/object:Gem::Version
@@ -114,6 +129,7 @@ dependencies:
114
129
  - !ruby/object:Gem::Dependency
115
130
  name: vcr
116
131
  requirement: !ruby/object:Gem::Requirement
132
+ none: false
117
133
  requirements:
118
134
  - - ! '>='
119
135
  - !ruby/object:Gem::Version
@@ -121,6 +137,7 @@ dependencies:
121
137
  type: :development
122
138
  prerelease: false
123
139
  version_requirements: !ruby/object:Gem::Requirement
140
+ none: false
124
141
  requirements:
125
142
  - - ! '>='
126
143
  - !ruby/object:Gem::Version
@@ -128,6 +145,7 @@ dependencies:
128
145
  - !ruby/object:Gem::Dependency
129
146
  name: webmock
130
147
  requirement: !ruby/object:Gem::Requirement
148
+ none: false
131
149
  requirements:
132
150
  - - ! '>='
133
151
  - !ruby/object:Gem::Version
@@ -135,6 +153,7 @@ dependencies:
135
153
  type: :development
136
154
  prerelease: false
137
155
  version_requirements: !ruby/object:Gem::Requirement
156
+ none: false
138
157
  requirements:
139
158
  - - ! '>='
140
159
  - !ruby/object:Gem::Version
@@ -169,6 +188,7 @@ files:
169
188
  - fixtures/vcr_cassettes/google_language_response_fr.yml
170
189
  - fixtures/vcr_cassettes/google_multi.yml
171
190
  - fixtures/vcr_cassettes/google_reverse_madrid.yml
191
+ - fixtures/vcr_cassettes/google_reverse_madrid_es.yml
172
192
  - fixtures/vcr_cassettes/ripe_geocode.yml
173
193
  - fixtures/vcr_cassettes/ripe_geocode_au.yml
174
194
  - fixtures/vcr_cassettes/yahoo_city.yml
@@ -228,7 +248,6 @@ files:
228
248
  homepage: http://github.com/geokit/geokit
229
249
  licenses:
230
250
  - MIT
231
- metadata: {}
232
251
  post_install_message:
233
252
  rdoc_options:
234
253
  - --main
@@ -236,20 +255,28 @@ rdoc_options:
236
255
  require_paths:
237
256
  - lib
238
257
  required_ruby_version: !ruby/object:Gem::Requirement
258
+ none: false
239
259
  requirements:
240
260
  - - ! '>='
241
261
  - !ruby/object:Gem::Version
242
262
  version: '0'
263
+ segments:
264
+ - 0
265
+ hash: -1638925415436466829
243
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
+ none: false
244
268
  requirements:
245
269
  - - ! '>='
246
270
  - !ruby/object:Gem::Version
247
271
  version: '0'
272
+ segments:
273
+ - 0
274
+ hash: -1638925415436466829
248
275
  requirements: []
249
276
  rubyforge_project:
250
- rubygems_version: 2.1.11
277
+ rubygems_version: 1.8.25
251
278
  signing_key:
252
- specification_version: 4
279
+ specification_version: 3
253
280
  summary: ! 'Geokit: encoding and distance calculation gem'
254
281
  test_files:
255
282
  - test/helper.rb
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzdhNTJlNWE1YTg5MWI5MjMyOTRjMmNhOTQ0YzdmZmU3MzVmNzVkNA==
5
- data.tar.gz: !binary |-
6
- OTE1ZTA5NTg4NmU3NDdjZWNkZWM0ZmVhYmE3NjkzYWIzMzMxMGI1ZQ==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- ODdlMDUwNjQxNzk0MDJhODNmZGRlMzYzNDUyZmRiNDYwZDU0ZWYzOGUxNGU4
10
- MWIxMTc3MDQ3ZTc1NDM5OTI0MzUxMjVmOTNkODliN2M5M2M1ZTM0NDE4ZTRh
11
- OGIxN2ZlMGYxN2UxNGFkMDU5YzU3ZGUyNDQ1N2JkYjNhNThmZTA=
12
- data.tar.gz: !binary |-
13
- YTQyNWVlOTk5OWY4ODkxNjMxNDk0NDhhZGM1MGZiYjE5ODBlZDEzZGI0Zjc4
14
- ZDBkNzQ3MTJmMWU5M2JjMjc5YzQ4ODM3NzBjYWNkZjEyY2ZhZDAwM2ExOTNk
15
- NTM4M2M4ZDNhYTZkNDMyYzM5OGZiODJiNDBkNTJkMmU2Y2I1NTc=