timezone 1.3.20 → 1.3.29

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.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +15 -0
  3. data/.github/workflows/{rake.yml → ci.yml} +2 -2
  4. data/.rubocop.yml +24 -5
  5. data/CHANGES.markdown +36 -0
  6. data/README.markdown +5 -5
  7. data/data/Africa/Blantyre +1 -1
  8. data/data/Africa/Bujumbura +1 -1
  9. data/data/Africa/Cairo +32 -0
  10. data/data/Africa/Casablanca +5 -5
  11. data/data/Africa/El_Aaiun +5 -5
  12. data/data/Africa/Gaborone +1 -1
  13. data/data/Africa/Harare +1 -1
  14. data/data/Africa/Kigali +1 -1
  15. data/data/Africa/Lubumbashi +1 -1
  16. data/data/Africa/Lusaka +1 -1
  17. data/data/Africa/Maputo +1 -1
  18. data/data/America/Asuncion +2 -29
  19. data/data/America/Bahia_Banderas +5 -7
  20. data/data/America/Bogota +1 -1
  21. data/data/America/Cambridge_Bay +17 -3
  22. data/data/America/Cancun +7 -6
  23. data/data/America/Chihuahua +4 -4
  24. data/data/America/Ciudad_Juarez +94 -0
  25. data/data/America/Coyhaique +134 -0
  26. data/data/America/Ensenada +11 -5
  27. data/data/America/Godthab +31 -32
  28. data/data/America/Hermosillo +5 -7
  29. data/data/America/Inuvik +17 -4
  30. data/data/America/Iqaluit +17 -3
  31. data/data/America/Mazatlan +5 -7
  32. data/data/America/Merida +3 -3
  33. data/data/America/Mexico_City +4 -4
  34. data/data/America/Miquelon +2 -2
  35. data/data/America/Monterrey +6 -1
  36. data/data/America/Montreal +2 -2
  37. data/data/America/Nassau +2 -2
  38. data/data/America/Nipigon +2 -2
  39. data/data/America/Nuuk +31 -32
  40. data/data/America/Ojinaga +36 -4
  41. data/data/America/Pangnirtung +51 -38
  42. data/data/America/Rankin_Inlet +17 -3
  43. data/data/America/Resolute +17 -3
  44. data/data/America/Santa_Isabel +11 -5
  45. data/data/America/Scoresbysund +30 -30
  46. data/data/America/Thunder_Bay +2 -2
  47. data/data/America/Tijuana +11 -5
  48. data/data/America/Toronto +2 -2
  49. data/data/America/Whitehorse +2 -2
  50. data/data/America/Yellowknife +33 -5
  51. data/data/Antarctica/Casey +6 -1
  52. data/data/Antarctica/Vostok +5 -2
  53. data/data/Asia/Almaty +2 -1
  54. data/data/Asia/Choibalsan +46 -47
  55. data/data/Asia/Dili +2 -2
  56. data/data/Asia/Gaza +11 -11
  57. data/data/Asia/Hebron +11 -11
  58. data/data/Asia/Ho_Chi_Minh +2 -2
  59. data/data/Asia/Kuala_Lumpur +1 -1
  60. data/data/Asia/Manila +14 -10
  61. data/data/Asia/Qostanay +2 -1
  62. data/data/Asia/Saigon +2 -2
  63. data/data/Asia/Singapore +1 -1
  64. data/data/Asia/Tehran +2 -2
  65. data/data/Atlantic/Azores +20 -27
  66. data/data/Atlantic/Madeira +18 -27
  67. data/data/CET +56 -7
  68. data/data/CST6CDT +90 -3
  69. data/data/Canada/Eastern +2 -2
  70. data/data/Canada/Yukon +2 -2
  71. data/data/EET +24 -8
  72. data/data/EST +3 -1
  73. data/data/EST5EDT +90 -3
  74. data/data/Egypt +32 -0
  75. data/data/Europe/Kirov +44 -44
  76. data/data/Europe/Lisbon +22 -21
  77. data/data/Europe/Volgograd +47 -47
  78. data/data/HST +8 -1
  79. data/data/Iran +2 -2
  80. data/data/MET +188 -139
  81. data/data/MST +12 -1
  82. data/data/MST7MDT +12 -3
  83. data/data/Mexico/BajaNorte +11 -5
  84. data/data/Mexico/BajaSur +5 -7
  85. data/data/Mexico/General +4 -4
  86. data/data/PST8PDT +39 -2
  87. data/data/Portugal +22 -21
  88. data/data/Singapore +1 -1
  89. data/data/WET +106 -4
  90. data/lib/timezone/error.rb +6 -0
  91. data/lib/timezone/loader.rb +2 -2
  92. data/lib/timezone/lookup/geonames.rb +1 -0
  93. data/lib/timezone/lookup/google.rb +3 -2
  94. data/lib/timezone/lookup.rb +3 -2
  95. data/lib/timezone/parser.rb +5 -4
  96. data/lib/timezone/version.rb +1 -1
  97. data/lib/timezone/zone.rb +0 -1
  98. data/test/timezone/lookup/test_geonames.rb +16 -9
  99. data/test/timezone/lookup/test_google.rb +7 -2
  100. data/test/timezone/lookup/test_test.rb +1 -0
  101. data/test/timezone/test_lookup.rb +5 -5
  102. data/timezone.gemspec +11 -4
  103. metadata +56 -10
data/data/WET CHANGED
@@ -1,11 +1,76 @@
1
- 228877199:WET:0:0
2
- 15120000:WEST:1:3600
1
+ -1830384001:LMT:0:-2205
2
+ 140828400:WET:0:0
3
+ 11754000:WEST:1:3600
4
+ 10368000:WET:0:0
5
+ 19695600:WEST:1:3600
6
+ 11840400:WET:0:0
7
+ 19695600:WEST:1:3600
8
+ 11840400:WET:0:0
9
+ 19695600:WEST:1:3600
10
+ 11926800:WET:0:0
11
+ 19695600:WEST:1:3600
12
+ 11840400:WET:0:0
13
+ 19695600:WEST:1:3600
14
+ 79056000:WET:0:0
15
+ 14774400:WEST:1:3600
16
+ 48384000:WET:0:0
17
+ 14515200:WEST:1:3600
3
18
  16329600:WET:0:0
19
+ 15120000:WEST:1:3600
20
+ 16934400:WET:0:0
21
+ 15120000:WEST:1:3600
22
+ 16934400:WET:0:0
23
+ 14515200:WEST:1:3600
24
+ 48384000:WET:0:0
25
+ 14515200:WEST:1:3600
26
+ 15724800:WET:0:0
27
+ 15724800:WEST:1:3600
28
+ 47779200:WET:0:0
4
29
  15724800:WEST:1:3600
30
+ 15120000:WET:0:0
31
+ 16329600:WEST:1:3600
32
+ 16934400:WET:0:0
33
+ 14515200:WEST:1:3600
34
+ 15724800:WET:0:0
35
+ 15724800:WEST:1:3600
36
+ 15120000:WET:0:0
37
+ 16329600:WEST:1:3600
38
+ 16934400:WET:0:0
39
+ 18748800:WEST:1:3600
40
+ 8467200:WET:0:0
41
+ 19526400:WEST:1:3600
42
+ 15552000:WET:0:0
43
+ 15811200:WEST:1:3600
44
+ 13824000:WET:0:0
45
+ 3625200:WEST:1:3600
46
+ 9676800:WEMT:1:7200
47
+ 6051600:WEST:1:3600
48
+ 12096000:WET:0:0
49
+ 3020400:WEST:1:3600
50
+ 11491200:WEMT:1:7200
51
+ 5446800:WEST:1:3600
52
+ 11491200:WET:0:0
53
+ 3625200:WEST:1:3600
54
+ 10886400:WEMT:1:7200
55
+ 5446800:WEST:1:3600
56
+ 11491200:WET:0:0
57
+ 3625200:WEST:1:3600
58
+ 10886400:WEMT:1:7200
59
+ 5446800:WEST:1:3600
60
+ 13910400:WET:0:0
61
+ 15724800:WEST:1:3600
62
+ 15735600:WET:0:0
63
+ 15724800:WEST:1:3600
64
+ 15724800:WET:0:0
65
+ 15724800:WEST:1:3600
66
+ 15724800:WET:0:0
67
+ 15724800:WEST:1:3600
68
+ 15724800:WET:0:0
69
+ 15724800:WEST:1:3600
70
+ 15724800:WET:0:0
71
+ 16329600:WEST:1:3600
5
72
  15724800:WET:0:0
