csv_country_selector 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module CsvCountrySelector
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5"
5
5
  end
@@ -8,7 +8,7 @@ module CsvCountrySelector
8
8
 
9
9
  #CSV Tabelle als Masterfreferenz
10
10
  #Lnd;Kfz;Sprache;ISO-Code;Kurzbez;Bezeichnung;Nationalität;Bezeichnung lang
11
- @@codes = CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].encode('UTF-8') => b[5].encode('UTF-8')})}
11
+ @@codes = CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
12
12
 
13
13
  def self.short_name_for(name)
14
14
  @@codes.select{|k,v| v.downcase == name.downcase}.try(:first).try(:first)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_country_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: