teasy 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3022cfddef7dae435802b341d1a8f77d068b430af92e0608a156c45f862af87e
4
- data.tar.gz: b9a22b20d1a05a0fca3c17c98e05c60f6948c3807a247191102f00dcb78c787b
3
+ metadata.gz: baa8dd5a91344149c47a96198bcfe2b288a41226bbd39ba03e2bfa6cad03f1da
4
+ data.tar.gz: 1a007962caceff11916e894f6df9b5c051e12b46dfb49a5ee3c3ee69d2716bfe
5
5
  SHA512:
6
- metadata.gz: 85876cc62382a0ceb9ee148f28fe4dccc8e437d3906e22718a3384569bf3ae42ea7262a13a838dda4e2e62edc67fabc824f1ca59701cd78e7e5fc821c163c161
7
- data.tar.gz: b29f06c3d1c68816c7d425daddc1d71da774a274f98e9e6f66e5105d31439c0a727ee4d6eb8edb40225f8abd207c1fd3c0936122ced72817db0bebd9964b374c
6
+ metadata.gz: fe00ddfdaaf2f6832b565d2e36c34c6f1e78dab3cfe9ab8e42e7b370ee471378c20264eb45f8ab9a6e6ff4f5506547f7713b1540e37c5e520883ab45d05dcfdc
7
+ data.tar.gz: a5c941b900dbca5f399abc6102606a9c9461d8fb49e9f82722a9844c5e2f294fff1326838867ed7b64bdc84e2c877dcc187061db7cdce658eb623fc6b51f841f
@@ -41,11 +41,11 @@ module Teasy
41
41
  # period by adding/subtracting 3 days
42
42
  next_period: lambda do |time, zone|
43
43
  period = zone.period_for_local(time + 3 * 86_400)
44
- [period, period.start_transition.time + period.utc_total_offset]
44
+ [period, period.start_transition.at.to_time + period.utc_total_offset]
45
45
  end,
46
46
  previous_period: lambda do |time, zone|
47
47
  period = zone.period_for_local(time - 3 * 86_400)
48
- [period, period.end_transition.time + period.utc_total_offset]
48
+ [period, period.end_transition.at.to_time + period.utc_total_offset]
49
49
  end
50
50
  }.freeze
51
51
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'tzinfo'
4
+ require 'time'
4
5
  require 'forwardable'
5
6
 
6
7
  module Teasy
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teasy
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.6'
5
5
  end
@@ -18,15 +18,14 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0")
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
21
  spec.require_paths = ['lib']
23
22
  spec.required_ruby_version = '> 2.0'
24
23
 
25
- spec.add_runtime_dependency 'tzinfo', '~> 1.2'
26
- spec.add_runtime_dependency 'tzinfo-data', '~> 1.2018.9'
24
+ spec.add_runtime_dependency 'tzinfo', '~> 2.0'
25
+ spec.add_runtime_dependency 'tzinfo-data', '~> 1.2019.2'
27
26
 
28
- spec.add_development_dependency 'bundler', '~> 1.6'
29
- spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'bundler'
28
+ spec.add_development_dependency 'rake'
30
29
  spec.add_development_dependency 'minitest'
31
30
  spec.add_development_dependency 'minitest-reporters'
32
31
  spec.add_development_dependency 'rubocop'
@@ -386,7 +386,7 @@ class TimeWithZoneTest < Minitest::Test
386
386
  end
387
387
 
388
388
  def test_to_i
389
- assert_instance_of Fixnum, @timestamptz.to_i
389
+ assert_instance_of Integer, @timestamptz.to_i
390
390
  assert_equal 2_280_011_445, @timestamptz.to_i
391
391
  assert_equal 2_280_004_245, @timestamptz_berlin.to_i
392
392
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teasy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Kuchenbecker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-27 00:00:00.000000000 Z
11
+ date: 2019-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '2.0'
20
20
  type: :runtime
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: '1.2'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tzinfo-data
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2018.9
33
+ version: 1.2019.2
34
34
  type: :runtime
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: 1.2018.9
40
+ version: 1.2019.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '0'
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: '1.6'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -161,8 +161,4 @@ rubygems_version: 3.0.1
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: Teasy intends to make handling time zones easy.
164
- test_files:
165
- - test/teasy/floating_time_test.rb
166
- - test/teasy/teasy_test.rb
167
- - test/teasy/time_with_zone_test.rb
168
- - test/test_helper.rb
164
+ test_files: []