i18n_country_select 1.1.5 → 1.1.6

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: d8562692fb90a88acb24002dd64a10b1e655b56d
4
- data.tar.gz: 09676b6c556cdc4eb2535f30c8668da1785e10c1
3
+ metadata.gz: 99c80dcbe9bf2130f1b09b3fb4408c4d9866bc5c
4
+ data.tar.gz: 63c54c634b5fc320032776936fbbf59c5488bc9f
5
5
  SHA512:
6
- metadata.gz: 55df1aa4207c059b9d9377eea6445760aea6f5831ceba4946eea14b721b71bd7e15b15f39e35e5cfcefe83639b2081ebd1086ebf0ef0217030f21e3f3cf0de3a
7
- data.tar.gz: 034814a5dbfd89be579e04ec968b0cf722aff7b948036d21cd01496899e7435f1008ce6b453f0cd6197fdff6b272aa31f6bbd86e5c51e5b69746f64d9217f28a
6
+ metadata.gz: c25106cf5ff9246de4c22b2e8e0dc0b622069155889ffc6fc013b3e420d6453422ad41afd3ead868486d6791c04b4fb4dd793a313217feb4cb29cd8b0b5d3e0d
7
+ data.tar.gz: cf576b1f6770191ecd65978d18f9867bef6f91e43ea44c6dfc338bd5e48eb4782bdfbb01005d740c882530dd98733d6a21a90be3c8d726c556e22d29db8f3a39
@@ -5,7 +5,7 @@
5
5
 
6
6
  A simple country code select helper with I18n translations for the countries. Works exactly the same as country_select but uses country codes instead and has i18n translations for the country names.
7
7
 
8
- NOTE: The old country_code_select repository that this one was forked from is outdated and no longer maintained. This i18_country_select repository is the most corrent.
8
+ NOTE: The old country_code_select repository that this one was forked from is outdated and no longer maintained. This i18_country_select repository is the most current.
9
9
 
10
10
  == Requirements
11
11
 
@@ -25,7 +25,7 @@ Simple use supplying model and attribute as parameters:
25
25
  Supplying priority countries to be placed at the top of the list:
26
26
 
27
27
  country_code_select(:user, :country, [[ 'US', 'United States' ], [ 'CA', 'Canada' ]])
28
-
28
+
29
29
 
30
30
  == Contributors
31
31
 
@@ -43,12 +43,15 @@ Supplying priority countries to be placed at the top of the list:
43
43
  * https://github.com/durandom
