allscripts_unity_client 3.1.1 → 3.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1efe85d50c95f9d89fce59ef22a581d73a74b5
|
4
|
+
data.tar.gz: cb520c70a5266bcf3ad63e7a1e4109c5fdbb3a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd93057b918e5a9f4b26fd9a31ad35cd869c238883f761cbf41a5ed943ed8c6a53fc699609d84e66338514cf16f2d7965b9b9a9228e4686ea3df3afd2be5d18
|
7
|
+
data.tar.gz: eb356537391ee7841a80e74c0b4f2bccc988e896a840da799e850d66b5fa80bfdd176dc168d735a4799e3911b4ad9b10e2975ebe1fef80943a3d32301219830d
|
@@ -6,8 +6,8 @@ module AllscriptsUnityClient
|
|
6
6
|
|
7
7
|
# Utilities for massaging the data that comes back from Unity.
|
8
8
|
class Utilities
|
9
|
-
DATETIME_REGEX =
|
10
|
-
DATE_REGEX =
|
9
|
+
DATETIME_REGEX = /\A((\d{1,2}[-\/]\d{1,2}[-\/]\d{4})|(\d{4}[-\/]\d{1,2}[-\/]\d{1,2})|(\d{1,2}-[A-Za-z]{3,4}-\d{4})|([A-Za-z]{3,4} +\d{1,2} \d{2,4}))(T| +)(\d{1,2}:\d{2}(:\d{2})?(\.\d+)? ?(PM|AM|pm|am)?((-|\+)\d{2}:?\d{2})?Z?)\z/
|
10
|
+
DATE_REGEX = /\A((\d{1,2}[-\/]\d{1,2}[-\/]\d{4})|(\d{4}[-\/]\d{1,2}[-\/]\d{1,2})|(\d{1,2}-[A-Za-z]{3,4}-\d{4})|([A-Za-z]{3,4} +\d{1,2} \d{2,4}))\z/
|
11
11
|
|
12
12
|
# Try to encode a string into a Date or ActiveSupport::TimeWithZone object.
|
13
13
|
#
|
data/spec/utilities_spec.rb
CHANGED
@@ -31,6 +31,8 @@ describe AllscriptsUnityClient::Utilities do
|
|
31
31
|
let(:date_two) { Date.parse(date_string_two) }
|
32
32
|
let(:date_three) { Date.parse(date_string_three) }
|
33
33
|
|
34
|
+
let(:invalid_date_string_one) { "32-13-2014\n02/21/2014"}
|
35
|
+
|
34
36
|
describe '.try_to_encode_as_date' do
|
35
37
|
context 'when given nil' do
|
36
38
|
it { expect(subject.try_to_encode_as_date(timezone, nil)).to be_nil }
|
@@ -95,6 +97,12 @@ describe AllscriptsUnityClient::Utilities do
|
|
95
97
|
expect(subject.try_to_encode_as_date(timezone, string)).to eq(string)
|
96
98
|
end
|
97
99
|
end
|
100
|
+
|
101
|
+
context 'when given an invalid date string' do
|
102
|
+
it 'returns that string' do
|
103
|
+
expect(subject.try_to_encode_as_date(timezone, invalid_date_string_one)).to eq(invalid_date_string_one)
|
104
|
+
end
|
105
|
+
end
|
98
106
|
end
|
99
107
|
|
100
108
|
describe '.encode_data' do
|
@@ -124,4 +132,4 @@ describe AllscriptsUnityClient::Utilities do
|
|
124
132
|
it { expect(subject.recursively_symbolize_keys(string_keyed_hash)).to eq(symbol_keyed_hash) }
|
125
133
|
end
|
126
134
|
end
|
127
|
-
end
|
135
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allscripts_unity_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucian Cesca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -282,8 +282,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
284
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.4.
|
285
|
+
rubygems_version: 2.4.5
|
286
286
|
signing_key:
|
287
287
|
specification_version: 4
|
288
288
|
summary: Allscripts Unity API client
|
289
289
|
test_files: []
|
290
|
+
has_rdoc:
|