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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c801f19e2389f6c0fd8d88b666bc31b382e5b7321033b94de1378df8c020726b
4
- data.tar.gz: 92d3b1031fb53cd0ae189e84391553436281680aaceaffd8540192d629ad5940
3
+ metadata.gz: ad1367d0d5496b47fad1f2952b50ea69c3debd17fccfa78ba0614d146ac5739f
4
+ data.tar.gz: cedbc815ad549d03c5b8c84c7595b17dc8ca317a20225955f4e87a372e3a03ed
5
5
  SHA512:
6
- metadata.gz: 6a8ff3e9f846e6b2081e925f4edac27409eeb9c62918bb6dec07a0a39540ec5f501792da09299d8de3d340118ae227c8d09c408da04ee92dd489a72f76ea73c5
7
- data.tar.gz: 9f56a57c00a86df1e5d38fc98b269764c6c7938951a77481dac5edfe57c09f9011fb386d5501296556f6d45ede72272199c70ec6140a2e9c5fa6a9f7e1127015
6
+ metadata.gz: 9698b322475af128513c1aa5ca91afcfc8764830b8e5e8e8f2c86892aede617f88218045a63da8ea794d8587bb68427608e3746dbcd8dc6c84177245922304f4
7
+ data.tar.gz: f12aff843e0e7a1f8df6d51b2c3373c983be5b6f98012647f439ea6d34cbec69a9a2ea87885f02949903353eef9a639fc82e48ffbfd08fc2575e7ff8217fb43a
@@ -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,21 +16,22 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: ['3.0', 3.1, 3.2]
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@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:
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@v4.0.0
36
+ uses: paambaati/codeclimate-action@v5.0.0
36
37
 
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
- TargetRubyVersion: 2.7
3
+ TargetRubyVersion: 3.1
4
4
 
5
5
  Metrics/MethodLength:
6
6
  Enabled: false
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 (8.0.3)
5
- countries (~> 5.0)
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.0)
11
- actionview (= 7.1.0)
12
- activesupport (= 7.1.0)
10
+ actionpack (7.2.1)
11
+ actionview (= 7.2.1)
12
+ activesupport (= 7.2.1)
13
13
  nokogiri (>= 1.8.5)
14
- rack (>= 2.2.4)
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
- actionview (7.1.0)
20
- activesupport (= 7.1.0)
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.0)
27
+ activesupport (7.2.1)
26
28
  base64
27
29
  bigdecimal
28
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- mutex_m
34
- tzinfo (~> 2.0)
35
- base64 (0.1.1)
36
- bigdecimal (3.1.4)
37
- builder (3.2.4)
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.2.2)
42
+ concurrent-ruby (1.3.4)
40
43
  connection_pool (2.4.1)
41
- countries (5.6.0)
44
+ countries (7.0.0)
42
45
  unaccent (~> 0.3)
43
46
  crass (1.0.6)
44
- diff-lcs (1.5.0)
45
- docile (1.4.0)
46
- drb (2.1.1)
47
- ruby2_keywords
48
- erubi (1.12.0)
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
- loofah (2.21.3)
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.0.0)
55
- mini_portile2 (2.8.4)
56
- minitest (5.20.0)
57
- mutex_m (0.1.2)
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.15.4-arm64-darwin)
63
+ nokogiri (1.16.7-arm64-darwin)
62
64
  racc (~> 1.4)
63
- nokogiri (1.15.4-x86_64-darwin)
65
+ nokogiri (1.16.7-x86_64-darwin)
64
66
  racc (~> 1.4)
65
- nokogiri (1.15.4-x86_64-linux)
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.7.1)
71
- rack (3.0.8)
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.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)
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.12.0)
93
- rspec-mocks (3.12.6)
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.12.0)
96
- rspec-support (3.12.1)
97
- ruby2_keywords (0.0.5)
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.12.3)
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.4.19
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/countries) [![build](https://github.com/countries/country_select/actions/workflows/test.yml/badge.svg)](https://github.com/countries/country_select/actions/workflows/test.yml)
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
 
@@ -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.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', '~> 5.0'
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 (8.0.3)
5
- countries (~> 5.0)
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.6)
11
- actionview (= 6.1.7.6)
12
- activesupport (= 6.1.7.6)
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.6)
18
- activesupport (= 6.1.7.6)
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.6)
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.2.4)
29
+ builder (3.3.0)
30
30
  coderay (1.1.3)
31
- concurrent-ruby (1.2.2)
32
- countries (5.6.0)
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.0)
36
- docile (1.4.0)
37
- erubi (1.12.0)
38
- i18n (1.14.1)
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.21.3)
40
+ loofah (2.22.0)
41
41
  crass (~> 1.0.2)
42
42
  nokogiri (>= 1.12.0)
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)
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.7.1)
55
- rack (2.2.8)
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.6)
65
- actionpack (= 6.1.7.6)
66
- activesupport (= 6.1.7.6)
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.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.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.12.0)
80
- rspec-mocks (3.12.6)
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.12.0)
83
- rspec-support (3.12.1)
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.12.3)
86
+ simplecov-html (0.13.1)
89
87
  simplecov_json_formatter (0.1.4)
90
- thor (1.2.2)
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.12)
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.4.19
111
+ 2.5.18
@@ -1,57 +1,57 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (8.0.3)
5
- countries (~> 5.0)
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.2.4)
28
+ builder (3.3.0)
29
29
  coderay (1.1.3)
30
- concurrent-ruby (1.2.2)
31
- countries (5.6.0)
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.0)
35
- docile (1.4.0)
36
- erubi (1.12.0)
37
- i18n (1.14.1)
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.21.3)
39
+ loofah (2.22.0)
40
40
  crass (~> 1.0.2)
41
41
  nokogiri (>= 1.12.0)
42
- method_source (1.0.0)
43
- minitest (5.20.0)
44
- nokogiri (1.15.4-arm64-darwin)
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.15.4-x86_64-darwin)
46
+ nokogiri (1.16.7-x86_64-darwin)
47
47
  racc (~> 1.4)
48
- nokogiri (1.15.4-x86_64-linux)
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.7.1)
54
- rack (2.2.8)
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.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.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.12.0)
81
- rspec-mocks (3.12.6)
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.12.0)
84
- rspec-support (3.12.1)
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.12.3)
89
+ simplecov-html (0.13.1)
90
90
  simplecov_json_formatter (0.1.4)
91
- thor (1.2.2)
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.12)
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.4.19
114
+ 2.5.18
@@ -1,28 +1,29 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- country_select (8.0.3)
5
- countries (~> 5.0)
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.0)
11
- actionview (= 7.1.0)
12
- activesupport (= 7.1.0)
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.0)
20
- activesupport (= 7.1.0)
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.0)
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.1.1)
36
- bigdecimal (3.1.4)
37
- builder (3.2.4)
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.2.2)
40
+ concurrent-ruby (1.3.4)
40
41
  connection_pool (2.4.1)
41
- countries (5.6.0)
42
+ countries (7.0.0)
42
43
  unaccent (~> 0.3)
43
44
  crass (1.0.6)
44
- diff-lcs (1.5.0)
45
- docile (1.4.0)
46
- drb (2.1.1)
47
- ruby2_keywords
48
- erubi (1.12.0)
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.6.0)
52
- irb (1.8.1)
53
- rdoc
54
- reline (>= 0.3.8)
55
- loofah (2.21.3)
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.0.0)
59
- minitest (5.20.0)
60
- mutex_m (0.1.2)
61
- nokogiri (1.15.4-arm64-darwin)
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.15.4-x86_64-darwin)
63
+ nokogiri (1.16.7-x86_64-darwin)
64
64
  racc (~> 1.4)
65
- nokogiri (1.15.4-x86_64-linux)
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.0)
70
+ psych (5.1.2)
71
71
  stringio
72
- racc (1.7.1)
73
- rack (3.0.8)
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.0)
89
- actionpack (= 7.1.0)
90
- activesupport (= 7.1.0)
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.0.6)
97
- rdoc (6.5.0)
96
+ rake (13.2.1)
97
+ rdoc (6.7.0)
98
98
  psych (>= 4.0.0)
99
- reline (0.3.9)
99
+ reline (0.5.10)
100
100
  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)
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.12.0)
110
- rspec-mocks (3.12.6)
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.12.0)
113
- rspec-support (3.12.1)
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.12.3)
118
+ simplecov-html (0.13.1)
120
119
  simplecov_json_formatter (0.1.4)
121
- stringio (3.0.8)
122
- thor (1.2.2)
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.1)
127
- zeitwerk (2.6.12)
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.4.19
145
+ 2.5.18
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec path: '../'
6
+
7
+ gem 'railties', '~> 7.2.0'
8
+ gem 'actionpack', '~> 7.2.0'
9
+ gem 'nokogiri', '~> 1.16'
@@ -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, 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))
@@ -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: 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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CountrySelect
4
- VERSION = '8.0.3'
4
+ VERSION = '10.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: 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: 2023-10-07 00:00:00.000000000 Z
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: '2.7'
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.4.19
166
+ rubygems_version: 3.5.16
159
167
  signing_key:
160
168
  specification_version: 4
161
169
  summary: Country Select Plugin