country_select 6.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +25 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +37 -49
- data/README.md +17 -10
- data/Rakefile +26 -2
- data/country_select.gemspec +8 -6
- data/gemfiles/actionpack-5.2.gemfile +6 -0
- data/gemfiles/actionpack-5.2.gemfile.lock +98 -0
- data/gemfiles/actionpack-6.0.gemfile +6 -0
- data/gemfiles/actionpack-6.0.gemfile.lock +100 -0
- data/gemfiles/actionpack-6.1.gemfile.lock +99 -0
- data/gemfiles/actionpack-7.0.gemfile +6 -0
- data/gemfiles/actionpack-7.0.gemfile.lock +99 -0
- data/lib/country_select/country_select_helper.rb +5 -0
- data/lib/country_select/defaults.rb +2 -1
- data/lib/country_select/formats.rb +1 -1
- data/lib/country_select/tag_helper.rb +6 -11
- data/lib/country_select/version.rb +1 -1
- data/lib/country_select.rb +0 -1
- data/spec/country_select_spec.rb +51 -22
- metadata +26 -51
- data/.travis.yml +0 -23
- data/gemfiles/actionpack.edge.gemfile +0 -9
- data/gemfiles/actionpack.edge.gemfile.lock +0 -105
- data/gemfiles/actionpack5.2.gemfile +0 -6
- data/gemfiles/actionpack5.2.gemfile.lock +0 -105
- data/gemfiles/actionpack6.0.gemfile +0 -6
- data/gemfiles/actionpack6.0.gemfile.lock +0 -107
- data/gemfiles/actionpack6.1.gemfile.lock +0 -106
- data/lib/country_select_without_sort_alphabetical.rb +0 -9
- /data/gemfiles/{actionpack6.1.gemfile → actionpack-6.1.gemfile} +0 -0
@@ -0,0 +1,99 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
country_select (7.0.0)
|
5
|
+
countries (~> 5.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (6.1.6)
|
11
|
+
actionview (= 6.1.6)
|
12
|
+
activesupport (= 6.1.6)
|
13
|
+
rack (~> 2.0, >= 2.0.9)
|
14
|
+
rack-test (>= 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
+
actionview (6.1.6)
|
18
|
+
activesupport (= 6.1.6)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubi (~> 1.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
+
activesupport (6.1.6)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 1.6, < 2)
|
26
|
+
minitest (>= 5.1)
|
27
|
+
tzinfo (~> 2.0)
|
28
|
+
zeitwerk (~> 2.3)
|
29
|
+
builder (3.2.4)
|
30
|
+
coderay (1.1.3)
|
31
|
+
concurrent-ruby (1.1.10)
|
32
|
+
countries (5.1.0)
|
33
|
+
sixarm_ruby_unaccent (~> 1.1)
|
34
|
+
crass (1.0.6)
|
35
|
+
diff-lcs (1.5.0)
|
36
|
+
erubi (1.10.0)
|
37
|
+
i18n (1.10.0)
|
38
|
+
concurrent-ruby (~> 1.0)
|
39
|
+
loofah (2.18.0)
|
40
|
+
crass (~> 1.0.2)
|
41
|
+
nokogiri (>= 1.5.9)
|
42
|
+
method_source (1.0.0)
|
43
|
+
minitest (5.16.1)
|
44
|
+
nokogiri (1.13.6-x86_64-darwin)
|
45
|
+
racc (~> 1.4)
|
46
|
+
nokogiri (1.13.6-x86_64-linux)
|
47
|
+
racc (~> 1.4)
|
48
|
+
pry (0.14.1)
|
49
|
+
coderay (~> 1.1)
|
50
|
+
method_source (~> 1.0)
|
51
|
+
racc (1.6.0)
|
52
|
+
rack (2.2.3.1)
|
53
|
+
rack-test (2.0.2)
|
54
|
+
rack (>= 1.3)
|
55
|
+
rails-dom-testing (2.0.3)
|
56
|
+
activesupport (>= 4.2.0)
|
57
|
+
nokogiri (>= 1.6)
|
58
|
+
rails-html-sanitizer (1.4.3)
|
59
|
+
loofah (~> 2.3)
|
60
|
+
railties (6.1.6)
|
61
|
+
actionpack (= 6.1.6)
|
62
|
+
activesupport (= 6.1.6)
|
63
|
+
method_source
|
64
|
+
rake (>= 12.2)
|
65
|
+
thor (~> 1.0)
|
66
|
+
rake (13.0.6)
|
67
|
+
rspec (3.11.0)
|
68
|
+
rspec-core (~> 3.11.0)
|
69
|
+
rspec-expectations (~> 3.11.0)
|
70
|
+
rspec-mocks (~> 3.11.0)
|
71
|
+
rspec-core (3.11.0)
|
72
|
+
rspec-support (~> 3.11.0)
|
73
|
+
rspec-expectations (3.11.0)
|
74
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
+
rspec-support (~> 3.11.0)
|
76
|
+
rspec-mocks (3.11.1)
|
77
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
+
rspec-support (~> 3.11.0)
|
79
|
+
rspec-support (3.11.0)
|
80
|
+
sixarm_ruby_unaccent (1.2.0)
|
81
|
+
thor (1.2.1)
|
82
|
+
tzinfo (2.0.4)
|
83
|
+
concurrent-ruby (~> 1.0)
|
84
|
+
zeitwerk (2.6.0)
|
85
|
+
|
86
|
+
PLATFORMS
|
87
|
+
x86_64-darwin-21
|
88
|
+
x86_64-linux
|
89
|
+
|
90
|
+
DEPENDENCIES
|
91
|
+
actionpack (~> 6.1.0)
|
92
|
+
country_select!
|
93
|
+
pry (~> 0)
|
94
|
+
railties (~> 6.1.0)
|
95
|
+
rake (~> 13)
|
96
|
+
rspec (~> 3)
|
97
|
+
|
98
|
+
BUNDLED WITH
|
99
|
+
2.3.10
|
@@ -0,0 +1,99 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
country_select (7.0.0)
|
5
|
+
countries (~> 5.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (7.0.3)
|
11
|
+
actionview (= 7.0.3)
|
12
|
+
activesupport (= 7.0.3)
|
13
|
+
rack (~> 2.0, >= 2.2.0)
|
14
|
+
rack-test (>= 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
+
actionview (7.0.3)
|
18
|
+
activesupport (= 7.0.3)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubi (~> 1.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
+
activesupport (7.0.3)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 1.6, < 2)
|
26
|
+
minitest (>= 5.1)
|
27
|
+
tzinfo (~> 2.0)
|
28
|
+
builder (3.2.4)
|
29
|
+
coderay (1.1.3)
|
30
|
+
concurrent-ruby (1.1.10)
|
31
|
+
countries (5.1.0)
|
32
|
+
sixarm_ruby_unaccent (~> 1.1)
|
33
|
+
crass (1.0.6)
|
34
|
+
diff-lcs (1.5.0)
|
35
|
+
erubi (1.10.0)
|
36
|
+
i18n (1.10.0)
|
37
|
+
concurrent-ruby (~> 1.0)
|
38
|
+
loofah (2.18.0)
|
39
|
+
crass (~> 1.0.2)
|
40
|
+
nokogiri (>= 1.5.9)
|
41
|
+
method_source (1.0.0)
|
42
|
+
minitest (5.16.1)
|
43
|
+
nokogiri (1.13.6-x86_64-darwin)
|
44
|
+
racc (~> 1.4)
|
45
|
+
nokogiri (1.13.6-x86_64-linux)
|
46
|
+
racc (~> 1.4)
|
47
|
+
pry (0.14.1)
|
48
|
+
coderay (~> 1.1)
|
49
|
+
method_source (~> 1.0)
|
50
|
+
racc (1.6.0)
|
51
|
+
rack (2.2.3.1)
|
52
|
+
rack-test (2.0.2)
|
53
|
+
rack (>= 1.3)
|
54
|
+
rails-dom-testing (2.0.3)
|
55
|
+
activesupport (>= 4.2.0)
|
56
|
+
nokogiri (>= 1.6)
|
57
|
+
rails-html-sanitizer (1.4.3)
|
58
|
+
loofah (~> 2.3)
|
59
|
+
railties (7.0.3)
|
60
|
+
actionpack (= 7.0.3)
|
61
|
+
activesupport (= 7.0.3)
|
62
|
+
method_source
|
63
|
+
rake (>= 12.2)
|
64
|
+
thor (~> 1.0)
|
65
|
+
zeitwerk (~> 2.5)
|
66
|
+
rake (13.0.6)
|
67
|
+
rspec (3.11.0)
|
68
|
+
rspec-core (~> 3.11.0)
|
69
|
+
rspec-expectations (~> 3.11.0)
|
70
|
+
rspec-mocks (~> 3.11.0)
|
71
|
+
rspec-core (3.11.0)
|
72
|
+
rspec-support (~> 3.11.0)
|
73
|
+
rspec-expectations (3.11.0)
|
74
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
+
rspec-support (~> 3.11.0)
|
76
|
+
rspec-mocks (3.11.1)
|
77
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
+
rspec-support (~> 3.11.0)
|
79
|
+
rspec-support (3.11.0)
|
80
|
+
sixarm_ruby_unaccent (1.2.0)
|
81
|
+
thor (1.2.1)
|
82
|
+
tzinfo (2.0.4)
|
83
|
+
concurrent-ruby (~> 1.0)
|
84
|
+
zeitwerk (2.6.0)
|
85
|
+
|
86
|
+
PLATFORMS
|
87
|
+
x86_64-darwin-21
|
88
|
+
x86_64-linux
|
89
|
+
|
90
|
+
DEPENDENCIES
|
91
|
+
actionpack (~> 7.0.0)
|
92
|
+
country_select!
|
93
|
+
pry (~> 0)
|
94
|
+
railties (~> 7.0.0)
|
95
|
+
rake (~> 13)
|
96
|
+
rspec (~> 3)
|
97
|
+
|
98
|
+
BUNDLED WITH
|
99
|
+
2.3.10
|
@@ -6,6 +6,11 @@ module ActionView
|
|
6
6
|
html_options = options
|
7
7
|
options = priority_or_options
|
8
8
|
else
|
9
|
+
if RUBY_VERSION =~ /^3\.\d\.\d/
|
10
|
+
warn "DEPRECATION WARNING: Setting priority countries with the 1.x syntax is deprecated. Please use the `priority_countries:` option.", uplevel: 1, category: :deprecated
|
11
|
+
else
|
12
|
+
warn "DEPRECATION WARNING: Setting priority countries with the 1.x syntax is deprecated. Please use the `priority_countries:` option.", uplevel: 1
|
13
|
+
end
|
9
14
|
options[:priority_countries] = priority_or_options
|
10
15
|
end
|
11
16
|
|
@@ -4,6 +4,6 @@ module CountrySelect
|
|
4
4
|
FORMATS[:default] = lambda do |country|
|
5
5
|
# Need to use :[] specifically, not :dig, because country.translations is a
|
6
6
|
# ISO3166::Translations object, which overrides :[] to support i18n locale fallbacks
|
7
|
-
country.translations&.send(:[], I18n.locale.to_s) || country.
|
7
|
+
country.translations&.send(:[], I18n.locale.to_s) || country.common_name || country.iso_short_name
|
8
8
|
end
|
9
9
|
end
|
@@ -19,7 +19,7 @@ module CountrySelect
|
|
19
19
|
}
|
20
20
|
|
21
21
|
if priority_countries.present?
|
22
|
-
priority_countries_options = country_options_for(priority_countries,
|
22
|
+
priority_countries_options = country_options_for(priority_countries, @options.fetch(:sort_provided, ::CountrySelect::DEFAULTS[:sort_provided]))
|
23
23
|
|
24
24
|
option_tags = options_for_select(priority_countries_options, option_tags_options)
|
25
25
|
option_tags += html_safe_newline + options_for_select([priority_countries_divider], disabled: priority_countries_divider)
|
@@ -59,14 +59,14 @@ module CountrySelect
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def country_options
|
62
|
-
country_options_for(all_country_codes,
|
62
|
+
country_options_for(all_country_codes, @options.fetch(:sort_provided, ::CountrySelect::DEFAULTS[:sort_provided]))
|
63
63
|
end
|
64
64
|
|
65
65
|
def all_country_codes
|
66
66
|
codes = ISO3166::Country.codes
|
67
67
|
|
68
68
|
if only_country_codes.present?
|
69
|
-
|
69
|
+
only_country_codes & codes
|
70
70
|
elsif except_country_codes.present?
|
71
71
|
codes - except_country_codes
|
72
72
|
else
|
@@ -79,9 +79,8 @@ module CountrySelect
|
|
79
79
|
country_list = country_codes.map do |code_or_name|
|
80
80
|
if country = ISO3166::Country.new(code_or_name)
|
81
81
|
code = country.alpha2
|
82
|
-
elsif country = ISO3166::Country.
|
83
|
-
code = country.
|
84
|
-
country = ISO3166::Country.new(code)
|
82
|
+
elsif country = ISO3166::Country.find_country_by_any_name(code_or_name)
|
83
|
+
code = country.alpha2
|
85
84
|
end
|
86
85
|
|
87
86
|
unless country.present?
|
@@ -100,11 +99,7 @@ module CountrySelect
|
|
100
99
|
end
|
101
100
|
|
102
101
|
if sorted
|
103
|
-
|
104
|
-
country_list.sort_alphabetical
|
105
|
-
else
|
106
|
-
country_list.sort
|
107
|
-
end
|
102
|
+
country_list.sort_by { |name, code| [I18n.transliterate(name), name] }
|
108
103
|
else
|
109
104
|
country_list
|
110
105
|
end
|
data/lib/country_select.rb
CHANGED
data/spec/country_select_spec.rb
CHANGED
@@ -92,9 +92,26 @@ describe "CountrySelect" do
|
|
92
92
|
it "accepts priority countries" do
|
93
93
|
tag = options_for_select(
|
94
94
|
[
|
95
|
+
['Denmark', 'DK'],
|
95
96
|
['Latvia','LV'],
|
96
97
|
['United States','US'],
|
98
|
+
['-'*15,'-'*15]
|
99
|
+
],
|
100
|
+
selected: 'US',
|
101
|
+
disabled: '-'*15
|
102
|
+
)
|
103
|
+
|
104
|
+
walrus.country_code = 'US'
|
105
|
+
t = builder.country_select(:country_code, priority_countries: ['LV','US','DK'])
|
106
|
+
expect(t).to include(tag)
|
107
|
+
end
|
108
|
+
|
109
|
+
it "priority countries are sorted by name by default" do
|
110
|
+
tag = options_for_select(
|
111
|
+
[
|
97
112
|
['Denmark', 'DK'],
|
113
|
+
['Latvia','LV'],
|
114
|
+
['United States','US'],
|
98
115
|
['-'*15,'-'*15]
|
99
116
|
],
|
100
117
|
selected: 'US',
|
@@ -106,6 +123,23 @@ describe "CountrySelect" do
|
|
106
123
|
expect(t).to include(tag)
|
107
124
|
end
|
108
125
|
|
126
|
+
it "priority countries with `sort_provided: false` preserves the provided order" do
|
127
|
+
tag = options_for_select(
|
128
|
+
[
|
129
|
+
['Latvia','LV'],
|
130
|
+
['United States','US'],
|
131
|
+
['Denmark', 'DK'],
|
132
|
+
['-'*15,'-'*15]
|
133
|
+
],
|
134
|
+
selected: 'US',
|
135
|
+
disabled: '-'*15
|
136
|
+
)
|
137
|
+
|
138
|
+
walrus.country_code = 'US'
|
139
|
+
t = builder.country_select(:country_code, priority_countries: ['LV','US','DK'], sort_provided: false)
|
140
|
+
expect(t).to include(tag)
|
141
|
+
end
|
142
|
+
|
109
143
|
describe "when selected options is not an array" do
|
110
144
|
it "selects only the first matching option" do
|
111
145
|
tag = options_for_select([["United States", "US"],["Uruguay", "UY"]], "US")
|
@@ -139,6 +173,18 @@ describe "CountrySelect" do
|
|
139
173
|
expect(t).to_not include(tag)
|
140
174
|
end
|
141
175
|
|
176
|
+
it "countries provided in `only` are sorted by name by default" do
|
177
|
+
t = builder.country_select(:country_code, only: ['PT','DE','AR'])
|
178
|
+
order = t.scan(/value="(\w{2})"/).map { |o| o[0] }
|
179
|
+
expect(order).to eq(['AR', 'DE', 'PT'])
|
180
|
+
end
|
181
|
+
|
182
|
+
it "countries provided in `only` with `sort_provided` to false keeps the order of the provided countries" do
|
183
|
+
t = builder.country_select(:country_code, only: ['PT','DE','AR'], sort_provided: false)
|
184
|
+
order = t.scan(/value="(\w{2})"/).map { |o| o[0] }
|
185
|
+
expect(order).to eq(['PT','DE','AR'])
|
186
|
+
end
|
187
|
+
|
142
188
|
context "when there is a default 'except' configured" do
|
143
189
|
around do |example|
|
144
190
|
old_value = ::CountrySelect::DEFAULTS[:except]
|
@@ -160,9 +206,9 @@ describe "CountrySelect" do
|
|
160
206
|
it "accepts priority countries" do
|
161
207
|
tag = options_for_select(
|
162
208
|
[
|
209
|
+
['Denmark', 'DK'],
|
163
210
|
['Latvia','LV'],
|
164
211
|
['United States','US'],
|
165
|
-
['Denmark', 'DK'],
|
166
212
|
['-'*15,'-'*15]
|
167
213
|
],
|
168
214
|
selected: 'US',
|
@@ -235,27 +281,10 @@ describe "CountrySelect" do
|
|
235
281
|
expect(order).to eq(['AF', 'AX', 'AL', 'ZW'])
|
236
282
|
end
|
237
283
|
|
238
|
-
context "without sort_alphabetical" do
|
239
|
-
before do
|
240
|
-
Enumerable.send(:alias_method, :_sort_alphabetical, :sort_alphabetical)
|
241
|
-
Enumerable.send(:remove_method, :sort_alphabetical)
|
242
|
-
end
|
243
|
-
|
244
|
-
after do
|
245
|
-
Enumerable.send(:alias_method, :sort_alphabetical, :_sort_alphabetical)
|
246
|
-
end
|
247
|
-
|
248
|
-
it 'falls back to regular sort' do
|
249
|
-
tag = builder.country_select(:country_code, only: ['AX', 'AL', 'AF', 'ZW'])
|
250
|
-
order = tag.scan(/value="(\w{2})"/).map { |o| o[0] }
|
251
|
-
expect(order).to eq(['AF', 'AL', 'ZW', 'AX'])
|
252
|
-
end
|
253
|
-
end
|
254
|
-
|
255
284
|
describe "custom formats" do
|
256
285
|
it "accepts a custom formatter" do
|
257
286
|
::CountrySelect::FORMATS[:with_alpha2] = lambda do |country|
|
258
|
-
"#{country.
|
287
|
+
"#{country.iso_short_name} (#{country.alpha2})"
|
259
288
|
end
|
260
289
|
|
261
290
|
tag = options_for_select([['United States of America (US)', 'US']], 'US')
|
@@ -267,7 +296,7 @@ describe "CountrySelect" do
|
|
267
296
|
|
268
297
|
it "accepts an array for formatter" do
|
269
298
|
::CountrySelect::FORMATS[:with_alpha3] = lambda do |country|
|
270
|
-
[country.
|
299
|
+
[country.iso_short_name, country.alpha3]
|
271
300
|
end
|
272
301
|
|
273
302
|
tag = options_for_select([['United States of America', 'USA']], 'USA')
|
@@ -278,7 +307,7 @@ describe "CountrySelect" do
|
|
278
307
|
|
279
308
|
it "accepts an array for formatter + custom formatter" do
|
280
309
|
::CountrySelect::FORMATS[:with_alpha3] = lambda do |country|
|
281
|
-
["#{country.
|
310
|
+
["#{country.iso_short_name} (#{country.alpha2})", country.alpha3]
|
282
311
|
end
|
283
312
|
|
284
313
|
tag = options_for_select([['United States of America (US)', 'USA']], 'USA')
|
@@ -289,7 +318,7 @@ describe "CountrySelect" do
|
|
289
318
|
|
290
319
|
it "marks priority countries as selected only once" do
|
291
320
|
::CountrySelect::FORMATS[:with_alpha3] = lambda do |country|
|
292
|
-
[country.
|
321
|
+
[country.iso_short_name, country.alpha3]
|
293
322
|
end
|
294
323
|
|
295
324
|
tag = options_for_select([['United States of America', 'USA']], 'USA')
|
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: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Penner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-30 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: '
|
19
|
+
version: '7.0'
|
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: '
|
26
|
+
version: '7.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,48 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: wwtd
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: countries
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '4.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: sort_alphabetical
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.1'
|
75
|
+
version: '5.0'
|
104
76
|
type: :runtime
|
105
77
|
prerelease: false
|
106
78
|
version_requirements: !ruby/object:Gem::Requirement
|
107
79
|
requirements:
|
108
80
|
- - "~>"
|
109
81
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
82
|
+
version: '5.0'
|
111
83
|
description: Provides a simple helper to get an HTML select list of countries. The
|
112
84
|
list of countries comes from the ISO 3166 standard. While it is a relatively neutral
|
113
85
|
source of country names, it will still offend some users.
|
@@ -117,9 +89,10 @@ executables: []
|
|
117
89
|
extensions: []
|
118
90
|
extra_rdoc_files: []
|
119
91
|
files:
|
92
|
+
- ".github/workflows/build.yml"
|
93
|
+
- ".github/workflows/codeql-analysis.yml"
|
120
94
|
- ".gitignore"
|
121
95
|
- ".rspec"
|
122
|
-
- ".travis.yml"
|
123
96
|
- CHANGELOG.md
|
124
97
|
- Gemfile
|
125
98
|
- Gemfile.lock
|
@@ -128,28 +101,30 @@ files:
|
|
128
101
|
- Rakefile
|
129
102
|
- UPGRADING.md
|
130
103
|
- country_select.gemspec
|
131
|
-
- gemfiles/actionpack.
|
132
|
-
- gemfiles/actionpack.
|
133
|
-
- gemfiles/
|
134
|
-
- gemfiles/
|
135
|
-
- gemfiles/
|
136
|
-
- gemfiles/
|
137
|
-
- gemfiles/
|
138
|
-
- gemfiles/
|
104
|
+
- gemfiles/actionpack-5.2.gemfile
|
105
|
+
- gemfiles/actionpack-5.2.gemfile.lock
|
106
|
+
- gemfiles/actionpack-6.0.gemfile
|
107
|
+
- gemfiles/actionpack-6.0.gemfile.lock
|
108
|
+
- gemfiles/actionpack-6.1.gemfile
|
109
|
+
- gemfiles/actionpack-6.1.gemfile.lock
|
110
|
+
- gemfiles/actionpack-7.0.gemfile
|
111
|
+
- gemfiles/actionpack-7.0.gemfile.lock
|
139
112
|
- lib/country_select.rb
|
140
113
|
- lib/country_select/country_select_helper.rb
|
141
114
|
- lib/country_select/defaults.rb
|
142
115
|
- lib/country_select/formats.rb
|
143
116
|
- lib/country_select/tag_helper.rb
|
144
117
|
- lib/country_select/version.rb
|
145
|
-
- lib/country_select_without_sort_alphabetical.rb
|
146
118
|
- spec/country_select_spec.rb
|
147
119
|
- spec/spec_helper.rb
|
148
|
-
homepage: https://github.com/
|
120
|
+
homepage: https://github.com/countries/country_select
|
149
121
|
licenses:
|
150
122
|
- MIT
|
151
|
-
metadata:
|
152
|
-
|
123
|
+
metadata:
|
124
|
+
bug_tracker_uri: http://github.com/countries/country_select/issues
|
125
|
+
changelog_uri: https://github.com/countries/country_select/blob/master/CHANGELOG.md
|
126
|
+
source_code_uri: https://github.com/countries/country_select
|
127
|
+
post_install_message:
|
153
128
|
rdoc_options: []
|
154
129
|
require_paths:
|
155
130
|
- lib
|
@@ -157,15 +132,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
132
|
requirements:
|
158
133
|
- - ">="
|
159
134
|
- !ruby/object:Gem::Version
|
160
|
-
version: '2.
|
135
|
+
version: '2.7'
|
161
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
137
|
requirements:
|
163
138
|
- - ">="
|
164
139
|
- !ruby/object:Gem::Version
|
165
140
|
version: '0'
|
166
141
|
requirements: []
|
167
|
-
rubygems_version: 3.
|
168
|
-
signing_key:
|
142
|
+
rubygems_version: 3.3.7
|
143
|
+
signing_key:
|
169
144
|
specification_version: 4
|
170
145
|
summary: Country Select Plugin
|
171
146
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
os: linux
|
2
|
-
cache: bundler
|
3
|
-
language: ruby
|
4
|
-
bundler_args: ""
|
5
|
-
rvm:
|
6
|
-
- "2.5"
|
7
|
-
- "2.6"
|
8
|
-
- "2.7"
|
9
|
-
- "3.0"
|
10
|
-
- ruby-head
|
11
|
-
gemfile:
|
12
|
-
- gemfiles/actionpack5.2.gemfile
|
13
|
-
- gemfiles/actionpack6.0.gemfile
|
14
|
-
- gemfiles/actionpack6.1.gemfile
|
15
|
-
- gemfiles/actionpack.edge.gemfile
|
16
|
-
jobs:
|
17
|
-
exclude:
|
18
|
-
- rvm: "2.5"
|
19
|
-
gemfile: gemfiles/actionpack.edge.gemfile
|
20
|
-
- rvm: "2.6"
|
21
|
-
gemfile: gemfiles/actionpack.edge.gemfile
|
22
|
-
allow_failures:
|
23
|
-
- rvm: ruby-head
|