csv_country_selector 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74f70201250920891b6cab83e157659e4b487104
4
- data.tar.gz: 0438c509265e775e9d7f6c3b096d6f40c61af12e
3
+ metadata.gz: 9e019dd3d6da9a8dc24ab57908467ba1ba03868f
4
+ data.tar.gz: 66438dc20939ad9ba9e28944f0350af414798a65
5
5
  SHA512:
6
- metadata.gz: 9321a989a5d9dc37ead34aaf9a1cdfc505ff83424a50a41c4e3ef2b649b469699038375fd8b2bffc17c1a4894a15350481f69c12b42790eb78fe506377aca6de
7
- data.tar.gz: d41bd8a9bd24b38093dd4e4db080cf685298c5fb8ae13f384b0f76c0c320fff832153630746dbe960756836a89c33812028983efa986a381b5390ed7f6c85c5b
6
+ metadata.gz: 7f49791280a557ff531219add599a3b9b1e84bbb19fa3f33ea466fa5f263b7f429f38532315bdd62074bb43678001236e85f71700b97e4402438eeb5cdd12af6
7
+ data.tar.gz: 836f4d4a2d32577d02708e39a3dd3650e592f02612147964c21855386c1c3aba182382c92e4f350fb8047cf64ef632fbec8fdb89e68285b3702659edbd467db9
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ["Marco Metz"]
12
12
  spec.email = ["marco.metz@gmail.com"]
13
13
  spec.summary = %q{Country List with long and short names}
14
- spec.description = %q{Country list based on a csv file wit long an short names for Dropdowns and selections}
14
+ spec.description = %q{Country list based on a csv file with long an short names for Dropdowns and selections}
15
15
  spec.homepage = "https://github.com/ikuseiGmbH/csv_country_selector"
16
16
  spec.license = "MIT"
17
17
 
@@ -6,38 +6,38 @@ require "csv_country_selector/version"
6
6
  module CsvCountrySelector
7
7
  class Country
8
8
 
9
- #CSV Tabelle als Masterfreferenz
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].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
9
+ #CSV Tabelle als Masterfreferenz
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].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
12
12
 
13
- #CSV Tabelle der Europäischen Länder
14
- #Lnd;Kfz;Sprache;ISO-Code;Kurzbez;Bezeichnung;Nationalität;Bezeichnung lang
15
- @@eu_codes = ::CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/eu_countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
16
-
17
- def self.short_name_for(name)
18
- @@codes.select{|k,v| v.downcase == name.downcase}.try(:first).try(:first)
19
- end
13
+ #CSV Tabelle der Europäischen Länder
14
+ #Lnd;Kfz;Sprache;ISO-Code;Kurzbez;Bezeichnung;Nationalität;Bezeichnung lang
15
+ @@eu_codes = ::CSV.read("#{File.dirname(File.expand_path(__FILE__))}/csv_country_selector/eu_countries.csv", :col_sep => ";").inject({}){|a,b| a.merge!({b[0].force_encoding('UTF-8') => b[5].force_encoding('UTF-8')})}
20
16
 
17
+ def self.short_name_for(name)
18
+ @@codes.select{|k,v| v.downcase == name.downcase}.try(:first).try(:first)
19
+ end
21
20
 
22
- def self.long_name_for(name)
23
- @@codes.select{|k,v| k.downcase == name.downcase}.try(:first).try(:last)
24
- end
25
21
 
26
- def self.long_list
27
- @@codes.values
28
- end
22
+ def self.long_name_for(name)
23
+ @@codes.select{|k,v| k.downcase == name.downcase}.try(:first).try(:last)
24
+ end
29
25
 
30
- def self.short_list
31
- @@codes.values
32
- end
26
+ def self.long_list
27
+ @@codes.values
28
+ end
33
29
 
34
- def self.codes
35
- @@codes
36
- end
30
+ def self.short_list
31
+ @@codes.values
32
+ end
37
33
 
38
- def is_in_eu?(country_short_name)
39
- @@eu_codes.values.include?(country_short_name)
40
- end
34
+ def self.codes
35
+ @@codes
36
+ end
41
37
 
38
+ def self.is_in_eu?(country_short_name)
39
+ @@eu_codes.values.include?(country_short_name)
42
40
  end
41
+
42
+ end
43
43
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module CsvCountrySelector
4
- VERSION = "1.0.7"
4
+ VERSION = "1.0.8"
5
5
  end
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.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Metz
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Country list based on a csv file wit long an short names for Dropdowns
41
+ description: Country list based on a csv file with long an short names for Dropdowns
42
42
  and selections
43
43
  email:
44
44
  - marco.metz@gmail.com