country_select 4.0.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +13 -31
  3. data/CHANGELOG.md +21 -0
  4. data/Gemfile +0 -6
  5. data/Gemfile.lock +63 -265
  6. data/README.md +15 -2
  7. data/Rakefile +3 -1
  8. data/country_select.gemspec +7 -9
  9. data/gemfiles/actionpack.edge.gemfile +0 -6
  10. data/gemfiles/actionpack.edge.gemfile.lock +63 -268
  11. data/gemfiles/actionpack5.2.gemfile +2 -8
  12. data/gemfiles/actionpack5.2.gemfile.lock +59 -266
  13. data/gemfiles/actionpack6.0.gemfile +6 -0
  14. data/gemfiles/actionpack6.0.gemfile.lock +107 -0
  15. data/gemfiles/actionpack6.1.gemfile +6 -0
  16. data/gemfiles/actionpack6.1.gemfile.lock +106 -0
  17. data/lib/country_select.rb +2 -6
  18. data/lib/country_select/defaults.rb +10 -0
  19. data/lib/country_select/formats.rb +3 -1
  20. data/lib/country_select/tag_helper.rb +7 -7
  21. data/lib/country_select/version.rb +1 -1
  22. data/lib/country_select_without_sort_alphabetical.rb +2 -6
  23. data/spec/country_select_spec.rb +43 -3
  24. metadata +25 -34
  25. data/gemfiles/actionpack3.2.gemfile +0 -11
  26. data/gemfiles/actionpack3.2.gemfile.lock +0 -297
  27. data/gemfiles/actionpack4.0.gemfile +0 -11
  28. data/gemfiles/actionpack4.0.gemfile.lock +0 -286
  29. data/gemfiles/actionpack4.1.gemfile +0 -11
  30. data/gemfiles/actionpack4.1.gemfile.lock +0 -290
  31. data/gemfiles/actionpack4.2.gemfile +0 -14
  32. data/gemfiles/actionpack4.2.gemfile.lock +0 -306
  33. data/gemfiles/actionpack5.0.gemfile +0 -12
  34. data/gemfiles/actionpack5.0.gemfile.lock +0 -311
  35. data/gemfiles/actionpack5.1.gemfile +0 -12
  36. data/gemfiles/actionpack5.1.gemfile.lock +0 -311
  37. data/lib/country_select/rails3/country_select_helper.rb +0 -39
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Rails – Country Select
2
- [![Build Status](https://travis-ci.org/stefanpenner/country_select.svg)](https://travis-ci.org/stefanpenner/country_select)
2
+ [![Build Status](https://travis-ci.org/stefanpenner/country_select.svg?branch=master)](https://travis-ci.org/stefanpenner/country_select)
3
3
 
4
4
  Provides a simple helper to get an HTML select list of countries using the
5
5
  [ISO 3166-1 standard](https://en.wikipedia.org/wiki/ISO_3166-1).
@@ -122,6 +122,19 @@ country_select("user", "country", format: :with_alpha2)
122
122
  country_select("user", "country", format: :with_data_attrs)
123
123
  ```
124
124
 
125
+ ### Using customized defaults
126
+
127
+ You can configure overridable defaults for `except`, `format`, `locale`,
128
+ `only`, `priority_countries` and `priority_countries_divider` in an initializer.
129
+
130
+ ````ruby
131
+ # config/initializers/country_select.rb
132
+
133
+ CountrySelect::DEFAULTS[:except] = [ "ZZ" ]
134
+ ````
135
+
136
+ The example would exclude "ZZ" from every `country_select` tag, where no `except` option is given.
137
+
125
138
  ### ISO 3166-1 alpha-2 codes
126
139
  The `option` tags use ISO 3166-1 alpha-2 codes as values and the country
127
140
  names as display strings. For example, the United States would appear as
@@ -193,7 +206,7 @@ changing the dependencies in the gemspec.
193
206
  ```shell
194
207
  for i in gemfiles/*.gemfile
195
208
  do
196
- BUNDLE_GEMFILE=$i bundle install --no-deployment
209
+ BUNDLE_GEMFILE=$i bundle install --local
197
210
  done
198
211
  ```
199
212
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/setup'
2
4
  require 'rake'
3
5
  require 'bundler/gem_tasks'
@@ -7,4 +9,4 @@ require 'wwtd/tasks'
7
9
  require 'rspec/core/rake_task'
8
10
  RSpec::Core::RakeTask.new(:spec)
9
11
 
10
- task default: "wwtd:local"
12
+ task default: 'spec'
@@ -10,23 +10,21 @@ Gem::Specification.new do |s|
10
10
  s.email = ['stefan.penner@gmail.com']
11
11
  s.homepage = 'https://github.com/stefanpenner/country_select'
12
12
  s.summary = %q{Country Select Plugin}
13
- s.description = %q{Provides a simple helper to get an HTML select list of countries. The list of countries comes from the ISO 3166 standard. While it is a relatively neutral source of country names, it will still offend some users.}
14
-
15
- s.rubyforge_project = 'country_select'
13
+ s.description = %q{Provides a simple helper to get an HTML select list of countries. The list of countries comes from the ISO 3166 standard. While it is a relatively neutral source of country names, it will still offend some users.}
16
14
 
17
15
  s.files = `git ls-files`.split("\n")
18
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
18
  s.require_paths = ['lib']
21
19
 
22
- s.required_ruby_version = '>= 2'
20
+ s.required_ruby_version = '>= 2.5'
23
21
 
24
- s.add_development_dependency 'actionpack', '~> 5'
22
+ s.add_development_dependency 'actionpack', '~> 6.1'
25
23
  s.add_development_dependency 'pry', '~> 0'
26
- s.add_development_dependency 'rake'
24
+ s.add_development_dependency 'rake', '~> 13'
27
25
  s.add_development_dependency 'rspec', '~> 3'
28
- s.add_development_dependency 'wwtd'
26
+ s.add_development_dependency 'wwtd', '~> 1'
29
27
 
30
- s.add_dependency 'countries', '~> 3.0'
31
- s.add_dependency 'sort_alphabetical', '~> 1.0'
28
+ s.add_dependency 'countries', '~> 4.0'
29
+ s.add_dependency 'sort_alphabetical', '~> 1.1'
32
30
  end
@@ -7,9 +7,3 @@ git "https://github.com/rails/rails.git" do
7
7
  gem "actionview"
8
8
  gem "activesupport"
9
9
  end
10
-
11
- platforms :rbx do
12
- gem "racc"
13
- gem "rubysl", "~> 2.0"
14
- gem "psych"
15
- end
@@ -1,294 +1,92 @@
1
1
  GIT
2
2
  remote: https://github.com/rails/rails.git
3
- revision: 30767f980faa2d7a0531774ddf040471db74a23b
3
+ revision: a34d64d82e213a4054fbb69ad5cd7a5137a5a252
4
4
  specs:
5
- actionpack (5.2.0.alpha)
6
- actionview (= 5.2.0.alpha)
7
- activesupport (= 5.2.0.alpha)
8
- rack (~> 2.0)
5
+ actionpack (7.0.0.alpha)
6
+ actionview (= 7.0.0.alpha)
7
+ activesupport (= 7.0.0.alpha)
8
+ rack (~> 2.0, >= 2.0.9)
9
9
  rack-test (>= 0.6.3)
10
10
  rails-dom-testing (~> 2.0)
11
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
12
- actionview (5.2.0.alpha)
13
- activesupport (= 5.2.0.alpha)
11
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
12
+ actionview (7.0.0.alpha)
13
+ activesupport (= 7.0.0.alpha)
14
14
  builder (~> 3.1)
15
15
  erubi (~> 1.4)
16
16
  rails-dom-testing (~> 2.0)
17
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
18
- activesupport (5.2.0.alpha)
17
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
18
+ activesupport (7.0.0.alpha)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (~> 0.7)
21
- minitest (~> 5.1)
22
- tzinfo (~> 1.1)
20
+ i18n (>= 1.6, < 2)
21
+ minitest (>= 5.1)
22
+ tzinfo (~> 2.0)
23
+ zeitwerk (~> 2.3)
23
24
 
24
25
  PATH
25
26
  remote: ..
26
27
  specs:
27
- country_select (4.0.0)
28
- countries (~> 3.0)
29
- sort_alphabetical (~> 1.0)
28
+ country_select (5.1.0)
29
+ countries (~> 4.0)
30
+ sort_alphabetical (~> 1.1)
30
31
 
31
32
  GEM
32
33
  remote: https://rubygems.org/
33
34
  specs:
34
- builder (3.2.3)
35
- coderay (1.1.2)
36
- concurrent-ruby (1.0.5)
37
- countries (3.0.0)
38
- i18n_data (~> 0.8.0)
35
+ builder (3.2.4)
36
+ coderay (1.1.3)
37
+ concurrent-ruby (1.1.8)
38
+ countries (4.0.0)
39
+ i18n_data (~> 0.13.0)
39
40
  sixarm_ruby_unaccent (~> 1.1)
40
- unicode_utils (~> 1.4)
41
- diff-lcs (1.3)
42
- erubi (1.6.1)
43
- ffi2-generators (0.1.1)
44
- i18n (0.8.6)
45
- i18n_data (0.8.0)
46
- loofah (2.0.3)
41
+ crass (1.0.6)
42
+ diff-lcs (1.4.4)
43
+ erubi (1.10.0)
44
+ i18n (1.8.9)
45
+ concurrent-ruby (~> 1.0)
46
+ i18n_data (0.13.0)
47
+ loofah (2.9.0)
48
+ crass (~> 1.0.2)
47
49
  nokogiri (>= 1.5.9)
48
- method_source (0.8.2)
49
- mini_portile2 (2.3.0)
50
- minitest (5.10.3)
51
- nokogiri (1.8.1)
52
- mini_portile2 (~> 2.3.0)
53
- pry (0.10.4)
54
- coderay (~> 1.1.0)
55
- method_source (~> 0.8.1)
56
- slop (~> 3.4)
57
- psych (2.2.4)
58
- racc (1.4.14)
59
- rack (2.0.3)
60
- rack-test (0.7.0)
50
+ method_source (1.0.0)
51
+ mini_portile2 (2.5.0)
52
+ minitest (5.14.4)
53
+ nokogiri (1.11.1)
54
+ mini_portile2 (~> 2.5.0)
55
+ racc (~> 1.4)
56
+ pry (0.14.0)
57
+ coderay (~> 1.1)
58
+ method_source (~> 1.0)
59
+ racc (1.5.2)
60
+ rack (2.2.3)
61
+ rack-test (1.1.0)
61
62
  rack (>= 1.0, < 3)
62
63
  rails-dom-testing (2.0.3)
63
64
  activesupport (>= 4.2.0)
64
65
  nokogiri (>= 1.6)
65
- rails-html-sanitizer (1.0.3)
66
- loofah (~> 2.0)
67
- rake (12.1.0)
68
- rspec (3.6.0)
69
- rspec-core (~> 3.6.0)
70
- rspec-expectations (~> 3.6.0)
71
- rspec-mocks (~> 3.6.0)
72
- rspec-core (3.6.0)
73
- rspec-support (~> 3.6.0)
74
- rspec-expectations (3.6.0)
66
+ rails-html-sanitizer (1.3.0)
67
+ loofah (~> 2.3)
68
+ rake (13.0.3)
69
+ rspec (3.10.0)
70
+ rspec-core (~> 3.10.0)
71
+ rspec-expectations (~> 3.10.0)
72
+ rspec-mocks (~> 3.10.0)
73
+ rspec-core (3.10.1)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-expectations (3.10.1)
75
76
  diff-lcs (>= 1.2.0, < 2.0)
76
- rspec-support (~> 3.6.0)
77
- rspec-mocks (3.6.0)
77
+ rspec-support (~> 3.10.0)
78
+ rspec-mocks (3.10.2)
78
79
  diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.6.0)
80
- rspec-support (3.6.0)
81
- rubysl (2.2.0)
82
- rubysl-abbrev (~> 2.0)
83
- rubysl-base64 (~> 2.0)
84
- rubysl-benchmark (~> 2.0)
85
- rubysl-bigdecimal (~> 2.0)
86
- rubysl-cgi (~> 2.0)
87
- rubysl-cgi-session (~> 2.0)
88
- rubysl-cmath (~> 2.0)
89
- rubysl-complex (~> 2.0)
90
- rubysl-continuation (~> 2.0)
91
- rubysl-coverage (~> 2.0)
92
- rubysl-csv (~> 2.0)
93
- rubysl-curses (~> 2.0)
94
- rubysl-date (~> 2.0)
95
- rubysl-delegate (~> 2.0)
96
- rubysl-digest (~> 2.0)
97
- rubysl-drb (~> 2.0)
98
- rubysl-e2mmap (~> 2.0)
99
- rubysl-english (~> 2.0)
100
- rubysl-enumerator (~> 2.0)
101
- rubysl-erb (~> 2.0)
102
- rubysl-etc (~> 2.0)
103
- rubysl-expect (~> 2.0)
104
- rubysl-fcntl (~> 2.0)
105
- rubysl-fiber (~> 2.0)
106
- rubysl-fileutils (~> 2.0)
107
- rubysl-find (~> 2.0)
108
- rubysl-forwardable (~> 2.0)
109
- rubysl-getoptlong (~> 2.0)
110
- rubysl-gserver (~> 2.0)
111
- rubysl-io-console (~> 2.0)
112
- rubysl-io-nonblock (~> 2.0)
113
- rubysl-io-wait (~> 2.0)
114
- rubysl-ipaddr (~> 2.0)
115
- rubysl-irb (~> 2.1)
116
- rubysl-logger (~> 2.0)
117
- rubysl-mathn (~> 2.0)
118
- rubysl-matrix (~> 2.0)
119
- rubysl-mkmf (~> 2.0)
120
- rubysl-monitor (~> 2.0)
121
- rubysl-mutex_m (~> 2.0)
122
- rubysl-net-ftp (~> 2.0)
123
- rubysl-net-http (~> 2.0)
124
- rubysl-net-imap (~> 2.0)
125
- rubysl-net-pop (~> 2.0)
126
- rubysl-net-protocol (~> 2.0)
127
- rubysl-net-smtp (~> 2.0)
128
- rubysl-net-telnet (~> 2.0)
129
- rubysl-nkf (~> 2.0)
130
- rubysl-observer (~> 2.0)
131
- rubysl-open-uri (~> 2.0)
132
- rubysl-open3 (~> 2.0)
133
- rubysl-openssl (~> 2.0)
134
- rubysl-optparse (~> 2.0)
135
- rubysl-ostruct (~> 2.0)
136
- rubysl-pathname (~> 2.0)
137
- rubysl-prettyprint (~> 2.0)
138
- rubysl-prime (~> 2.0)
139
- rubysl-profile (~> 2.0)
140
- rubysl-profiler (~> 2.0)
141
- rubysl-pstore (~> 2.0)
142
- rubysl-pty (~> 2.0)
143
- rubysl-rational (~> 2.0)
144
- rubysl-resolv (~> 2.0)
145
- rubysl-rexml (~> 2.0)
146
- rubysl-rinda (~> 2.0)
147
- rubysl-rss (~> 2.0)
148
- rubysl-scanf (~> 2.0)
149
- rubysl-securerandom (~> 2.0)
150
- rubysl-set (~> 2.0)
151
- rubysl-shellwords (~> 2.0)
152
- rubysl-singleton (~> 2.0)
153
- rubysl-socket (~> 2.0)
154
- rubysl-stringio (~> 2.0)
155
- rubysl-strscan (~> 2.0)
156
- rubysl-sync (~> 2.0)
157
- rubysl-syslog (~> 2.0)
158
- rubysl-tempfile (~> 2.0)
159
- rubysl-thread (~> 2.0)
160
- rubysl-thwait (~> 2.0)
161
- rubysl-time (~> 2.0)
162
- rubysl-timeout (~> 2.0)
163
- rubysl-tmpdir (~> 2.0)
164
- rubysl-tsort (~> 2.0)
165
- rubysl-un (~> 2.0)
166
- rubysl-unicode_normalize (~> 2.0)
167
- rubysl-uri (~> 2.0)
168
- rubysl-weakref (~> 2.0)
169
- rubysl-webrick (~> 2.0)
170
- rubysl-xmlrpc (~> 2.0)
171
- rubysl-yaml (~> 2.0)
172
- rubysl-zlib (~> 2.0)
173
- rubysl-abbrev (2.0.4)
174
- rubysl-base64 (2.0.0)
175
- rubysl-benchmark (2.0.1)
176
- rubysl-bigdecimal (2.0.2)
177
- rubysl-cgi (2.0.1)
178
- rubysl-cgi-session (2.1.0)
179
- rubysl-cmath (2.0.0)
180
- rubysl-complex (2.0.0)
181
- rubysl-continuation (2.0.0)
182
- rubysl-coverage (2.1)
183
- rubysl-csv (2.0.2)
184
- rubysl-english (~> 2.0)
185
- rubysl-curses (2.0.1)
186
- rubysl-date (2.0.9)
187
- rubysl-delegate (2.0.1)
188
- rubysl-digest (2.0.8)
189
- rubysl-drb (2.0.1)
190
- rubysl-e2mmap (2.0.0)
191
- rubysl-english (2.0.0)
192
- rubysl-enumerator (2.0.0)
193
- rubysl-erb (2.0.2)
194
- rubysl-etc (2.0.3)
195
- ffi2-generators (~> 0.1)
196
- rubysl-expect (2.0.0)
197
- rubysl-fcntl (2.0.4)
198
- ffi2-generators (~> 0.1)
199
- rubysl-fiber (2.0.0)
200
- rubysl-fileutils (2.0.3)
201
- rubysl-find (2.0.1)
202
- rubysl-forwardable (2.0.1)
203
- rubysl-getoptlong (2.0.0)
204
- rubysl-gserver (2.0.0)
205
- rubysl-socket (~> 2.0)
206
- rubysl-thread (~> 2.0)
207
- rubysl-io-console (2.0.0)
208
- rubysl-io-nonblock (2.0.0)
209
- rubysl-io-wait (2.0.0)
210
- rubysl-ipaddr (2.0.0)
211
- rubysl-irb (2.1.1)
212
- rubysl-e2mmap (~> 2.0)
213
- rubysl-mathn (~> 2.0)
214
- rubysl-thread (~> 2.0)
215
- rubysl-logger (2.1.0)
216
- rubysl-mathn (2.0.0)
217
- rubysl-matrix (2.1.0)
218
- rubysl-e2mmap (~> 2.0)
219
- rubysl-mkmf (2.1)
220
- rubysl-fileutils (~> 2.0)
221
- rubysl-shellwords (~> 2.0)
222
- rubysl-monitor (2.0.0)
223
- rubysl-mutex_m (2.0.0)
224
- rubysl-net-ftp (2.0.1)
225
- rubysl-net-http (2.0.4)
226
- rubysl-cgi (~> 2.0)
227
- rubysl-erb (~> 2.0)
228
- rubysl-singleton (~> 2.0)
229
- rubysl-net-imap (2.0.1)
230
- rubysl-net-pop (2.0.1)
231
- rubysl-net-protocol (2.0.1)
232
- rubysl-net-smtp (2.0.1)
233
- rubysl-net-telnet (2.0.0)
234
- rubysl-nkf (2.0.1)
235
- rubysl-observer (2.0.0)
236
- rubysl-open-uri (2.0.0)
237
- rubysl-open3 (2.0.0)
238
- rubysl-openssl (2.9)
239
- rubysl-optparse (2.0.1)
240
- rubysl-shellwords (~> 2.0)
241
- rubysl-ostruct (2.1.0)
242
- rubysl-pathname (2.3)
243
- rubysl-prettyprint (2.0.3)
244
- rubysl-prime (2.0.1)
245
- rubysl-profile (2.0.0)
246
- rubysl-profiler (2.1)
247
- rubysl-pstore (2.0.0)
248
- rubysl-pty (2.0.3)
249
- rubysl-rational (2.0.1)
250
- rubysl-resolv (2.1.2)
251
- rubysl-rexml (2.0.4)
252
- rubysl-rinda (2.0.1)
253
- rubysl-rss (2.0.0)
254
- rubysl-scanf (2.0.0)
255
- rubysl-securerandom (2.0.0)
256
- rubysl-set (2.0.1)
257
- rubysl-shellwords (2.0.0)
258
- rubysl-singleton (2.0.0)
259
- rubysl-socket (2.2.1)
260
- rubysl-fcntl (~> 2.0)
261
- rubysl-stringio (2.1.0)
262
- rubysl-strscan (2.0.0)
263
- rubysl-sync (2.0.0)
264
- rubysl-syslog (2.1.0)
265
- ffi2-generators (~> 0.1)
266
- rubysl-tempfile (2.0.1)
267
- rubysl-thread (2.0.3)
268
- rubysl-thwait (2.0.0)
269
- rubysl-time (2.0.3)
270
- rubysl-timeout (2.0.0)
271
- rubysl-tmpdir (2.0.1)
272
- rubysl-tsort (2.0.1)
273
- rubysl-un (2.0.0)
274
- rubysl-fileutils (~> 2.0)
275
- rubysl-optparse (~> 2.0)
276
- rubysl-unicode_normalize (2.0)
277
- rubysl-uri (2.0.0)
278
- rubysl-weakref (2.0.0)
279
- rubysl-webrick (2.0.0)
280
- rubysl-xmlrpc (2.0.0)
281
- rubysl-yaml (2.1.0)
282
- rubysl-zlib (2.0.1)
80
+ rspec-support (~> 3.10.0)
81
+ rspec-support (3.10.2)
283
82
  sixarm_ruby_unaccent (1.2.0)
284
- slop (3.6.0)
285
83
  sort_alphabetical (1.1.0)
286
84
  unicode_utils (>= 1.2.2)
287
- thread_safe (0.3.6)
288
- tzinfo (1.2.3)
289
- thread_safe (~> 0.1)
85
+ tzinfo (2.0.4)
86
+ concurrent-ruby (~> 1.0)
290
87
  unicode_utils (1.4.0)
291
- wwtd (1.3.0)
88
+ wwtd (1.4.1)
89
+ zeitwerk (2.4.2)
292
90
 
293
91
  PLATFORMS
294
92
  ruby
@@ -299,12 +97,9 @@ DEPENDENCIES
299
97
  activesupport!
300
98
  country_select!
301
99
  pry (~> 0)
302
- psych
303
- racc
304
- rake
100
+ rake (~> 13)
305
101
  rspec (~> 3)
306
- rubysl (~> 2.0)
307
- wwtd
102
+ wwtd (~> 1)
308
103
 
309
104
  BUNDLED WITH
310
- 1.17.1
105
+ 2.2.15