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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b222557ba64f49c1a1a498f5e1b7b2c1b872e2a4
4
- data.tar.gz: 9a87fc562ddb21efbc79baa99fe1f2a9a3dd5943
3
+ metadata.gz: 3f899b44eb58c69e9bbac3d6b19343af0cd72d9a
4
+ data.tar.gz: dedf55d550d10ebcdb7543caf0e5dd0963be258b
5
5
  SHA512:
6
- metadata.gz: 310d4d0e734c35833adab31d6216c4583597c606b3d1ff82058475bf6448f8331e82f8f81b83bddd81436a427e0cc428571e93bfc5f9290c1f78c00ed0ae0f4b
7
- data.tar.gz: 9915e46f839d4502da31ebba8151122e88a84f2ebd8c2104cceed27fedfe3f1abda438f32bab70be3e2e65c1452d925728caf45294d0608e1092790ebf6abeac
6
+ metadata.gz: 77eda3671980d8b076d9243a59103fbb8c7b9ed1621ea07cd98450f350384e13e2863916573d4f96ffa68df05f2c7ec86d75fa141e51b2a513bdf3995f03b332
7
+ data.tar.gz: e67c84455253409cdaa24ef6b4a4be560ae18f8e3f869fd5a874f05337362e63e2b2ad3922448b624acc4eba5978a64845a2c58cda15ee1794abe329c9a40885
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  .rvmrc
2
+ .ruby-version
2
3
  .rspec
3
4
  *.gem
4
5
  *.rbc
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Dexby
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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-08-01 00:00:00.000000000 Z
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.2.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