6
73
  15724800:WEST:1:3600
7
- 16329600:WET:0:0
8
- 15120000:WEST:1:3600
9
74
  15724800:WET:0:0
10
75
  15724800:WEST:1:3600
11
76
  15724800:WET:0:0
@@ -34,9 +99,46 @@
34
99
  15724800:WEST:1:3600
35
100
  15724800:WET:0:0
36
101
  15724800:WEST:1:3600
102
+ 315093600:CET:0:3600
103
+ 15724800:WET:0:0
104
+ 15724800:WEST:1:3600
105
+ 16333200:WET:0:0
106
+ 15724800:WEST:1:3600
37
107
  15724800:WET:0:0
38
108
  15724800:WEST:1:3600
39
109
  16329600:WET:0:0
110
+ 15120000:WEST:1:3600
111
+ 15721200:WET:0:0
112
+ 15724800:WEST:1:3600
113
+ 15724800:WET:0:0
114
+ 15724800:WEST:1:3600
115
+ 15724800:WET:0:0
116
+ 15724800:WEST:1:3600
117
+ 15724800:WET:0:0
118
+ 16329600:WEST:1:3600
119
+ 15724800:WET:0:0
120
+ 15724800:WEST:1:3600
121
+ 15728400:WET:0:0
122
+ 15724800:WEST:1:3600
123
+ 15724800:WET:0:0
124
+ 15724800:WEST:1:3600
125
+ 15724800:WET:0:0
126
+ 15724800:WEST:1:3600
127
+ 15724800:WET:0:0
128
+ 15724800:WEST:1:3600
129
+ 15724800:WET:0:0
130
+ 16329600:WEST:1:3600
131
+ 15724800:WET:0:0
132
+ 15724800:WEST:1:3600
133
+ 15724800:WET:0:0
134
+ 15724800:WEST:1:3600
135
+ 15724800:CET:0:3600
136
+ 15724800:CEST:1:7200
137
+ 15724800:CET:0:3600
138
+ 15724800:CEST:1:7200
139
+ 15724800:CET:0:3600
140
+ 15724800:CEST:1:7200
141
+ 16329600:CET:0:3600
40
142
  18144000:WEST:1:3600
41
143
  13305600:WET:0:0
42
144
  18144000:WEST:1:3600
@@ -12,16 +12,22 @@ module Timezone
12
12
  module Error
13
13
  # Top-level error. All other timezone errors subclass this one.
14
14
  class Base < StandardError; end
15
+
15
16
  # Indicates an invalid timezone name.
16
17
  class InvalidZone < Base; end
18
+
17
19
  # Indicates a lookup failure.
18
20
  class Lookup < Base; end
21
+
19
22
  # Indicates an error during lookup using the geonames API.
20
23
  class GeoNames < Lookup; end
24
+
21
25
  # Indicates an error during lookup using the google API.
22
26
  class Google < Lookup; end
27
+
23
28
  # Indicates a missing stub during a test lookup.
24
29
  class Test < Lookup; end
30
+
25
31
  # Indicates an invalid configuration.
26
32
  class InvalidConfig < Base; end
27
33
  end
@@ -2,10 +2,10 @@
2
2
 
3
3
  require 'timezone/error'
4
4
 
5
- module Timezone # rubocop:disable Style/Documentation
5
+ module Timezone
6
6
  # Responsible for loading and parsing timezone data from files.
7
7
  module Loader
8
- ZONE_FILE_PATH = File.expand_path(File.dirname(__FILE__) + '/../../data')
8
+ ZONE_FILE_PATH = File.expand_path("#{File.dirname(__FILE__)}/../../data")
9
9
  SOURCE_BIT = 0
10
10
 
11
11
  @rules = {} # cache of loaded rules
@@ -55,6 +55,7 @@ module Timezone
55
55
  return unless data['gmtOffset'].is_a? Numeric
56
56
 
57
57
  return 'Etc/UTC' if data['gmtOffset'].zero?
58
+
58
59
  "Etc/GMT#{format('%+d', -data['gmtOffset'])}"
59
60
  end
60
61
 
@@ -14,7 +14,7 @@ module Timezone
14
14
  class Google < ::Timezone::Lookup::Basic
15
15
  # Indicates that no time zone data could be found for the specified
16
16
  # <lat, lng>. This can occur if the query is incomplete or ambiguous.
17
- NO_TIMEZONE_INFORMATION = 'ZERO_RESULTS'.freeze
17
+ NO_TIMEZONE_INFORMATION = 'ZERO_RESULTS'
18
18
 
19
19
  def initialize(config)
20
20
  if config.api_key.nil?
@@ -34,7 +34,8 @@ module Timezone
34
34
  raise(Timezone::Error::Google, '403 Forbidden')
35
35
  end
36
36
 
37
- return unless response.code =~ /^2\d\d$/
37
+ return unless /^2\d\d$/.match?(response.code)
38
+
38
39
  data = JSON.parse(response.body)
39
40
 
40
41
  return if data['status'] == NO_TIMEZONE_INFORMATION
@@ -4,12 +4,13 @@ require 'timezone/lookup/geonames'
4
4
  require 'timezone/lookup/google'
5
5
  require 'timezone/lookup/test'
6
6
  require 'timezone/net_http_client'
7
+ require 'ostruct'
7
8
 
8
9
  module Timezone
9
10
  # Configure timezone lookups.
10
11
  module Lookup
11
12
  class << self
12
- MISSING_LOOKUP = 'No lookup configured'.freeze
13
+ MISSING_LOOKUP = 'No lookup configured'
13
14
  private_constant :MISSING_LOOKUP
14
15
 
15
16
  # Returns the lookup object
@@ -45,7 +46,7 @@ module Timezone
45
46
  test: ::Timezone::Lookup::Test
46
47
  }.freeze
47
48
 
48
- INVALID_LOOKUP = 'Invalid lookup specified'.freeze
49
+ INVALID_LOOKUP = 'Invalid lookup specified'
49
50
 
50
51
  attr_reader :config
51
52
 
@@ -9,7 +9,7 @@ module Timezone
9
9
  MIN_YEAR = -500
10
10
  MAX_YEAR = 2039
11
11
 
12
- LINE = /\s*(.+)\s*=\s*(.+)\s*isdst=(\d+)\s*gmtoff=([\+\-]*\d+)/
12
+ LINE = /\s*(.+)\s*=\s*(.+)\s*isdst=(\d+)\s*gmtoff=([+\-]*\d+)/.freeze
13
13
 
14
14
  # Bookkeeping files that we do not want to parse.
15
15
  IGNORE = ['leapseconds', 'posixrules', 'tzdata.zi'].freeze
@@ -25,6 +25,7 @@ module Timezone
25
25
  next if File.directory?(file)
26
26
  next if file.end_with?('.tab')
27
27
  next if IGNORE.include?(File.basename(file))
28
+
28
29
  parse(file)
29
30
  end
30
31
  end
@@ -65,7 +66,7 @@ module Timezone
65
66
  def parse_offset(offset)
66
67
  arity = offset.start_with?('-') ? -1 : 1
67
68
 
68
- match = offset.match(/^[\-\+](\d{2})$/)
69
+ match = offset.match(/^[\-+](\d{2})$/)
69
70
  arity * match[1].to_i * 60 * 60
70
71
  end
71
72
  end
@@ -76,10 +77,10 @@ module Timezone
76
77
  class Line
77
78
  attr_accessor :source, :name, :dst, :offset
78
79
 
79
- SOURCE_FORMAT = '%a %b %e %H:%M:%S %Y %Z'.freeze
80
+ SOURCE_FORMAT = '%a %b %e %H:%M:%S %Y %Z'
80
81
 
81
82
  def initialize(match)
82
- self.source = Time.strptime(match[1] + 'C', SOURCE_FORMAT).to_i
83
+ self.source = Time.strptime("#{match[1]}C", SOURCE_FORMAT).to_i
83
84
  self.name = match[2].split(' ').last
84
85
  self.dst = match[3].to_i
85
86
  self.offset = match[4].to_i
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Timezone
4
- VERSION = '1.3.20'.freeze
4
+ VERSION = '1.3.29'
5
5
  end
data/lib/timezone/zone.rb CHANGED
@@ -6,7 +6,6 @@ require 'time'
6
6
 
7
7
  require 'timezone/loader'
8
8
  require 'timezone/error'
9
- require 'timezone/loader'
10
9
 
11
10
  module Timezone
12
11
  # This object represents a real-world timezone. Each instance provides
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'timezone/lookup/geonames'
4
4
  require 'minitest/autorun'
5
+ require 'ostruct'
5
6
  require_relative '../../http_test_client'
6
7
 
7
8
  class TestGeonames < ::Minitest::Test
@@ -19,6 +20,10 @@ class TestGeonames < ::Minitest::Test
19
20
  }
20
21
  end
21
22
 
23
+ def lookup_file(file_name, &block)
24
+ lookup(File.open(File.join(mock_path, file_name)).read, &block)
25
+ end
26
+
22
27
  def lookup(body = nil, &_block)
23
28
  config = OpenStruct.new
24
29
  config.username = 'timezone'
@@ -40,23 +45,25 @@ class TestGeonames < ::Minitest::Test
40
45
  end
41
46
 
42
47
  def test_lookup
43
- mine = lookup(File.open(mock_path + '/lat_lon_coords.txt').read)
48
+ mine = lookup_file('/lat_lon_coords.txt')
44
49
 
45
50
  assert_equal 'Australia/Adelaide', mine.lookup(*coordinates)
46
51
  end
47
52
 
48
53
  def test_lookup_with_etc
49
54
  etc_data.each do |key, data|
50
- body = File.open(mock_path + "/lat_lon_coords_#{key}.txt").read
51
- mine = lookup(body) { |c| c.offset_etc_zones = true }
55
+ mine = lookup_file("/lat_lon_coords_#{key}.txt") do |c|
56
+ c.offset_etc_zones = true
57
+ end
52
58
 
53
59
  assert_equal data[:name], mine.lookup(*data[:coordinates])
54
60
  end
55
61
  end
56
62
 
57
63
  def test_wrong_offset
58
- body = File.open(mock_path + '/lat_lon_coords_wrong_offset.txt').read
59
- mine = lookup(body) { |c| c.offset_etc_zones = true }
64
+ mine = lookup_file('/lat_lon_coords_wrong_offset.txt') do |c|
65
+ c.offset_etc_zones = true
66
+ end
60
67
 
61
68
  assert_nil mine.lookup(*coordinates)
62
69
  end
@@ -80,7 +87,7 @@ class TestGeonames < ::Minitest::Test
80
87
  end
81
88
 
82
89
  def test_api_limit
83
- mine = lookup(File.open(mock_path + '/api_limit_reached.json').read)
90
+ mine = lookup_file('/api_limit_reached.json')
84
91
 
85
92
  assert_exception(
86
93
  mine,
@@ -90,19 +97,19 @@ class TestGeonames < ::Minitest::Test
90
97
  end
91
98
 
92
99
  def test_invalid_latlong
93
- mine = lookup(File.open(mock_path + '/invalid_latlong.json').read)
100
+ mine = lookup_file('/invalid_latlong.json')
94
101
 
95
102
  assert_exception(mine, 'invalid lat/lng')
96
103
  end
97
104
 
98
105
  def test_no_result_found
99
- mine = lookup(File.open(mock_path + '/no_result_found.json').read)
106
+ mine = lookup_file('/no_result_found.json')
100
107
 
101
108
  assert_nil(mine.lookup(10, 10))
102
109
  end
103
110
 
104
111
  def test_invalid_parameter
105
- mine = lookup(File.open(mock_path + '/invalid_parameter.json').read)
112
+ mine = lookup_file('/invalid_parameter.json')
106
113
 
107
114
  assert_exception(mine, 'error parsing parameter')
108
115
  end
@@ -3,6 +3,7 @@
3
3
  require 'timezone/lookup/google'
4
4
  require 'minitest/autorun'
5
5
  require 'timecop'
6
+ require 'ostruct'
6
7
  require_relative '../../http_test_client'
7
8
 
8
9
  class TestGoogle < ::Minitest::Test
@@ -12,6 +13,10 @@ class TestGoogle < ::Minitest::Test
12
13
  [-34.92771808058, 138.477041423321]
13
14
  end
14
15
 
16
+ def lookup_file(file_name, &block)
17
+ lookup(File.open(File.join(mock_path, file_name)).read, &block)
18
+ end
19
+
15
20
  def lookup(body = nil, &_block)
16
21
  config = OpenStruct.new
17
22
  config.api_key = 'MTIzYWJj'
@@ -33,7 +38,7 @@ class TestGoogle < ::Minitest::Test
33
38
  end
34
39
 
35
40
  def test_google_using_lat_long_coordinates
36
- mine = lookup(File.open(mock_path + '/google_lat_lon_coords.txt').read)
41
+ mine = lookup_file('/google_lat_lon_coords.txt')
37
42
 
38
43
  assert_equal 'Australia/Adelaide', mine.lookup(*coordinates)
39
44
  end
@@ -76,7 +81,7 @@ class TestGoogle < ::Minitest::Test
76
81
  end
77
82
 
78
83
  def test_no_result_found
79
- mine = lookup(File.open(mock_path + '/google_no_result_found.json').read)
84
+ mine = lookup_file('/google_no_result_found.json')
80
85
 
81
86
  assert_nil(mine.lookup(26.188703, -78.987053))
82
87
  end
@@ -3,6 +3,7 @@
3
3
  require 'timezone/lookup/test'
4
4
  require 'timezone'
5
5
  require 'minitest/autorun'
6
+ require 'ostruct'
6
7
 
7
8
  class TestTest < ::Minitest::Test
8
9
  parallelize_me!
@@ -8,7 +8,7 @@ class TestLookup < ::Minitest::Test
8
8
  Timezone::Lookup.config(:test)
9
9
 
10
10
  assert_equal Timezone::Lookup::Test,
11
- Timezone::Lookup.lookup.class
11
+ Timezone::Lookup.lookup.class
12
12
  end
13
13
 
14
14
  def test_geonames_config
@@ -17,10 +17,10 @@ class TestLookup < ::Minitest::Test
17
17
  end
18
18
 
19
19
  assert_equal Timezone::Lookup::Geonames,
20
- Timezone::Lookup.lookup.class
20
+ Timezone::Lookup.lookup.class
21
21
 
22
22
  assert_equal Timezone::NetHTTPClient,
23
- Timezone::Lookup.lookup.config.request_handler
23
+ Timezone::Lookup.lookup.config.request_handler
24
24
  end
25
25
 
26
26
  def test_google_config
@@ -29,10 +29,10 @@ class TestLookup < ::Minitest::Test
29
29
  end
30
30
 
31
31
  assert_equal Timezone::Lookup::Google,
32
- Timezone::Lookup.lookup.class
32
+ Timezone::Lookup.lookup.class
33
33
 
34
34
  assert_equal Timezone::NetHTTPClient,
35
- Timezone::Lookup.lookup.config.request_handler
35
+ Timezone::Lookup.lookup.config.request_handler
36
36
  end
37
37
 
38
38
  def test_custom_config
data/timezone.gemspec CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
- # -*- encoding: utf-8 -*-
3
2
 
4
- $:.push File.expand_path('../lib', __FILE__)
3
+ $:.push File.expand_path('lib', __dir__)
5
4
  require 'timezone/version'
6
5
 
7
6
  Gem::Specification.new do |s|
@@ -16,6 +15,10 @@ Gem::Specification.new do |s|
16
15
  s.description = 'Accurate current and historical timezones for Ruby with ' \
17
16
  'support for Geonames and Google latitude - longitude lookups.'
18
17
 
18
+ s.metadata = {
19
+ 'changelog_uri' => 'https://github.com/panthomakos/timezone/blob/master/CHANGES.markdown'
20
+ }
21
+
19
22
  s.files = `git ls-files`.split("\n")
20
23
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
24
  s.executables = `git ls-files -- bin/*`
@@ -25,8 +28,12 @@ Gem::Specification.new do |s|
25
28
  s.rdoc_options = ['--charset=UTF-8']
26
29
  s.require_paths = ['lib']
27
30
 
31
+ s.add_runtime_dependency('base64', '~> 0.2')
32
+ s.add_runtime_dependency('ostruct', '~> 0.6')
33
+
28
34
  s.add_development_dependency('minitest', '~> 5.8')
29
- s.add_development_dependency('rake', '~> 12')
30
- s.add_development_dependency('rubocop', '= 0.51')
35
+ s.add_development_dependency('rake', '~> 13')
36
+ s.add_development_dependency('rubocop', '= 1.5.1')
37
+ s.add_development_dependency('rubocop-performance', '= 1.5.1')
31
38
  s.add_development_dependency('timecop', '~> 0.8')
32
39
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timezone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.20
4
+ version: 1.3.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pan Thomakos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-01 00:00:00.000000000 Z
11
+ date: 2025-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: base64
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ostruct
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.6'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.6'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: minitest
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -30,28 +58,42 @@ dependencies:
30
58
  requirements:
31
59
  - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '12'
61
+ version: '13'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: '12'
68
+ version: '13'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rubocop
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
73
  - - '='
46
74
  - !ruby/object:Gem::Version
47
- version: '0.51'
75
+ version: 1.5.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.5.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-performance
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 1.5.1
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
94
  - - '='
53
95
  - !ruby/object:Gem::Version
54
- version: '0.51'
96
+ version: 1.5.1
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: timecop
57
99
  requirement: !ruby/object:Gem::Requirement
@@ -76,8 +118,9 @@ extra_rdoc_files:
76
118
  - README.markdown
77
119
  - License.txt
78
120
  files:
121
+ - ".codeclimate.yml"
79
122
  - ".editorconfig"
80
- - ".github/workflows/rake.yml"
123
+ - ".github/workflows/ci.yml"
81
124
  - ".gitignore"
82
125
  - ".rubocop.yml"
83
126
  - CHANGES.markdown
@@ -183,9 +226,11 @@ files:
183
226
  - data/America/Cayman
184
227
  - data/America/Chicago
185
228
  - data/America/Chihuahua
229
+ - data/America/Ciudad_Juarez
186
230
  - data/America/Coral_Harbour
187
231
  - data/America/Cordoba
188
232
  - data/America/Costa_Rica
233
+ - data/America/Coyhaique
189
234
  - data/America/Creston
190
235
  - data/America/Cuiaba
191
236
  - data/America/Curacao
@@ -729,7 +774,8 @@ files:
729
774
  homepage: https://github.com/panthomakos/timezone
730
775
  licenses:
731
776
  - MIT
732
- metadata: {}
777
+ metadata:
778
+ changelog_uri: https://github.com/panthomakos/timezone/blob/master/CHANGES.markdown
733
779
  post_install_message:
734
780
  rdoc_options:
735
781
  - "--charset=UTF-8"
@@ -746,10 +792,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
746
792
  - !ruby/object:Gem::Version
747
793
  version: '0'
748
794
  requirements: []
749
- rubygems_version: 3.2.15
795
+ rubygems_version: 3.4.19
750
796
  signing_key:
751
797
  specification_version: 4
752
- summary: timezone-1.3.20
798
+ summary: timezone-1.3.29
753
799
  test_files:
754
800
  - test/data/Helsinki_rules_without_timestamps.json
755
801
  - test/data/asia