code-ruby 0.8.4 → 0.8.5

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: f5dda57442d7fc50b08ceb9998021e623f226a0b8de3cdaf58fecd05d0ba3a30
4
- data.tar.gz: bead8ebd992882ea955f10d24e10f110a5c9955926e0e4850cddbcb4e3afe34c
3
+ metadata.gz: deb295fa0a68512686041fc2d29d7097a429a4e53d31e44f90028bccea2be8c4
4
+ data.tar.gz: a8011e7b16501d6766b02f15139481dfec4fadc23201dd5e772340550460c9d6
5
5
  SHA512:
6
- metadata.gz: 136c900a7f0efab8fbf2ada6bc90c018689f5545b350b1b3b77c19e07ebd2eb18addb6852a12ede8c7bb692ad48af341c9decab8740b26d92fd5f45ec2a5ffa6
7
- data.tar.gz: 24881df454cb5e179265232a37c45a1d1322ed0606ed3caf82fc56ee3526df1b3dc3c1f06301f5887e48b5da65e2b01b9c4e8424c703ab47923325c3b5ee1d6f
6
+ metadata.gz: 1caa4cfa4ca44dfa4ff820acd8c7f49f8f9586bfefb1b0f43bd6e6eda0fd835d5d8f2bc91ec748dcbdd75a64553bf3cb75adc9059521cdbd64fc480b0f4ea226
7
+ data.tar.gz: 20cb4e9b6089121edd2d9968726b00a76b9d2f14b7a9adc29de0b3c98711f7724e2d52e6824944b2675681e0c9d7d884eb17ff2a06984f9f6b9e76af1afbaf52
@@ -8,7 +8,10 @@ class Code
8
8
  attr_reader :raw
9
9
 
10
10
  def initialize(time)
11
- @raw = time
11
+ ::Time.zone ||= DEFAULT_ZONE
12
+ time = time.raw if time.is_a?(Time)
13
+ time = time.to_s if time.is_a?(::Time)
14
+ @raw = ::Time.zone.parse(time)
12
15
  end
13
16
 
14
17
  def self.name
data/lib/code/version.rb CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require_relative "../code"
4
4
 
5
- Code::Version = Gem::Version.new("0.8.4")
5
+ Code::Version = Gem::Version.new("0.8.5")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié