dexcom 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +5 -5
- data/Gemfile +1 -2
- data/Gemfile.lock +37 -36
- data/lib/dexcom.rb +1 -11
- data/lib/dexcom/authentication.rb +3 -1
- data/lib/dexcom/blood_glucose/api_handler.rb +4 -0
- data/lib/dexcom/configuration.rb +22 -1
- data/lib/dexcom/version.rb +1 -1
- data/lib/utils/httparty_configured.rb +18 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9fd13bc624d95fe72f20fb528eade9fc3240282f052450a18a81070d6b2c18f
|
4
|
+
data.tar.gz: 0fad9ab7130a00684ffc57bf4daebf6ef2bf50892437bb93590f755a20111575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ae42721d0b56cf18fb3d1b202f244702f5aa38e8da23c6747ed5ebe5b058093fb56197e35bbd975bfc2061d8ac2c2d223a4bb10f36e038812b4fa6693200d4
|
7
|
+
data.tar.gz: f6155dad0b5fb77910260612f6a386481e38885210dccf87291c56c602b2b8a837494a674daf4e9563fdcada49d3ea71098cb2cb0204bdde66e957f3647211b2
|
data/.circleci/config.yml
CHANGED
@@ -29,10 +29,6 @@ common: &common
|
|
29
29
|
|
30
30
|
|
31
31
|
jobs:
|
32
|
-
"ruby-25":
|
33
|
-
<<: *common
|
34
|
-
docker:
|
35
|
-
- image: circleci/ruby:2.5
|
36
32
|
"ruby-26":
|
37
33
|
<<: *common
|
38
34
|
docker:
|
@@ -41,10 +37,14 @@ jobs:
|
|
41
37
|
<<: *common
|
42
38
|
docker:
|
43
39
|
- image: ruby:2.7
|
40
|
+
"ruby-30":
|
41
|
+
<<: *common
|
42
|
+
docker:
|
43
|
+
- image: ruby:3.0
|
44
44
|
workflows:
|
45
45
|
version: 2.1
|
46
46
|
build:
|
47
47
|
jobs:
|
48
|
-
- "ruby-25"
|
49
48
|
- "ruby-26"
|
50
49
|
- "ruby-27"
|
50
|
+
- "ruby-30"
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,66 +1,67 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dexcom (0.3.
|
4
|
+
dexcom (0.3.1)
|
5
5
|
activesupport
|
6
6
|
httparty
|
7
7
|
|
8
8
|
GEM
|
9
|
-
remote:
|
9
|
+
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (
|
11
|
+
activesupport (6.1.4)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>=
|
14
|
-
minitest (
|
15
|
-
tzinfo (~>
|
16
|
-
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
zeitwerk (~> 2.3)
|
17
|
+
addressable (2.8.0)
|
17
18
|
public_suffix (>= 2.0.2, < 5.0)
|
18
|
-
climate_control (0.
|
19
|
+
climate_control (1.0.1)
|
19
20
|
coderay (1.1.3)
|
20
|
-
concurrent-ruby (1.1.
|
21
|
-
crack (0.4.
|
22
|
-
|
23
|
-
diff-lcs (1.
|
24
|
-
factory_bot (
|
25
|
-
activesupport (>=
|
21
|
+
concurrent-ruby (1.1.9)
|
22
|
+
crack (0.4.5)
|
23
|
+
rexml
|
24
|
+
diff-lcs (1.4.4)
|
25
|
+
factory_bot (6.2.0)
|
26
|
+
activesupport (>= 5.0.0)
|
26
27
|
hashdiff (1.0.1)
|
27
|
-
httparty (0.18.
|
28
|
+
httparty (0.18.1)
|
28
29
|
mime-types (~> 3.0)
|
29
30
|
multi_xml (>= 0.5.2)
|
30
|
-
i18n (1.
|
31
|
+
i18n (1.8.10)
|
31
32
|
concurrent-ruby (~> 1.0)
|
32
33
|
method_source (1.0.0)
|
33
34
|
mime-types (3.3.1)
|
34
35
|
mime-types-data (~> 3.2015)
|
35
|
-
mime-types-data (3.
|
36
|
-
minitest (5.
|
36
|
+
mime-types-data (3.2021.0704)
|
37
|
+
minitest (5.14.4)
|
37
38
|
multi_xml (0.6.0)
|
38
39
|
pry (0.13.1)
|
39
40
|
coderay (~> 1.1)
|
40
41
|
method_source (~> 1.0)
|
41
|
-
public_suffix (4.0.
|
42
|
-
|
43
|
-
|
44
|
-
rspec-
|
45
|
-
rspec-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
public_suffix (4.0.6)
|
43
|
+
rexml (3.2.5)
|
44
|
+
rspec (3.10.0)
|
45
|
+
rspec-core (~> 3.10.0)
|
46
|
+
rspec-expectations (~> 3.10.0)
|
47
|
+
rspec-mocks (~> 3.10.0)
|
48
|
+
rspec-core (3.10.1)
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-expectations (3.10.1)
|
49
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.
|
51
|
-
rspec-mocks (3.
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-mocks (3.10.2)
|
52
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
-
rspec-support (~> 3.
|
54
|
-
rspec-support (3.
|
55
|
-
safe_yaml (1.0.5)
|
56
|
-
thread_safe (0.3.6)
|
55
|
+
rspec-support (~> 3.10.0)
|
56
|
+
rspec-support (3.10.2)
|
57
57
|
timecop (0.9.1)
|
58
|
-
tzinfo (
|
59
|
-
|
60
|
-
webmock (3.
|
58
|
+
tzinfo (2.0.4)
|
59
|
+
concurrent-ruby (~> 1.0)
|
60
|
+
webmock (3.13.0)
|
61
61
|
addressable (>= 2.3.6)
|
62
62
|
crack (>= 0.3.2)
|
63
63
|
hashdiff (>= 0.4.0, < 2.0.0)
|
64
|
+
zeitwerk (2.4.2)
|
64
65
|
|
65
66
|
PLATFORMS
|
66
67
|
ruby
|
@@ -76,4 +77,4 @@ DEPENDENCIES
|
|
76
77
|
webmock
|
77
78
|
|
78
79
|
BUNDLED WITH
|
79
|
-
2.
|
80
|
+
2.2.21
|
data/lib/dexcom.rb
CHANGED
@@ -6,14 +6,4 @@ require 'dexcom/configuration'
|
|
6
6
|
require 'dexcom/constants'
|
7
7
|
require 'dexcom/version'
|
8
8
|
|
9
|
-
module Dexcom
|
10
|
-
class << self
|
11
|
-
def configuration
|
12
|
-
@configuration ||= Configuration.new
|
13
|
-
end
|
14
|
-
|
15
|
-
def configure
|
16
|
-
yield configuration
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
9
|
+
module Dexcom; end
|
data/lib/dexcom/configuration.rb
CHANGED
@@ -2,16 +2,37 @@
|
|
2
2
|
|
3
3
|
module Dexcom
|
4
4
|
class Configuration
|
5
|
-
attr_accessor :username, :password, :outside_usa
|
5
|
+
attr_accessor :username, :password, :outside_usa, :logger, :log_level
|
6
|
+
|
7
|
+
DEFAULT_LOGGER = nil
|
8
|
+
DEFAULT_LOGGER_LEVEL = :info
|
6
9
|
|
7
10
|
def initialize
|
8
11
|
@username = nil
|
9
12
|
@password = nil
|
10
13
|
@outside_usa = nil
|
14
|
+
@logger = DEFAULT_LOGGER
|
15
|
+
@log_level = DEFAULT_LOGGER_LEVEL
|
11
16
|
end
|
12
17
|
|
13
18
|
def base_url
|
14
19
|
outside_usa ? URL_BASE_OUTSIDE_USA : URL_BASE
|
15
20
|
end
|
16
21
|
end
|
22
|
+
|
23
|
+
class << self
|
24
|
+
def configuration
|
25
|
+
@configuration ||= Configuration.new
|
26
|
+
end
|
27
|
+
|
28
|
+
def configuration=(config)
|
29
|
+
raise StandardError('Invalid configuration provided') unless config.is_a? Dexcom::Configuration
|
30
|
+
|
31
|
+
@configuration = config
|
32
|
+
end
|
33
|
+
|
34
|
+
def configure
|
35
|
+
yield configuration
|
36
|
+
end
|
37
|
+
end
|
17
38
|
end
|
data/lib/dexcom/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'httparty'
|
4
|
+
|
5
|
+
require 'dexcom/configuration'
|
6
|
+
|
7
|
+
module Utils
|
8
|
+
module HTTPartyConfigured
|
9
|
+
include HTTParty
|
10
|
+
|
11
|
+
config = Dexcom.configuration
|
12
|
+
|
13
|
+
unless config.logger.nil?
|
14
|
+
logger config.logger, config.log_level, :apache
|
15
|
+
debug_output config.logger if config.log_level == :debug
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dexcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Gascon
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: alexgascon.93@gmail.com
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -158,11 +158,12 @@ files:
|
|
158
158
|
- lib/dexcom/configuration.rb
|
159
159
|
- lib/dexcom/constants.rb
|
160
160
|
- lib/dexcom/version.rb
|
161
|
-
|
161
|
+
- lib/utils/httparty_configured.rb
|
162
|
+
homepage:
|
162
163
|
licenses:
|
163
164
|
- MIT
|
164
165
|
metadata: {}
|
165
|
-
post_install_message:
|
166
|
+
post_install_message:
|
166
167
|
rdoc_options: []
|
167
168
|
require_paths:
|
168
169
|
- lib
|
@@ -177,9 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
178
|
- !ruby/object:Gem::Version
|
178
179
|
version: '0'
|
179
180
|
requirements: []
|
180
|
-
|
181
|
-
|
182
|
-
signing_key:
|
181
|
+
rubygems_version: 3.2.15
|
182
|
+
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Gem to interact with Dexcom Share API
|
185
185
|
test_files: []
|