teasy 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 273a6716f2320256d8894fc5d59cdb5db6d199ab
4
- data.tar.gz: 5a8b907999251a222f9bd474306c30293ed80b97
3
+ metadata.gz: d59065b11afcc1227925a905fa90a6c7ff6ae679
4
+ data.tar.gz: a82354d6291ac4d3975b7da8102b7b006a4449a3
5
5
  SHA512:
6
- metadata.gz: 2c371ca880d7a52a2a4bc5866744c17908e838e593b43e041e5d92a8c7826ea11ee45823731673a25a9403a198c945f1a4895065ab47bc68f3f950bd595f1195
7
- data.tar.gz: d127720d95b025f5acbf27c147a63f31bc40248c52ed8457bd7be955268845e1cf21ef5ee83fc22be2766ebec029edbca5eff0e3dd042c939a809ef826becfdc
6
+ metadata.gz: a079254d50d2442675af904e1bfbfd4fb7351c8f0a3092a2d023a3650fd81a59c47312adf3659c5cafbd9bc53c5c7d32e6978f663d5eb501b066e28273081224
7
+ data.tar.gz: f91e54b6c1d0efd65f14e823ea8bc09daf482314045c1916a1fe35ea1822c3dc334b85852ab710820b34d4c231661ad863f70d1ab4b1dcf3cbf9af0ac51254b6
@@ -25,7 +25,7 @@ module Teasy
25
25
  time.hour, time.min, time.sec, time.nsec / 1_000.0)
26
26
  end
27
27
 
28
- def in_time_zone(zone)
28
+ def in_time_zone(zone = Teasy.default_zone)
29
29
  Teasy.with_zone(zone) { TimeWithZone.from_time(self) }
30
30
  end
31
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Teasy
4
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.2.1'
5
5
  end
@@ -25,8 +25,8 @@ class FloatingTimeTest < Minitest::Test
25
25
 
26
26
  def test_in_time_zone
27
27
  time = Teasy::FloatingTime.new(2014, 1, 1, 12)
28
+ assert_equal Time.utc(2014, 1, 1, 12), time.in_time_zone
28
29
  assert_equal Time.utc(2014, 1, 1, 11), time.in_time_zone('Europe/Berlin')
29
- assert_equal Time.utc(2014, 1, 1, 12), time.in_time_zone('Europe/London')
30
30
  assert_equal Time.utc(2014, 1, 1, 6, 30), time.in_time_zone('Asia/Calcutta')
31
31
  assert_equal Time.utc(2014, 1, 1, 17), time.in_time_zone('America/New_York')
32
32
  assert_raises(TZInfo::AmbiguousTime) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teasy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Kuchenbecker