country_select 8.0.3 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql-analysis.yml +1 -1
- data/.github/workflows/test.yml +5 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +52 -49
- data/README.md +1 -1
- data/country_select.gemspec +2 -2
- data/gemfiles/actionpack-6.1.gemfile.lock +43 -44
- data/gemfiles/actionpack-7.0.gemfile.lock +43 -42
- data/gemfiles/actionpack-7.1.gemfile.lock +57 -57
- data/gemfiles/actionpack-7.2.gemfile +9 -0
- data/gemfiles/actionpack-7.2.gemfile.lock +157 -0
- data/lib/country_select/country_select_helper.rb +3 -13
- data/lib/country_select/tag_helper.rb +1 -1
- data/lib/country_select/version.rb +1 -1
- data/spec/country_select_spec.rb +4 -66
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1367d0d5496b47fad1f2952b50ea69c3debd17fccfa78ba0614d146ac5739f
|
4
|
+
data.tar.gz: cedbc815ad549d03c5b8c84c7595b17dc8ca317a20225955f4e87a372e3a03ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9698b322475af128513c1aa5ca91afcfc8764830b8e5e8e8f2c86892aede617f88218045a63da8ea794d8587bb68427608e3746dbcd8dc6c84177245922304f4
|
7
|
+
data.tar.gz: f12aff843e0e7a1f8df6d51b2c3373c983be5b6f98012647f439ea6d34cbec69a9a2ea87885f02949903353eef9a639fc82e48ffbfd08fc2575e7ff8217fb43a
|
data/.github/workflows/test.yml
CHANGED
@@ -16,21 +16,22 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [
|
20
|
-
gemfile: [6.1, '7.0', 7.1]
|
19
|
+
ruby: [3.1, 3.2, 3.3]
|
20
|
+
gemfile: [6.1, '7.0', 7.1, 7.2]
|
21
21
|
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
22
22
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/actionpack-${{ matrix.gemfile }}.gemfile
|
23
23
|
CC_TEST_REPORTER_ID: 0d09e6611c01dedd75511b1c60f62329d01729289e06375cfe67cefe67013d9f
|
24
24
|
steps:
|
25
|
-
- uses: actions/checkout@
|
25
|
+
- uses: actions/checkout@v4
|
26
26
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
27
27
|
uses: ruby/setup-ruby@v1
|
28
28
|
with:
|
29
29
|
ruby-version: ${{ matrix.ruby }}
|
30
30
|
bundler-cache: true
|
31
|
+
cache-version: 9
|
31
32
|
- name: Run tests
|
32
33
|
|
33
34
|
run: bundle exec rake
|
34
35
|
- name: Publish code coverage
|
35
|
-
uses: paambaati/codeclimate-action@
|
36
|
+
uses: paambaati/codeclimate-action@v5.0.0
|
36
37
|
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 10.0.0 2024-09-29
|
2
|
+
|
3
|
+
* Drop support for Ruby 3.0 (EOL 2024-04-23) (@pmor)
|
4
|
+
* Add Rails 7.2 to the test matrix (@pmor)
|
5
|
+
* Update countries gem to 7.0.0 (@pmor)
|
6
|
+
|
7
|
+
## 9.0.0 2024-02-17
|
8
|
+
|
9
|
+
* Drop support for Ruby 2.7, Rails 5.2 and 6.0 (@pmor)
|
10
|
+
* Remove support for deprecated 1.x syntax (@pmor)
|
11
|
+
|
1
12
|
## 8.0.3 2023-10-07
|
2
13
|
|
3
14
|
* Fix when country name is nil. (@zerobearing2)
|
data/Gemfile.lock
CHANGED
@@ -1,74 +1,76 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
country_select (
|
5
|
-
countries (
|
4
|
+
country_select (9.0.0)
|
5
|
+
countries (> 5.0, < 8.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (7.1
|
11
|
-
actionview (= 7.1
|
12
|
-
activesupport (= 7.1
|
10
|
+
actionpack (7.2.1)
|
11
|
+
actionview (= 7.2.1)
|
12
|
+
activesupport (= 7.2.1)
|
13
13
|
nokogiri (>= 1.8.5)
|
14
|
-
|
14
|
+
racc
|
15
|
+
rack (>= 2.2.4, < 3.2)
|
15
16
|
rack-session (>= 1.0.1)
|
16
17
|
rack-test (>= 0.6.3)
|
17
18
|
rails-dom-testing (~> 2.2)
|
18
19
|
rails-html-sanitizer (~> 1.6)
|
19
|
-
|
20
|
-
|
20
|
+
useragent (~> 0.16)
|
21
|
+
actionview (7.2.1)
|
22
|
+
activesupport (= 7.2.1)
|
21
23
|
builder (~> 3.1)
|
22
24
|
erubi (~> 1.11)
|
23
25
|
rails-dom-testing (~> 2.2)
|
24
26
|
rails-html-sanitizer (~> 1.6)
|
25
|
-
activesupport (7.1
|
27
|
+
activesupport (7.2.1)
|
26
28
|
base64
|
27
29
|
bigdecimal
|
28
|
-
concurrent-ruby (~> 1.0, >= 1.
|
30
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
29
31
|
connection_pool (>= 2.2.5)
|
30
32
|
drb
|
31
33
|
i18n (>= 1.6, < 2)
|
34
|
+
logger (>= 1.4.2)
|
32
35
|
minitest (>= 5.1)
|
33
|
-
|
34
|
-
tzinfo (~> 2.0)
|
35
|
-
base64 (0.
|
36
|
-
bigdecimal (3.1.
|
37
|
-
builder (3.
|
36
|
+
securerandom (>= 0.3)
|
37
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
38
|
+
base64 (0.2.0)
|
39
|
+
bigdecimal (3.1.8)
|
40
|
+
builder (3.3.0)
|
38
41
|
coderay (1.1.3)
|
39
|
-
concurrent-ruby (1.
|
42
|
+
concurrent-ruby (1.3.4)
|
40
43
|
connection_pool (2.4.1)
|
41
|
-
countries (
|
44
|
+
countries (7.0.0)
|
42
45
|
unaccent (~> 0.3)
|
43
46
|
crass (1.0.6)
|
44
|
-
diff-lcs (1.5.
|
45
|
-
docile (1.4.
|
46
|
-
drb (2.
|
47
|
-
|
48
|
-
|
49
|
-
i18n (1.14.1)
|
47
|
+
diff-lcs (1.5.1)
|
48
|
+
docile (1.4.1)
|
49
|
+
drb (2.2.1)
|
50
|
+
erubi (1.13.0)
|
51
|
+
i18n (1.14.6)
|
50
52
|
concurrent-ruby (~> 1.0)
|
51
|
-
|
53
|
+
logger (1.6.1)
|
54
|
+
loofah (2.22.0)
|
52
55
|
crass (~> 1.0.2)
|
53
56
|
nokogiri (>= 1.12.0)
|
54
|
-
method_source (1.
|
55
|
-
mini_portile2 (2.8.
|
56
|
-
minitest (5.
|
57
|
-
|
58
|
-
nokogiri (1.15.4)
|
57
|
+
method_source (1.1.0)
|
58
|
+
mini_portile2 (2.8.7)
|
59
|
+
minitest (5.25.1)
|
60
|
+
nokogiri (1.16.7)
|
59
61
|
mini_portile2 (~> 2.8.2)
|
60
62
|
racc (~> 1.4)
|
61
|
-
nokogiri (1.
|
63
|
+
nokogiri (1.16.7-arm64-darwin)
|
62
64
|
racc (~> 1.4)
|
63
|
-
nokogiri (1.
|
65
|
+
nokogiri (1.16.7-x86_64-darwin)
|
64
66
|
racc (~> 1.4)
|
65
|
-
nokogiri (1.
|
67
|
+
nokogiri (1.16.7-x86_64-linux)
|
66
68
|
racc (~> 1.4)
|
67
69
|
pry (0.14.2)
|
68
70
|
coderay (~> 1.1)
|
69
71
|
method_source (~> 1.0)
|
70
|
-
racc (1.
|
71
|
-
rack (3.
|
72
|
+
racc (1.8.1)
|
73
|
+
rack (3.1.7)
|
72
74
|
rack-session (2.0.0)
|
73
75
|
rack (>= 3.0.0)
|
74
76
|
rack-test (2.1.0)
|
@@ -80,30 +82,31 @@ GEM
|
|
80
82
|
rails-html-sanitizer (1.6.0)
|
81
83
|
loofah (~> 2.21)
|
82
84
|
nokogiri (~> 1.14)
|
83
|
-
rake (13.
|
84
|
-
rspec (3.
|
85
|
-
rspec-core (~> 3.
|
86
|
-
rspec-expectations (~> 3.
|
87
|
-
rspec-mocks (~> 3.
|
88
|
-
rspec-core (3.
|
89
|
-
rspec-support (~> 3.
|
90
|
-
rspec-expectations (3.
|
85
|
+
rake (13.2.1)
|
86
|
+
rspec (3.13.0)
|
87
|
+
rspec-core (~> 3.13.0)
|
88
|
+
rspec-expectations (~> 3.13.0)
|
89
|
+
rspec-mocks (~> 3.13.0)
|
90
|
+
rspec-core (3.13.1)
|
91
|
+
rspec-support (~> 3.13.0)
|
92
|
+
rspec-expectations (3.13.3)
|
91
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
92
|
-
rspec-support (~> 3.
|
93
|
-
rspec-mocks (3.
|
94
|
+
rspec-support (~> 3.13.0)
|
95
|
+
rspec-mocks (3.13.1)
|
94
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-support (3.
|
97
|
-
|
97
|
+
rspec-support (~> 3.13.0)
|
98
|
+
rspec-support (3.13.1)
|
99
|
+
securerandom (0.3.1)
|
98
100
|
simplecov (0.22.0)
|
99
101
|
docile (~> 1.1)
|
100
102
|
simplecov-html (~> 0.11)
|
101
103
|
simplecov_json_formatter (~> 0.1)
|
102
|
-
simplecov-html (0.
|
104
|
+
simplecov-html (0.13.1)
|
103
105
|
simplecov_json_formatter (0.1.4)
|
104
106
|
tzinfo (2.0.6)
|
105
107
|
concurrent-ruby (~> 1.0)
|
106
108
|
unaccent (0.4.0)
|
109
|
+
useragent (0.16.10)
|
107
110
|
|
108
111
|
PLATFORMS
|
109
112
|
arm64-darwin-22
|
@@ -120,4 +123,4 @@ DEPENDENCIES
|
|
120
123
|
simplecov (~> 0.22)
|
121
124
|
|
122
125
|
BUNDLED WITH
|
123
|
-
2.
|
126
|
+
2.5.11
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Rails – Country Select
|
2
|
-
[![Gem Version](https://badge.fury.io/rb/country_select.svg)](https://badge.fury.io/rb/
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/country_select.svg)](https://badge.fury.io/rb/country_select) [![build](https://github.com/countries/country_select/actions/workflows/test.yml/badge.svg)](https://github.com/countries/country_select/actions/workflows/test.yml)
|
3
3
|
[![Code Climate](https://codeclimate.com/github/countries/country_select.svg)](https://codeclimate.com/github/countries/country_select)
|
4
4
|
[![CodeQL](https://github.com/countries/country_select/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/countries/country_select/actions/workflows/codeql-analysis.yml)
|
5
5
|
|
data/country_select.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
25
25
|
s.require_paths = ['lib']
|
26
26
|
|
27
|
-
s.required_ruby_version = '>=
|
27
|
+
s.required_ruby_version = '>= 3.1'
|
28
28
|
|
29
29
|
s.add_development_dependency 'actionpack', '~> 7.0'
|
30
30
|
s.add_development_dependency 'pry', '~> 0'
|
@@ -32,5 +32,5 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_development_dependency 'rspec', '~> 3'
|
33
33
|
s.add_development_dependency 'simplecov', '~> 0.22'
|
34
34
|
|
35
|
-
s.add_dependency 'countries', '
|
35
|
+
s.add_dependency 'countries', '> 5.0', '< 8.0'
|
36
36
|
end
|
@@ -1,58 +1,56 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
country_select (
|
5
|
-
countries (
|
4
|
+
country_select (10.0.0)
|
5
|
+
countries (> 5.0, < 8.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (6.1.7.
|
11
|
-
actionview (= 6.1.7.
|
12
|
-
activesupport (= 6.1.7.
|
10
|
+
actionpack (6.1.7.8)
|
11
|
+
actionview (= 6.1.7.8)
|
12
|
+
activesupport (= 6.1.7.8)
|
13
13
|
rack (~> 2.0, >= 2.0.9)
|
14
14
|
rack-test (>= 0.6.3)
|
15
15
|
rails-dom-testing (~> 2.0)
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
-
actionview (6.1.7.
|
18
|
-
activesupport (= 6.1.7.
|
17
|
+
actionview (6.1.7.8)
|
18
|
+
activesupport (= 6.1.7.8)
|
19
19
|
builder (~> 3.1)
|
20
20
|
erubi (~> 1.4)
|
21
21
|
rails-dom-testing (~> 2.0)
|
22
22
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
-
activesupport (6.1.7.
|
23
|
+
activesupport (6.1.7.8)
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
25
|
i18n (>= 1.6, < 2)
|
26
26
|
minitest (>= 5.1)
|
27
27
|
tzinfo (~> 2.0)
|
28
28
|
zeitwerk (~> 2.3)
|
29
|
-
builder (3.
|
29
|
+
builder (3.3.0)
|
30
30
|
coderay (1.1.3)
|
31
|
-
concurrent-ruby (1.
|
32
|
-
countries (
|
31
|
+
concurrent-ruby (1.3.4)
|
32
|
+
countries (7.0.0)
|
33
33
|
unaccent (~> 0.3)
|
34
34
|
crass (1.0.6)
|
35
|
-
diff-lcs (1.5.
|
36
|
-
docile (1.4.
|
37
|
-
erubi (1.
|
38
|
-
i18n (1.14.
|
35
|
+
diff-lcs (1.5.1)
|
36
|
+
docile (1.4.1)
|
37
|
+
erubi (1.13.0)
|
38
|
+
i18n (1.14.6)
|
39
39
|
concurrent-ruby (~> 1.0)
|
40
|
-
loofah (2.
|
40
|
+
loofah (2.22.0)
|
41
41
|
crass (~> 1.0.2)
|
42
42
|
nokogiri (>= 1.12.0)
|
43
|
-
method_source (1.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
racc (~> 1.4)
|
49
|
-
nokogiri (1.14.0.rc1-x86_64-linux)
|
43
|
+
method_source (1.1.0)
|
44
|
+
mini_portile2 (2.8.7)
|
45
|
+
minitest (5.25.1)
|
46
|
+
nokogiri (1.14.0.rc1)
|
47
|
+
mini_portile2 (~> 2.8.0)
|
50
48
|
racc (~> 1.4)
|
51
49
|
pry (0.14.2)
|
52
50
|
coderay (~> 1.1)
|
53
51
|
method_source (~> 1.0)
|
54
|
-
racc (1.
|
55
|
-
rack (2.2.
|
52
|
+
racc (1.8.1)
|
53
|
+
rack (2.2.9)
|
56
54
|
rack-test (2.1.0)
|
57
55
|
rack (>= 1.3)
|
58
56
|
rails-dom-testing (2.2.0)
|
@@ -61,40 +59,41 @@ GEM
|
|
61
59
|
nokogiri (>= 1.6)
|
62
60
|
rails-html-sanitizer (1.5.0)
|
63
61
|
loofah (~> 2.19, >= 2.19.1)
|
64
|
-
railties (6.1.7.
|
65
|
-
actionpack (= 6.1.7.
|
66
|
-
activesupport (= 6.1.7.
|
62
|
+
railties (6.1.7.8)
|
63
|
+
actionpack (= 6.1.7.8)
|
64
|
+
activesupport (= 6.1.7.8)
|
67
65
|
method_source
|
68
66
|
rake (>= 12.2)
|
69
67
|
thor (~> 1.0)
|
70
|
-
rake (13.
|
71
|
-
rspec (3.
|
72
|
-
rspec-core (~> 3.
|
73
|
-
rspec-expectations (~> 3.
|
74
|
-
rspec-mocks (~> 3.
|
75
|
-
rspec-core (3.
|
76
|
-
rspec-support (~> 3.
|
77
|
-
rspec-expectations (3.
|
68
|
+
rake (13.2.1)
|
69
|
+
rspec (3.13.0)
|
70
|
+
rspec-core (~> 3.13.0)
|
71
|
+
rspec-expectations (~> 3.13.0)
|
72
|
+
rspec-mocks (~> 3.13.0)
|
73
|
+
rspec-core (3.13.1)
|
74
|
+
rspec-support (~> 3.13.0)
|
75
|
+
rspec-expectations (3.13.3)
|
78
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
79
|
-
rspec-support (~> 3.
|
80
|
-
rspec-mocks (3.
|
77
|
+
rspec-support (~> 3.13.0)
|
78
|
+
rspec-mocks (3.13.1)
|
81
79
|
diff-lcs (>= 1.2.0, < 2.0)
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-support (3.
|
80
|
+
rspec-support (~> 3.13.0)
|
81
|
+
rspec-support (3.13.1)
|
84
82
|
simplecov (0.22.0)
|
85
83
|
docile (~> 1.1)
|
86
84
|
simplecov-html (~> 0.11)
|
87
85
|
simplecov_json_formatter (~> 0.1)
|
88
|
-
simplecov-html (0.
|
86
|
+
simplecov-html (0.13.1)
|
89
87
|
simplecov_json_formatter (0.1.4)
|
90
|
-
thor (1.
|
88
|
+
thor (1.3.2)
|
91
89
|
tzinfo (2.0.6)
|
92
90
|
concurrent-ruby (~> 1.0)
|
93
91
|
unaccent (0.4.0)
|
94
|
-
zeitwerk (2.6.
|
92
|
+
zeitwerk (2.6.18)
|
95
93
|
|
96
94
|
PLATFORMS
|
97
95
|
arm64-darwin-22
|
96
|
+
arm64-darwin-23
|
98
97
|
x86_64-darwin-22
|
99
98
|
x86_64-linux
|
100
99
|
|
@@ -109,4 +108,4 @@ DEPENDENCIES
|
|
109
108
|
simplecov (~> 0.22)
|
110
109
|
|
111
110
|
BUNDLED WITH
|
112
|
-
2.
|
111
|
+
2.5.18
|
@@ -1,57 +1,57 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
country_select (
|
5
|
-
countries (
|
4
|
+
country_select (10.0.0)
|
5
|
+
countries (> 5.0, < 8.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (7.0.8)
|
11
|
-
actionview (= 7.0.8)
|
12
|
-
activesupport (= 7.0.8)
|
10
|
+
actionpack (7.0.8.4)
|
11
|
+
actionview (= 7.0.8.4)
|
12
|
+
activesupport (= 7.0.8.4)
|
13
13
|
rack (~> 2.0, >= 2.2.4)
|
14
14
|
rack-test (>= 0.6.3)
|
15
15
|
rails-dom-testing (~> 2.0)
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
-
actionview (7.0.8)
|
18
|
-
activesupport (= 7.0.8)
|
17
|
+
actionview (7.0.8.4)
|
18
|
+
activesupport (= 7.0.8.4)
|
19
19
|
builder (~> 3.1)
|
20
20
|
erubi (~> 1.4)
|
21
21
|
rails-dom-testing (~> 2.0)
|
22
22
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
-
activesupport (7.0.8)
|
23
|
+
activesupport (7.0.8.4)
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
25
|
i18n (>= 1.6, < 2)
|
26
26
|
minitest (>= 5.1)
|
27
27
|
tzinfo (~> 2.0)
|
28
|
-
builder (3.
|
28
|
+
builder (3.3.0)
|
29
29
|
coderay (1.1.3)
|
30
|
-
concurrent-ruby (1.
|
31
|
-
countries (
|
30
|
+
concurrent-ruby (1.3.4)
|
31
|
+
countries (7.0.0)
|
32
32
|
unaccent (~> 0.3)
|
33
33
|
crass (1.0.6)
|
34
|
-
diff-lcs (1.5.
|
35
|
-
docile (1.4.
|
36
|
-
erubi (1.
|
37
|
-
i18n (1.14.
|
34
|
+
diff-lcs (1.5.1)
|
35
|
+
docile (1.4.1)
|
36
|
+
erubi (1.13.0)
|
37
|
+
i18n (1.14.6)
|
38
38
|
concurrent-ruby (~> 1.0)
|
39
|
-
loofah (2.
|
39
|
+
loofah (2.22.0)
|
40
40
|
crass (~> 1.0.2)
|
41
41
|
nokogiri (>= 1.12.0)
|
42
|
-
method_source (1.
|
43
|
-
minitest (5.
|
44
|
-
nokogiri (1.
|
42
|
+
method_source (1.1.0)
|
43
|
+
minitest (5.25.1)
|
44
|
+
nokogiri (1.16.7-arm64-darwin)
|
45
45
|
racc (~> 1.4)
|
46
|
-
nokogiri (1.
|
46
|
+
nokogiri (1.16.7-x86_64-darwin)
|
47
47
|
racc (~> 1.4)
|
48
|
-
nokogiri (1.
|
48
|
+
nokogiri (1.16.7-x86_64-linux)
|
49
49
|
racc (~> 1.4)
|
50
50
|
pry (0.14.2)
|
51
51
|
coderay (~> 1.1)
|
52
52
|
method_source (~> 1.0)
|
53
|
-
racc (1.
|
54
|
-
rack (2.2.
|
53
|
+
racc (1.8.1)
|
54
|
+
rack (2.2.9)
|
55
55
|
rack-test (2.1.0)
|
56
56
|
rack (>= 1.3)
|
57
57
|
rails-dom-testing (2.2.0)
|
@@ -61,41 +61,42 @@ GEM
|
|
61
61
|
rails-html-sanitizer (1.6.0)
|
62
62
|
loofah (~> 2.21)
|
63
63
|
nokogiri (~> 1.14)
|
64
|
-
railties (7.0.8)
|
65
|
-
actionpack (= 7.0.8)
|
66
|
-
activesupport (= 7.0.8)
|
64
|
+
railties (7.0.8.4)
|
65
|
+
actionpack (= 7.0.8.4)
|
66
|
+
activesupport (= 7.0.8.4)
|
67
67
|
method_source
|
68
68
|
rake (>= 12.2)
|
69
69
|
thor (~> 1.0)
|
70
70
|
zeitwerk (~> 2.5)
|
71
|
-
rake (13.
|
72
|
-
rspec (3.
|
73
|
-
rspec-core (~> 3.
|
74
|
-
rspec-expectations (~> 3.
|
75
|
-
rspec-mocks (~> 3.
|
76
|
-
rspec-core (3.
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-expectations (3.
|
71
|
+
rake (13.2.1)
|
72
|
+
rspec (3.13.0)
|
73
|
+
rspec-core (~> 3.13.0)
|
74
|
+
rspec-expectations (~> 3.13.0)
|
75
|
+
rspec-mocks (~> 3.13.0)
|
76
|
+
rspec-core (3.13.1)
|
77
|
+
rspec-support (~> 3.13.0)
|
78
|
+
rspec-expectations (3.13.3)
|
79
79
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-mocks (3.
|
80
|
+
rspec-support (~> 3.13.0)
|
81
|
+
rspec-mocks (3.13.1)
|
82
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-support (3.
|
83
|
+
rspec-support (~> 3.13.0)
|
84
|
+
rspec-support (3.13.1)
|
85
85
|
simplecov (0.22.0)
|
86
86
|
docile (~> 1.1)
|
87
87
|
simplecov-html (~> 0.11)
|
88
88
|
simplecov_json_formatter (~> 0.1)
|
89
|
-
simplecov-html (0.
|
89
|
+
simplecov-html (0.13.1)
|
90
90
|
simplecov_json_formatter (0.1.4)
|
91
|
-
thor (1.
|
91
|
+
thor (1.3.2)
|
92
92
|
tzinfo (2.0.6)
|
93
93
|
concurrent-ruby (~> 1.0)
|
94
94
|
unaccent (0.4.0)
|
95
|
-
zeitwerk (2.6.
|
95
|
+
zeitwerk (2.6.18)
|
96
96
|
|
97
97
|
PLATFORMS
|
98
98
|
arm64-darwin-22
|
99
|
+
arm64-darwin-23
|
99
100
|
x86_64-darwin-22
|
100
101
|
x86_64-linux
|
101
102
|
|
@@ -110,4 +111,4 @@ DEPENDENCIES
|
|
110
111
|
simplecov (~> 0.22)
|
111
112
|
|
112
113
|
BUNDLED WITH
|
113
|
-
2.
|
114
|
+
2.5.18
|
@@ -1,28 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
country_select (
|
5
|
-
countries (
|
4
|
+
country_select (10.0.0)
|
5
|
+
countries (> 5.0, < 8.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (7.1.
|
11
|
-
actionview (= 7.1.
|
12
|
-
activesupport (= 7.1.
|
10
|
+
actionpack (7.1.4)
|
11
|
+
actionview (= 7.1.4)
|
12
|
+
activesupport (= 7.1.4)
|
13
13
|
nokogiri (>= 1.8.5)
|
14
|
+
racc
|
14
15
|
rack (>= 2.2.4)
|
15
16
|
rack-session (>= 1.0.1)
|
16
17
|
rack-test (>= 0.6.3)
|
17
18
|
rails-dom-testing (~> 2.2)
|
18
19
|
rails-html-sanitizer (~> 1.6)
|
19
|
-
actionview (7.1.
|
20
|
-
activesupport (= 7.1.
|
20
|
+
actionview (7.1.4)
|
21
|
+
activesupport (= 7.1.4)
|
21
22
|
builder (~> 3.1)
|
22
23
|
erubi (~> 1.11)
|
23
24
|
rails-dom-testing (~> 2.2)
|
24
25
|
rails-html-sanitizer (~> 1.6)
|
25
|
-
activesupport (7.1.
|
26
|
+
activesupport (7.1.4)
|
26
27
|
base64
|
27
28
|
bigdecimal
|
28
29
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -32,45 +33,44 @@ GEM
|
|
32
33
|
minitest (>= 5.1)
|
33
34
|
mutex_m
|
34
35
|
tzinfo (~> 2.0)
|
35
|
-
base64 (0.
|
36
|
-
bigdecimal (3.1.
|
37
|
-
builder (3.
|
36
|
+
base64 (0.2.0)
|
37
|
+
bigdecimal (3.1.8)
|
38
|
+
builder (3.3.0)
|
38
39
|
coderay (1.1.3)
|
39
|
-
concurrent-ruby (1.
|
40
|
+
concurrent-ruby (1.3.4)
|
40
41
|
connection_pool (2.4.1)
|
41
|
-
countries (
|
42
|
+
countries (7.0.0)
|
42
43
|
unaccent (~> 0.3)
|
43
44
|
crass (1.0.6)
|
44
|
-
diff-lcs (1.5.
|
45
|
-
docile (1.4.
|
46
|
-
drb (2.
|
47
|
-
|
48
|
-
|
49
|
-
i18n (1.14.1)
|
45
|
+
diff-lcs (1.5.1)
|
46
|
+
docile (1.4.1)
|
47
|
+
drb (2.2.1)
|
48
|
+
erubi (1.13.0)
|
49
|
+
i18n (1.14.6)
|
50
50
|
concurrent-ruby (~> 1.0)
|
51
|
-
io-console (0.
|
52
|
-
irb (1.
|
53
|
-
rdoc
|
54
|
-
reline (>= 0.
|
55
|
-
loofah (2.
|
51
|
+
io-console (0.7.2)
|
52
|
+
irb (1.14.1)
|
53
|
+
rdoc (>= 4.0.0)
|
54
|
+
reline (>= 0.4.2)
|
55
|
+
loofah (2.22.0)
|
56
56
|
crass (~> 1.0.2)
|
57
57
|
nokogiri (>= 1.12.0)
|
58
|
-
method_source (1.
|
59
|
-
minitest (5.
|
60
|
-
mutex_m (0.
|
61
|
-
nokogiri (1.
|
58
|
+
method_source (1.1.0)
|
59
|
+
minitest (5.25.1)
|
60
|
+
mutex_m (0.2.0)
|
61
|
+
nokogiri (1.16.7-arm64-darwin)
|
62
62
|
racc (~> 1.4)
|
63
|
-
nokogiri (1.
|
63
|
+
nokogiri (1.16.7-x86_64-darwin)
|
64
64
|
racc (~> 1.4)
|
65
|
-
nokogiri (1.
|
65
|
+
nokogiri (1.16.7-x86_64-linux)
|
66
66
|
racc (~> 1.4)
|
67
67
|
pry (0.14.2)
|
68
68
|
coderay (~> 1.1)
|
69
69
|
method_source (~> 1.0)
|
70
|
-
psych (5.1.
|
70
|
+
psych (5.1.2)
|
71
71
|
stringio
|
72
|
-
racc (1.
|
73
|
-
rack (3.
|
72
|
+
racc (1.8.1)
|
73
|
+
rack (3.1.7)
|
74
74
|
rack-session (2.0.0)
|
75
75
|
rack (>= 3.0.0)
|
76
76
|
rack-test (2.1.0)
|
@@ -85,49 +85,49 @@ GEM
|
|
85
85
|
rails-html-sanitizer (1.6.0)
|
86
86
|
loofah (~> 2.21)
|
87
87
|
nokogiri (~> 1.14)
|
88
|
-
railties (7.1.
|
89
|
-
actionpack (= 7.1.
|
90
|
-
activesupport (= 7.1.
|
88
|
+
railties (7.1.4)
|
89
|
+
actionpack (= 7.1.4)
|
90
|
+
activesupport (= 7.1.4)
|
91
91
|
irb
|
92
92
|
rackup (>= 1.0.0)
|
93
93
|
rake (>= 12.2)
|
94
94
|
thor (~> 1.0, >= 1.2.2)
|
95
95
|
zeitwerk (~> 2.6)
|
96
|
-
rake (13.
|
97
|
-
rdoc (6.
|
96
|
+
rake (13.2.1)
|
97
|
+
rdoc (6.7.0)
|
98
98
|
psych (>= 4.0.0)
|
99
|
-
reline (0.
|
99
|
+
reline (0.5.10)
|
100
100
|
io-console (~> 0.5)
|
101
|
-
rspec (3.
|
102
|
-
rspec-core (~> 3.
|
103
|
-
rspec-expectations (~> 3.
|
104
|
-
rspec-mocks (~> 3.
|
105
|
-
rspec-core (3.
|
106
|
-
rspec-support (~> 3.
|
107
|
-
rspec-expectations (3.
|
101
|
+
rspec (3.13.0)
|
102
|
+
rspec-core (~> 3.13.0)
|
103
|
+
rspec-expectations (~> 3.13.0)
|
104
|
+
rspec-mocks (~> 3.13.0)
|
105
|
+
rspec-core (3.13.1)
|
106
|
+
rspec-support (~> 3.13.0)
|
107
|
+
rspec-expectations (3.13.3)
|
108
108
|
diff-lcs (>= 1.2.0, < 2.0)
|
109
|
-
rspec-support (~> 3.
|
110
|
-
rspec-mocks (3.
|
109
|
+
rspec-support (~> 3.13.0)
|
110
|
+
rspec-mocks (3.13.1)
|
111
111
|
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
-
rspec-support (~> 3.
|
113
|
-
rspec-support (3.
|
114
|
-
ruby2_keywords (0.0.5)
|
112
|
+
rspec-support (~> 3.13.0)
|
113
|
+
rspec-support (3.13.1)
|
115
114
|
simplecov (0.22.0)
|
116
115
|
docile (~> 1.1)
|
117
116
|
simplecov-html (~> 0.11)
|
118
117
|
simplecov_json_formatter (~> 0.1)
|
119
|
-
simplecov-html (0.
|
118
|
+
simplecov-html (0.13.1)
|
120
119
|
simplecov_json_formatter (0.1.4)
|
121
|
-
stringio (3.
|
122
|
-
thor (1.
|
120
|
+
stringio (3.1.1)
|
121
|
+
thor (1.3.2)
|
123
122
|
tzinfo (2.0.6)
|
124
123
|
concurrent-ruby (~> 1.0)
|
125
124
|
unaccent (0.4.0)
|
126
|
-
webrick (1.8.
|
127
|
-
zeitwerk (2.6.
|
125
|
+
webrick (1.8.2)
|
126
|
+
zeitwerk (2.6.18)
|
128
127
|
|
129
128
|
PLATFORMS
|
130
129
|
arm64-darwin-22
|
130
|
+
arm64-darwin-23
|
131
131
|
x86_64-darwin-22
|
132
132
|
x86_64-linux
|
133
133
|
|
@@ -142,4 +142,4 @@ DEPENDENCIES
|
|
142
142
|
simplecov (~> 0.22)
|
143
143
|
|
144
144
|
BUNDLED WITH
|
145
|
-
2.
|
145
|
+
2.5.18
|
@@ -0,0 +1,157 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
country_select (10.0.0)
|
5
|
+
countries (> 5.0, < 8.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (7.2.1)
|
11
|
+
actionview (= 7.2.1)
|
12
|
+
activesupport (= 7.2.1)
|
13
|
+
nokogiri (>= 1.8.5)
|
14
|
+
racc
|
15
|
+
rack (>= 2.2.4, < 3.2)
|
16
|
+
rack-session (>= 1.0.1)
|
17
|
+
rack-test (>= 0.6.3)
|
18
|
+
rails-dom-testing (~> 2.2)
|
19
|
+
rails-html-sanitizer (~> 1.6)
|
20
|
+
useragent (~> 0.16)
|
21
|
+
actionview (7.2.1)
|
22
|
+
activesupport (= 7.2.1)
|
23
|
+
builder (~> 3.1)
|
24
|
+
erubi (~> 1.11)
|
25
|
+
rails-dom-testing (~> 2.2)
|
26
|
+
rails-html-sanitizer (~> 1.6)
|
27
|
+
activesupport (7.2.1)
|
28
|
+
base64
|
29
|
+
bigdecimal
|
30
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
31
|
+
connection_pool (>= 2.2.5)
|
32
|
+
drb
|
33
|
+
i18n (>= 1.6, < 2)
|
34
|
+
logger (>= 1.4.2)
|
35
|
+
minitest (>= 5.1)
|
36
|
+
securerandom (>= 0.3)
|
37
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
38
|
+
base64 (0.2.0)
|
39
|
+
bigdecimal (3.1.8)
|
40
|
+
builder (3.3.0)
|
41
|
+
coderay (1.1.3)
|
42
|
+
concurrent-ruby (1.3.4)
|
43
|
+
connection_pool (2.4.1)
|
44
|
+
countries (7.0.0)
|
45
|
+
unaccent (~> 0.3)
|
46
|
+
crass (1.0.6)
|
47
|
+
diff-lcs (1.5.1)
|
48
|
+
docile (1.4.1)
|
49
|
+
drb (2.2.1)
|
50
|
+
erubi (1.13.0)
|
51
|
+
i18n (1.14.6)
|
52
|
+
concurrent-ruby (~> 1.0)
|
53
|
+
io-console (0.7.2)
|
54
|
+
irb (1.14.1)
|
55
|
+
rdoc (>= 4.0.0)
|
56
|
+
reline (>= 0.4.2)
|
57
|
+
logger (1.6.1)
|
58
|
+
loofah (2.22.0)
|
59
|
+
crass (~> 1.0.2)
|
60
|
+
nokogiri (>= 1.12.0)
|
61
|
+
method_source (1.1.0)
|
62
|
+
minitest (5.25.1)
|
63
|
+
nokogiri (1.16.7-aarch64-linux)
|
64
|
+
racc (~> 1.4)
|
65
|
+
nokogiri (1.16.7-arm-linux)
|
66
|
+
racc (~> 1.4)
|
67
|
+
nokogiri (1.16.7-arm64-darwin)
|
68
|
+
racc (~> 1.4)
|
69
|
+
nokogiri (1.16.7-x86-linux)
|
70
|
+
racc (~> 1.4)
|
71
|
+
nokogiri (1.16.7-x86_64-darwin)
|
72
|
+
racc (~> 1.4)
|
73
|
+
nokogiri (1.16.7-x86_64-linux)
|
74
|
+
racc (~> 1.4)
|
75
|
+
pry (0.14.2)
|
76
|
+
coderay (~> 1.1)
|
77
|
+
method_source (~> 1.0)
|
78
|
+
psych (5.1.2)
|
79
|
+
stringio
|
80
|
+
racc (1.8.1)
|
81
|
+
rack (3.1.7)
|
82
|
+
rack-session (2.0.0)
|
83
|
+
rack (>= 3.0.0)
|
84
|
+
rack-test (2.1.0)
|
85
|
+
rack (>= 1.3)
|
86
|
+
rackup (2.1.0)
|
87
|
+
rack (>= 3)
|
88
|
+
webrick (~> 1.8)
|
89
|
+
rails-dom-testing (2.2.0)
|
90
|
+
activesupport (>= 5.0.0)
|
91
|
+
minitest
|
92
|
+
nokogiri (>= 1.6)
|
93
|
+
rails-html-sanitizer (1.6.0)
|
94
|
+
loofah (~> 2.21)
|
95
|
+
nokogiri (~> 1.14)
|
96
|
+
railties (7.2.1)
|
97
|
+
actionpack (= 7.2.1)
|
98
|
+
activesupport (= 7.2.1)
|
99
|
+
irb (~> 1.13)
|
100
|
+
rackup (>= 1.0.0)
|
101
|
+
rake (>= 12.2)
|
102
|
+
thor (~> 1.0, >= 1.2.2)
|
103
|
+
zeitwerk (~> 2.6)
|
104
|
+
rake (13.2.1)
|
105
|
+
rdoc (6.7.0)
|
106
|
+
psych (>= 4.0.0)
|
107
|
+
reline (0.5.10)
|
108
|
+
io-console (~> 0.5)
|
109
|
+
rspec (3.13.0)
|
110
|
+
rspec-core (~> 3.13.0)
|
111
|
+
rspec-expectations (~> 3.13.0)
|
112
|
+
rspec-mocks (~> 3.13.0)
|
113
|
+
rspec-core (3.13.1)
|
114
|
+
rspec-support (~> 3.13.0)
|
115
|
+
rspec-expectations (3.13.3)
|
116
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
117
|
+
rspec-support (~> 3.13.0)
|
118
|
+
rspec-mocks (3.13.1)
|
119
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
120
|
+
rspec-support (~> 3.13.0)
|
121
|
+
rspec-support (3.13.1)
|
122
|
+
securerandom (0.3.1)
|
123
|
+
simplecov (0.22.0)
|
124
|
+
docile (~> 1.1)
|
125
|
+
simplecov-html (~> 0.11)
|
126
|
+
simplecov_json_formatter (~> 0.1)
|
127
|
+
simplecov-html (0.13.1)
|
128
|
+
simplecov_json_formatter (0.1.4)
|
129
|
+
stringio (3.1.1)
|
130
|
+
thor (1.3.2)
|
131
|
+
tzinfo (2.0.6)
|
132
|
+
concurrent-ruby (~> 1.0)
|
133
|
+
unaccent (0.4.0)
|
134
|
+
useragent (0.16.10)
|
135
|
+
webrick (1.8.2)
|
136
|
+
zeitwerk (2.6.18)
|
137
|
+
|
138
|
+
PLATFORMS
|
139
|
+
aarch64-linux
|
140
|
+
arm-linux
|
141
|
+
arm64-darwin
|
142
|
+
x86-linux
|
143
|
+
x86_64-darwin
|
144
|
+
x86_64-linux
|
145
|
+
|
146
|
+
DEPENDENCIES
|
147
|
+
actionpack (~> 7.2.0)
|
148
|
+
country_select!
|
149
|
+
nokogiri (~> 1.16)
|
150
|
+
pry (~> 0)
|
151
|
+
railties (~> 7.2.0)
|
152
|
+
rake (~> 13)
|
153
|
+
rspec (~> 3)
|
154
|
+
simplecov (~> 0.22)
|
155
|
+
|
156
|
+
BUNDLED WITH
|
157
|
+
2.5.18
|
@@ -3,19 +3,9 @@
|
|
3
3
|
module ActionView
|
4
4
|
module Helpers
|
5
5
|
class FormBuilder
|
6
|
-
def country_select(method,
|
7
|
-
|
8
|
-
|
9
|
-
options = priority_or_options
|
10
|
-
else
|
11
|
-
if RUBY_VERSION =~ /^3\.\d\.\d/
|
12
|
-
warn 'DEPRECATION WARNING: Setting priority countries with the 1.x syntax is deprecated. \
|
13
|
-
Please use the `priority_countries:` option.', uplevel: 1, category: :deprecated
|
14
|
-
else
|
15
|
-
warn 'DEPRECATION WARNING: Setting priority countries with the 1.x syntax is deprecated. \
|
16
|
-
Please use the `priority_countries:` option.', uplevel: 1
|
17
|
-
end
|
18
|
-
options[:priority_countries] = priority_or_options
|
6
|
+
def country_select(method, options = {}, html_options = {})
|
7
|
+
unless options.is_a?(Hash)
|
8
|
+
raise ArgumentError, 'Invalid syntax for country_select method. options must be a hash'
|
19
9
|
end
|
20
10
|
|
21
11
|
@template.country_select(@object_name, method, objectify_options(options), @default_options.merge(html_options))
|
@@ -84,7 +84,7 @@ module CountrySelect
|
|
84
84
|
|
85
85
|
def options_for_select_with_priority_countries(country_options, tags_options)
|
86
86
|
sorted = @options.fetch(:sort_provided, ::CountrySelect::DEFAULTS[:sort_provided])
|
87
|
-
priority_countries_options = country_options_for(priority_countries, sorted:
|
87
|
+
priority_countries_options = country_options_for(priority_countries, sorted:)
|
88
88
|
|
89
89
|
option_tags = priority_options_for_select(priority_countries_options, tags_options)
|
90
90
|
|
data/spec/country_select_spec.rb
CHANGED
@@ -223,73 +223,11 @@ describe 'CountrySelect' do
|
|
223
223
|
end
|
224
224
|
|
225
225
|
context 'using old 1.x syntax' do
|
226
|
-
it '
|
227
|
-
tag = options_for_select(
|
228
|
-
[
|
229
|
-
['Denmark', 'DK'],
|
230
|
-
['Latvia', 'LV'],
|
231
|
-
['United States', 'US'],
|
232
|
-
['-' * 15, '-' * 15]
|
233
|
-
],
|
234
|
-
selected: 'US',
|
235
|
-
disabled: '-' * 15
|
236
|
-
)
|
237
|
-
|
238
|
-
walrus.country_code = 'US'
|
239
|
-
t = builder.country_select(:country_code, %w[LV US DK])
|
240
|
-
expect(t).to include(tag)
|
241
|
-
end
|
242
|
-
|
243
|
-
it 'selects only the first matching option' do
|
244
|
-
tag = options_for_select([['United States', 'US'], ['Uruguay', 'UY']], 'US')
|
226
|
+
it 'raises ArgumentError' do
|
245
227
|
walrus.country_code = 'US'
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
it 'supports the country names as provided by default in Formtastic' do
|
251
|
-
tag = options_for_select([['Australia', 'AU'],
|
252
|
-
['Canada', 'CA'],
|
253
|
-
['United Kingdom', 'GB'],
|
254
|
-
['United States', 'US']])
|
255
|
-
country_names = ['Australia', 'Canada', 'United Kingdom', 'United States']
|
256
|
-
t = builder.country_select(:country_code, country_names)
|
257
|
-
expect(t).to include(tag)
|
258
|
-
end
|
259
|
-
|
260
|
-
it 'raises an error when a country code or name is not found' do
|
261
|
-
country_names = [
|
262
|
-
'United States',
|
263
|
-
'Canada',
|
264
|
-
'United Kingdom',
|
265
|
-
'Mexico',
|
266
|
-
'Australia',
|
267
|
-
'Freedonia'
|
268
|
-
]
|
269
|
-
error_msg = "Could not find Country with string 'Freedonia'"
|
270
|
-
|
271
|
-
expect do
|
272
|
-
builder.country_select(:country_code, country_names)
|
273
|
-
end.to raise_error(CountrySelect::CountryNotFoundError, error_msg)
|
274
|
-
end
|
275
|
-
|
276
|
-
it 'supports the select prompt' do
|
277
|
-
tag = '<option value="">Select your country</option>'
|
278
|
-
t = builder.country_select(:country_code, prompt: 'Select your country')
|
279
|
-
expect(t).to include(tag)
|
280
|
-
end
|
281
|
-
|
282
|
-
it 'supports the include_blank option' do
|
283
|
-
# Rails 6.1 more closely follows the HTML spec for
|
284
|
-
# empty option tags.
|
285
|
-
# https://github.com/rails/rails/pull/39808
|
286
|
-
tag = if ActionView::VERSION::STRING >= '6.1'
|
287
|
-
'<option value="" label=" "></option>'
|
288
|
-
else
|
289
|
-
'<option value=""></option>'
|
290
|
-
end
|
291
|
-
t = builder.country_select(:country_code, include_blank: true)
|
292
|
-
expect(t).to include(tag)
|
228
|
+
expect {
|
229
|
+
builder.country_select(:country_code, %w[LV US DK])
|
230
|
+
}.to raise_error(ArgumentError, 'Invalid syntax for country_select method. options must be a hash')
|
293
231
|
end
|
294
232
|
end
|
295
233
|
|
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:
|
4
|
+
version: 10.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:
|
11
|
+
date: 2024-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -84,16 +84,22 @@ dependencies:
|
|
84
84
|
name: countries
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '5.0'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '8.0'
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
|
-
- - "
|
97
|
+
- - ">"
|
95
98
|
- !ruby/object:Gem::Version
|
96
99
|
version: '5.0'
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '8.0'
|
97
103
|
description: |-
|
98
104
|
Provides a simple helper to get an HTML select list of countries. \
|
99
105
|
The list of countries comes from the ISO 3166 standard. \
|
@@ -124,6 +130,8 @@ files:
|
|
124
130
|
- gemfiles/actionpack-7.0.gemfile.lock
|
125
131
|
- gemfiles/actionpack-7.1.gemfile
|
126
132
|
- gemfiles/actionpack-7.1.gemfile.lock
|
133
|
+
- gemfiles/actionpack-7.2.gemfile
|
134
|
+
- gemfiles/actionpack-7.2.gemfile.lock
|
127
135
|
- lib/country_select.rb
|
128
136
|
- lib/country_select/country_select_helper.rb
|
129
137
|
- lib/country_select/defaults.rb
|
@@ -148,14 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
156
|
requirements:
|
149
157
|
- - ">="
|
150
158
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
159
|
+
version: '3.1'
|
152
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
161
|
requirements:
|
154
162
|
- - ">="
|
155
163
|
- !ruby/object:Gem::Version
|
156
164
|
version: '0'
|
157
165
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
166
|
+
rubygems_version: 3.5.16
|
159
167
|
signing_key:
|
160
168
|
specification_version: 4
|
161
169
|
summary: Country Select Plugin
|