dexby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/dexby/reader.rb +2 -2
- data/lib/dexby/version.rb +1 -1
- data/spec/reader_spec.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f899b44eb58c69e9bbac3d6b19343af0cd72d9a
|
4
|
+
data.tar.gz: dedf55d550d10ebcdb7543caf0e5dd0963be258b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77eda3671980d8b076d9243a59103fbb8c7b9ed1621ea07cd98450f350384e13e2863916573d4f96ffa68df05f2c7ec86d75fa141e51b2a513bdf3995f03b332
|
7
|
+
data.tar.gz: e67c84455253409cdaa24ef6b4a4be560ae18f8e3f869fd5a874f05337362e63e2b2ad3922448b624acc4eba5978a64845a2c58cda15ee1794abe329c9a40885
|
data/lib/dexby/reader.rb
CHANGED
@@ -22,14 +22,14 @@ class Dexby::Reader
|
|
22
22
|
ensure_session_id
|
23
23
|
result = session_connection_read(minutes, count)
|
24
24
|
if result[1] != 200
|
25
|
-
raise ::StandardError
|
25
|
+
raise ::StandardError, result[1]
|
26
26
|
end
|
27
27
|
parser.parse_all(result[0])
|
28
28
|
end
|
29
29
|
|
30
30
|
def session_connection_read(minutes, count)
|
31
31
|
result = read_connection(minutes, count)
|
32
|
-
if result[1] == 401 # expired session_id
|
32
|
+
if result[1] == 401 || result[1] == 500 # expired session_id
|
33
33
|
result = get_session_reread(minutes, count)
|
34
34
|
end
|
35
35
|
return result
|
data/lib/dexby/version.rb
CHANGED
data/spec/reader_spec.rb
CHANGED
@@ -132,9 +132,10 @@ RSpec.describe Dexby::Reader do
|
|
132
132
|
end
|
133
133
|
context "where reads return 500s" do
|
134
134
|
before(:example) do
|
135
|
-
expect(fake_connection_class).to receive(:read).and_return([[],500])
|
135
|
+
expect(fake_connection_class).to receive(:read).and_return([[],500],[[],500])
|
136
136
|
end
|
137
137
|
it "raises exception" do
|
138
|
+
expect(fake_connection_class).to receive(:login).and_return(['banana', 200])
|
138
139
|
expect{ subject.read }.to raise_error StandardError
|
139
140
|
end
|
140
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dexby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Cantara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.6.11
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Ruby API wrapper for Dexcom data
|