Style canges and enabled Spanish
This commit is contained in:
@@ -48,6 +48,7 @@ Before('@javascript') do
|
||||
end
|
||||
|
||||
Before do
|
||||
# user_agent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
|
||||
user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A"
|
||||
#request.stub!(:user_agent).and_return()
|
||||
#controller.request.stub!(:user_agent).and_return(user_agent)
|
||||
@@ -111,7 +112,14 @@ def create_org(name = nil, location = nil)
|
||||
found_location = nil
|
||||
if location.present?
|
||||
cache_file = File.join(File.dirname(__FILE__), 'location_cache.yml')
|
||||
cache = File.exists?(cache_file) ? YAML.load_file(cache_file) : {}
|
||||
cache = {}
|
||||
if File.exists?(cache_file)
|
||||
begin
|
||||
cache = YAML.load_file(cache_file)
|
||||
rescue
|
||||
# get rid of the cache if there's an error
|
||||
end
|
||||
end
|
||||
l = cache[location]
|
||||
if l.nil?
|
||||
l = Geocoder.search(location).first
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 45.96934
|
||||
lng: -64.31345000000002
|
||||
lng: -64.31372929999999
|
||||
southwest:
|
||||
lat: 45.86707
|
||||
lng: -64.4562439
|
||||
@@ -92,7 +92,7 @@
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 45.96934
|
||||
lng: -64.31345000000002
|
||||
lng: -64.31372929999999
|
||||
southwest:
|
||||
lat: 45.86707
|
||||
lng: -64.4562439
|
||||
@@ -102,248 +102,3 @@
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in Anchorage AK": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: Anchorage
|
||||
short_name: Anchorage
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Anchorage
|
||||
short_name: Anchorage
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Alaska
|
||||
short_name: AK
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: United States
|
||||
short_name: US
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: Anchorage, AK, USA
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 61.4838912
|
||||
lng: -148.460007
|
||||
southwest:
|
||||
lat: 60.733791
|
||||
lng: -150.2862833
|
||||
location:
|
||||
lat: 61.2180556
|
||||
lng: -149.9002778
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 61.4838912
|
||||
lng: -148.460007
|
||||
southwest:
|
||||
lat: 60.733791
|
||||
lng: -150.2862833
|
||||
partial_match: true
|
||||
place_id: ChIJQT-zBHaRyFYR42iEp1q6fSU
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in San Marcos TX": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: San Marcos
|
||||
short_name: San Marcos
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Hays County
|
||||
short_name: Hays County
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Texas
|
||||
short_name: TX
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: United States
|
||||
short_name: US
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: San Marcos, TX, USA
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 29.9605819
|
||||
lng: -97.8419149
|
||||
southwest:
|
||||
lat: 29.777154
|
||||
lng: -98.012087
|
||||
location:
|
||||
lat: 29.8832749
|
||||
lng: -97.9413941
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 29.9605819
|
||||
lng: -97.8419149
|
||||
southwest:
|
||||
lat: 29.777154
|
||||
lng: -98.012087
|
||||
partial_match: true
|
||||
place_id: ChIJWUZBNCqnXIYRJzGOU2wzOi8
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in Guadalajara Mexico": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: Guadalajara
|
||||
short_name: Guadalajara
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Guadalajara
|
||||
short_name: Guadalajara
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Jalisco
|
||||
short_name: Jal.
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: Mexico
|
||||
short_name: MX
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: Guadalajara, Jalisco, Mexico
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 20.7438464
|
||||
lng: -103.2637617
|
||||
southwest:
|
||||
lat: 20.6037373
|
||||
lng: -103.4070646
|
||||
location:
|
||||
lat: 20.6596988
|
||||
lng: -103.3496092
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 20.7438464
|
||||
lng: -103.2637617
|
||||
southwest:
|
||||
lat: 20.6037373
|
||||
lng: -103.4070646
|
||||
partial_match: true
|
||||
place_id: ChIJm9MvtYyxKIQRUFeGvwKTPdY
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in Portland OR": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: Portland
|
||||
short_name: Portland
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Multnomah County
|
||||
short_name: Multnomah County
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Oregon
|
||||
short_name: OR
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: United States
|
||||
short_name: US
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: Portland, OR, USA
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 45.6524799
|
||||
lng: -122.4718489
|
||||
southwest:
|
||||
lat: 45.432393
|
||||
lng: -122.8369952
|
||||
location:
|
||||
lat: 45.5230622
|
||||
lng: -122.6764816
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 45.6524799
|
||||
lng: -122.4718489
|
||||
southwest:
|
||||
lat: 45.432393
|
||||
lng: -122.8369952
|
||||
partial_match: true
|
||||
place_id: ChIJJ3SpfQsLlVQRkYXR9ua5Nhw
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
" in Boise ID": !ruby/object:Geocoder::Result::Google
|
||||
data:
|
||||
address_components:
|
||||
- long_name: Boise
|
||||
short_name: Boise
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
- long_name: Ada County
|
||||
short_name: Ada County
|
||||
types:
|
||||
- administrative_area_level_2
|
||||
- political
|
||||
- long_name: Idaho
|
||||
short_name: ID
|
||||
types:
|
||||
- administrative_area_level_1
|
||||
- political
|
||||
- long_name: United States
|
||||
short_name: US
|
||||
types:
|
||||
- country
|
||||
- political
|
||||
formatted_address: Boise, ID, USA
|
||||
geometry:
|
||||
bounds:
|
||||
northeast:
|
||||
lat: 43.6898951
|
||||
lng: -116.101909
|
||||
southwest:
|
||||
lat: 43.511717
|
||||
lng: -116.3658869
|
||||
location:
|
||||
lat: 43.6187102
|
||||
lng: -116.2146068
|
||||
location_type: APPROXIMATE
|
||||
viewport:
|
||||
northeast:
|
||||
lat: 43.6898951
|
||||
lng: -116.101909
|
||||
southwest:
|
||||
lat: 43.511717
|
||||
lng: -116.3658869
|
||||
partial_match: true
|
||||
place_id: ChIJnbRH6XLxrlQRm51nNpuYW5o
|
||||
types:
|
||||
- locality
|
||||
- political
|
||||
cache_hit:
|
||||
|
||||
Reference in New Issue
Block a user