timezone 0.6.0 → 0.99.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +99 -1
  4. data/.travis.yml +6 -3
  5. data/CHANGES.markdown +10 -0
  6. data/Gemfile +1 -1
  7. data/README.markdown +129 -89
  8. data/Rakefile +7 -4
  9. data/benchmark.rb +13 -13
  10. data/lib/timezone/active_support.rb +147 -134
  11. data/lib/timezone/configure.rb +131 -110
  12. data/lib/timezone/deprecate.rb +32 -0
  13. data/lib/timezone/error.rb +16 -5
  14. data/lib/timezone/loader.rb +19 -16
  15. data/lib/timezone/lookup/basic.rb +24 -2
  16. data/lib/timezone/lookup/geonames.rb +9 -5
  17. data/lib/timezone/lookup/google.rb +24 -15
  18. data/lib/timezone/lookup/test.rb +8 -8
  19. data/lib/timezone/lookup.rb +68 -0
  20. data/lib/timezone/net_http_client.rb +23 -9
  21. data/lib/timezone/nil_zone.rb +32 -0
  22. data/lib/timezone/parser.rb +10 -5
  23. data/lib/timezone/version.rb +2 -1
  24. data/lib/timezone/zone.rb +230 -99
  25. data/lib/timezone.rb +75 -1
  26. data/test/basic_lookup_test.rb +2 -2
  27. data/test/geonames_lookup_test.rb +13 -6
  28. data/test/google_lookup_test.rb +34 -24
  29. data/test/http_test_client.rb +7 -6
  30. data/test/test_lookup_test.rb +3 -1
  31. data/test/test_timezone.rb +59 -0
  32. data/test/timezone/lookup/test_geonames.rb +59 -0
  33. data/test/timezone/lookup/test_google.rb +94 -0
  34. data/test/timezone/lookup/test_test.rb +24 -0
  35. data/test/timezone/test_deprecate.rb +20 -0
  36. data/test/timezone/test_loader.rb +32 -0
  37. data/test/timezone/test_lookup.rb +53 -0
  38. data/test/timezone/test_nil_zone.rb +26 -0
  39. data/test/timezone/test_zone.rb +49 -0
  40. data/test/timezone_test.rb +64 -63
  41. data/timezone.gemspec +16 -15
  42. metadata +39 -38
  43. data/.rubocop_todo.yml +0 -235
@@ -1,89 +1,88 @@
1
1
  require 'timezone'
2
2
  require 'timezone/zone'
3
3
  require 'minitest/autorun'
4
- require "mocha/setup"
5
4
  require 'timecop'
6
5
 
7
6
  class TimezoneTest < ::Minitest::Unit::TestCase
8
7
  def test_valid_timezone
9
- refute_nil(Timezone::Zone.new(:zone => 'Australia/Sydney'))
8
+ refute_nil(Timezone::Zone.new(zone: 'Australia/Sydney'))
10
9
  end
11
10
 
12
11
  def test_nil_timezone
13
12
  assert_raises Timezone::Error::NilZone do
14
- Timezone::Zone.new :zone => nil
13
+ Timezone::Zone.new zone: nil
15
14
  end
16
15
  end
17
16
 
18
17
  def test_invalid_timezone
19
18
  assert_raises Timezone::Error::InvalidZone do
20
- Timezone::Zone.new :zone => 'Foo/Bar'
19
+ Timezone::Zone.new zone: 'Foo/Bar'
21
20
  end
22
21
  end
23
22
 
24
23
  def test_timezone_list
25
- list = Timezone::Zone.list "Australia/Sydney", "America/Chicago"
24
+ list = Timezone::Zone.list 'Australia/Sydney', 'America/Chicago'
26
25
  assert list.is_a?(Array)
27
26
  assert list.count == 2
28
27
  assert list.first.is_a?(Hash)
29
- assert(list.any?{ |l| l[:zone] == 'Australia/Sydney' })
28
+ assert(list.any? { |l| l[:zone] == 'Australia/Sydney' })
30
29
  end
