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 +4 -4
- data/lib/teasy/period_not_found_handling.rb +2 -2
- data/lib/teasy/time_with_zone.rb +1 -0
- data/lib/teasy/version.rb +1 -1
- data/teasy.gemspec +4 -5
- data/test/teasy/time_with_zone_test.rb +1 -1
- metadata +15 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baa8dd5a91344149c47a96198bcfe2b288a41226bbd39ba03e2bfa6cad03f1da
|
4
|
+
data.tar.gz: 1a007962caceff11916e894f6df9b5c051e12b46dfb49a5ee3c3ee69d2716bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
48
|
+
[period, period.end_transition.at.to_time + period.utc_total_offset]
|
49
49
|
end
|
50
50
|
}.freeze
|
51
51
|
end
|
data/lib/teasy/time_with_zone.rb
CHANGED
data/lib/teasy/version.rb
CHANGED
data/teasy.gemspec
CHANGED
@@ -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', '~>
|
26
|
-
spec.add_runtime_dependency 'tzinfo-data', '~> 1.
|
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'
|
29
|
-
spec.add_development_dependency 'rake'
|
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
|
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.
|
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-
|
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: '
|
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: '
|
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.
|
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.
|
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: '
|
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: '
|
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: '
|
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: '
|
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: []
|