timezone 0.99.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.markdown +6 -0
  3. data/README.markdown +1 -11
  4. data/Rakefile +3 -1
  5. data/data/America/Caracas +2 -1
  6. data/data/Asia/Almaty +51 -48
  7. data/data/Asia/Anadyr +3 -3
  8. data/data/Asia/Aqtau +50 -50
  9. data/data/Asia/Aqtobe +51 -49
  10. data/data/Asia/Baku +2 -2
  11. data/data/Asia/Barnaul +3 -3
  12. data/data/Asia/Chita +3 -3
  13. data/data/Asia/Irkutsk +3 -3
  14. data/data/Asia/Kamchatka +3 -3
  15. data/data/Asia/Khandyga +3 -3
  16. data/data/Asia/Krasnoyarsk +3 -3
  17. data/data/Asia/Magadan +5 -4
  18. data/data/Asia/Novokuznetsk +3 -3
  19. data/data/Asia/Novosibirsk +3 -3
  20. data/data/Asia/Omsk +3 -3
  21. data/data/Asia/Oral +51 -50
  22. data/data/Asia/Qyzylorda +51 -50
  23. data/data/Asia/Sakhalin +3 -3
  24. data/data/Asia/Srednekolymsk +3 -3
  25. data/data/Asia/Tomsk +68 -0
  26. data/data/Asia/Ust-Nera +3 -3
  27. data/data/Asia/Vladivostok +3 -3
  28. data/data/Asia/Yakutsk +3 -3
  29. data/data/Asia/Yekaterinburg +3 -3
  30. data/data/Asia/Yerevan +3 -3
  31. data/data/Europe/Astrakhan +2 -2
  32. data/data/Europe/Kaliningrad +3 -3
  33. data/data/Europe/Kirov +64 -0
  34. data/data/Europe/Minsk +2 -2
  35. data/data/Europe/Moscow +3 -3
  36. data/data/Europe/Samara +3 -3
  37. data/data/Europe/Ulyanovsk +3 -3
  38. data/data/Europe/Volgograd +2 -2
  39. data/data/W-SU +3 -3
  40. data/lib/timezone/error.rb +0 -4
  41. data/lib/timezone/lookup/basic.rb +1 -7
  42. data/lib/timezone/lookup/geonames.rb +7 -6
  43. data/lib/timezone/lookup/google.rb +2 -1
  44. data/lib/timezone/net_http_client.rb +1 -10
  45. data/lib/timezone/version.rb +1 -1
  46. data/lib/timezone/zone.rb +1 -122
  47. data/test/http_test_client.rb +1 -2
  48. data/test/mocks/{api_limit_reached.txt → api_limit_reached.json} +0 -0
  49. data/test/mocks/invalid_latlong.json +1 -0
  50. data/test/mocks/invalid_parameter.json +1 -0
  51. data/test/{basic_lookup_test.rb → timezone/lookup/test_basic.rb} +3 -1
  52. data/test/timezone/lookup/test_geonames.rb +33 -4
  53. data/test/timezone/test_zone.rb +211 -3
  54. data/timezone.gemspec +14 -13
  55. metadata +22 -26
  56. data/lib/timezone/active_support.rb +0 -156
  57. data/lib/timezone/configure.rb +0 -258
  58. data/test/geonames_lookup_test.rb +0 -56
  59. data/test/google_lookup_test.rb +0 -81
  60. data/test/test_lookup_test.rb +0 -41
  61. data/test/timezone_test.rb +0 -297
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc0bf678bd6e161dc45a028424c1a7151b158d66
4
- data.tar.gz: d7174c31c317d4567f0742bf03386e990e2e1039
3
+ metadata.gz: fdabd1b4850be519e4f17397996071356c7af609
4
+ data.tar.gz: f3f527225d4485d9af73c863305dd10192b7a091
5
5
  SHA512:
6
- metadata.gz: 6db246f5d3c12a8393e32d8a881fdb471cab5474ba1590acdf2c00e263361bd080e8d5c1cc3cfe6eee4e0d8d351930fd61763a2f836f2c9c6adad93c59ba9a1a
7
- data.tar.gz: 9543df55e941e02e1f49c5568e5165b9e825b5eb26471d21d3ead25ed171f07a530d9340075349b33c09ff346718b1e3cadcb3a0315d3cd2e350802808471d83
6
+ metadata.gz: e7a5d4b82ab054a445bb3519b7ce1ce868b1e003f2167800d92717e1038e907973376ed4ca396fc52ae65ac5874b701fe0521aea7feb4074aa1163d65ff9187f
7
+ data.tar.gz: 3bdce28fbe2dd7e7a89b6ff093aed4d09126249b3d8cdba982f3d019ccd7e113e4825f16598d64b80c354ab1c8f5bece1dd0b16c73edb7456b7a1a17c8a86c54
@@ -1,5 +1,11 @@
1
1
  # master (unreleased)
2
2
 
3
+ # 1.0.0
4
+
5
+ * Remove deprecated code. (panthomakos)
6
+ * Updated with `tzdata-2016d-1`. (panthomakos)
7
+ * Improve Geonames exception messaging. (panthomakos)
8
+
3
9
  # 0.99.2
4
10
 
5
11
  * Updated with `tzdata-2016c-1`. (panthomakos)
@@ -13,17 +13,7 @@ Accurate current and history timezones for Ruby.
13
13
 
