localized_country_select 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -64,9 +64,9 @@ namespace :import do
|
|
64
64
|
countries = []
|
65
65
|
doc.search("//tr").each do |row|
|
66
66
|
n = row.search("td[@class='n']")
|
67
|
-
g = row.search("td
|
68
|
-
if n && n.inner_html =~ /NamesTerritories/ && g.inner_html =~ /^[A-Z]{2}/
|
69
|
-
code = g.inner_text
|
67
|
+
g = row.search("td")
|
68
|
+
if n && n.inner_html =~ /NamesTerritories/ && g.count==7 && g[4].inner_html =~ /^[A-Z]{2}/
|
69
|
+
code = g[4].inner_text
|
70
70
|
code = code[-code.size, 2]
|
71
71
|
name = row.search("td[@class='v']").inner_text
|
72
72
|
countries << { :code => code.to_sym, :name => name.to_s }
|
@@ -74,6 +74,7 @@ namespace :import do
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
puts "\n\n... imported countries: #{countries.count}"
|
77
|
+
#puts countries.sort{|a,b| a[:code]<=>b[:code]}.inspect
|
77
78
|
|
78
79
|
|
79
80
|
# ----- Prepare the output format ------------------------------------------
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localized_country_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2013-
|
18
|
+
date: 2013-11-11 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: actionpack
|