country_select 2.5.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path => "../"
4
+
5
+ gem "railties", "~> 5.0.0"
6
+ gem "actionpack", "~> 5.0.0"
7
+
8
+ platforms :rbx do
9
+ gem "racc"
10
+ gem "rubysl", "~> 2.0"
11
+ gem "psych"
12
+ end
@@ -0,0 +1,314 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ country_select (3.0.0.alpha1)
5
+ countries (~> 2.0)
6
+ sort_alphabetical (~> 1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (5.0.0.1)
12
+ actionview (= 5.0.0.1)
13
+ activesupport (= 5.0.0.1)
14
+ rack (~> 2.0)
15
+ rack-test (~> 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
+ actionview (5.0.0.1)
19
+ activesupport (= 5.0.0.1)
20
+ builder (~> 3.1)
21
+ erubis (~> 2.7.0)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ activesupport (5.0.0.1)
25
+ concurrent-ruby (~> 1.0, >= 1.0.2)
26
+ i18n (~> 0.7)
27
+ minitest (~> 5.1)
28
+ tzinfo (~> 1.1)
29
+ builder (3.2.2)
30
+ coderay (1.1.1)
31
+ concurrent-ruby (1.0.2)
32
+ countries (2.0.1)
33
+ i18n_data (~> 0.7.0)
34
+ money (~> 6.0)
35
+ unicode_utils (~> 1.4)
36
+ diff-lcs (1.2.5)
37
+ erubis (2.7.0)
38
+ ffi2-generators (0.1.1)
39
+ i18n (0.7.0)
40
+ i18n_data (0.7.0)
41
+ loofah (2.0.3)
42
+ nokogiri (>= 1.5.9)
43
+ method_source (0.8.2)
44
+ mini_portile2 (2.1.0)
45
+ minitest (5.9.1)
46
+ money (6.7.1)
47
+ i18n (>= 0.6.4, <= 0.7.0)
48
+ sixarm_ruby_unaccent (>= 1.1.1, < 2)
49
+ nokogiri (1.6.8.1)
50
+ mini_portile2 (~> 2.1.0)
51
+ pry (0.10.4)
52
+ coderay (~> 1.1.0)
53
+ method_source (~> 0.8.1)
54
+ slop (~> 3.4)
55
+ psych (2.2.0)
56
+ racc (1.4.14)
57
+ rack (2.0.1)
58
+ rack-test (0.6.3)
59
+ rack (>= 1.0)
60
+ rails-dom-testing (2.0.1)
61
+ activesupport (>= 4.2.0, < 6.0)
62
+ nokogiri (~> 1.6.0)
63
+ rails-html-sanitizer (1.0.3)
64
+ loofah (~> 2.0)
65
+ railties (5.0.0.1)
66
+ actionpack (= 5.0.0.1)
67
+ activesupport (= 5.0.0.1)
68
+ method_source
69
+ rake (>= 0.8.7)
70
+ thor (>= 0.18.1, < 2.0)
71
+ rake (11.3.0)
72
+ rspec (3.5.0)
73
+ rspec-core (~> 3.5.0)
74
+ rspec-expectations (~> 3.5.0)
75
+ rspec-mocks (~> 3.5.0)
76
+ rspec-core (3.5.4)
77
+ rspec-support (~> 3.5.0)
78
+ rspec-expectations (3.5.0)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.5.0)
81
+ rspec-mocks (3.5.0)
82
+ diff-lcs (>= 1.2.0, < 2.0)
83
+ rspec-support (~> 3.5.0)
84
+ rspec-support (3.5.0)
85
+ rubysl (2.2.0)
86
+ rubysl-abbrev (~> 2.0)
87
+ rubysl-base64 (~> 2.0)
88
+ rubysl-benchmark (~> 2.0)
89
+ rubysl-bigdecimal (~> 2.0)
90
+ rubysl-cgi (~> 2.0)
91
+ rubysl-cgi-session (~> 2.0)
92
+ rubysl-cmath (~> 2.0)
93
+ rubysl-complex (~> 2.0)
94
+ rubysl-continuation (~> 2.0)
95
+ rubysl-coverage (~> 2.0)
96
+ rubysl-csv (~> 2.0)
97
+ rubysl-curses (~> 2.0)
98
+ rubysl-date (~> 2.0)
99
+ rubysl-delegate (~> 2.0)
100
+ rubysl-digest (~> 2.0)
101
+ rubysl-drb (~> 2.0)
102
+ rubysl-e2mmap (~> 2.0)
103
+ rubysl-english (~> 2.0)
104
+ rubysl-enumerator (~> 2.0)
105
+ rubysl-erb (~> 2.0)
106
+ rubysl-etc (~> 2.0)
107
+ rubysl-expect (~> 2.0)
108
+ rubysl-fcntl (~> 2.0)
109
+ rubysl-fiber (~> 2.0)
110
+ rubysl-fileutils (~> 2.0)
111
+ rubysl-find (~> 2.0)
112
+ rubysl-forwardable (~> 2.0)
113
+ rubysl-getoptlong (~> 2.0)
114
+ rubysl-gserver (~> 2.0)
115
+ rubysl-io-console (~> 2.0)
116
+ rubysl-io-nonblock (~> 2.0)
117
+ rubysl-io-wait (~> 2.0)
118
+ rubysl-ipaddr (~> 2.0)
119
+ rubysl-irb (~> 2.1)
120
+ rubysl-logger (~> 2.0)
121
+ rubysl-mathn (~> 2.0)
122
+ rubysl-matrix (~> 2.0)
123
+ rubysl-mkmf (~> 2.0)
124
+ rubysl-monitor (~> 2.0)
125
+ rubysl-mutex_m (~> 2.0)
126
+ rubysl-net-ftp (~> 2.0)
127
+ rubysl-net-http (~> 2.0)
128
+ rubysl-net-imap (~> 2.0)
129
+ rubysl-net-pop (~> 2.0)
130
+ rubysl-net-protocol (~> 2.0)
131
+ rubysl-net-smtp (~> 2.0)
132
+ rubysl-net-telnet (~> 2.0)
133
+ rubysl-nkf (~> 2.0)
134
+ rubysl-observer (~> 2.0)
135
+ rubysl-open-uri (~> 2.0)
136
+ rubysl-open3 (~> 2.0)
137
+ rubysl-openssl (~> 2.0)
138
+ rubysl-optparse (~> 2.0)
139
+ rubysl-ostruct (~> 2.0)
140
+ rubysl-pathname (~> 2.0)
141
+ rubysl-prettyprint (~> 2.0)
142
+ rubysl-prime (~> 2.0)
143
+ rubysl-profile (~> 2.0)
144
+ rubysl-profiler (~> 2.0)
145
+ rubysl-pstore (~> 2.0)
146
+ rubysl-pty (~> 2.0)
147
+ rubysl-rational (~> 2.0)
148
+ rubysl-resolv (~> 2.0)
149
+ rubysl-rexml (~> 2.0)
150
+ rubysl-rinda (~> 2.0)
151
+ rubysl-rss (~> 2.0)
152
+ rubysl-scanf (~> 2.0)
153
+ rubysl-securerandom (~> 2.0)
154
+ rubysl-set (~> 2.0)
155
+ rubysl-shellwords (~> 2.0)
156
+ rubysl-singleton (~> 2.0)
157
+ rubysl-socket (~> 2.0)
158
+ rubysl-stringio (~> 2.0)
159
+ rubysl-strscan (~> 2.0)
160
+ rubysl-sync (~> 2.0)
161
+ rubysl-syslog (~> 2.0)
162
+ rubysl-tempfile (~> 2.0)
163
+ rubysl-thread (~> 2.0)
164
+ rubysl-thwait (~> 2.0)
165
+ rubysl-time (~> 2.0)
166
+ rubysl-timeout (~> 2.0)
167
+ rubysl-tmpdir (~> 2.0)
168
+ rubysl-tsort (~> 2.0)
169
+ rubysl-un (~> 2.0)
170
+ rubysl-unicode_normalize (~> 2.0)
171
+ rubysl-uri (~> 2.0)
172
+ rubysl-weakref (~> 2.0)
173
+ rubysl-webrick (~> 2.0)
174
+ rubysl-xmlrpc (~> 2.0)
175
+ rubysl-yaml (~> 2.0)
176
+ rubysl-zlib (~> 2.0)
177
+ rubysl-abbrev (2.0.4)
178
+ rubysl-base64 (2.0.0)
179
+ rubysl-benchmark (2.0.1)
180
+ rubysl-bigdecimal (2.0.2)
181
+ rubysl-cgi (2.0.1)
182
+ rubysl-cgi-session (2.1.0)
183
+ rubysl-cmath (2.0.0)
184
+ rubysl-complex (2.0.0)
185
+ rubysl-continuation (2.0.0)
186
+ rubysl-coverage (2.1)
187
+ rubysl-csv (2.0.2)
188
+ rubysl-english (~> 2.0)
189
+ rubysl-curses (2.0.1)
190
+ rubysl-date (2.0.9)
191
+ rubysl-delegate (2.0.1)
192
+ rubysl-digest (2.0.8)
193
+ rubysl-drb (2.0.1)
194
+ rubysl-e2mmap (2.0.0)
195
+ rubysl-english (2.0.0)
196
+ rubysl-enumerator (2.0.0)
197
+ rubysl-erb (2.0.2)
198
+ rubysl-etc (2.0.3)
199
+ ffi2-generators (~> 0.1)
200
+ rubysl-expect (2.0.0)
201
+ rubysl-fcntl (2.0.4)
202
+ ffi2-generators (~> 0.1)
203
+ rubysl-fiber (2.0.0)
204
+ rubysl-fileutils (2.0.3)
205
+ rubysl-find (2.0.1)
206
+ rubysl-forwardable (2.0.1)
207
+ rubysl-getoptlong (2.0.0)
208
+ rubysl-gserver (2.0.0)
209
+ rubysl-socket (~> 2.0)
210
+ rubysl-thread (~> 2.0)
211
+ rubysl-io-console (2.0.0)
212
+ rubysl-io-nonblock (2.0.0)
213
+ rubysl-io-wait (2.0.0)
214
+ rubysl-ipaddr (2.0.0)
215
+ rubysl-irb (2.1.1)
216
+ rubysl-e2mmap (~> 2.0)
217
+ rubysl-mathn (~> 2.0)
218
+ rubysl-thread (~> 2.0)
219
+ rubysl-logger (2.1.0)
220
+ rubysl-mathn (2.0.0)
221
+ rubysl-matrix (2.1.0)
222
+ rubysl-e2mmap (~> 2.0)
223
+ rubysl-mkmf (2.1)
224
+ rubysl-fileutils (~> 2.0)
225
+ rubysl-shellwords (~> 2.0)
226
+ rubysl-monitor (2.0.0)
227
+ rubysl-mutex_m (2.0.0)
228
+ rubysl-net-ftp (2.0.1)
229
+ rubysl-net-http (2.0.4)
230
+ rubysl-cgi (~> 2.0)
231
+ rubysl-erb (~> 2.0)
232
+ rubysl-singleton (~> 2.0)
233
+ rubysl-net-imap (2.0.1)
234
+ rubysl-net-pop (2.0.1)
235
+ rubysl-net-protocol (2.0.1)
236
+ rubysl-net-smtp (2.0.1)
237
+ rubysl-net-telnet (2.0.0)
238
+ rubysl-nkf (2.0.1)
239
+ rubysl-observer (2.0.0)
240
+ rubysl-open-uri (2.0.0)
241
+ rubysl-open3 (2.0.0)
242
+ rubysl-openssl (2.9)
243
+ rubysl-optparse (2.0.1)
244
+ rubysl-shellwords (~> 2.0)
245
+ rubysl-ostruct (2.1.0)
246
+ rubysl-pathname (2.3)
247
+ rubysl-prettyprint (2.0.3)
248
+ rubysl-prime (2.0.1)
249
+ rubysl-profile (2.0.0)
250
+ rubysl-profiler (2.1)
251
+ rubysl-pstore (2.0.0)
252
+ rubysl-pty (2.0.3)
253
+ rubysl-rational (2.0.1)
254
+ rubysl-resolv (2.1.2)
255
+ rubysl-rexml (2.0.4)
256
+ rubysl-rinda (2.0.1)
257
+ rubysl-rss (2.0.0)
258
+ rubysl-scanf (2.0.0)
259
+ rubysl-securerandom (2.0.0)
260
+ rubysl-set (2.0.1)
261
+ rubysl-shellwords (2.0.0)
262
+ rubysl-singleton (2.0.0)
263
+ rubysl-socket (2.2)
264
+ rubysl-fcntl (~> 2.0)
265
+ rubysl-stringio (2.1.0)
266
+ rubysl-strscan (2.0.0)
267
+ rubysl-sync (2.0.0)
268
+ rubysl-syslog (2.1.0)
269
+ ffi2-generators (~> 0.1)
270
+ rubysl-tempfile (2.0.1)
271
+ rubysl-thread (2.0.3)
272
+ rubysl-thwait (2.0.0)
273
+ rubysl-time (2.0.3)
274
+ rubysl-timeout (2.0.0)
275
+ rubysl-tmpdir (2.0.1)
276
+ rubysl-tsort (2.0.1)
277
+ rubysl-un (2.0.0)
278
+ rubysl-fileutils (~> 2.0)
279
+ rubysl-optparse (~> 2.0)
280
+ rubysl-unicode_normalize (2.0)
281
+ rubysl-uri (2.0.0)
282
+ rubysl-weakref (2.0.0)
283
+ rubysl-webrick (2.0.0)
284
+ rubysl-xmlrpc (2.0.0)
285
+ rubysl-yaml (2.1.0)
286
+ rubysl-zlib (2.0.1)
287
+ sixarm_ruby_unaccent (1.1.1)
288
+ slop (3.6.0)
289
+ sort_alphabetical (1.0.2)
290
+ unicode_utils (>= 1.2.2)
291
+ thor (0.19.1)
292
+ thread_safe (0.3.5)
293
+ tzinfo (1.2.2)
294
+ thread_safe (~> 0.1)
295
+ unicode_utils (1.4.0)
296
+ wwtd (1.3.0)
297
+
298
+ PLATFORMS
299
+ ruby
300
+
301
+ DEPENDENCIES
302
+ actionpack (~> 5.0.0)
303
+ country_select!
304
+ pry (~> 0)
305
+ psych
306
+ racc
307
+ railties (~> 5.0.0)
308
+ rake
309
+ rspec (~> 3)
310
+ rubysl (~> 2.0)
311
+ wwtd
312
+
313
+ BUNDLED WITH
314
+ 1.13.6
@@ -1,3 +1,3 @@
1
1
  module CountrySelect
2
- VERSION = "2.5.2"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -9,6 +9,12 @@ describe "CountrySelect" do
9
9
  include ActionView::Helpers::TagHelper
10
10
  include ActionView::Helpers::FormOptionsHelper
11
11
 
12
+ before do
13
+ I18n.available_locales = [:en]
14
+ I18n.locale = :en
15
+ ISO3166.reset
16
+ end
17
+
12
18
  class Walrus
13
19
  attr_accessor :country_code
14
20
  end
@@ -39,6 +45,9 @@ describe "CountrySelect" do
39
45
  end
40
46
 
41
47
  it "uses the locale specified by I18n.locale" do
48
+ I18n.available_locales = [:en, :es]
49
+ ISO3166.reset
50
+
42
51
  tag = options_for_select([['Estados Unidos', 'US']], 'US')
43
52
 
44
53
  walrus.country_code = 'US'
@@ -53,6 +62,9 @@ describe "CountrySelect" do
53
62
  end
54
63
 
55
64
  it "accepts a locale option" do
65
+ I18n.available_locales = [:fr]
66
+ ISO3166.reset
67
+
56
68
  tag = options_for_select([['États-Unis', 'US']], 'US')
57
69
 
58
70
  walrus.country_code = 'US'
@@ -189,7 +201,7 @@ describe "CountrySelect" do
189
201
  "#{country.name} (#{country.alpha2})"
190
202
  end
191
203
 
192
- tag = options_for_select([['United States (US)', 'US']], 'US')
204
+ tag = options_for_select([['United States of America (US)', 'US']], 'US')
193
205
 
194
206
  walrus.country_code = 'US'
195
207
  t = builder.country_select(:country_code, format: :with_alpha2)
@@ -201,7 +213,7 @@ describe "CountrySelect" do
201
213
  [country.name, country.alpha3]
202
214
  end
203
215
 
204
- tag = options_for_select([['United States', 'USA']], 'USA')
216
+ tag = options_for_select([['United States of America', 'USA']], 'USA')
205
217
  walrus.country_code = 'USA'
206
218
  t = builder.country_select(:country_code, format: :with_alpha3)
207
219
  expect(t).to include(tag)
@@ -212,7 +224,7 @@ describe "CountrySelect" do
212
224
  ["#{country.name} (#{country.alpha2})", country.alpha3]
213
225
  end
214
226
 
215
- tag = options_for_select([['United States (US)', 'USA']], 'USA')
227
+ tag = options_for_select([['United States of America (US)', 'USA']], 'USA')
216
228
  walrus.country_code = 'USA'
217
229
  t = builder.country_select(:country_code, format: :with_alpha3)
218
230
  expect(t).to include(tag)
@@ -223,7 +235,7 @@ describe "CountrySelect" do
223
235
  [country.name, country.alpha3]
224
236
  end
225
237
 
226
- tag = options_for_select([['United States', 'USA']], 'USA')
238
+ tag = options_for_select([['United States of America', 'USA']], 'USA')
227
239
  walrus.country_code = 'USA'
228
240
  t = builder.country_select(:country_code, format: :with_alpha3, priority_countries: ['US'])
229
241
  expect(t.scan(Regexp.new(Regexp.escape(tag))).size).to eq 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: country_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Penner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.2.0
89
+ version: '2.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.2.0
96
+ version: '2.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sort_alphabetical
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -138,6 +138,8 @@ files:
138
138
  - gemfiles/actionpack4.1.gemfile.lock
139
139
  - gemfiles/actionpack4.2.gemfile
140
140
  - gemfiles/actionpack4.2.gemfile.lock
141
+ - gemfiles/actionpack5.0.gemfile
142
+ - gemfiles/actionpack5.0.gemfile.lock
141
143
  - lib/country_select.rb
142
144
  - lib/country_select/country_select_helper.rb
143
145
  - lib/country_select/formats.rb
@@ -158,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
160
  requirements:
159
161
  - - ">="
160
162
  - !ruby/object:Gem::Version
161
- version: '0'
163
+ version: '2'
162
164
  required_rubygems_version: !ruby/object:Gem::Requirement
163
165
  requirements:
164
166
  - - ">="
@@ -166,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
168
  version: '0'
167
169
  requirements: []
168
170
  rubyforge_project: country_select
169
- rubygems_version: 2.4.5.1
171
+ rubygems_version: 2.5.2
170
172
  signing_key:
171
173
  specification_version: 4
172
174
  summary: Country Select Plugin