time_to 0.0.1 → 0.0.2

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: 8c4373b1c0658d772ec67fe81e8e01faf293b23cb09473fc978e1f09a575cffb
4
- data.tar.gz: 8d36457d6c180467778966e06407237f28647dfa34da145bc429ed06e19a9acc
3
+ metadata.gz: 10d29b8b9db0123bacf48a451c3bd842fe9eb481e422152c1cd7082cd6e1ae22
4
+ data.tar.gz: e17ccb42e0de1e192233618db2dbff9ef8e4f1a179fbd1345c3c9dd5e75b3dc0
5
5
  SHA512:
6
- metadata.gz: fdb8fc20fb93a8cf60fc8e380e53face1748cdf5838fb19ed76fb10081f918f2ccfd1a3d927f269c16fff04017f6b03d4458bb214842bf4796ba59f91fb5cb95
7
- data.tar.gz: 78181c7a17dd869a788a2a23e0036b76cb64f49d06ce780d933bf3f29cf1fe4616f25fc49d1783bfc2b29c54d84957e4f765e89929050c92e18d7d7bef2f72f3
6
+ metadata.gz: 40ad179e2b05c528279c187e1d7f420e8f996e3c7eab37b1045f6b82d8e61d28fd2fb11fcefc405e2d5d83cbda23cdb554ec36bed407e74f5b4041ffb6eb40ca
7
+ data.tar.gz: 1f9c82773b22808a5f318f745d16f10791c9487be54cae0685a0720447e4e1fd97c62f87039e3d78deb46291d9eb04cc0e1bb53ea71cd8d09eae73285dbae933
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.0.2] - 2021-01-07
10
+ ### Fixed
11
+ - ActiveSupport::TimeWithZone failed with `undefined method 'at' for Time:Class`
12
+
9
13
  ## [0.0.1] - 2021-01-07
10
14
  ### Added
11
15
  - The whole gem, basic `to` functionality on ActiveSupport::TimeWithZone and Time
data/Gemfile CHANGED
@@ -8,3 +8,5 @@ gemspec
8
8
  gem 'rake', '~> 13.0'
9
9
  gem 'rspec', '~> 3.0'
10
10
  gem 'rubocop', '~> 1.8'
11
+
12
+ gem 'activesupport'
@@ -4,6 +4,8 @@ module TimeTo::Extension
4
4
  DAY = 86_400
5
5
 
6
6
  def to(time, by: DAY)
7
- (to_i..time.to_i).step(by).map { |i| self.class.at(i) }
7
+ (to_i..time.to_i).step(by).map do |i|
8
+ respond_to?(:zone) ? Time.at(i).in_time_zone(zone) : Time.at(i)
9
+ end
8
10
  end
9
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TimeTo
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_to
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock