country_select 3.1.0 → 3.1.1

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: 5a0b49887be335ea4a50f736e7768d267adb0851
4
- data.tar.gz: 13db26a37a192cb6a31a557f28fa7daf4811a8d7
3
+ metadata.gz: b802a86ebb12fc93ecedd4f2d76954057ae7e63d
4
+ data.tar.gz: 47a93b79e3fc56a378076547501e211c56db2945
5
5
  SHA512:
6
- metadata.gz: b572d405c2601801b0e57c9e76beffb8fdbbbe8b2a2acc0bddbc241c5c3d4d2d0e4626aa7ed429b683404498894b3d7949112d27656898f9b09b351ac6ccb702
7
- data.tar.gz: 390fffb2d462fa8b18620ed6b52d01329abdf411484f45bd7e6ec9d9f8618ae7cbab0345c0f009daf67c0f6c78abfd207761b9814c4633f383ac80bf201f76f6
6
+ metadata.gz: 7398753f73190c7e63f3acc849feab7062dfd7e3c67aa79b78f1c5a962114836106bf203222e2d58132d4aca86adb8c0694da6c06587b4fd65b104be3ab68fb9
7
+ data.tar.gz: 8fbcaa15bba5707813232d5089efd788af4e5d0dcb433bcb379b1e663e626f255700970d1d6a00f7148aca8e9c661cc8766d99558af5afddc51733d08c266f8a
@@ -3,11 +3,11 @@ cache: bundler
3
3
  language: ruby
4
4
  script: "bundle exec rspec"
5
5
  rvm:
6
- - 2.0.0
7
- - 2.1.10
8
- - 2.2.7
9
- - 2.3.4
10
- - 2.4.1
6
+ - 2.0
7
+ - 2.1
8
+ - 2.2
9
+ - 2.3
10
+ - 2.4
11
11
  - ruby-head
12
12
  gemfile:
13
13
  - gemfiles/actionpack3.2.gemfile
@@ -21,15 +21,15 @@ matrix:
21
21
  allow_failures:
22
22
  - rvm: ruby-head
23
23
  exclude:
24
- - rvm: 2.0.0
24
+ - rvm: 2.0
25
25
  gemfile: gemfiles/actionpack.edge.gemfile
26
- - rvm: 2.0.0
26
+ - rvm: 2.0
27
27
  gemfile: gemfiles/actionpack5.0.gemfile
28
- - rvm: 2.0.0
28
+ - rvm: 2.0
29
29
  gemfile: gemfiles/actionpack5.1.gemfile
30
- - rvm: 2.1.10
30
+ - rvm: 2.1
31
31
  gemfile: gemfiles/actionpack.edge.gemfile
32
- - rvm: 2.1.10
32
+ - rvm: 2.1
33
33
  gemfile: gemfiles/actionpack5.0.gemfile
34
- - rvm: 2.1.10
34
+ - rvm: 2.1
35
35
  gemfile: gemfiles/actionpack5.1.gemfile
@@ -1,3 +1,7 @@
1
+ ## 3.1.0 2017-07-18
2
+
3
+ * #146 - Fix value call on Rails edge (5.2+) - @ybart
4
+
1
5
  ## 3.1.0 2017-07-18
2
6
 
3
7
  * #144 - Provide a possibility to opt out of `sort_alphabetical` - @fschwahn
@@ -1,58 +1,67 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (3.2.22)
12
- activemodel (= 3.2.22)
13
- activesupport (= 3.2.22)
14
- builder (~> 3.0.0)
15
- erubis (~> 2.7.0)
16
- journey (~> 1.0.4)
17
- rack (~> 1.4.5)
18
- rack-cache (~> 1.2)
19
- rack-test (~> 0.6.1)
20
- sprockets (~> 2.2.1)
21
- activemodel (3.2.22)
22
- activesupport (= 3.2.22)
23
- builder (~> 3.0.0)
24
- activesupport (3.2.22)
25
- i18n (~> 0.6, >= 0.6.4)
26
- multi_json (~> 1.0)
27
- builder (3.0.4)
11
+ actionpack (5.1.4)
12
+ actionview (= 5.1.4)
13
+ activesupport (= 5.1.4)
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.1.4)
19
+ activesupport (= 5.1.4)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activesupport (5.1.4)
25
+ concurrent-ruby (~> 1.0, >= 1.0.2)
26
+ i18n (~> 0.7)
27
+ minitest (~> 5.1)
28
+ tzinfo (~> 1.1)
29
+ builder (3.2.3)
28
30
  coderay (1.1.0)