44
44
  * Stefan Slaveykov (https://github.com/wizardone)
45
45
  * Leonardo D. Schlossmacher (https://github.com/leods92)
46
+ * https://github.com/mstark
47
+ * Adam St. John (https://github.com/astjohn)
46
48
  * Monica Giambitto - https://github.com/nirnaeth
47
49
  * Marat Galiev - https://github.com/maratgaliev
48
50
 
49
51
  Based on the deprecated country_code_select by: Russ Smith (russ@bashme.org) and Frank Wambutt (frank@mo-stud.io)
50
52
 
51
53
  == Version History
54
+ * 1.1.6 - Simplifying country code definition
52
55
  * 1.1.5 - Fixing support for Rails 4.2. Adding Kosovo country code
53
56
  * 1.1.4 - Fixed options being ignored when running Rails 4
54
57
  * 1.1.3 - Removed Netherlands Antilles. Added Bonaire, Curacao, Sint Maarten, and South Sudan
@@ -67,4 +70,3 @@ Based on the deprecated country_code_select by: Russ Smith (russ@bashme.org) and
67
70
  == License
68
71
 
69
72
  MIT or GPL
70
-
@@ -2,7 +2,6 @@ require 'unicode_utils/canonical_decomposition'
2
2
  require 'unicode_utils/general_category'
3
3
 
4
4
  require "i18n-country-translations"
5
- require "i18n_country_select/countries"
6
5
  require "i18n_country_select/form_builder"
7
6
  require "i18n_country_select/form_helpers"
8
7
  require "i18n_country_select/instance_tag"
@@ -1,7 +1,5 @@
1
1
  module I18nCountrySelect
2
2
  module InstanceTag
3
- include Countries
4
-
5
3
  def to_country_code_select_tag(priority_countries, html_options = {}, options = {})
6
4
  # Rails 4 stores options sent when creating an InstanceTag.
7
5
  # Let's use them!
@@ -37,7 +35,7 @@ module I18nCountrySelect
37
35
  def country_translations
38
36
  Thread.current[:country_translations] ||= {}
39
37
  Thread.current[:country_translations][I18n.locale] ||= begin
40
- COUNTRY_CODES.map do |code|
38
+ (I18n.t 'countries').keys.map do |code|
41
39
  translation = I18n.t(code, :scope => :countries, :default => 'missing')
42
40
  translation == 'missing' ? nil : [translation, code]
43
41
  end.compact.sort_by do |translation, code|
@@ -1,3 +1,3 @@
1
1
  module I18nCountrySelect
2
- VERSION = "1.1.5"
2
+ VERSION = "1.1.6"
3
3
  end
metadata CHANGED
@@ -1,121 +1,121 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_country_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian McQuay (brian@onomojo.com)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2016-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: i18n-country-translations
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 1.0.3
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ~>
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '1.0'
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.3
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: unicode_utils
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.0'
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.0.0
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.0'
64
- - - '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.0.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rails
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ~>
71
+ - - "~>"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '3.0'
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: 3.0.0
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '3.0'
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 3.0.0
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: rspec-rails
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ~>
91
+ - - "~>"
92
92
  - !ruby/object:Gem::Version
93
93
  version: '2.7'
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.7.0
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.7'
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: 2.7.0
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: spork
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - ~>
111
+ - - "~>"
112
112
  - !ruby/object:Gem::Version
113
113
  version: 1.0rc
114
114
  type: :development
115
115
  prerelease: false
116
116
  version_requirements: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - ~>
118
+ - - "~>"
119
119
  - !ruby/object:Gem::Version
120
120
  version: 1.0rc
121
121
  description: A simple country code select helper that works with I18n translations.
@@ -128,7 +128,6 @@ files:
128
128
  - MIT-LICENSE
129
129
  - README.rdoc
130
130
  - lib/i18n_country_select.rb
131
- - lib/i18n_country_select/countries.rb
132
131
  - lib/i18n_country_select/form_builder.rb
133
132
  - lib/i18n_country_select/form_helpers.rb
134
133
  - lib/i18n_country_select/instance_tag.rb
@@ -144,18 +143,19 @@ require_paths:
144
143
  - lib
145
144
  required_ruby_version: !ruby/object:Gem::Requirement
146
145
  requirements:
147
- - - '>='
146
+ - - ">="
148
147
  - !ruby/object:Gem::Version
149
148
  version: '0'
150
149
  required_rubygems_version: !ruby/object:Gem::Requirement
151
150
  requirements:
152
- - - '>='
151
+ - - ">="
153
152
  - !ruby/object:Gem::Version
154
153
  version: 1.3.5
155
154
  requirements: []
156
- rubyforge_project: '[none]'
157
- rubygems_version: 2.2.2
155
+ rubyforge_project: "[none]"
156
+ rubygems_version: 2.5.1
158
157
  signing_key:
159
158
  specification_version: 4
160
159
  summary: I18n country select helper
161
160
  test_files: []
161
+ has_rdoc:
@@ -1,28 +0,0 @@
1
- module I18nCountrySelect
2
- module Countries
3
- COUNTRY_CODES = 'AF','AL','DZ','AS','AD','AO','AI','AQ','AG','AR',
4
- 'AM','AW','AU','AT','AZ','BS','BH','BD','BB','BY',
5
- 'BE','BZ','BJ','BM','BO','BA','BW','BV','BR','IO',
6
- 'BN','BG','BF','BI','BT','KH','CM','CA','CV','KY',
7
- 'CF','TD','CL','CN','CX','CC','CO','KM','CG','CK',
8
- 'CR','HR','CU','CY','CZ','CS','DK','DJ','DM','DO',
9
- 'EC','EG','SV','GQ','EE','ET','FK','FO','FJ','FI',
10
- 'FR','FX','TF','GA','GM','GE','DE','GH','GI','GB',
11
- 'GR','GL','GD','GP','GU','GT','GN','GW','GY','GF',
12
- 'HT','HM','HN','HK','HU','IS','IN','ID','IR','IQ',
13
- 'IE','IL','IT','CI','JM','JP','JO','KZ','KE','KG',
14
- 'KI','KP','KR','KW','LA','LV','LB','LS','LR','LY',
15
- 'LI','LT','LU','MO','MK','MG','MW','MY','MV','ML',
16
- 'MT','MH','MQ','MR','MU','MX','FM','MD','MC','MN',
17
- 'MS','MA','MZ','MM','NA','NR','NO','NP','NL','BQ',
18
- 'NC','NZ','NI','NE','NG','NU','NF','MP','OM','PK',
19
- 'PW','PA','PG','PY','PE','PH','PN','PL','PF','PT',
20
- 'PR','QA','RE','RO','RS','RU','RW','LC','WS','SM',
21
- 'SA','SN','SC','SL','SG','SK','SI','SB','SO','ZA',
22
- 'ES','LK','SH','PM','ST','KN','VC','SD','SR','SJ',
23
- 'SZ','SE','CH','SY','TJ','TW','TZ','TH','TG','TK',
24
- 'TO','TT','TN','TR','TM','TC','TV','UG','UA','AE',
25
- 'US','UY','UM','UZ','VU','VA','VE','VN','VG','VI',
26
- 'WF','EH','YE','ZM','ZW','CW','SX','SS','ME','XK'
27
- end
28
- end