validic 0.3.3 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rspec +0 -1
- data/Gemfile +12 -1
- data/Gemfile.lock +32 -62
- data/README.md +442 -28
- data/lib/validic.rb +3 -20
- data/lib/validic/app.rb +11 -0
- data/lib/validic/biometrics.rb +9 -0
- data/lib/validic/client.rb +35 -77
- data/lib/validic/diabetes.rb +4 -60
- data/lib/validic/error.rb +33 -0
- data/lib/validic/extra.rb +10 -0
- data/lib/validic/fitness.rb +4 -57
- data/lib/validic/nutrition.rb +5 -61
- data/lib/validic/organization.rb +6 -13
- data/lib/validic/profile.rb +4 -39
- data/lib/validic/response.rb +15 -0
- data/lib/validic/rest/apps.rb +21 -0
- data/lib/validic/rest/biometrics.rb +39 -0
- data/lib/validic/rest/diabetes.rb +39 -0
- data/lib/validic/rest/fitness.rb +40 -0
- data/lib/validic/rest/nutrition.rb +40 -0
- data/lib/validic/rest/organizations.rb +12 -0
- data/lib/validic/rest/profile.rb +18 -0
- data/lib/validic/rest/request.rb +95 -0
- data/lib/validic/rest/routine.rb +40 -0
- data/lib/validic/rest/sleep.rb +41 -0
- data/lib/validic/rest/tobacco_cessation.rb +40 -0
- data/lib/validic/rest/users.rb +55 -0
- data/lib/validic/rest/utils.rb +28 -0
- data/lib/validic/rest/weight.rb +43 -0
- data/lib/validic/routine.rb +4 -55
- data/lib/validic/sleep.rb +4 -59
- data/lib/validic/summary.rb +18 -0
- data/lib/validic/tobacco_cessation.rb +4 -53
- data/lib/validic/user.rb +4 -99
- data/lib/validic/utils.rb +13 -0
- data/lib/validic/version.rb +1 -1
- data/lib/validic/weight.rb +4 -57
- data/spec/fixtures/apps.json +32 -0
- data/spec/fixtures/biometrics-expanded.json +56 -0
- data/spec/fixtures/biometrics-extras.json +35 -0
- data/spec/fixtures/biometrics_record.json +36 -0
- data/spec/fixtures/biometrics_records.json +54 -0
- data/spec/fixtures/bulk_biometrics_records.json +55 -0
- data/spec/fixtures/bulk_diabetes_records.json +37 -0
- data/spec/fixtures/bulk_fitnesses.json +35 -0
- data/spec/fixtures/bulk_nutritions.json +37 -0
- data/spec/fixtures/bulk_sleeps.json +35 -0
- data/spec/fixtures/bulk_tobacco_cessations.json +33 -0
- data/spec/fixtures/conflict.json +5 -0
- data/spec/fixtures/diabetes-expanded.json +38 -0
- data/spec/fixtures/diabetes-extras.json +17 -0
- data/spec/fixtures/diabetes_record.json +18 -0
- data/spec/fixtures/diabetes_records.json +36 -0
- data/spec/fixtures/fitness-expanded.json +1521 -0
- data/spec/fixtures/fitness-extras.json +15 -0
- data/spec/fixtures/fitness.json +16 -0
- data/spec/fixtures/fitnesses.json +34 -0
- data/spec/fixtures/forbidden.json +5 -0
- data/spec/fixtures/internal_server.json +4 -0
- data/spec/fixtures/me.json +5 -0
- data/spec/fixtures/not_found.json +5 -0
- data/spec/fixtures/nutrition-expanded.json +123 -0
- data/spec/fixtures/nutrition-extras.json +13 -0
- data/spec/fixtures/nutrition.json +18 -0
- data/spec/fixtures/nutritions-expanded.json +123 -0
- data/spec/fixtures/nutritions.json +36 -0
- data/spec/fixtures/organizations.json +27 -0
- data/spec/fixtures/profile.json +13 -0
- data/spec/fixtures/refresh_token.json +7 -0
- data/spec/fixtures/routine-expanded.json +749 -0
- data/spec/fixtures/routine-extras.json +14 -0
- data/spec/fixtures/routine.json +17 -0
- data/spec/fixtures/routines.json +47 -0
- data/spec/fixtures/sleep-expanded.json +51 -0
- data/spec/fixtures/sleep-extras.json +15 -0
- data/spec/fixtures/sleep.json +16 -0
- data/spec/fixtures/sleeps.json +48 -0
- data/spec/fixtures/synced_apps.json +43 -0
- data/spec/fixtures/tobacco_cessation-expanded.json +33 -0
- data/spec/fixtures/tobacco_cessation-extras.json +12 -0
- data/spec/fixtures/tobacco_cessation.json +14 -0
- data/spec/fixtures/tobacco_cessations.json +32 -0
- data/spec/fixtures/unauthorized.json +4 -0
- data/spec/fixtures/unprocessable_entity.json +5 -0
- data/spec/fixtures/updated_user.json +9 -0
- data/spec/fixtures/user.json +8 -0
- data/spec/fixtures/user_with_profile.json +14 -0
- data/spec/fixtures/users.json +23 -0
- data/spec/fixtures/weight-expanded.json +66 -0
- data/spec/fixtures/weight-extras.json +15 -0
- data/spec/fixtures/weight.json +18 -0
- data/spec/fixtures/weights.json +48 -0
- data/spec/spec_helper.rb +47 -33
- data/spec/validic/client_spec.rb +5 -38
- data/spec/validic/error_spec.rb +73 -0
- data/spec/validic/expanded_spec.rb +87 -0
- data/spec/validic/rest/apps_spec.rb +41 -0
- data/spec/validic/rest/biometrics_spec.rb +131 -0
- data/spec/validic/rest/diabetes_spec.rb +131 -0
- data/spec/validic/rest/fitness_spec.rb +131 -0
- data/spec/validic/rest/nutrition_spec.rb +144 -0
- data/spec/validic/rest/organizations_spec.rb +24 -0
- data/spec/validic/rest/profile_spec.rb +44 -0
- data/spec/validic/rest/routine_spec.rb +129 -0
- data/spec/validic/rest/sleep_spec.rb +148 -0
- data/spec/validic/rest/tobacco_cessation_spec.rb +131 -0
- data/spec/validic/rest/users_spec.rb +170 -0
- data/spec/validic/rest/weight_spec.rb +150 -0
- data/spec/validic/summary_spec.rb +3 -0
- data/spec/validic_spec.rb +19 -31
- data/validic.gemspec +0 -13
- metadata +174 -194
- data/lib/validic/biometric.rb +0 -97
- data/lib/validic/request.rb +0 -46
- data/lib/validic/third_party_app.rb +0 -32
- data/spec/validic/biometrics_spec.rb +0 -43
- data/spec/validic/diabetes_spec.rb +0 -89
- data/spec/validic/fitness_spec.rb +0 -85
- data/spec/validic/nutrition_spec.rb +0 -91
- data/spec/validic/organization_spec.rb +0 -26
- data/spec/validic/profile_spec.rb +0 -19
- data/spec/validic/routine_spec.rb +0 -82
- data/spec/validic/sleep_spec.rb +0 -86
- data/spec/validic/third_party_app_spec.rb +0 -32
- data/spec/validic/tobacco_cessation_spec.rb +0 -81
- data/spec/validic/user_spec.rb +0 -81
- data/spec/validic/weight_spec.rb +0 -88
@@ -0,0 +1,150 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Validic::REST::Weight do
|
4
|
+
let(:client) { Validic::Client.new }
|
5
|
+
|
6
|
+
describe "#get_weight" do
|
7
|
+
context 'no user_id given' do
|
8
|
+
before do
|
9
|
+
stub_get("/organizations/1/weight.json")
|
10
|
+
.with(query: { access_token: '1' })
|
11
|
+
.to_return(body: fixture('weights.json'),
|
12
|
+
headers: { content_type: 'application/json; charset=utf-8' })
|
13
|
+
end
|
14
|
+
it 'returns a validic response object' do
|
15
|
+
weight = client.get_weight
|
16
|
+
expect(weight).to be_a Validic::Response
|
17
|
+
end
|
18
|
+
it 'makes a weight request to the correct url' do
|
19
|
+
client.get_weight
|
20
|
+
expect(a_get('/organizations/1/weight.json').with(query: { access_token: '1' })).to have_been_made
|
21
|
+
end
|
22
|
+
end
|
23
|
+
context 'with user_id' do
|
24
|
+
before do
|
25
|
+
stub_get("/organizations/1/users/1/weight.json")
|
26
|
+
.with(query: { access_token: '1' })
|
27
|
+
.to_return(body: fixture('weights.json'),
|
28
|
+
headers: { content_type: 'application/json; charset=utf-8' })
|
29
|
+
end
|
30
|
+
it 'returns a Response' do
|
31
|
+
weight = client.get_weight(user_id: '1')
|
32
|
+
expect(weight).to be_a Validic::Response
|
33
|
+
end
|
34
|
+
it 'makes a weight request to the correct url' do
|
35
|
+
client.get_weight(user_id: '1')
|
36
|
+
expect(a_get('/organizations/1/users/1/weight.json').with(query: { access_token: '1' })).to have_been_made
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '#create_weight' do
|
42
|
+
before do
|
43
|
+
stub_post("/organizations/1/users/1/weight.json").
|
44
|
+
with(body: { weight: { timestamp: '2013-03-10T07:12:16+00:00',
|
45
|
+
utc_offset: '+00:00', weight: 177,
|
46
|
+
height: 34, data_id: '12345' },
|
47
|
+
access_token: '1' }.to_json)
|
48
|
+
.to_return(body: fixture('weight.json'),
|
49
|
+
headers: { content_type: 'application/json; charset=utf-8'} )
|
50
|
+
|
51
|
+
@weight = client.create_weight(user_id: '1',
|
52
|
+
timestamp: "2013-03-10T07:12:16+00:00",
|
53
|
+
utc_offset: "+00:00",
|
54
|
+
weight: 177,
|
55
|
+
height: 34,
|
56
|
+
data_id: '12345')
|
57
|
+
end
|
58
|
+
it 'returns a weight' do
|
59
|
+
expect(@weight).to be_a Validic::Weight
|
60
|
+
end
|
61
|
+
it 'builds the correct url' do
|
62
|
+
pending
|
63
|
+
expect(a_post('/organizations/1/users/1/weight.json')
|
64
|
+
.with(body: { weight: { timestamp: '2013-03-10T07:12:16+00:00',
|
65
|
+
utf_offset: '+00:00', weight: 177,
|
66
|
+
height: 34, data_id: '12345'},
|
67
|
+
access_token: '1' })).to have_been_made
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#update_weight" do
|
72
|
+
before do
|
73
|
+
stub_put("/organizations/1/users/1/weight/51552cddfded0807c4000083.json").
|
74
|
+
with(body: { weight: { timestamp: '2013-03-10T07:12:16+00:00',
|
75
|
+
utc_offset: '+00:00', total_weight: 377,
|
76
|
+
awake: 224, deep: 234, light: 94, rem: 115,
|
77
|
+
times_woken: 4 },
|
78
|
+
access_token: '1' }.to_json)
|
79
|
+
.to_return(body: fixture('weight.json'),
|
80
|
+
headers: {content_type: 'application/json; charset=utf-8'})
|
81
|
+
|
82
|
+
@weight = client.update_weight(user_id: '1',
|
83
|
+
_id: "51552cddfded0807c4000083",
|
84
|
+
timestamp: "2013-03-10T07:12:16+00:00",
|
85
|
+
utc_offset: "+00:00",
|
86
|
+
total_weight: 377,
|
87
|
+
awake: 224,
|
88
|
+
deep: 234,
|
89
|
+
light: 94,
|
90
|
+
rem: 115,
|
91
|
+
times_woken: 4)
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'returns a weight' do
|
95
|
+
expect(@weight).to be_a Validic::Weight
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'makes a weight request to the correct url' do
|
99
|
+
url = "#{Validic::BASE_URL}/organizations/1/users/1/weight/51552cddfded0807c4000083.json"
|
100
|
+
expect(a_request(:put, url)).to have_been_made
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
describe '#delete_weight' do
|
105
|
+
context 'when resource is found' do
|
106
|
+
before do
|
107
|
+
stub_delete("/organizations/1/users/1/weight/51552cddfded0807c4000096.json")
|
108
|
+
.to_return(status: 200)
|
109
|
+
end
|
110
|
+
it 'returns true' do
|
111
|
+
weight = client.delete_weight(user_id: '1', _id: '51552cddfded0807c4000096')
|
112
|
+
expect(weight).to be true
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
describe '#latest_weight' do
|
118
|
+
context 'with user_id' do
|
119
|
+
before do
|
120
|
+
stub_get("/organizations/1/users/2/weight/latest.json").
|
121
|
+
with(query: { access_token: '1' }).
|
122
|
+
to_return(body: fixture('weights.json'),
|
123
|
+
headers: { content_type: 'application/json; charset=utf-8' })
|
124
|
+
@latest = client.latest_weight(user_id: '2')
|
125
|
+
end
|
126
|
+
it 'makes a latest for weight' do
|
127
|
+
expect(@latest).to be_a Validic::Response
|
128
|
+
end
|
129
|
+
it 'builds a latest url' do
|
130
|
+
expect(a_get('/organizations/1/users/2/weight/latest.json').with(query: { access_token: '1' })).to have_been_made
|
131
|
+
end
|
132
|
+
end
|
133
|
+
context 'without user_id' do
|
134
|
+
before do
|
135
|
+
stub_get("/organizations/1/weight/latest.json").
|
136
|
+
with(query: { access_token: '1' }).
|
137
|
+
to_return(body: fixture('weights.json'),
|
138
|
+
headers: { content_type: 'application/json; charset=utf-8' })
|
139
|
+
@latest = client.latest_weight
|
140
|
+
end
|
141
|
+
it 'makes a latest for weight' do
|
142
|
+
expect(@latest).to be_a Validic::Response
|
143
|
+
end
|
144
|
+
it 'builds a latest url' do
|
145
|
+
expect(a_get('/organizations/1/weight/latest.json').with(query: { access_token: '1' })).to have_been_made
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
data/spec/validic_spec.rb
CHANGED
@@ -1,39 +1,27 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
require 'spec_helper'
|
3
2
|
|
4
3
|
describe Validic do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
it "uses default API URL" do
|
11
|
-
client.api_url.should eq 'https://api.validic.com'
|
4
|
+
describe '.configure' do
|
5
|
+
context 'when no block given' do
|
6
|
+
it 'throws an error' do
|
7
|
+
expect{ Validic.configure }.to raise_error
|
8
|
+
end
|
12
9
|
end
|
13
10
|
|
14
|
-
|
15
|
-
|
11
|
+
context 'with block given' do
|
12
|
+
it 'sets the attributes correctly' do
|
13
|
+
Validic.configure do |c|
|
14
|
+
c.api_url = 'https://validic.com/api'
|
15
|
+
c.api_version = 'v2'
|
16
|
+
c.access_token = '123'
|
17
|
+
c.organization_id = 'abc'
|
18
|
+
end
|
19
|
+
|
20
|
+
expect(Validic.api_url).to eq 'https://validic.com/api'
|
21
|
+
expect(Validic.api_version).to eq 'v2'
|
22
|
+
expect(Validic.access_token).to eq '123'
|
23
|
+
expect(Validic.organization_id).to eq 'abc'
|
24
|
+
end
|
16
25
|
end
|
17
|
-
|
18
26
|
end
|
19
|
-
|
20
|
-
context "handles custom configuration" do
|
21
|
-
let(:new_client) { Validic::Client
|
22
|
-
.new(api_url: 'https://api.validic.net',
|
23
|
-
api_version: 'v2',
|
24
|
-
organization_id: '1234567') }
|
25
|
-
|
26
|
-
it "::Client API_URL configuration" do
|
27
|
-
new_client.api_url.should eq 'https://api.validic.net'
|
28
|
-
end
|
29
|
-
|
30
|
-
it "::Client API_VERSION configuration" do
|
31
|
-
new_client.api_version.should eq 'v2'
|
32
|
-
end
|
33
|
-
|
34
|
-
it "::Client Organization ID configuration" do
|
35
|
-
new_client.organization_id.should eq '1234567'
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
27
|
end
|
data/validic.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'validic/version'
|
@@ -19,18 +18,6 @@ Gem::Specification.new do |spec|
|
|
19
18
|
spec.require_paths = ["lib"]
|
20
19
|
|
21
20
|
spec.add_dependency 'faraday_middleware', '~> 0.9.0'
|
22
|
-
spec.add_dependency 'hashie', '~> 2.0.3'
|
23
|
-
spec.add_dependency 'activesupport'
|
24
21
|
spec.add_dependency 'multi_json'
|
25
|
-
|
26
22
|
spec.add_development_dependency "bundler"
|
27
|
-
spec.add_development_dependency "rake"
|
28
|
-
spec.add_development_dependency "rspec"
|
29
|
-
spec.add_development_dependency "simplecov"
|
30
|
-
spec.add_development_dependency "simplecov-rcov"
|
31
|
-
spec.add_development_dependency "yard"
|
32
|
-
spec.add_development_dependency "vcr", '~> 2.8.0'
|
33
|
-
spec.add_development_dependency "shoulda"
|
34
|
-
spec.add_development_dependency "webmock", '~> 1.8.0'
|
35
|
-
spec.add_development_dependency "api_matchers"
|
36
23
|
end
|
metadata
CHANGED
@@ -1,209 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julius Francisco & Jay Balanay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.9.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: hashie
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.0.3
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 2.0.3
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: activesupport
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
27
|
- !ruby/object:Gem::Dependency
|
56
28
|
name: multi_json
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
|
-
- -
|
31
|
+
- - '>='
|
60
32
|
- !ruby/object:Gem::Version
|
61
33
|
version: '0'
|
62
34
|
type: :runtime
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
|
-
- -
|
38
|
+
- - '>='
|
67
39
|
- !ruby/object:Gem::Version
|
68
40
|
version: '0'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: bundler
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
|
-
- -
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: simplecov
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: simplecov-rcov
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: yard
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: vcr
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 2.8.0
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 2.8.0
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: shoulda
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: webmock
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: 1.8.0
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - "~>"
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: 1.8.0
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: api_matchers
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
45
|
+
- - '>='
|
200
46
|
- !ruby/object:Gem::Version
|
201
47
|
version: '0'
|
202
48
|
type: :development
|
203
49
|
prerelease: false
|
204
50
|
version_requirements: !ruby/object:Gem::Requirement
|
205
51
|
requirements:
|
206
|
-
- -
|
52
|
+
- - '>='
|
207
53
|
- !ruby/object:Gem::Version
|
208
54
|
version: '0'
|
209
55
|
description: API Wrapper for Validic
|
@@ -214,43 +60,119 @@ executables: []
|
|
214
60
|
extensions: []
|
215
61
|
extra_rdoc_files: []
|
216
62
|
files:
|
217
|
-
-
|
218
|
-
-
|
63
|
+
- .gitignore
|
64
|
+
- .rspec
|
219
65
|
- Gemfile
|
220
66
|
- Gemfile.lock
|
221
67
|
- LICENSE.txt
|
222
68
|
- README.md
|
223
69
|
- Rakefile
|
224
70
|
- lib/validic.rb
|
225
|
-
- lib/validic/
|
71
|
+
- lib/validic/app.rb
|
72
|
+
- lib/validic/biometrics.rb
|
226
73
|
- lib/validic/client.rb
|
227
74
|
- lib/validic/diabetes.rb
|
75
|
+
- lib/validic/error.rb
|
76
|
+
- lib/validic/extra.rb
|
228
77
|
- lib/validic/fitness.rb
|
229
78
|
- lib/validic/nutrition.rb
|
230
79
|
- lib/validic/organization.rb
|
231
80
|
- lib/validic/profile.rb
|
232
|
-
- lib/validic/
|
81
|
+
- lib/validic/response.rb
|
82
|
+
- lib/validic/rest/apps.rb
|
83
|
+
- lib/validic/rest/biometrics.rb
|
84
|
+
- lib/validic/rest/diabetes.rb
|
85
|
+
- lib/validic/rest/fitness.rb
|
86
|
+
- lib/validic/rest/nutrition.rb
|
87
|
+
- lib/validic/rest/organizations.rb
|
88
|
+
- lib/validic/rest/profile.rb
|
89
|
+
- lib/validic/rest/request.rb
|
90
|
+
- lib/validic/rest/routine.rb
|
91
|
+
- lib/validic/rest/sleep.rb
|
92
|
+
- lib/validic/rest/tobacco_cessation.rb
|
93
|
+
- lib/validic/rest/users.rb
|
94
|
+
- lib/validic/rest/utils.rb
|
95
|
+
- lib/validic/rest/weight.rb
|
233
96
|
- lib/validic/routine.rb
|
234
97
|
- lib/validic/sleep.rb
|
235
|
-
- lib/validic/
|
98
|
+
- lib/validic/summary.rb
|
236
99
|
- lib/validic/tobacco_cessation.rb
|
237
100
|
- lib/validic/user.rb
|
101
|
+
- lib/validic/utils.rb
|
238
102
|
- lib/validic/version.rb
|
239
103
|
- lib/validic/weight.rb
|
104
|
+
- spec/fixtures/apps.json
|
105
|
+
- spec/fixtures/biometrics-expanded.json
|
106
|
+
- spec/fixtures/biometrics-extras.json
|
107
|
+
- spec/fixtures/biometrics_record.json
|
108
|
+
- spec/fixtures/biometrics_records.json
|
109
|
+
- spec/fixtures/bulk_biometrics_records.json
|
110
|
+
- spec/fixtures/bulk_diabetes_records.json
|
111
|
+
- spec/fixtures/bulk_fitnesses.json
|
112
|
+
- spec/fixtures/bulk_nutritions.json
|
113
|
+
- spec/fixtures/bulk_sleeps.json
|
114
|
+
- spec/fixtures/bulk_tobacco_cessations.json
|
115
|
+
- spec/fixtures/conflict.json
|
116
|
+
- spec/fixtures/diabetes-expanded.json
|
117
|
+
- spec/fixtures/diabetes-extras.json
|
118
|
+
- spec/fixtures/diabetes_record.json
|
119
|
+
- spec/fixtures/diabetes_records.json
|
120
|
+
- spec/fixtures/fitness-expanded.json
|
121
|
+
- spec/fixtures/fitness-extras.json
|
122
|
+
- spec/fixtures/fitness.json
|
123
|
+
- spec/fixtures/fitnesses.json
|
124
|
+
- spec/fixtures/forbidden.json
|
125
|
+
- spec/fixtures/internal_server.json
|
126
|
+
- spec/fixtures/me.json
|
127
|
+
- spec/fixtures/not_found.json
|
128
|
+
- spec/fixtures/nutrition-expanded.json
|
129
|
+
- spec/fixtures/nutrition-extras.json
|
130
|
+
- spec/fixtures/nutrition.json
|
131
|
+
- spec/fixtures/nutritions-expanded.json
|
132
|
+
- spec/fixtures/nutritions.json
|
133
|
+
- spec/fixtures/organizations.json
|
134
|
+
- spec/fixtures/profile.json
|
135
|
+
- spec/fixtures/refresh_token.json
|
136
|
+
- spec/fixtures/routine-expanded.json
|
137
|
+
- spec/fixtures/routine-extras.json
|
138
|
+
- spec/fixtures/routine.json
|
139
|
+
- spec/fixtures/routines.json
|
140
|
+
- spec/fixtures/sleep-expanded.json
|
141
|
+
- spec/fixtures/sleep-extras.json
|
142
|
+
- spec/fixtures/sleep.json
|
143
|
+
- spec/fixtures/sleeps.json
|
144
|
+
- spec/fixtures/synced_apps.json
|
145
|
+
- spec/fixtures/tobacco_cessation-expanded.json
|
146
|
+
- spec/fixtures/tobacco_cessation-extras.json
|
147
|
+
- spec/fixtures/tobacco_cessation.json
|
148
|
+
- spec/fixtures/tobacco_cessations.json
|
149
|
+
- spec/fixtures/unauthorized.json
|
150
|
+
- spec/fixtures/unprocessable_entity.json
|
151
|
+
- spec/fixtures/updated_user.json
|
152
|
+
- spec/fixtures/user.json
|
153
|
+
- spec/fixtures/user_with_profile.json
|
154
|
+
- spec/fixtures/users.json
|
155
|
+
- spec/fixtures/weight-expanded.json
|
156
|
+
- spec/fixtures/weight-extras.json
|
157
|
+
- spec/fixtures/weight.json
|
158
|
+
- spec/fixtures/weights.json
|
240
159
|
- spec/spec_helper.rb
|
241
|
-
- spec/validic/biometrics_spec.rb
|
242
160
|
- spec/validic/client_spec.rb
|
243
|
-
- spec/validic/
|
244
|
-
- spec/validic/
|
245
|
-
- spec/validic/
|
246
|
-
- spec/validic/
|
247
|
-
- spec/validic/
|
248
|
-
- spec/validic/
|
249
|
-
- spec/validic/
|
250
|
-
- spec/validic/
|
251
|
-
- spec/validic/
|
252
|
-
- spec/validic/
|
253
|
-
- spec/validic/
|
161
|
+
- spec/validic/error_spec.rb
|
162
|
+
- spec/validic/expanded_spec.rb
|
163
|
+
- spec/validic/rest/apps_spec.rb
|
164
|
+
- spec/validic/rest/biometrics_spec.rb
|
165
|
+
- spec/validic/rest/diabetes_spec.rb
|
166
|
+
- spec/validic/rest/fitness_spec.rb
|
167
|
+
- spec/validic/rest/nutrition_spec.rb
|
168
|
+
- spec/validic/rest/organizations_spec.rb
|
169
|
+
- spec/validic/rest/profile_spec.rb
|
170
|
+
- spec/validic/rest/routine_spec.rb
|
171
|
+
- spec/validic/rest/sleep_spec.rb
|
172
|
+
- spec/validic/rest/tobacco_cessation_spec.rb
|
173
|
+
- spec/validic/rest/users_spec.rb
|
174
|
+
- spec/validic/rest/weight_spec.rb
|
175
|
+
- spec/validic/summary_spec.rb
|
254
176
|
- spec/validic_spec.rb
|
255
177
|
- validic.gemspec
|
256
178
|
homepage: https://validic.com
|
@@ -263,34 +185,92 @@ require_paths:
|
|
263
185
|
- lib
|
264
186
|
required_ruby_version: !ruby/object:Gem::Requirement
|
265
187
|
requirements:
|
266
|
-
- -
|
188
|
+
- - '>='
|
267
189
|
- !ruby/object:Gem::Version
|
268
190
|
version: '0'
|
269
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
270
192
|
requirements:
|
271
|
-
- -
|
193
|
+
- - '>='
|
272
194
|
- !ruby/object:Gem::Version
|
273
195
|
version: '0'
|
274
196
|
requirements: []
|
275
197
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.0.14
|
277
199
|
signing_key:
|
278
200
|
specification_version: 4
|
279
201
|
summary: API Wrapper for Validic
|
280
202
|
test_files:
|
203
|
+
- spec/fixtures/apps.json
|
204
|
+
- spec/fixtures/biometrics-expanded.json
|
205
|
+
- spec/fixtures/biometrics-extras.json
|
206
|
+
- spec/fixtures/biometrics_record.json
|
207
|
+
- spec/fixtures/biometrics_records.json
|
208
|
+
- spec/fixtures/bulk_biometrics_records.json
|
209
|
+
- spec/fixtures/bulk_diabetes_records.json
|
210
|
+
- spec/fixtures/bulk_fitnesses.json
|
211
|
+
- spec/fixtures/bulk_nutritions.json
|
212
|
+
- spec/fixtures/bulk_sleeps.json
|
213
|
+
- spec/fixtures/bulk_tobacco_cessations.json
|
214
|
+
- spec/fixtures/conflict.json
|
215
|
+
- spec/fixtures/diabetes-expanded.json
|
216
|
+
- spec/fixtures/diabetes-extras.json
|
217
|
+
- spec/fixtures/diabetes_record.json
|
218
|
+
- spec/fixtures/diabetes_records.json
|
219
|
+
- spec/fixtures/fitness-expanded.json
|
220
|
+
- spec/fixtures/fitness-extras.json
|
221
|
+
- spec/fixtures/fitness.json
|
222
|
+
- spec/fixtures/fitnesses.json
|
223
|
+
- spec/fixtures/forbidden.json
|
224
|
+
- spec/fixtures/internal_server.json
|
225
|
+
- spec/fixtures/me.json
|
226
|
+
- spec/fixtures/not_found.json
|
227
|
+
- spec/fixtures/nutrition-expanded.json
|
228
|
+
- spec/fixtures/nutrition-extras.json
|
229
|
+
- spec/fixtures/nutrition.json
|
230
|
+
- spec/fixtures/nutritions-expanded.json
|
231
|
+
- spec/fixtures/nutritions.json
|
232
|
+
- spec/fixtures/organizations.json
|
233
|
+
- spec/fixtures/profile.json
|
234
|
+
- spec/fixtures/refresh_token.json
|
235
|
+
- spec/fixtures/routine-expanded.json
|
236
|
+
- spec/fixtures/routine-extras.json
|
237
|
+
- spec/fixtures/routine.json
|
238
|
+
- spec/fixtures/routines.json
|
239
|
+
- spec/fixtures/sleep-expanded.json
|
240
|
+
- spec/fixtures/sleep-extras.json
|
241
|
+
- spec/fixtures/sleep.json
|
242
|
+
- spec/fixtures/sleeps.json
|
243
|
+
- spec/fixtures/synced_apps.json
|
244
|
+
- spec/fixtures/tobacco_cessation-expanded.json
|
245
|
+
- spec/fixtures/tobacco_cessation-extras.json
|
246
|
+
- spec/fixtures/tobacco_cessation.json
|
247
|
+
- spec/fixtures/tobacco_cessations.json
|
248
|
+
- spec/fixtures/unauthorized.json
|
249
|
+
- spec/fixtures/unprocessable_entity.json
|
250
|
+
- spec/fixtures/updated_user.json
|
251
|
+
- spec/fixtures/user.json
|
252
|
+
- spec/fixtures/user_with_profile.json
|
253
|
+
- spec/fixtures/users.json
|
254
|
+
- spec/fixtures/weight-expanded.json
|
255
|
+
- spec/fixtures/weight-extras.json
|
256
|
+
- spec/fixtures/weight.json
|
257
|
+
- spec/fixtures/weights.json
|
281
258
|
- spec/spec_helper.rb
|
282
|
-
- spec/validic/biometrics_spec.rb
|
283
259
|
- spec/validic/client_spec.rb
|
284
|
-
- spec/validic/
|
285
|
-
- spec/validic/
|
286
|
-
- spec/validic/
|
287
|
-
- spec/validic/
|
288
|
-
- spec/validic/
|
289
|
-
- spec/validic/
|
290
|
-
- spec/validic/
|
291
|
-
- spec/validic/
|
292
|
-
- spec/validic/
|
293
|
-
- spec/validic/
|
294
|
-
- spec/validic/
|
260
|
+
- spec/validic/error_spec.rb
|
261
|
+
- spec/validic/expanded_spec.rb
|
262
|
+
- spec/validic/rest/apps_spec.rb
|
263
|
+
- spec/validic/rest/biometrics_spec.rb
|
264
|
+
- spec/validic/rest/diabetes_spec.rb
|
265
|
+
- spec/validic/rest/fitness_spec.rb
|
266
|
+
- spec/validic/rest/nutrition_spec.rb
|
267
|
+
- spec/validic/rest/organizations_spec.rb
|
268
|
+
- spec/validic/rest/profile_spec.rb
|
269
|
+
- spec/validic/rest/routine_spec.rb
|
270
|
+
- spec/validic/rest/sleep_spec.rb
|
271
|
+
- spec/validic/rest/tobacco_cessation_spec.rb
|
272
|
+
- spec/validic/rest/users_spec.rb
|
273
|
+
- spec/validic/rest/weight_spec.rb
|
274
|
+
- spec/validic/summary_spec.rb
|
295
275
|
- spec/validic_spec.rb
|
296
276
|
has_rdoc:
|