31
30
 
32
31
  def test_timezone_list_current_time
33
- Timecop.freeze(Time.new(2012,2,2,0,0,0)) do
32
+ Timecop.freeze(Time.new(2012, 2, 2, 0, 0, 0)) do
34
33
  assert !Timezone::Zone.list('EST5EDT').first[:dst]
35
34
  end
36
- Timecop.freeze(Time.new(2013,6,6,0,0,0)) do
35
+ Timecop.freeze(Time.new(2013, 6, 6, 0, 0, 0)) do
37
36
  assert Timezone::Zone.list('EST5EDT').first[:dst]
38
37
  end
39
38
  end
40
39
 
41
40
  def test_timezone_custom_list_order
42
41
  Timezone::Configure.order_list_by = :title
43
- Timezone::Configure.replace "America/Chicago", with: "Chicago"
44
- list = Timezone::Zone.list "Australia/Sydney", "America/Chicago"
45
- assert list.first[:title] == "Australia/Sydney"
46
- assert list.last[:title] == "Chicago"
47
- assert list.last[:zone] == "America/Chicago"
42
+ Timezone::Configure.replace 'America/Chicago', with: 'Chicago'
43
+ list = Timezone::Zone.list 'Australia/Sydney', 'America/Chicago'
44
+ assert list.first[:title] == 'Australia/Sydney'
45
+ assert list.last[:title] == 'Chicago'
46
+ assert list.last[:zone] == 'America/Chicago'
48
47
  end
49
48
 
50
49
  def test_timezone_default_list
51
- Timezone::Configure.default_for_list = "America/Chicago", "Australia/Sydney"
50
+ Timezone::Configure.default_for_list = 'America/Chicago', 'Australia/Sydney'
52
51
  list = Timezone::Zone.list
53
52
  assert list.count == 2
54
- assert(list.any?{ |l| l.has_value?("Australia/Sydney") })
53
+ assert(list.any? { |l| l.value?('Australia/Sydney') })
55
54
  end
56
55
 
57
56
  def test_timezone_names
58
57
  zones = Timezone::Zone.names
59
58
  assert zones.is_a?(Array)
60
59
  assert zones.count > 0
61
- assert zones.include? "Australia/Sydney"
60
+ assert zones.include? 'Australia/Sydney'
62
61
  end
63
62
 
64
63
  def time_timezone_equivalence
65
- gmt = Timezone::Zone.new :zone => 'GMT'
66
- australia = Timezone::Zone.new :zone => 'Australia/Sydney'
64
+ gmt = Timezone::Zone.new zone: 'GMT'
65
+ australia = Timezone::Zone.new zone: 'Australia/Sydney'
67
66
 
68
- assert_equal(gmt, Timezone::Zone.new(:zone => 'GMT'))
67
+ assert_equal(gmt, Timezone::Zone.new(zone: 'GMT'))
69
68
  assert gmt <= australia
70
69
  assert gmt < australia
71
70
  end
72
71
 
73
72
  def utc_offset(zone, year, month, day)
74
- Timezone::Zone.new(:zone => zone).utc_offset(Time.new(year, month, day))
73
+ Timezone::Zone.new(zone: zone).utc_offset(Time.new(year, month, day))
75
74
  end
76
75
 
77
76
  def test_getting_utc_offset
78
- assert_equal(36000, utc_offset('Australia/Sydney', 2011, 06, 05))
79
- assert_equal(-25200, utc_offset('America/Los_Angeles', 2011, 06, 05))
80
- assert_equal(20700, utc_offset('Asia/Kathmandu', 2011, 06, 05))
81
- assert_equal(-18000, utc_offset('America/New_York', 2011, 01, 11))
82
- assert_equal(-14400, utc_offset('America/New_York', 2011, 06, 11))
77
+ assert_equal(36_000, utc_offset('Australia/Sydney', 2011, 06, 05))
78
+ assert_equal(-25_200, utc_offset('America/Los_Angeles', 2011, 06, 05))
79
+ assert_equal(20_700, utc_offset('Asia/Kathmandu', 2011, 06, 05))
80
+ assert_equal(-18_000, utc_offset('America/New_York', 2011, 01, 11))
81
+ assert_equal(-14_400, utc_offset('America/New_York', 2011, 06, 11))
83
82
  end
