code-ruby 0.14.1 → 0.14.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: 4457f2b10410f6514df4f0eebb52d52931724e2b448bd8e179650942f78aba9f
4
- data.tar.gz: c9a3214b391d5a39aa185dd48ad6bde35bbd537616b93d626ff6686fc341ed9a
3
+ metadata.gz: 7027d0ca2225f4adf54f980dd7d08b7fa07c10c40c7e04b8e67e651a300f77b7
4
+ data.tar.gz: f652f053f3bb7710629deea3ad6cb0684c6117f1475cace386c4ea5005649eca
5
5
  SHA512:
6
- metadata.gz: 6ba9119d592685a669c174ead2554725ec5586f25bcf41b3c9c418fb95965327cf0e84f1797e3dd83abc7c4cfe4bb9be4ed2f2fbd7fb9e98de94571b83c53647
7
- data.tar.gz: e1c928ad8bbeab9b0101af715cea94ebefa8540465ae4482e7a8afa8d5e88436a800b8097e51a44b624bb8171c0940397f1eb4b871269d130eb2453e74fa3da3
6
+ metadata.gz: 5ecea3358e470e50cb5571c0c5094837a1eb7fd68043e803d18dc3b691686e246cc0cb93a1a89fd4fbe1448b0dc45841883e4938b8510f9df6d45d7091d57447
7
+ data.tar.gz: 3c0d475b0420dd3a937dd0f2dcff648bc2d1924b0639415c3096e79429dda1e787579a684aa3ce8b236739b590f72ebfb2049c901224288fadfca4ce25c5c183
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (0.14.0)
4
+ code-ruby (0.14.1)
5
5
  activesupport (~> 7)
6
6
  bigdecimal (~> 3)
7
7
  json (~> 2)
@@ -7,9 +7,10 @@ class Code
7
7
 
8
8
  def initialize(*args, **_kargs, &_block)
9
9
  ::Time.zone ||= DEFAULT_ZONE
10
- raw = args.first.presence || ::Time.zone.now
10
+ raw = args.first
11
11
  raw = raw.raw if raw.is_an?(Object)
12
- @raw = ::Time.zone.parse(raw.to_s)
12
+ raw = raw.presence || ::Time.zone.now
13
+ @raw = ::Time.zone.parse(raw.to_s).presence || ::Time.zone.now
13
14
  end
14
15
 
15
16
  def self.call(**args)
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.14.1")
5
+ Code::Version = Gem::Version.new("0.14.2")
data/spec/code_spec.rb CHANGED
@@ -62,6 +62,7 @@ RSpec.describe Code do
62
62
  Parameter.new
63
63
  IdentifierList.new
64
64
  IdentifierList.new([])
65
+ Time.new(nothing).before?
65
66
  ].each { |input| it(input) { Code.evaluate(input) } }
66
67
 
67
68
  [
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.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié