safai 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/safai/address.rb +7 -7
  2. metadata +1 -1
data/lib/safai/address.rb CHANGED
@@ -32,8 +32,8 @@ class Safai::Address
32
32
  str = (u.addressline.blank? ? "" : u.addressline + ", ")
33
33
  str = str + (u.city.blank? ? "" : u.city + ", ")
34
34
  str = str + (u.zipcode.blank? ? "" : u.zipcode + ", ")
35
- c = Safai::Address.country_to_s(u.country_code)
36
- s = Safai::Address.state_to_s(u.country_code, u.subregion_code)
35
+ c = Safai::Address.country_to_s(u.country_iso2)
36
+ s = Safai::Address.state_to_s(u.country_iso2, u.subregion_iso2)
37
37
  str = str + (s.blank? ? "" : s + ", ")
38
38
  str = str + (c.blank? ? "" : c)
39
39
  return str
@@ -42,8 +42,8 @@ class Safai::Address
42
42
  def self.gist(u)
43
43
  str = ""
44
44
  str = (u.city.blank? ? "" : u.city + ", ")
45
- c = Safai::Address.country_to_s(u.country_code)
46
- s = Safai::Address.state_to_s(u.country_code, u.subregion_code)
45
+ c = Safai::Address.country_to_s(u.country_iso2)
46
+ s = Safai::Address.state_to_s(u.country_iso2, u.subregion_iso2)
47
47
  str = str + (s.blank? ? "" : s + ", ")
48
48
  str = str + (c.blank? ? "" : c)
49
49
  return str
@@ -51,8 +51,8 @@ class Safai::Address
51
51
 
52
52
  def self.gist_no_city(u)
53
53
  str = ""
54
- c = Safai::Address.country_to_s(u.country_code)
55
- s = Safai::Address.state_to_s(u.country_code, u.subregion_code)
54
+ c = Safai::Address.country_to_s(u.country_iso2)
55
+ s = Safai::Address.state_to_s(u.country_iso2, u.subregion_iso2)
56
56
  str = str + (s.blank? ? "" : s + ", ")
57
57
  str = str + (c.blank? ? "" : c)
58
58
  return str
@@ -63,7 +63,7 @@ class Safai::Address
63
63
  def self.map(u, h=300, w=95)
64
64
  str = ""
65
65
  str = (u.city.blank? ? "" : u.city + "++")
66
- c = Safai::Address.country_to_s(u.country_code)
66
+ c = Safai::Address.country_to_s(u.country_iso2)
67
67
  str = str + (c.blank? ? "" : c)
68
68
  return str == "" ? nil : "https://maps.google.com/maps/api/staticmap?visible=#{str}&size=#{h.to_s}x#{w.to_s}&sensor=false&maptype=terrain&markers=size:small|color:red|#{str}"
69
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: