country_select 8.0.3 → 9.0.0

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
  SHA256:
3
- metadata.gz: c801f19e2389f6c0fd8d88b666bc31b382e5b7321033b94de1378df8c020726b
4
- data.tar.gz: 92d3b1031fb53cd0ae189e84391553436281680aaceaffd8540192d629ad5940
3
+ metadata.gz: facd6ce42fd150f9e08a26dd2aeceb5f4d7d160839de3f27ea20d422825aa2f9
4
+ data.tar.gz: b6d83bdb9c22f4a3b9df1a3e3a4b1be2d810ada9425fa5182f142a08d038aa1a
5
5
  SHA512:
6
- metadata.gz: 6a8ff3e9f846e6b2081e925f4edac27409eeb9c62918bb6dec07a0a39540ec5f501792da09299d8de3d340118ae227c8d09c408da04ee92dd489a72f76ea73c5
7
- data.tar.gz: 9f56a57c00a86df1e5d38fc98b269764c6c7938951a77481dac5edfe57c09f9011fb386d5501296556f6d45ede72272199c70ec6140a2e9c5fa6a9f7e1127015
6
+ metadata.gz: 75597d9af0f7672a1b11be02c26a7ab1eeea508d1364bbcc963785b35c539d07e2bcf39dcd43069fd956c21a0d7181c764533ea3e20a8d23cc805846423bed51
7
+ data.tar.gz: 4e48666ead80c190fe3810b28c173bad21a24aaf502243afb64c5b0011868ab9f2ca3c4ffdf8598f44703d58b39e0fecbc24294456adb05309034d2a846725f5
@@ -38,7 +38,7 @@ jobs:
38
38
 
39
39
  steps:
40
40
  - name: Checkout repository
41
- uses: actions/checkout@v3
41
+ uses: actions/checkout@v4
42
42
 
43
43
  # Initializes the CodeQL tools for scanning.
44
44
  - name: Initialize CodeQL
@@ -16,13 +16,13 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: ['3.0', 3.1, 3.2]
19
+ ruby: ['3.0', 3.1, 3.2, 3.3]
20
20
  gemfile: [6.1, '7.0', 7.1]
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@v3
25
+ - uses: actions/checkout@v4
26
26
  - name: Set up Ruby ${{ matrix.ruby-version }}
27
27
  uses: ruby/setup-ruby@v1
28
28
  with:
@@ -32,5 +32,5 @@ jobs:
32
32
 
33
33
  run: bundle exec rake
34
34
  - name: Publish code coverage
35
- uses: paambaati/codeclimate-action@v4.0.0
35
+ uses: paambaati/codeclimate-action@v5.0.0
36
36
 
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
- TargetRubyVersion: 2.7
3
+ TargetRubyVersion: 3.0
4
4
 
5
5
  Metrics/MethodLength:
6
6
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 9.0.0 2024-02-17
2
+
3
+ * Drop support for Ruby 2.7, Rails 5.2 and 6.0 (@pmor)
4
+ * Remove support for deprecated 1.x syntax (@pmor)
5
+
1
6
  ## 8.0.3 2023-10-07
2
7
 
3
8
  * Fix when country name is nil. (@zerobearing2)
data/Gemfile.lock CHANGED
@@ -2,27 +2,28 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  country_select (8.0.3)
5
- countries (~> 5.0)
5
+ countries (> 5.0, < 7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (7.1.0)
11
- actionview (= 7.1.0)
12
- activesupport (= 7.1.0)
10
+ actionpack (7.1.3)
11
+ actionview (= 7.1.3)
12
+ activesupport (= 7.1.3)
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.0)
20
- activesupport (= 7.1.0)
20
+ actionview (7.1.3)
21
+ activesupport (= 7.1.3)
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.0)
26
+ activesupport (7.1.3)
26
27
  base64
27
28
  bigdecimal
28
29
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -32,43 +33,43 @@ GEM
32
33
  minitest (>= 5.1)
33
34
  mutex_m
34
35
  tzinfo (~> 2.0)
35
- base64 (0.1.1)
36
- bigdecimal (3.1.4)
36
+ base64 (0.2.0)
37
+ bigdecimal (3.1.6)
37
38
  builder (3.2.4)
38
39
  coderay (1.1.3)
39
- concurrent-ruby (1.2.2)
40
+ concurrent-ruby (1.2.3)
40
41
  connection_pool (2.4.1)
41
- countries (5.6.0)
42
+ countries (6.0.0)
42
43
  unaccent (~> 0.3)
43
44
  crass (1.0.6)
44
- diff-lcs (1.5.0)
45
+ diff-lcs (1.5.1)
45
46
  docile (1.4.0)
46
- drb (2.1.1)
47
+ drb (2.2.0)
47
48
  ruby2_keywords
48
49
  erubi (1.12.0)
49
50
  i18n (1.14.1)
50
51
  concurrent-ruby (~> 1.0)
51
- loofah (2.21.3)
52
+ loofah (2.22.0)
52
53
  crass (~> 1.0.2)
53
54
  nokogiri (>= 1.12.0)
54
55
  method_source (1.0.0)
55
- mini_portile2 (2.8.4)
56
- minitest (5.20.0)
57
- mutex_m (0.1.2)
58
- nokogiri (1.15.4)
56
+ mini_portile2 (2.8.5)
57
+ minitest (5.22.2)
58
+ mutex_m (0.2.0)
59
+ nokogiri (1.16.2)
59
60
  mini_portile2 (~> 2.8.2)
60
61
  racc (~> 1.4)
61
- nokogiri (1.15.4-arm64-darwin)
62
+ nokogiri (1.16.2-arm64-darwin)
62
63
  racc (~> 1.4)
63
- nokogiri (1.15.4-x86_64-darwin)
64
+ nokogiri (1.16.2-x86_64-darwin)
64
65
  racc (~> 1.4)
65
- nokogiri (1.15.4-x86_64-linux)
66
+ nokogiri (1.16.2-x86_64-linux)
66
67
  racc (~> 1.4)
67
68
  pry (0.14.2)
68
69
  coderay (~> 1.1)
69
70
  method_source (~> 1.0)
70
- racc (1.7.1)
71
- rack (3.0.8)
71
+ racc (1.7.3)
72
+ rack (3.0.9)
72
73
  rack-session (2.0.0)
73
74
  rack (>= 3.0.0)
74
75
  rack-test (2.1.0)
@@ -80,20 +81,20 @@ GEM
80
81
  rails-html-sanitizer (1.6.0)
81
82
  loofah (~> 2.21)
82
83
  nokogiri (~> 1.14)
83
- rake (13.0.6)
84
- rspec (3.12.0)
85
- rspec-core (~> 3.12.0)
86
- rspec-expectations (~> 3.12.0)
87
- rspec-mocks (~> 3.12.0)
88
- rspec-core (3.12.2)
89
- rspec-support (~> 3.12.0)
90
- rspec-expectations (3.12.3)
84
+ rake (13.1.0)
85
+ rspec (3.13.0)
86
+ rspec-core (~> 3.13.0)
87
+ rspec-expectations (~> 3.13.0)
88
+ rspec-mocks (~> 3.13.0)
89
+ rspec-core (3.13.0)
90
+ rspec-support (~> 3.13.0)
91
+ rspec-expectations (3.13.0)
91
92
  diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.12.0)
93
- rspec-mocks (3.12.6)
93
+ rspec-support (~> 3.13.0)
94
+ rspec-mocks (3.13.0)
94
95
  diff-lcs (>= 1.2.0, < 2.0)
95
- rspec-support (~> 3.12.0)
96
- rspec-support (3.12.1)
96
+ rspec-support (~> 3.13.0)
97
+ rspec-support (3.13.0)
97
98
  ruby2_keywords (0.0.5)
98
99
  simplecov (0.22.0)
99
100
  docile (~> 1.1)
@@ -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 = '>= 2.7'
27
+ s.required_ruby_version = '>= 3.0'
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', '~> 5.0'
35
+ s.add_dependency 'countries', '> 5.0', '< 7.0'
36
36
  end
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  country_select (8.0.3)
5
- countries (~> 5.0)
5
+ countries (> 5.0, < 7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -28,30 +28,28 @@ GEM
28
28
  zeitwerk (~> 2.3)
29
29
  builder (3.2.4)
30
30
  coderay (1.1.3)
31
- concurrent-ruby (1.2.2)
32
- countries (5.6.0)
31
+ concurrent-ruby (1.2.3)
32
+ countries (6.0.0)
33
33
  unaccent (~> 0.3)
34
34
  crass (1.0.6)
35
- diff-lcs (1.5.0)
35
+ diff-lcs (1.5.1)
36
36
  docile (1.4.0)
37
37
  erubi (1.12.0)
38
38
  i18n (1.14.1)
39
39
  concurrent-ruby (~> 1.0)
40
- loofah (2.21.3)
40
+ loofah (2.22.0)
41
41
  crass (~> 1.0.2)
42
42
  nokogiri (>= 1.12.0)
43
43
  method_source (1.0.0)
44
- minitest (5.20.0)
45
- nokogiri (1.14.0.rc1-arm64-darwin)
46
- racc (~> 1.4)
47
- nokogiri (1.14.0.rc1-x86_64-darwin)
48
- racc (~> 1.4)
49
- nokogiri (1.14.0.rc1-x86_64-linux)
44
+ mini_portile2 (2.8.5)
45
+ minitest (5.22.2)
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.7.1)
52
+ racc (1.7.3)
55
53
  rack (2.2.8)
56
54
  rack-test (2.1.0)
57
55
  rack (>= 1.3)
@@ -67,34 +65,35 @@ GEM
67
65
  method_source
68
66
  rake (>= 12.2)
69
67
  thor (~> 1.0)
70
- rake (13.0.6)
71
- rspec (3.12.0)
72
- rspec-core (~> 3.12.0)
73
- rspec-expectations (~> 3.12.0)
74
- rspec-mocks (~> 3.12.0)
75
- rspec-core (3.12.2)
76
- rspec-support (~> 3.12.0)
77
- rspec-expectations (3.12.3)
68
+ rake (13.1.0)
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.0)
74
+ rspec-support (~> 3.13.0)
75
+ rspec-expectations (3.13.0)
78
76
  diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.12.0)
80
- rspec-mocks (3.12.6)
77
+ rspec-support (~> 3.13.0)
78
+ rspec-mocks (3.13.0)
81
79
  diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.12.0)
83
- rspec-support (3.12.1)
80
+ rspec-support (~> 3.13.0)
81
+ rspec-support (3.13.0)
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
86
  simplecov-html (0.12.3)
89
87
  simplecov_json_formatter (0.1.4)
90
- thor (1.2.2)
88
+ thor (1.3.0)
91
89
  tzinfo (2.0.6)
92
90
  concurrent-ruby (~> 1.0)
93
91
  unaccent (0.4.0)
94
- zeitwerk (2.6.12)
92
+ zeitwerk (2.6.13)
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
 
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  country_select (8.0.3)
5
- countries (~> 5.0)
5
+ countries (> 5.0, < 7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -27,30 +27,30 @@ GEM
27
27
  tzinfo (~> 2.0)
28
28
  builder (3.2.4)
29
29
  coderay (1.1.3)
30
- concurrent-ruby (1.2.2)
31
- countries (5.6.0)
30
+ concurrent-ruby (1.2.3)
31
+ countries (6.0.0)
32
32
  unaccent (~> 0.3)
33
33
  crass (1.0.6)
34
- diff-lcs (1.5.0)
34
+ diff-lcs (1.5.1)
35
35
  docile (1.4.0)
36
36
  erubi (1.12.0)
37
37
  i18n (1.14.1)
38
38
  concurrent-ruby (~> 1.0)
39
- loofah (2.21.3)
39
+ loofah (2.22.0)
40
40
  crass (~> 1.0.2)
41
41
  nokogiri (>= 1.12.0)
42
42
  method_source (1.0.0)
43
- minitest (5.20.0)
44
- nokogiri (1.15.4-arm64-darwin)
43
+ minitest (5.22.2)
44
+ nokogiri (1.16.2-arm64-darwin)
45
45
  racc (~> 1.4)
46
- nokogiri (1.15.4-x86_64-darwin)
46
+ nokogiri (1.16.2-x86_64-darwin)
47
47
  racc (~> 1.4)
48
- nokogiri (1.15.4-x86_64-linux)
48
+ nokogiri (1.16.2-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.7.1)
53
+ racc (1.7.3)
54
54
  rack (2.2.8)
55
55
  rack-test (2.1.0)
56
56
  rack (>= 1.3)
@@ -68,34 +68,35 @@ GEM
68
68
  rake (>= 12.2)
69
69
  thor (~> 1.0)
70
70
  zeitwerk (~> 2.5)
71
- rake (13.0.6)
72
- rspec (3.12.0)
73
- rspec-core (~> 3.12.0)
74
- rspec-expectations (~> 3.12.0)
75
- rspec-mocks (~> 3.12.0)
76
- rspec-core (3.12.2)
77
- rspec-support (~> 3.12.0)
78
- rspec-expectations (3.12.3)
71
+ rake (13.1.0)
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.0)
77
+ rspec-support (~> 3.13.0)
78
+ rspec-expectations (3.13.0)
79
79
  diff-lcs (>= 1.2.0, < 2.0)
80
- rspec-support (~> 3.12.0)
81
- rspec-mocks (3.12.6)
80
+ rspec-support (~> 3.13.0)
81
+ rspec-mocks (3.13.0)
82
82
  diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.12.0)
84
- rspec-support (3.12.1)
83
+ rspec-support (~> 3.13.0)
84
+ rspec-support (3.13.0)
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
89
  simplecov-html (0.12.3)
90
90
  simplecov_json_formatter (0.1.4)
91
- thor (1.2.2)
91
+ thor (1.3.0)
92
92
  tzinfo (2.0.6)
93
93
  concurrent-ruby (~> 1.0)
94
94
  unaccent (0.4.0)
95
- zeitwerk (2.6.12)
95
+ zeitwerk (2.6.13)
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
 
@@ -2,27 +2,28 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  country_select (8.0.3)
5
- countries (~> 5.0)
5
+ countries (> 5.0, < 7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (7.1.0)
11
- actionview (= 7.1.0)
12
- activesupport (= 7.1.0)
10
+ actionpack (7.1.3)
11
+ actionview (= 7.1.3)
12
+ activesupport (= 7.1.3)
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.0)
20
- activesupport (= 7.1.0)
20
+ actionview (7.1.3)
21
+ activesupport (= 7.1.3)
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.0)
26
+ activesupport (7.1.3)
26
27
  base64
27
28
  bigdecimal
28
29
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -32,45 +33,45 @@ GEM
32
33
  minitest (>= 5.1)
33
34
  mutex_m
34
35
  tzinfo (~> 2.0)
35
- base64 (0.1.1)
36
- bigdecimal (3.1.4)
36
+ base64 (0.2.0)
37
+ bigdecimal (3.1.6)
37
38
  builder (3.2.4)
38
39
  coderay (1.1.3)
39
- concurrent-ruby (1.2.2)
40
+ concurrent-ruby (1.2.3)
40
41
  connection_pool (2.4.1)
41
- countries (5.6.0)
42
+ countries (6.0.0)
42
43
  unaccent (~> 0.3)
43
44
  crass (1.0.6)
44
- diff-lcs (1.5.0)
45
+ diff-lcs (1.5.1)
45
46
  docile (1.4.0)
46
- drb (2.1.1)
47
+ drb (2.2.0)
47
48
  ruby2_keywords
48
49
  erubi (1.12.0)
49
50
  i18n (1.14.1)
50
51
  concurrent-ruby (~> 1.0)
51
- io-console (0.6.0)
52
- irb (1.8.1)
52
+ io-console (0.7.2)
53
+ irb (1.11.2)
53
54
  rdoc
54
- reline (>= 0.3.8)
55
- loofah (2.21.3)
55
+ reline (>= 0.4.2)
56
+ loofah (2.22.0)
56
57
  crass (~> 1.0.2)
57
58
  nokogiri (>= 1.12.0)
58
59
  method_source (1.0.0)
59
- minitest (5.20.0)
60
- mutex_m (0.1.2)
61
- nokogiri (1.15.4-arm64-darwin)
60
+ minitest (5.22.2)
61
+ mutex_m (0.2.0)
62
+ nokogiri (1.16.2-arm64-darwin)
62
63
  racc (~> 1.4)
63
- nokogiri (1.15.4-x86_64-darwin)
64
+ nokogiri (1.16.2-x86_64-darwin)
64
65
  racc (~> 1.4)
65
- nokogiri (1.15.4-x86_64-linux)
66
+ nokogiri (1.16.2-x86_64-linux)
66
67
  racc (~> 1.4)
67
68
  pry (0.14.2)
68
69
  coderay (~> 1.1)
69
70
  method_source (~> 1.0)
70
- psych (5.1.0)
71
+ psych (5.1.2)
71
72
  stringio
72
- racc (1.7.1)
73
- rack (3.0.8)
73
+ racc (1.7.3)
74
+ rack (3.0.9)
74
75
  rack-session (2.0.0)
75
76
  rack (>= 3.0.0)
76
77
  rack-test (2.1.0)
@@ -85,32 +86,32 @@ GEM
85
86
  rails-html-sanitizer (1.6.0)
86
87
  loofah (~> 2.21)
87
88
  nokogiri (~> 1.14)
88
- railties (7.1.0)
89
- actionpack (= 7.1.0)
90
- activesupport (= 7.1.0)
89
+ railties (7.1.3)
90
+ actionpack (= 7.1.3)
91
+ activesupport (= 7.1.3)
91
92
  irb
92
93
  rackup (>= 1.0.0)
93
94
  rake (>= 12.2)
94
95
  thor (~> 1.0, >= 1.2.2)
95
96
  zeitwerk (~> 2.6)
96
- rake (13.0.6)
97
- rdoc (6.5.0)
97
+ rake (13.1.0)
98
+ rdoc (6.6.2)
98
99
  psych (>= 4.0.0)
99
- reline (0.3.9)
100
+ reline (0.4.2)
100
101
  io-console (~> 0.5)
101
- rspec (3.12.0)
102
- rspec-core (~> 3.12.0)
103
- rspec-expectations (~> 3.12.0)
104
- rspec-mocks (~> 3.12.0)
105
- rspec-core (3.12.2)
106
- rspec-support (~> 3.12.0)
107
- rspec-expectations (3.12.3)
102
+ rspec (3.13.0)
103
+ rspec-core (~> 3.13.0)
104
+ rspec-expectations (~> 3.13.0)
105
+ rspec-mocks (~> 3.13.0)
106
+ rspec-core (3.13.0)
107
+ rspec-support (~> 3.13.0)
108
+ rspec-expectations (3.13.0)
108
109
  diff-lcs (>= 1.2.0, < 2.0)
109
- rspec-support (~> 3.12.0)
110
- rspec-mocks (3.12.6)
110
+ rspec-support (~> 3.13.0)
111
+ rspec-mocks (3.13.0)
111
112
  diff-lcs (>= 1.2.0, < 2.0)
112
- rspec-support (~> 3.12.0)
113
- rspec-support (3.12.1)
113
+ rspec-support (~> 3.13.0)
114
+ rspec-support (3.13.0)
114
115
  ruby2_keywords (0.0.5)
115
116
  simplecov (0.22.0)
116
117
  docile (~> 1.1)
@@ -118,16 +119,17 @@ GEM
118
119
  simplecov_json_formatter (~> 0.1)
119
120
  simplecov-html (0.12.3)
120
121
  simplecov_json_formatter (0.1.4)
121
- stringio (3.0.8)
122
- thor (1.2.2)
122
+ stringio (3.1.0)
123
+ thor (1.3.0)
123
124
  tzinfo (2.0.6)
124
125
  concurrent-ruby (~> 1.0)
125
126
  unaccent (0.4.0)
126
127
  webrick (1.8.1)
127
- zeitwerk (2.6.12)
128
+ zeitwerk (2.6.13)
128
129
 
129
130
  PLATFORMS
130
131
  arm64-darwin-22
132
+ arm64-darwin-23
131
133
  x86_64-darwin-22
132
134
  x86_64-linux
133
135
 
@@ -3,19 +3,9 @@
3
3
  module ActionView
4
4
  module Helpers
5
5
  class FormBuilder
6
- def country_select(method, priority_or_options = {}, options = {}, html_options = {})
7
- if priority_or_options.is_a? Hash
8
- html_options = options
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))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CountrySelect
4
- VERSION = '8.0.3'
4
+ VERSION = '9.0.0'
5
5
  end
@@ -223,73 +223,11 @@ describe 'CountrySelect' do
223
223
  end
224
224
 
225
225
  context 'using old 1.x syntax' do
226
- it 'accepts priority countries' do
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
- t = builder.country_select(:country_code, %w[LV US])
247
- expect(t).to_not include(tag)
248
- end
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: 8.0.3
4
+ version: 9.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: 2023-10-07 00:00:00.000000000 Z
11
+ date: 2024-02-17 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: '7.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: '7.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. \
@@ -148,14 +154,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
154
  requirements:
149
155
  - - ">="
150
156
  - !ruby/object:Gem::Version
151
- version: '2.7'
157
+ version: '3.0'
152
158
  required_rubygems_version: !ruby/object:Gem::Requirement
153
159
  requirements:
154
160
  - - ">="
155
161
  - !ruby/object:Gem::Version
156
162
  version: '0'
157
163
  requirements: []
158
- rubygems_version: 3.4.19
164
+ rubygems_version: 3.5.4
159
165
  signing_key:
160
166
  specification_version: 4
161
167
  summary: Country Select Plugin