29
- countries (2.0.8)
30
- i18n_data (~> 0.7.0)
31
- money (~> 6.7)
31
+ concurrent-ruby (1.0.5)
32
+ countries (2.1.2)
33
+ i18n_data (~> 0.8.0)
34
+ money (~> 6.9)
32
35
  sixarm_ruby_unaccent (~> 1.1)
33
36
  unicode_utils (~> 1.4)
34
37
  diff-lcs (1.2.5)
35
- erubis (2.7.0)
38
+ erubi (1.6.1)
36
39
  ffi2-generators (0.1.1)
37
- hike (1.2.3)
38
- i18n (0.7.0)
39
- i18n_data (0.7.0)
40
- journey (1.0.4)
40
+ i18n (0.8.6)
41
+ i18n_data (0.8.0)
42
+ loofah (2.0.3)
43
+ nokogiri (>= 1.5.9)
41
44
  method_source (0.8.2)
45
+ mini_portile2 (2.3.0)
46
+ minitest (5.10.3)
42
47
  money (6.9.0)
43
48
  i18n (>= 0.6.4, < 0.9)
44
- multi_json (1.11.2)
49
+ nokogiri (1.8.1)
50
+ mini_portile2 (~> 2.3.0)
45
51
  pry (0.10.1)
46
52
  coderay (~> 1.1.0)
47
53
  method_source (~> 0.8.1)
48
54
  slop (~> 3.4)
49
55
  psych (2.0.15)
50
56
  racc (1.4.12)
51
- rack (1.4.7)
52
- rack-cache (1.2)
53
- rack (>= 0.4)
54
- rack-test (0.6.3)
55
- rack (>= 1.0)
57
+ rack (2.0.3)
58
+ rack-test (0.7.0)
59
+ rack (>= 1.0, < 3)
60
+ rails-dom-testing (2.0.3)
61
+ activesupport (>= 4.2.0)
62
+ nokogiri (>= 1.6)
63
+ rails-html-sanitizer (1.0.3)
64
+ loofah (~> 2.0)
56
65
  rake (10.4.2)
57
66
  rspec (3.3.0)
58
67
  rspec-core (~> 3.3.0)
@@ -266,16 +275,13 @@ GEM
266
275
  rubysl-xmlrpc (2.0.0)
267
276
  rubysl-yaml (2.1.0)
268
277
  rubysl-zlib (2.0.1)
269
- sixarm_ruby_unaccent (1.1.1)
278
+ sixarm_ruby_unaccent (1.2.0)
270
279
  slop (3.6.0)
271
280
  sort_alphabetical (1.1.0)
272
281
  unicode_utils (>= 1.2.2)
273
- sprockets (2.2.3)
274
- hike (~> 1.2)
275
- multi_json (~> 1.0)
276
- rack (~> 1.0)
277
- tilt (~> 1.1, != 1.3.0)
278
- tilt (1.4.1)
282
+ thread_safe (0.3.6)
283
+ tzinfo (1.2.3)
284
+ thread_safe (~> 0.1)
279
285
  unicode_utils (1.4.0)
280
286
  wwtd (1.1.1)
281
287
 
@@ -283,7 +289,7 @@ PLATFORMS
283
289
  ruby
284
290
 
285
291
  DEPENDENCIES
286
- actionpack (~> 3)
292
+ actionpack (~> 5)
287
293
  country_select!
288
294
  pry (~> 0)
289
295
  psych
@@ -294,4 +300,4 @@ DEPENDENCIES
294
300
  wwtd
295
301
 
296
302
  BUNDLED WITH
297
- 1.14.4
303
+ 1.15.4
data/README.md CHANGED
@@ -75,6 +75,11 @@ Pre-selecting a particular country:
75
75
  country_select("user", "country", selected: "GB")
76
76
  ```
77
77
 
78
+ Changing the divider when priority_countries is active.
79
+ ```ruby
80
+ country_select("user", "country", priority_countries: ["AR", "US"], priority_countries_divider: "~~~~~~")
81
+ ```
82
+
78
83
  Using existing `select` options:
79
84
  ```ruby
80
85
  country_select("user", "country", include_blank: true)
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.required_ruby_version = '>= 2'
23
23
 
24
- s.add_development_dependency 'actionpack', '~> 3'
24
+ s.add_development_dependency 'actionpack', '~> 5'
25
25
  s.add_development_dependency 'pry', '~> 0'
26
26
  s.add_development_dependency 'rake'
27
27
  s.add_development_dependency 'rspec', '~> 3'
@@ -1,12 +1,12 @@
1
1
  GIT
2
2
  remote: https://github.com/rails/rails.git
3
- revision: f4d52eee07954c510a8318176d6d11100afabf7b
3
+ revision: 30767f980faa2d7a0531774ddf040471db74a23b
4
4
  specs:
5
5
  actionpack (5.2.0.alpha)
6
6
  actionview (= 5.2.0.alpha)
7
7
  activesupport (= 5.2.0.alpha)
8
8
  rack (~> 2.0)
9
- rack-test (~> 0.6.3)
9
+ rack-test (>= 0.6.3)
10
10
  rails-dom-testing (~> 2.0)
11
11
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
12
12
  actionview (5.2.0.alpha)
@@ -24,7 +24,7 @@ GIT
24
24
  PATH
25
25
  remote: ..
26
26
  specs:
27
- country_select (3.0.0)
27
+ country_select (3.1.1)
28
28
  countries (~> 2.0)
29
29
  sort_alphabetical (~> 1.0)
30
30
 
@@ -32,27 +32,27 @@ GEM
32
32
  remote: https://rubygems.org/
33
33
  specs:
34
34
  builder (3.2.3)
35
- coderay (1.1.1)
35
+ coderay (1.1.2)
36
36
  concurrent-ruby (1.0.5)
37
- countries (2.0.8)
38
- i18n_data (~> 0.7.0)
39
- money (~> 6.7)
37
+ countries (2.1.2)
38
+ i18n_data (~> 0.8.0)
39
+ money (~> 6.9)
40
40
  sixarm_ruby_unaccent (~> 1.1)
41
41
  unicode_utils (~> 1.4)
42
42
  diff-lcs (1.3)
43
43
  erubi (1.6.1)
44
44
  ffi2-generators (0.1.1)
45
45
  i18n (0.8.6)
46
- i18n_data (0.7.0)
46
+ i18n_data (0.8.0)
47
47
  loofah (2.0.3)
48
48
  nokogiri (>= 1.5.9)
49
49
  method_source (0.8.2)
50
- mini_portile2 (2.2.0)
51
- minitest (5.10.2)
50
+ mini_portile2 (2.3.0)
51
+ minitest (5.10.3)
52
52
  money (6.9.0)
53
53
  i18n (>= 0.6.4, < 0.9)
54
- nokogiri (1.8.0)
55
- mini_portile2 (~> 2.2.0)
54
+ nokogiri (1.8.1)
55
+ mini_portile2 (~> 2.3.0)
56
56
  pry (0.10.4)
57
57
  coderay (~> 1.1.0)
58
58
  method_source (~> 0.8.1)
@@ -60,14 +60,14 @@ GEM
60
60
  psych (2.2.4)
61
61
  racc (1.4.14)
62
62
  rack (2.0.3)
63
- rack-test (0.6.3)
64
- rack (>= 1.0)
63
+ rack-test (0.7.0)
64
+ rack (>= 1.0, < 3)
65
65
  rails-dom-testing (2.0.3)
66
66
  activesupport (>= 4.2.0)
67
67
  nokogiri (>= 1.6)
68
68
  rails-html-sanitizer (1.0.3)
69
69
  loofah (~> 2.0)
70
- rake (12.0.0)
70
+ rake (12.1.0)
71
71
  rspec (3.6.0)
72
72
  rspec-core (~> 3.6.0)
73
73
  rspec-expectations (~> 3.6.0)
@@ -283,7 +283,7 @@ GEM
283
283
  rubysl-xmlrpc (2.0.0)
284
284
  rubysl-yaml (2.1.0)
285
285
  rubysl-zlib (2.0.1)
286
- sixarm_ruby_unaccent (1.1.2)
286
+ sixarm_ruby_unaccent (1.2.0)
287
287
  slop (3.6.0)
288
288
  sort_alphabetical (1.1.0)
289
289
  unicode_utils (>= 1.2.2)
@@ -310,4 +310,4 @@ DEPENDENCIES
310
310
  wwtd
311
311
 
312
312
  BUNDLED WITH
313
- 1.15.1
313
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -26,9 +26,9 @@ GEM
26
26
  multi_json (~> 1.0)
27
27
  builder (3.0.4)
28
28
  coderay (1.1.1)
29
- countries (2.0.8)
30
- i18n_data (~> 0.7.0)
31
- money (~> 6.7)
29
+ countries (2.1.2)
30
+ i18n_data (~> 0.8.0)
31
+ money (~> 6.9)
32
32
  sixarm_ruby_unaccent (~> 1.1)
33
33
  unicode_utils (~> 1.4)
34
34
  diff-lcs (1.3)
@@ -36,7 +36,7 @@ GEM
36
36
  ffi2-generators (0.1.1)
37
37
  hike (1.2.3)
38
38
  i18n (0.8.6)
39
- i18n_data (0.7.0)
39
+ i18n_data (0.8.0)
40
40
  journey (1.0.4)
41
41
  method_source (0.8.2)
42
42
  money (6.9.0)
@@ -269,7 +269,7 @@ GEM
269
269
  rubysl-xmlrpc (2.0.0)
270
270
  rubysl-yaml (2.1.0)
271
271
  rubysl-zlib (2.0.1)
272
- sixarm_ruby_unaccent (1.1.2)
272
+ sixarm_ruby_unaccent (1.2.0)
273
273
  slop (3.6.0)
274
274
  sort_alphabetical (1.1.0)
275
275
  unicode_utils (>= 1.2.2)
@@ -297,4 +297,4 @@ DEPENDENCIES
297
297
  wwtd
298
298
 
299
299
  BUNDLED WITH
300
- 1.15.1
300
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -22,16 +22,16 @@ GEM
22
22
  tzinfo (~> 0.3.37)
23
23
  builder (3.1.4)
24
24
  coderay (1.1.1)
25
- countries (2.0.8)
26
- i18n_data (~> 0.7.0)
27
- money (~> 6.7)
25
+ countries (2.1.2)
26
+ i18n_data (~> 0.8.0)
27
+ money (~> 6.9)
28
28
  sixarm_ruby_unaccent (~> 1.1)
29
29
  unicode_utils (~> 1.4)
30
30
  diff-lcs (1.3)
31
31
  erubis (2.7.0)
32
32
  ffi2-generators (0.1.1)
33
33
  i18n (0.8.6)
34
- i18n_data (0.7.0)
34
+ i18n_data (0.8.0)
35
35
  method_source (0.8.2)
36
36
  minitest (4.7.5)
37
37
  money (6.9.0)
@@ -262,7 +262,7 @@ GEM
262
262
  rubysl-xmlrpc (2.0.0)
263
263
  rubysl-yaml (2.1.0)
264
264
  rubysl-zlib (2.0.1)
265
- sixarm_ruby_unaccent (1.1.2)
265
+ sixarm_ruby_unaccent (1.2.0)
266
266
  slop (3.6.0)
267
267
  sort_alphabetical (1.1.0)
268
268
  unicode_utils (>= 1.2.2)
@@ -286,4 +286,4 @@ DEPENDENCIES
286
286
  wwtd
287
287
 
288
288
  BUNDLED WITH
289
- 1.15.1
289
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -25,16 +25,16 @@ GEM
25
25
  tzinfo (~> 1.1)
26
26
  builder (3.2.3)
27
27
  coderay (1.1.1)
28
- countries (2.0.8)
29
- i18n_data (~> 0.7.0)
30
- money (~> 6.7)
28
+ countries (2.1.2)
29
+ i18n_data (~> 0.8.0)
30
+ money (~> 6.9)
31
31
  sixarm_ruby_unaccent (~> 1.1)
32
32
  unicode_utils (~> 1.4)
33
33
  diff-lcs (1.3)
34
34
  erubis (2.7.0)
35
35
  ffi2-generators (0.1.1)
36
36
  i18n (0.8.6)
37
- i18n_data (0.7.0)
37
+ i18n_data (0.8.0)
38
38
  json (1.8.6)
39
39
  method_source (0.8.2)
40
40
  minitest (5.10.2)
@@ -265,7 +265,7 @@ GEM
265
265
  rubysl-xmlrpc (2.0.0)
266
266
  rubysl-yaml (2.1.0)
267
267
  rubysl-zlib (2.0.1)
268
- sixarm_ruby_unaccent (1.1.2)
268
+ sixarm_ruby_unaccent (1.2.0)
269
269
  slop (3.6.0)
270
270
  sort_alphabetical (1.1.0)
271
271
  unicode_utils (>= 1.2.2)
@@ -290,4 +290,4 @@ DEPENDENCIES
290
290
  wwtd
291
291
 
292
292
  BUNDLED WITH
293
- 1.15.1
293
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -28,16 +28,16 @@ GEM
28
28
  tzinfo (~> 1.1)
29
29
  builder (3.2.3)
30
30
  coderay (1.1.1)
31
- countries (2.0.8)
32
- i18n_data (~> 0.7.0)
33
- money (~> 6.7)
31
+ countries (2.1.2)
32
+ i18n_data (~> 0.8.0)
33
+ money (~> 6.9)
34
34
  sixarm_ruby_unaccent (~> 1.1)
35
35
  unicode_utils (~> 1.4)
36
36
  diff-lcs (1.3)
37
37
  erubis (2.7.0)
38
38
  ffi2-generators (0.1.1)
39
39
  i18n (0.8.6)
40
- i18n_data (0.7.0)
40
+ i18n_data (0.8.0)
41
41
  loofah (2.0.3)
42
42
  nokogiri (>= 1.5.9)
43
43
  method_source (0.8.2)
@@ -280,7 +280,7 @@ GEM
280
280
  rubysl-xmlrpc (2.0.0)
281
281
  rubysl-yaml (2.1.0)
282
282
  rubysl-zlib (2.0.1)
283
- sixarm_ruby_unaccent (1.1.2)
283
+ sixarm_ruby_unaccent (1.2.0)
284
284
  slop (3.6.0)
285
285
  sort_alphabetical (1.1.0)
286
286
  unicode_utils (>= 1.2.2)
@@ -306,4 +306,4 @@ DEPENDENCIES
306
306
  wwtd
307
307
 
308
308
  BUNDLED WITH
309
- 1.15.1
309
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -29,16 +29,16 @@ GEM
29
29
  builder (3.2.3)
30
30
  coderay (1.1.1)
31
31
  concurrent-ruby (1.0.5)
32
- countries (2.0.8)
33
- i18n_data (~> 0.7.0)
34
- money (~> 6.7)
32
+ countries (2.1.2)
33
+ i18n_data (~> 0.8.0)
34
+ money (~> 6.9)
35
35
  sixarm_ruby_unaccent (~> 1.1)
36
36
  unicode_utils (~> 1.4)
37
37
  diff-lcs (1.3)
38
38
  erubis (2.7.0)
