spark_api 1.4.31 → 1.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/spark_api/models/subresource.rb +2 -2
- data/spec/unit/spark_api/models/subresource_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 333a1c5cdb7419fa682dc3f46a04ef53c6cf97d42b78c7a28a268732b73d726d
|
4
|
+
data.tar.gz: 36a17a5800f04b1452682bf29a841e4a488b35e42d5ea245f734da3c154ac0d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b3d3d3d10e26d62acc9fa7e7b5edcc1acb3dc1a77be9e1f4ebff0e88f0a86f3cce9c0481480e1076e313d96e5c84ccc3bf456fb0ea5440c1761ca1427908e9a
|
7
|
+
data.tar.gz: d4c92495fdf606b97c690ebc843705cab2a735939c3e8983a6d9a4e0974f9677fee24e12401430b1b1a832b8147d2d374b26635aa6535dc1958760dbfab3a426
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.32
|
@@ -16,10 +16,10 @@ module SparkApi
|
|
16
16
|
|
17
17
|
def parse_date_start_and_end_times(attributes)
|
18
18
|
# Transform the date strings
|
19
|
-
unless attributes['Date'].nil?
|
19
|
+
unless attributes['Date'].nil? || attributes['Date'].empty?
|
20
20
|
date = Date.strptime attributes['Date'], '%m/%d/%Y'
|
21
21
|
['StartTime','EndTime'].each do |time|
|
22
|
-
next if attributes[time].nil?
|
22
|
+
next if attributes[time].nil? || attributes[time].empty?
|
23
23
|
formatted_date = "#{attributes['Date']}T#{attributes[time]}"
|
24
24
|
datetime = nil
|
25
25
|
|
@@ -71,4 +71,22 @@ describe Subresource do
|
|
71
71
|
|
72
72
|
expect {dummy_class.parse_date_start_and_end_times(times)}.to raise_error(ArgumentError)
|
73
73
|
end
|
74
|
+
|
75
|
+
it "should ignore an empty Date" do
|
76
|
+
times = {'Date' => '', 'StartTime' => '09:12:34-0700', 'EndTime' => '12:43:21-0700'}
|
77
|
+
dummy_class.parse_date_start_and_end_times(times)
|
78
|
+
times['Date'].should eq('')
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should ignore an empty StartTime" do
|
82
|
+
times = {'Date' => '10/01/2012', 'StartTime' => '', 'EndTime' => '12:43:21-0700'}
|
83
|
+
dummy_class.parse_date_start_and_end_times(times)
|
84
|
+
times['StartTime'].should eq('')
|
85
|
+
end
|
86
|
+
|
87
|
+
it "should ignore an empty EndTime" do
|
88
|
+
times = {'Date' => '10/01/2012', 'StartTime' => '09:12:34-0700', 'EndTime' => ''}
|
89
|
+
dummy_class.parse_date_start_and_end_times(times)
|
90
|
+
times['EndTime'].should eq('')
|
91
|
+
end
|
74
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spark_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Hornseth
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|