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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08a105761151bdff166a7c512a604339da3170b73d145f7842d17ccfaa06920d'
4
- data.tar.gz: 3a6303ce787ba904c3c5bec3c1bdca6549e45115aa108d3c71bbfe8262646536
3
+ metadata.gz: 333a1c5cdb7419fa682dc3f46a04ef53c6cf97d42b78c7a28a268732b73d726d
4
+ data.tar.gz: 36a17a5800f04b1452682bf29a841e4a488b35e42d5ea245f734da3c154ac0d0
5
5
  SHA512:
6
- metadata.gz: 1eb046b673d876b4226c341a0b1ed085ea80b29b4f8dbf600fc4f8156f4084582343861c4e4f9da2333f45c8a1d8e10cca7320b95a42cfc802ef26b177354b3e
7
- data.tar.gz: 90b225ad0f9dd8801bf46488d8bb3f006d06bf700d4f93fcc9d5ec62667daa925bdd63410e8297efc860947ac67fce6d1932ca6d935a9e2d5949cc56abe92245
6
+ metadata.gz: 0b3d3d3d10e26d62acc9fa7e7b5edcc1acb3dc1a77be9e1f4ebff0e88f0a86f3cce9c0481480e1076e313d96e5c84ccc3bf456fb0ea5440c1761ca1427908e9a
7
+ data.tar.gz: d4c92495fdf606b97c690ebc843705cab2a735939c3e8983a6d9a4e0974f9677fee24e12401430b1b1a832b8147d2d374b26635aa6535dc1958760dbfab3a426
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.31
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.31
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-02-13 00:00:00.000000000 Z
12
+ date: 2020-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday