Skip to content

Commit

Permalink
Upgrade countries gem to 5.7 from 2.x (#5)
Browse files Browse the repository at this point in the history
* Upgrade countries gem to 5.7

Huge version change as the countries gem is extremely out of date. This commit is an attempt to simply upgrade it, and see what breaks.

* `name` deprecated, using `iso_short_name` for countries gem

* Update gemspec
  • Loading branch information
hannah-dw authored Jan 16, 2024
1 parent c14039c commit a5c3f58
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
36 changes: 14 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,24 @@ PATH
remote: .
specs:
national_holidays (1.17.21)
countries (~> 2.1)
countries (~> 5.7)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
concurrent-ruby (1.2.2)
countries (2.1.4)
i18n_data (~> 0.8.0)
money (~> 6.9)
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
minitest (5.16.3)
money (6.16.0)
i18n (>= 0.6.4, <= 2)
parallel (1.22.1)
parser (3.1.2.1)
countries (5.7.1)
unaccent (~> 0.3)
minitest (5.20.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
rake (12.3.3)
regexp_parser (2.6.1)
rexml (3.2.5)
regexp_parser (2.8.3)
rexml (3.2.6)
rubocop (0.93.1)
parallel (~> 1.10)
parser (>= 2.7.1.5)
Expand All @@ -36,12 +29,11 @@ GEM
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
sixarm_ruby_unaccent (1.2.2)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
unaccent (0.4.0)
unicode-display_width (1.8.0)
unicode_utils (1.4.0)

PLATFORMS
arm64-darwin-21
Expand Down
2 changes: 1 addition & 1 deletion lib/national_holidays/country.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.all

def initialize(code)
@code = code.to_sym
@name = ISO3166::Country.new(code).name
@name = ISO3166::Country.new(code).iso_short_name
end

def regions
Expand Down
6 changes: 3 additions & 3 deletions national_holidays.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Gem::Specification.new do |s|
s.name = 'national_holidays'
s.version = '1.17.22'
s.date = '2024-01-09'
s.version = '2.0'
s.date = '2024-01-16'
s.summary = 'National Holidays for 95 countries'
s.description = 'Uses config from the national-holidays-config project to provide access to national holiday data across 95 countries'
s.authors = ['Alex Balhatchet']
Expand All @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.files = Dir.glob("{bin,lib,test}/**/*") + Dir.glob("national-holidays-config/conf/*/*.yml") + %w(LICENSE.txt README.md Rakefile)

s.add_runtime_dependency 'countries', '~>2.1'
s.add_runtime_dependency 'countries', '~>5.7'

s.add_development_dependency 'minitest', '~> 5.11'
s.add_development_dependency 'rake', '~> 12.3'
Expand Down

0 comments on commit a5c3f58

Please sign in to comment.