39
39
  ffi2-generators (0.1.1)
40
40
  i18n (0.8.6)
41
- i18n_data (0.7.0)
41
+ i18n_data (0.8.0)
42
42
  loofah (2.0.3)
43
43
  nokogiri (>= 1.5.9)
44
44
  method_source (0.8.2)
@@ -284,7 +284,7 @@ GEM
284
284
  rubysl-xmlrpc (2.0.0)
285
285
  rubysl-yaml (2.1.0)
286
286
  rubysl-zlib (2.0.1)
287
- sixarm_ruby_unaccent (1.1.2)
287
+ sixarm_ruby_unaccent (1.2.0)
288
288
  slop (3.6.0)
289
289
  sort_alphabetical (1.1.0)
290
290
  unicode_utils (>= 1.2.2)
@@ -311,4 +311,4 @@ DEPENDENCIES
311
311
  wwtd
312
312
 
313
313
  BUNDLED WITH
314
- 1.15.1
314
+ 1.15.4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (3.0.0)
4
+ country_select (3.1.1)
5
5
  countries (~> 2.0)
6
6
  sort_alphabetical (~> 1.0)
7
7
 
@@ -29,16 +29,16 @@ GEM
29
29
  builder (3.2.3)
30
30
  coderay (1.1.1)
31
31
  concurrent-ruby (1.0.5)
32
- countries (2.0.8)
33
- i18n_data (~> 0.7.0)
34
- money (~> 6.7)
32
+ countries (2.1.2)
33
+ i18n_data (~> 0.8.0)
34
+ money (~> 6.9)
35
35
  sixarm_ruby_unaccent (~> 1.1)
36
36
  unicode_utils (~> 1.4)
37
37
  diff-lcs (1.3)
38
38
  erubi (1.6.1)
39
39
  ffi2-generators (0.1.1)
40
40
  i18n (0.8.6)
41
- i18n_data (0.7.0)
41
+ i18n_data (0.8.0)
42
42
  loofah (2.0.3)
43
43
  nokogiri (>= 1.5.9)
44
44
  method_source (0.8.2)
@@ -284,7 +284,7 @@ GEM
284
284
  rubysl-xmlrpc (2.0.0)
285
285
  rubysl-yaml (2.1.0)
286
286
  rubysl-zlib (2.0.1)
287
- sixarm_ruby_unaccent (1.1.2)
287
+ sixarm_ruby_unaccent (1.2.0)
288
288
  slop (3.6.0)
289
289
  sort_alphabetical (1.1.0)
290
290
  unicode_utils (>= 1.2.2)
@@ -311,4 +311,4 @@ DEPENDENCIES
311
311
  wwtd
312
312
 
313
313
  BUNDLED WITH
314
- 1.15.1
314
+ 1.15.4
@@ -2,8 +2,19 @@ module CountrySelect
2
2
  class CountryNotFoundError < StandardError;end
3
3
  module TagHelper
4
4
  def country_option_tags
5
+ # In Rails 5.2+, `value` accepts no arguments and must also be called
6
+ # called with parens to avoid the local variable of the same name
7
+ # https://github.com/rails/rails/pull/29791
8
+ selected_option = @options.fetch(:selected) do
9
+ if self.method(:value).arity == 0
10
+ value()
11
+ else
12
+ value(@object)
13
+ end
14
+ end
15
+
5
16
  option_tags_options = {
6
- :selected => @options.fetch(:selected) { value(@object) },
17
+ :selected => selected_option,
7
18
  :disabled => @options[:disabled]
8
19
  }
9
20
 
@@ -1,3 +1,3 @@
1
1
  module CountrySelect
2
- VERSION = "3.1.0"
2
+ VERSION = "3.1.1"
3
3
  end
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: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Penner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-18 00:00:00.000000000 Z
11
+ date: 2017-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3'
19
+ version: '5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3'
26
+ version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  requirements: []
173
173
  rubyforge_project: country_select
174
- rubygems_version: 2.6.11
174
+ rubygems_version: 2.6.13
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: Country Select Plugin