14
14
  Use the [`timezone`](https://rubygems.org/gems/timezone) gem - available on RubyGems. Semantic versioning is used, so if you would like to remain up-to-date and avoid any backwards-incompatible changes, use the following in your `Gemfile`:
15
15
 
16
- gem 'timezone', '~> 0.99'
17
-
18
- ## NOTE: v1.0.0 Release and Upgrade
19
-
20
- Version `1.0.0` of `timezone` will be released in the coming months. The `0.99.*` releases are backwards-forwards-compatible preparatory releases for `1.0.0`. Once `1.0.0` has been released, previous major versions will no longer be updated to include new timezone data. Any method that will be removed in `1.0.0` has been deprecated and warnings are included when deprecated methods are used. There have been some configuration changes - deprecation warnings and upgrade instructions are provided for those as well.
21
-
22
- Additionally, if you would like to provide your own deprecation logging, you can use `Timezone::Deprecate.callback`. For instance, to log to an external logger, you might use:
23
-
24
- Timezone::Deprecate.callback = lambda do |klass, method, message|
25
- MyLogger.log("[#{klass} : #{method}] #{message}")
26
- end
16
+ gem 'timezone', '~> 1.0'
27
17
 
28
18
  ## RubyDocs
29
19
 
data/Rakefile CHANGED
@@ -12,7 +12,9 @@ end
12
12
 
13
13
  RuboCop::RakeTask.new
14
14
 
15
- task default: [:test, :rubocop]
15
+ task(:utc) { ENV['TZ'] = 'UTC' }
16
+
17
+ task default: [:utc, :test, :rubocop]
16
18
 
17
19
  task :parse do
18
20
  require 'timezone/parser'
@@ -2,4 +2,5 @@
2
2
  697766396:CMT:0:-16060
3
3
  1668988940:VET:0:-16200
4
4
  1354933800:VET:0:-14400
5
- 238525201:VET:0:-16200
5
+ 264902400:VET:0:-16200
6
+ 1:VET:0:-14400
@@ -1,49 +1,52 @@
1
1
  -1441170469:LMT:0:18468
2
- 193622868:ALMT:0:18000
3
- 1602457200:ALMT:0:21600
4
- 15807600:ALMST:1:25200
5
- 15728400:ALMT:0:21600
6
- 15807600:ALMST:1:25200
7
- 15728400:ALMT:0:21600
8
- 15807600:ALMST:1:25200
9
- 15814800:ALMT:0:21600
10
- 15732000:ALMST:1:25200
11
- 15724800:ALMT:0:21600
12
- 15724800:ALMST:1:25200
13
- 15724800:ALMT:0:21600
14
- 15724800:ALMST:1:25200
15
- 15724800:ALMT:0:21600
16
- 15724800:ALMST:1:25200
17
- 15724800:ALMT:0:21600
18
- 15724800:ALMST:1:25200
19
- 15724800:ALMT:0:21600
20
- 15724800:ALMST:1:25200
21
- 15724800:ALMT:0:21600
22
- 16329600:ALMST:1:25200
23
- 47163600:ALMT:0:21600
24
- 15721200:ALMST:1:25200
25
- 15739200:ALMT:0:21600
26
- 15724800:ALMST:1:25200
27
- 15724800:ALMT:0:21600
28
- 15724800:ALMST:1:25200
29
- 15724800:ALMT:0:21600
30
- 15724800:ALMST:1:25200
31
- 16329600:ALMT:0:21600
32
- 18144000:ALMST:1:25200
33
- 13305600:ALMT:0:21600
34
- 18144000:ALMST:1:25200
35
- 13305600:ALMT:0:21600
36
- 18144000:ALMST:1:25200
37
- 13305600:ALMT:0:21600
38
- 18748800:ALMST:1:25200
39
- 12700800:ALMT:0:21600
40
- 18748800:ALMST:1:25200
41
- 12700800:ALMT:0:21600
42
- 18748800:ALMST:1:25200
43
- 13305600:ALMT:0:21600
44
- 18144000:ALMST:1:25200
45
- 13305600:ALMT:0:21600
46
- 18144000:ALMST:1:25200
47
- 13305600:ALMT:0:21600
48
- 18748800:ALMST:1:25200
49
- 336542401:ALMT:0:21600
2
+ 193622868:+05:0:18000
3
+ 1602457200:+06:0:21600
4
+ 15807600:+07:1:25200
5
+ 15728400:+06:0:21600
6
+ 15807600:+07:1:25200
7
+ 15728400:+06:0:21600
8
+ 15807600:+07:1:25200
9
+ 15814800:+06:0:21600
10
+ 15732000:+07:1:25200
11
+ 15724800:+06:0:21600
12
+ 15724800:+07:1:25200
13
+ 15724800:+06:0:21600
14
+ 15724800:+07:1:25200
15
+ 15724800:+06:0:21600
16
+ 15724800:+07:1:25200
17
+ 15724800:+06:0:21600
18
+ 15724800:+07:1:25200
19
+ 15724800:+06:0:21600
20
+ 15724800:+07:1:25200
21
+ 15724800:+06:0:21600
22
+ 16329600:+07:1:25200
23
+ 15724800:+06:0:21600
24
+ 15728400:+06:1:21600
25
+ 9676800:+05:0:18000
26
+ 6044400:+06:0:21600
27
+ 15724800:+07:1:25200
28
+ 15724800:+06:0:21600
29
+ 15724800:+07:1:25200
30
+ 15724800:+06:0:21600
31
+ 15724800:+07:1:25200
32
+ 15724800:+06:0:21600
33
+ 15724800:+07:1:25200
34
+ 16329600:+06:0:21600
35
+ 18144000:+07:1:25200
36
+ 13305600:+06:0:21600
37
+ 18144000:+07:1:25200
38
+ 13305600:+06:0:21600
39
+ 18144000:+07:1:25200
40
+ 13305600:+06:0:21600
41
+ 18748800:+07:1:25200
42
+ 12700800:+06:0:21600
43
+ 18748800:+07:1:25200
44
+ 12700800:+06:0:21600
45
+ 18748800:+07:1:25200
46
+ 13305600:+06:0:21600
47
+ 18144000:+07:1:25200
48
+ 13305600:+06:0:21600
49
+ 18144000:+07:1:25200
50
+ 13305600:+06:0:21600
51
+ 18748800:+07:1:25200
52
+ 336542401:+06:0:21600
@@ -23,9 +23,9 @@
23
23
  15724800:ANAT:0:43200
24
24
  15728400:ANAST:1:43200
25
25
  9676800:ANAT:0:39600
26
- 6033600:ANAT:0:43200
27
- 15721200:ANAST:1:46800
28
- 15739200:ANAT:0:43200
26
+ 6044400:ANAT:0:43200
27
+ 15724800:ANAST:1:46800
28
+ 15724800:ANAT:0:43200
29
29
  15724800:ANAST:1:46800
30
30
  15724800:ANAT:0:43200
31
31
  15724800:ANAST:1:46800
@@ -1,51 +1,51 @@
1
1
  -1441164065:LMT:0:12064
2
- 193620064:FORT:0:14400
3
- 1026601200:FORT:0:18000
4
- 591667200:SHET:0:18000
5
- 15721200:SHET:0:21600
6
- 15811200:SHEST:1:21600
7
- 15728400:SHET:0:18000
8
- 15807600:SHEST:1:21600
9
- 15814800:SHET:0:18000
10
- 15732000:SHEST:1:21600
11
- 15724800:SHET:0:18000
12
- 15724800:SHEST:1:21600
13
- 15724800:SHET:0:18000
14
- 15724800:SHEST:1:21600
15
- 15724800:SHET:0:18000
16
- 15724800:SHEST:1:21600
17
- 15724800:SHET:0:18000
18
- 15724800:SHEST:1:21600
19
- 15724800:SHET:0:18000
20
- 15724800:SHEST:1:21600
21
- 15724800:SHET:0:18000
22
- 16329600:SHEST:1:21600
23
- 38181600:SHET:0:18000
24
- 8982000:AQTT:0:18000
25
- 15721200:AQTST:1:21600
26
- 15739200:AQTT:0:18000
27
- 15724800:AQTST:1:21600
28
- 15724800:AQTT:0:18000
29
- 15724800:AQTST:1:21600
30
- 15724800:AQTT:0:18000
31
- 15728400:AQTST:1:18000
32
- 16329600:AQTT:0:14400
33
- 18144000:AQTST:1:18000
34
- 13305600:AQTT:0:14400
35
- 18144000:AQTST:1:18000
36
- 13305600:AQTT:0:14400
37
- 18144000:AQTST:1:18000
38
- 13305600:AQTT:0:14400
39
- 18748800:AQTST:1:18000
40
- 12700800:AQTT:0:14400
41
- 18748800:AQTST:1:18000
42
- 12700800:AQTT:0:14400
43
- 18748800:AQTST:1:18000
44
- 13305600:AQTT:0:14400
45
- 18144000:AQTST:1:18000
46
- 13305600:AQTT:0:14400
47
- 18144000:AQTST:1:18000
48
- 13305600:AQTT:0:14400
49
- 18748800:AQTST:1:18000
50
- 11656800:AQTT:0:14400
51
- 324878401:AQTT:0:18000
2
+ 193620064:+04:0:14400
3
+ 1618268400:+05:0:18000
4
+ 15721200:+06:0:21600
5
+ 15811200:+06:1:21600
6
+ 15728400:+05:0:18000
7
+ 15807600:+06:1:21600
8
+ 15814800:+05:0:18000
9
+ 15732000:+06:1:21600
10
+ 15724800:+05:0:18000
11
+ 15724800:+06:1:21600
12
+ 15724800:+05:0:18000
13
+ 15724800:+06:1:21600
14
+ 15724800:+05:0:18000
15
+ 15724800:+06:1:21600
16
+ 15724800:+05:0:18000
17
+ 15724800:+06:1:21600
18
+ 15724800:+05:0:18000
19
+ 15724800:+06:1:21600
20
+ 15724800:+05:0:18000
21
+ 16329600:+06:1:21600
22
+ 15724800:+05:0:18000
23
+ 15728400:+05:1:18000
24
+ 9676800:+04:0:14400
25
+ 6044400:+05:0:18000
26
+ 15724800:+06:1:21600
27
+ 15724800:+05:0:18000
28
+ 15724800:+06:1:21600
29
+ 15724800:+05:0:18000
30
+ 15724800:+06:1:21600
31
+ 15728400:+04:0:14400
32
+ 15724800:+05:1:18000
33
+ 16329600:+04:0:14400
34
+ 18144000:+05:1:18000
35
+ 13305600:+04:0:14400
36
+ 18144000:+05:1:18000
37
+ 13305600:+04:0:14400
38
+ 18144000:+05:1:18000
39
+ 13305600:+04:0:14400
40
+ 18748800:+05:1:18000
41
+ 12700800:+04:0:14400
42
+ 18748800:+05:1:18000
43
+ 12700800:+04:0:14400
44
+ 18748800:+05:1:18000
45
+ 13305600:+04:0:14400
46
+ 18144000:+05:1:18000
47
+ 13305600:+04:0:14400
48
+ 18144000:+05:1:18000
49
+ 13305600:+04:0:14400
50
+ 18748800:+05:1:18000
51
+ 336535201:+05:0:18000
@@ -1,50 +1,52 @@
1
1
  -1441165721:LMT:0:13720
2
- 193621720:AKTT:0:14400
3
- 1602457200:AKTT:0:18000
4
- 15807600:AKTST:1:21600
5
- 15724800:AKTT:0:21600
6
- 15811200:AKTST:1:21600
7
- 15728400:AKTT:0:18000
8
- 15807600:AKTST:1:21600
9
- 15814800:AKTT:0:18000
10
- 15732000:AKTST:1:21600
11
- 15724800:AKTT:0:18000
12
- 15724800:AKTST:1:21600
13
- 15724800:AKTT:0:18000
14
- 15724800:AKTST:1:21600
15
- 15724800:AKTT:0:18000
16
- 15724800:AKTST:1:21600
17
- 15724800:AKTT:0:18000
18
- 15724800:AKTST:1:21600
19
- 15724800:AKTT:0:18000
20
- 15724800:AKTST:1:21600
21
- 15724800:AKTT:0:18000
22
- 16329600:AKTST:1:21600
23
- 38181600:AKTT:0:18000
24
- 8982000:AQTT:0:18000
25
- 15721200:AQTST:1:21600
26
- 15739200:AQTT:0:18000
27
- 15724800:AQTST:1:21600
28
- 15724800:AQTT:0:18000
29
- 15724800:AQTST:1:21600
30
- 15724800:AQTT:0:18000
31
- 15724800:AQTST:1:21600
32
- 16329600:AQTT:0:18000
33
- 18144000:AQTST:1:21600
34
- 13305600:AQTT:0:18000
35
- 18144000:AQTST:1:21600
36
- 13305600:AQTT:0:18000
37
- 18144000:AQTST:1:21600
38
- 13305600:AQTT:0:18000
39
- 18748800:AQTST:1:21600
40
- 12700800:AQTT:0:18000
41
- 18748800:AQTST:1:21600
42
- 12700800:AQTT:0:18000
43
- 18748800:AQTST:1:21600
44
- 13305600:AQTT:0:18000
45
- 18144000:AQTST:1:21600
46
- 13305600:AQTT:0:18000
47
- 18144000:AQTST:1:21600
48
- 13305600:AQTT:0:18000
49
- 18748800:AQTST:1:21600
50
- 336538801:AQTT:0:18000
2
+ 193621720:+04:0:14400
3
+ 1602457200:+05:0:18000
4
+ 15807600:+06:1:21600
5
+ 15724800:+06:0:21600
6
+ 15811200:+06:1:21600
7
+ 15728400:+05:0:18000
8
+ 15807600:+06:1:21600
9
+ 15814800:+05:0:18000
10
+ 15732000:+06:1:21600
11
+ 15724800:+05:0:18000
12
+ 15724800:+06:1:21600
13
+ 15724800:+05:0:18000
14
+ 15724800:+06:1:21600
15
+ 15724800:+05:0:18000
16
+ 15724800:+06:1:21600
17
+ 15724800:+05:0:18000
18
+ 15724800:+06:1:21600
19
+ 15724800:+05:0:18000
20
+ 15724800:+06:1:21600
21
+ 15724800:+05:0:18000
22
+ 16329600:+06:1:21600
23
+ 15724800:+05:0:18000
24
+ 15728400:+05:1:18000
25
+ 9676800:+04:0:14400
26
+ 6044400:+05:0:18000
27
+ 15724800:+06:1:21600
28
+ 15724800:+05:0:18000
29
+ 15724800:+06:1:21600
30
+ 15724800:+05:0:18000
31
+ 15724800:+06:1:21600
32
+ 15724800:+05:0:18000
33
+ 15724800:+06:1:21600
34
+ 16329600:+05:0:18000
35
+ 18144000:+06:1:21600
36
+ 13305600:+05:0:18000
37
+ 18144000:+06:1:21600
38
+ 13305600:+05:0:18000
39
+ 18144000:+06:1:21600
40
+ 13305600:+05:0:18000
41
+ 18748800:+06:1:21600
42
+ 12700800:+05:0:18000
43
+ 18748800:+06:1:21600
44
+ 12700800:+05:0:18000
45
+ 18748800:+06:1:21600
46
+ 13305600:+05:0:18000
47
+ 18144000:+06:1:21600
48
+ 13305600:+05:0:18000
49
+ 18144000:+06:1:21600
50
+ 13305600:+05:0:18000
51
+ 18748800:+06:1:21600
52
+ 336538801:+05:0:18000
@@ -23,8 +23,8 @@
23
23
  15724800:BAKT:0:14400
24
24
  13125600:BAKST:1:14400
25
25
  2602800:AZST:1:14400
26
- 15714000:AZT:0:10800
27
- 15721200:AZST:1:14400
26
+ 15724800:AZT:0:10800
27
+ 15710400:AZST:1:14400
28
28
  110700000:AZT:0:14400
29
29
  18144000:AZST:1:18000
30
30
  13302000:AZT:0:14400
@@ -23,9 +23,9 @@
23
23
  15724800:+07:0:25200
24
24
  15728400:+07:1:25200
25
25
  9676800:+06:0:21600
26
- 6033600:+07:0:25200
27
- 15721200:+08:1:28800
28
- 15739200:+07:0:25200
26
+ 6044400:+07:0:25200
27
+ 15724800:+08:1:28800
28
+ 15724800:+07:0:25200
29
29
  15724800:+08:1:28800
30
30
  15724800:+07:0:25200
31
31
  15724800:+08:1:28800
@@ -23,9 +23,9 @@
23
23
  15724800:YAKT:0:32400
24
24
  15728400:YAKST:1:32400
25
25
  9676800:YAKT:0:28800
26
- 6033600:YAKT:0:32400
27
- 15721200:YAKST:1:36000
28
- 15739200:YAKT:0:32400
26
+ 6044400:YAKT:0:32400
27
+ 15724800:YAKST:1:36000
28
+ 15724800:YAKT:0:32400
29
29
  15724800:YAKST:1:36000
30
30
  15724800:YAKT:0:32400
31
31
  15724800:YAKST:1:36000
@@ -24,9 +24,9 @@
24
24
  15724800:IRKT:0:28800
25
25
  15728400:IRKST:1:28800
26
26
  9676800:IRKT:0:25200
27
- 6033600:IRKT:0:28800
28
- 15721200:IRKST:1:32400
29
- 15739200:IRKT:0:28800
27
+ 6044400:IRKT:0:28800
28
+ 15724800:IRKST:1:32400
29
+ 15724800:IRKT:0:28800
30
30
  15724800:IRKST:1:32400
31
31
  15724800:IRKT:0:28800
32
32
  15724800:IRKST:1:32400
@@ -23,9 +23,9 @@
23
23
  15724800:PETT:0:43200
24
24
  15728400:PETST:1:43200
25
25
  9676800:PETT:0:39600
26
- 6033600:PETT:0:43200
27
- 15721200:PETST:1:46800
28
- 15739200:PETT:0:43200
26
+ 6044400:PETT:0:43200
27
+ 15724800:PETST:1:46800
28
+ 15724800:PETT:0:43200
29
29
  15724800:PETST:1:46800
30
30
  15724800:PETT:0:43200
31
31
  15724800:PETST:1:46800