trailblazer-finder 0.2.6 → 0.2.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81be12acd7b9578205af33adb7c4ec7b8c3cfd5d5b14922b377c2221396ddb94
|
4
|
+
data.tar.gz: 1eb13fa24716d87215c0ce14e23b4a3e748242339c833b4a402c16c5bf9b4084
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5efd0d9ae65bef07f8ff838f324d1421d20496e7f3b321859b580ee9057011dfc856a1dc1e631fda9f33d92ecb4da27880687b418c2e223db008062b029ec6de
|
7
|
+
data.tar.gz: 74b411ad786feb26a28a01db862914e28e8746c3617ed4ca14d07e2bec9bf2f5fc9dcf657fc0bb86b6d3c62471b1c37f94f88c5eab6561e0d9d11e4bbc12a534
|
data/CHANGES.md
CHANGED
@@ -36,7 +36,12 @@ module Trailblazer
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.date?(date)
|
39
|
-
|
39
|
+
return false unless
|
40
|
+
date.kind_of?(::DateTime) ||
|
41
|
+
date.kind_of?(::Date) ||
|
42
|
+
date.kind_of?(::String)
|
43
|
+
return false if date.kind_of?(::String) && date.size == 36 # Ignore uuids that could get casted to dates
|
44
|
+
date_hash = ::Date._parse(date.to_s)
|
40
45
|
Date.valid_date?(date_hash[:year].to_i, date_hash[:mon].to_i, date_hash[:mday].to_i)
|
41
46
|
end
|
42
47
|
end
|
@@ -35,6 +35,7 @@ module Trailblazer
|
|
35
35
|
expect(described_class.date?("2018/01/01")).to eq true
|
36
36
|
expect(described_class.date?("2018.01.01")).to eq true
|
37
37
|
expect(described_class.date?("21-12-2018")).to eq true
|
38
|
+
expect(described_class.date?("0fae2de1-6537-4d36-9cdb-30edf1e37990")).to eq false
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-types
|