84
83
 
85
84
  def dst?(zone, year, month, day)
86
- Timezone::Zone.new(:zone => zone).dst?(Time.new(year, month, day))
85
+ Timezone::Zone.new(zone: zone).dst?(Time.new(year, month, day))
87
86
  end
88
87
 
89
88
  def test_getting_dst
@@ -95,13 +94,13 @@ class TimezoneTest < ::Minitest::Unit::TestCase
95
94
  assert dst?('America/New_York', 2011, 06, 11)
96
95
  end
97
96
 
98
- def test_loading_GMT_timezone
99
- timezone = Timezone::Zone.new :zone => 'GMT'
97
+ def test_loading_gmt_timezone
98
+ timezone = Timezone::Zone.new zone: 'GMT'
100
99
  assert_equal Time.now.utc.to_i, timezone.time(Time.now).to_i
101
100
  end
102
101
 
103
102
  def test_loading_historical_time
104
- timezone = Timezone::Zone.new :zone => 'America/Los_Angeles'
103
+ timezone = Timezone::Zone.new zone: 'America/Los_Angeles'
105
104
  local = Time.strptime('2011-02-11T13:20:00Z', '%Y-%m-%dT%H:%M:%SZ')
106
105
  utc = Time.strptime('2011-02-11T21:20:00Z', '%Y-%m-%dT%H:%M:%SZ')
107
106
  assert_equal local.to_i, timezone.time(utc).to_i
@@ -109,12 +108,12 @@ class TimezoneTest < ::Minitest::Unit::TestCase
109
108
 
110
109
  # http://www.timeanddate.com/worldclock/clockchange.html?n=137&year=2011
111
110
  def test_historical_time_change_in_la_forward
112
- timezone = Timezone::Zone.new :zone => 'America/Los_Angeles'
111
+ timezone = Timezone::Zone.new zone: 'America/Los_Angeles'
113
112
  local = Time.strptime('2011-03-13T01:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
114
113
  utc = Time.strptime('2011-03-13T09:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
115
114
  assert_equal local.to_i, timezone.time(utc).to_i
116
115
 
117
- timezone = Timezone::Zone.new :zone => 'America/Los_Angeles'
116
+ timezone = Timezone::Zone.new zone: 'America/Los_Angeles'
118
117
  local = Time.strptime('2011-03-13T03:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
119
118
  utc = Time.strptime('2011-03-13T10:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
120
119
  assert_equal local.to_i, timezone.time(utc).to_i
@@ -122,12 +121,12 @@ class TimezoneTest < ::Minitest::Unit::TestCase
122
121
 
123
122
  # http://www.timeanddate.com/worldclock/clockchange.html?n=137&year=2011
124
123
  def test_historical_time_change_in_la_backward
125
- timezone = Timezone::Zone.new :zone => 'America/Los_Angeles'
124
+ timezone = Timezone::Zone.new zone: 'America/Los_Angeles'
126
125
  local = Time.strptime('2011-11-06T01:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
127
126
  utc = Time.strptime('2011-11-06T08:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
128
127
  assert_equal local.to_i, timezone.time(utc).to_i
129
128
 
130
- timezone = Timezone::Zone.new :zone => 'America/Los_Angeles'
129
+ timezone = Timezone::Zone.new zone: 'America/Los_Angeles'
131
130
  local = Time.strptime('2011-11-06T01:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
132
131
  utc = Time.strptime('2011-11-06T09:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
133
132
  assert_equal local.to_i, timezone.time(utc).to_i
@@ -135,19 +134,19 @@ class TimezoneTest < ::Minitest::Unit::TestCase
135
134
 
136
135
  # http://www.timeanddate.com/worldclock/clockchange.html?n=2364&year=1940
137
136
  def test_historical_time_change_in_hebron
138
- timezone = Timezone::Zone.new :zone => 'Asia/Hebron'
137
+ timezone = Timezone::Zone.new zone: 'Asia/Hebron'
139
138
  local = Time.strptime('1940-05-31T23:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
140
139
  utc = Time.strptime('1940-05-31T21:59:59 UTC', '%Y-%m-%dT%H:%M:%S %Z')
141
140
  assert_equal local.to_i, timezone.time(utc).to_i
142
141
 
143
- timezone = Timezone::Zone.new :zone => 'Asia/Hebron'
142
+ timezone = Timezone::Zone.new zone: 'Asia/Hebron'
144
143
  local = Time.strptime('1940-06-01T01:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
145
144
  utc = Time.strptime('1940-05-31T22:00:00 UTC', '%Y-%m-%dT%H:%M:%S %Z')
146
145
  assert_equal local.to_i, timezone.time(utc).to_i
147
146
  end
148
147
 
149
148
  def test_loading_half_hour_timezone
150
- timezone = Timezone::Zone.new :zone => 'Asia/Kathmandu'
149
+ timezone = Timezone::Zone.new zone: 'Asia/Kathmandu'
151
150
  utc = Time.utc(2011, 1, 4, 3, 51, 29)
152
151
  local = Time.utc(2011, 1, 4, 9, 36, 29)
153
152
  assert_equal local.to_i, timezone.time(utc).to_i
@@ -157,67 +156,69 @@ class TimezoneTest < ::Minitest::Unit::TestCase
157
156
  # their offsets do not match, and we want to test that the time and offsets
158
157
  # are equivalent.
159
158
  def test_time_with_offset
160
- timezone = Timezone::Zone.new :zone => 'Asia/Kathmandu'
159
+ timezone = Timezone::Zone.new zone: 'Asia/Kathmandu'
161
160
  utc = Time.utc(2011, 1, 4, 3, 51, 29)
162
- local = Time.new(2011, 1, 4, 9, 36, 29, 20700)
161
+ local = Time.new(2011, 1, 4, 9, 36, 29, 20_700)
163
162
  assert_equal local.to_s, timezone.time_with_offset(utc).to_s
164
163
 
165
- zone = Timezone::Zone.new(:zone => 'America/Los_Angeles')
166
- utc = Time.utc(2014,12,15,22,00,00)
167
- local = Time.new(2014,12,15,14,00,00,'-08:00')
164
+ zone = Timezone::Zone.new(zone: 'America/Los_Angeles')
165
+ utc = Time.utc(2014, 12, 15, 22, 00, 00)
166
+ local = Time.new(2014, 12, 15, 14, 00, 00, '-08:00')
168
167
  assert_equal local.to_s, zone.time_with_offset(utc).to_s
169
168
 
170
- utc = Time.utc(2014,4,5,22,00,00)
171
- local = Time.new(2014,4,5,15,00,00,'-07:00')
169
+ utc = Time.utc(2014, 4, 5, 22, 00, 00)
170
+ local = Time.new(2014, 4, 5, 15, 00, 00, '-07:00')
172
171
  assert_equal local.to_s, zone.time_with_offset(utc).to_s
173
172
  end
174
173
 
175
174
  def test_australian_timezone_with_dst
176
- timezone = Timezone::Zone.new :zone => 'Australia/Adelaide'
175
+ timezone = Timezone::Zone.new zone: 'Australia/Adelaide'
177
176
  utc = Time.utc(2010, 12, 23, 19, 37, 15)
178
177
  local = Time.utc(2010, 12, 24, 6, 7, 15)
179
178
  assert_equal local.to_i, timezone.time(utc).to_i
180
179
  end
181
180
 
182
181
  def test_local_to_utc
183
- timezone = Timezone::Zone.new(:zone => 'America/Los_Angeles')
182
+ timezone = Timezone::Zone.new(zone: 'America/Los_Angeles')
184
183
 
185
184
  # Time maps to two rules - we pick the first
186
- local = Time.utc(2015,11,1,1,50,0)
187
- utc = Time.utc(2015,11,1,8,50,0)
185
+ local = Time.utc(2015, 11, 1, 1, 50, 0)
186
+ utc = Time.utc(2015, 11, 1, 8, 50, 0)
188
187
  assert_equal(utc.to_s, timezone.local_to_utc(local).to_s)
189
188
 
190
189
  # Time is above the maximum - we pick the last rule
191
- local = Time.utc(3000,1,1,0,0,0)
192
- utc = Time.utc(3000,1,1,8,0,0)
190
+ local = Time.utc(3000, 1, 1, 0, 0, 0)
191
+ utc = Time.utc(3000, 1, 1, 8, 0, 0)
193
192
  assert_equal(utc.to_s, timezone.local_to_utc(local).to_s)
194
193
 
195
194
  # Time maps to a single rule - we pick that rule
196
- local = Time.utc(2015,11,1,0,1,0)
197
- utc = Time.utc(2015,11,1,7,1,0)
195
+ local = Time.utc(2015, 11, 1, 0, 1, 0)
196
+ utc = Time.utc(2015, 11, 1, 7, 1, 0)
198
197
  assert_equal(utc.to_s, timezone.local_to_utc(local).to_s)
199
198
 
200
199
  # Time is missing - we pick the first closest rule
201
- local = Time.utc(2015,3,8,2,50,0)
202
- utc = Time.utc(2015,3,8,9,50,0)
200
+ local = Time.utc(2015, 3, 8, 2, 50, 0)
201
+ utc = Time.utc(2015, 3, 8, 9, 50, 0)
203
202
  assert_equal(utc.to_s, timezone.local_to_utc(local).to_s)
204
203
  end
205
204
 
206
205
  def test_configure_url_default
207
- Timezone::Configure.begin{ |c| c.google_api_key = nil }
206
+ Timezone::Configure.begin { |c| c.google_api_key = nil }
208
207
  assert_equal 'api.geonames.org', Timezone::Configure.url
209
208
  end
210
209
 
211
210
  def test_configure_url_custom
212
211
  Timezone::Configure.begin { |c| c.google_api_key = nil }
213
- Timezone::Configure.begin { |c| c.geonames_url = 'www.newtimezoneserver.com' }
212
+ Timezone::Configure.begin do |c|
213
+ c.geonames_url = 'www.newtimezoneserver.com'
214
+ end
214
215
  assert_equal 'www.newtimezoneserver.com', Timezone::Configure.url
215
216
  # clean up url after test
216
217
  Timezone::Configure.begin { |c| c.geonames_url = nil }
217
218
  end
218
219
 
219
220
  def test_utc_offset_without_dst
220
- timezone = Timezone::Zone.new :zone => 'Europe/Helsinki'
221
+ timezone = Timezone::Zone.new zone: 'Europe/Helsinki'
221
222
  # just before DST starts
222
223
  utc = Time.utc(2012, 3, 25, 0, 59, 59)
223
224
  assert_equal timezone.utc_offset(utc), 7200
@@ -227,25 +228,25 @@ class TimezoneTest < ::Minitest::Unit::TestCase
227
228
  end
228
229
 
229
230
  def test_utc_offset_with_dst
230
- timezone = Timezone::Zone.new :zone => 'Europe/Helsinki'
231
+ timezone = Timezone::Zone.new zone: 'Europe/Helsinki'
231
232
  # on the second DST starts
232
233
  utc = Time.utc(2012, 3, 25, 1, 0, 0)
233
- assert_equal timezone.utc_offset(utc), 10800
234
+ assert_equal timezone.utc_offset(utc), 10_800
234
235
  # right before DST end
235
236
  utc = Time.utc(2012, 10, 28, 0, 59, 59)
236
- assert_equal timezone.utc_offset(utc), 10800
237
+ assert_equal timezone.utc_offset(utc), 10_800
237
238
  end
238
239
 
239
240
  def test_active_support_timezone
240
- timezone = Timezone::Zone.new(:zone => 'Australia/Adelaide')
241
+ timezone = Timezone::Zone.new(zone: 'Australia/Adelaide')
241
242
  assert_equal 'Australia/Adelaide', timezone.zone
242
243
  assert_equal 'Adelaide', timezone.active_support_time_zone
243
244
 
244
- timezone = Timezone::Zone.new(:zone => 'America/Phoenix')
245
+ timezone = Timezone::Zone.new(zone: 'America/Phoenix')
245
246
  assert_equal 'America/Phoenix', timezone.zone
246
247
  assert_equal 'Arizona', timezone.active_support_time_zone
247
248
 
248
- timezone = Timezone::Zone.new(:zone => 'America/Anchorage')
249
+ timezone = Timezone::Zone.new(zone: 'America/Anchorage')
249
250
  assert_equal 'America/Anchorage', timezone.zone
250
251
  assert_equal 'America/Anchorage', timezone.active_support_time_zone
251
252
  end
@@ -259,7 +260,7 @@ class TimezoneTest < ::Minitest::Unit::TestCase
259
260
  ].freeze
260
261
 
261
262
  def check_equivalence(zone, time, other)
262
- tz = Timezone::Zone.new(:zone => zone)
263
+ tz = Timezone::Zone.new(zone: zone)
263
264
 
264
265
  EQUIVALENCE_METHODS.each do |m|
265
266
  assert_equal(tz.public_send(m, time), tz.public_send(m, other))
data/timezone.gemspec CHANGED
@@ -1,30 +1,31 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "timezone/version"
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'timezone/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "timezone"
6
+ s.name = 'timezone'
7
7
  s.version = Timezone::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Pan Thomakos"]
10
- s.email = ["pan.thomakos@gmail.com"]
11
- s.homepage = "http://github.com/panthomakos/timezone"
9
+ s.authors = ['Pan Thomakos']
10
+ s.email = ['pan.thomakos@gmail.com']
11
+ s.homepage = 'http://github.com/panthomakos/timezone'
12
12
  s.summary = "timezone-#{Timezone::VERSION}"
13
- s.description = %q{A simple way to get accurate current and historical timezone information based on zone or latitude and longitude coordinates. This gem uses the tz database (http://www.twinsun.com/tz/tz-link.htm) for historical timezone information. It also uses either the geonames API (http://www.geonames.org/export/web-services.html) or Google timezone API (https://developers.google.com/maps/documentation/timezone/) for timezone latitude and longitude lookup.}
14
13
  s.license = 'MIT'
14
+ s.description = 'Accurate current and historical timezones for Ruby with ' \
15
+ 'support for Geonames and Google latitude - longitude lookups.'
15
16
 
16
- s.rubyforge_project = "timezone"
17
+ s.rubyforge_project = 'timezone'
17
18
 
18
19
  s.files = `git ls-files`.split("\n")
19
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.executables = `git ls-files -- bin/*`
22
+ .split("\n").map { |f| File.basename(f) }
21
23
  s.extra_rdoc_files = ['README.markdown', 'License.txt']
22
24
  s.rdoc_options = ['--charset=UTF-8']
23
- s.require_paths = ["lib"]
25
+ s.require_paths = ['lib']
24
26
 
25
- s.add_development_dependency('rake')
26
- s.add_development_dependency('minitest', '~> 4.0')
27
- s.add_development_dependency('rubocop')
28
- s.add_development_dependency('timecop')
29
- s.add_development_dependency('mocha')
27
+ s.add_development_dependency('rake', '~> 10.5')
28
+ s.add_development_dependency('minitest', '~> 5.8')
29
+ s.add_development_dependency('rubocop', '~> 0.37')
30
+ s.add_development_dependency('timecop', '~> 0.8')
30
31
  end
metadata CHANGED
@@ -1,91 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timezone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.99.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pan Thomakos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-01 00:00:00.000000000 Z
11
+ date: 2016-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '10.5'
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: '0'
26
+ version: '10.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: '5.8'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.0'
40
+ version: '5.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.37'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.37'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: timecop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: mocha
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: '0.8'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
83
- description: A simple way to get accurate current and historical timezone information
84
- based on zone or latitude and longitude coordinates. This gem uses the tz database
85
- (http://www.twinsun.com/tz/tz-link.htm) for historical timezone information. It
86
- also uses either the geonames API (http://www.geonames.org/export/web-services.html)
87
- or Google timezone API (https://developers.google.com/maps/documentation/timezone/)
88
- for timezone latitude and longitude lookup.
68
+ version: '0.8'
69
+ description: Accurate current and historical timezones for Ruby with support for Geonames
70
+ and Google latitude - longitude lookups.
89
71
  email:
90
72
  - pan.thomakos@gmail.com
91
73
  executables: []
@@ -96,7 +78,6 @@ extra_rdoc_files:
96
78
  files:
97
79
  - ".gitignore"
98
80
  - ".rubocop.yml"
99
- - ".rubocop_todo.yml"
100
81
  - ".travis.yml"
101
82
  - CHANGES.markdown
102
83
  - CONTRIBUTING.markdown
@@ -692,6 +673,7 @@ files:
692
673
  - lib/timezone.rb
693
674
  - lib/timezone/active_support.rb
694
675
  - lib/timezone/configure.rb
676
+ - lib/timezone/deprecate.rb
695
677
  - lib/timezone/error.rb
696
678
  - lib/timezone/loader.rb
697
679
  - lib/timezone/lookup.rb
@@ -700,6 +682,7 @@ files:
700
682
  - lib/timezone/lookup/google.rb
701
683
  - lib/timezone/lookup/test.rb
702
684
  - lib/timezone/net_http_client.rb
685
+ - lib/timezone/nil_zone.rb
703
686
  - lib/timezone/parser.rb
704
687
  - lib/timezone/version.rb
705
688
  - lib/timezone/zone.rb
@@ -714,6 +697,15 @@ files:
714
697
  - test/mocks/google_request_denied.txt
715
698
  - test/mocks/lat_lon_coords.txt
716
699
  - test/test_lookup_test.rb
700
+ - test/test_timezone.rb
701
+ - test/timezone/lookup/test_geonames.rb
702
+ - test/timezone/lookup/test_google.rb
703
+ - test/timezone/lookup/test_test.rb
704
+ - test/timezone/test_deprecate.rb
705
+ - test/timezone/test_loader.rb
706
+ - test/timezone/test_lookup.rb
707
+ - test/timezone/test_nil_zone.rb
708
+ - test/timezone/test_zone.rb
717
709
  - test/timezone_test.rb
718
710
  - timezone.gemspec
719
711
  homepage: http://github.com/panthomakos/timezone
@@ -740,7 +732,7 @@ rubyforge_project: timezone
740
732
  rubygems_version: 2.4.5.1
741
733
  signing_key:
742
734
  specification_version: 4
743
- summary: timezone-0.6.0
735
+ summary: timezone-0.99.0
744
736
  test_files:
745
737
  - test/basic_lookup_test.rb
746
738
  - test/data/Helsinki_rules_without_timestamps.json
@@ -753,5 +745,14 @@ test_files:
753
745
  - test/mocks/google_request_denied.txt
754
746
  - test/mocks/lat_lon_coords.txt
755
747
  - test/test_lookup_test.rb
748
+ - test/test_timezone.rb
749
+ - test/timezone/lookup/test_geonames.rb
750
+ - test/timezone/lookup/test_google.rb
751
+ - test/timezone/lookup/test_test.rb
752
+ - test/timezone/test_deprecate.rb
753
+ - test/timezone/test_loader.rb
754
+ - test/timezone/test_lookup.rb
755
+ - test/timezone/test_nil_zone.rb
756
+ - test/timezone/test_zone.rb
756
757
  - test/timezone_test.rb
757
758
  has_rdoc: