validic 0.3.3 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rspec +0 -1
  4. data/Gemfile +12 -1
  5. data/Gemfile.lock +32 -62
  6. data/README.md +442 -28
  7. data/lib/validic.rb +3 -20
  8. data/lib/validic/app.rb +11 -0
  9. data/lib/validic/biometrics.rb +9 -0
  10. data/lib/validic/client.rb +35 -77
  11. data/lib/validic/diabetes.rb +4 -60
  12. data/lib/validic/error.rb +33 -0
  13. data/lib/validic/extra.rb +10 -0
  14. data/lib/validic/fitness.rb +4 -57
  15. data/lib/validic/nutrition.rb +5 -61
  16. data/lib/validic/organization.rb +6 -13
  17. data/lib/validic/profile.rb +4 -39
  18. data/lib/validic/response.rb +15 -0
  19. data/lib/validic/rest/apps.rb +21 -0
  20. data/lib/validic/rest/biometrics.rb +39 -0
  21. data/lib/validic/rest/diabetes.rb +39 -0
  22. data/lib/validic/rest/fitness.rb +40 -0
  23. data/lib/validic/rest/nutrition.rb +40 -0
  24. data/lib/validic/rest/organizations.rb +12 -0
  25. data/lib/validic/rest/profile.rb +18 -0
  26. data/lib/validic/rest/request.rb +95 -0
  27. data/lib/validic/rest/routine.rb +40 -0
  28. data/lib/validic/rest/sleep.rb +41 -0
  29. data/lib/validic/rest/tobacco_cessation.rb +40 -0
  30. data/lib/validic/rest/users.rb +55 -0
  31. data/lib/validic/rest/utils.rb +28 -0
  32. data/lib/validic/rest/weight.rb +43 -0
  33. data/lib/validic/routine.rb +4 -55
  34. data/lib/validic/sleep.rb +4 -59
  35. data/lib/validic/summary.rb +18 -0
  36. data/lib/validic/tobacco_cessation.rb +4 -53
  37. data/lib/validic/user.rb +4 -99
  38. data/lib/validic/utils.rb +13 -0
  39. data/lib/validic/version.rb +1 -1
  40. data/lib/validic/weight.rb +4 -57
  41. data/spec/fixtures/apps.json +32 -0
  42. data/spec/fixtures/biometrics-expanded.json +56 -0
  43. data/spec/fixtures/biometrics-extras.json +35 -0
  44. data/spec/fixtures/biometrics_record.json +36 -0
  45. data/spec/fixtures/biometrics_records.json +54 -0
  46. data/spec/fixtures/bulk_biometrics_records.json +55 -0
  47. data/spec/fixtures/bulk_diabetes_records.json +37 -0
  48. data/spec/fixtures/bulk_fitnesses.json +35 -0
  49. data/spec/fixtures/bulk_nutritions.json +37 -0
  50. data/spec/fixtures/bulk_sleeps.json +35 -0
  51. data/spec/fixtures/bulk_tobacco_cessations.json +33 -0
  52. data/spec/fixtures/conflict.json +5 -0
  53. data/spec/fixtures/diabetes-expanded.json +38 -0
  54. data/spec/fixtures/diabetes-extras.json +17 -0
  55. data/spec/fixtures/diabetes_record.json +18 -0
  56. data/spec/fixtures/diabetes_records.json +36 -0
  57. data/spec/fixtures/fitness-expanded.json +1521 -0
  58. data/spec/fixtures/fitness-extras.json +15 -0
  59. data/spec/fixtures/fitness.json +16 -0
  60. data/spec/fixtures/fitnesses.json +34 -0
  61. data/spec/fixtures/forbidden.json +5 -0
  62. data/spec/fixtures/internal_server.json +4 -0
  63. data/spec/fixtures/me.json +5 -0
  64. data/spec/fixtures/not_found.json +5 -0
  65. data/spec/fixtures/nutrition-expanded.json +123 -0
  66. data/spec/fixtures/nutrition-extras.json +13 -0
  67. data/spec/fixtures/nutrition.json +18 -0
  68. data/spec/fixtures/nutritions-expanded.json +123 -0
  69. data/spec/fixtures/nutritions.json +36 -0
  70. data/spec/fixtures/organizations.json +27 -0
  71. data/spec/fixtures/profile.json +13 -0
  72. data/spec/fixtures/refresh_token.json +7 -0
  73. data/spec/fixtures/routine-expanded.json +749 -0
  74. data/spec/fixtures/routine-extras.json +14 -0
  75. data/spec/fixtures/routine.json +17 -0
  76. data/spec/fixtures/routines.json +47 -0
  77. data/spec/fixtures/sleep-expanded.json +51 -0
  78. data/spec/fixtures/sleep-extras.json +15 -0
  79. data/spec/fixtures/sleep.json +16 -0
  80. data/spec/fixtures/sleeps.json +48 -0
  81. data/spec/fixtures/synced_apps.json +43 -0
  82. data/spec/fixtures/tobacco_cessation-expanded.json +33 -0
  83. data/spec/fixtures/tobacco_cessation-extras.json +12 -0
  84. data/spec/fixtures/tobacco_cessation.json +14 -0
  85. data/spec/fixtures/tobacco_cessations.json +32 -0
  86. data/spec/fixtures/unauthorized.json +4 -0
  87. data/spec/fixtures/unprocessable_entity.json +5 -0
  88. data/spec/fixtures/updated_user.json +9 -0
  89. data/spec/fixtures/user.json +8 -0
  90. data/spec/fixtures/user_with_profile.json +14 -0
  91. data/spec/fixtures/users.json +23 -0
  92. data/spec/fixtures/weight-expanded.json +66 -0
  93. data/spec/fixtures/weight-extras.json +15 -0
  94. data/spec/fixtures/weight.json +18 -0
  95. data/spec/fixtures/weights.json +48 -0
  96. data/spec/spec_helper.rb +47 -33
  97. data/spec/validic/client_spec.rb +5 -38
  98. data/spec/validic/error_spec.rb +73 -0
  99. data/spec/validic/expanded_spec.rb +87 -0
  100. data/spec/validic/rest/apps_spec.rb +41 -0
  101. data/spec/validic/rest/biometrics_spec.rb +131 -0
  102. data/spec/validic/rest/diabetes_spec.rb +131 -0
  103. data/spec/validic/rest/fitness_spec.rb +131 -0
  104. data/spec/validic/rest/nutrition_spec.rb +144 -0
  105. data/spec/validic/rest/organizations_spec.rb +24 -0
  106. data/spec/validic/rest/profile_spec.rb +44 -0
  107. data/spec/validic/rest/routine_spec.rb +129 -0
  108. data/spec/validic/rest/sleep_spec.rb +148 -0
  109. data/spec/validic/rest/tobacco_cessation_spec.rb +131 -0
  110. data/spec/validic/rest/users_spec.rb +170 -0
  111. data/spec/validic/rest/weight_spec.rb +150 -0
  112. data/spec/validic/summary_spec.rb +3 -0
  113. data/spec/validic_spec.rb +19 -31
  114. data/validic.gemspec +0 -13
  115. metadata +174 -194
  116. data/lib/validic/biometric.rb +0 -97
  117. data/lib/validic/request.rb +0 -46
  118. data/lib/validic/third_party_app.rb +0 -32
  119. data/spec/validic/biometrics_spec.rb +0 -43
  120. data/spec/validic/diabetes_spec.rb +0 -89
  121. data/spec/validic/fitness_spec.rb +0 -85
  122. data/spec/validic/nutrition_spec.rb +0 -91
  123. data/spec/validic/organization_spec.rb +0 -26
  124. data/spec/validic/profile_spec.rb +0 -19
  125. data/spec/validic/routine_spec.rb +0 -82
  126. data/spec/validic/sleep_spec.rb +0 -86
  127. data/spec/validic/third_party_app_spec.rb +0 -32
  128. data/spec/validic/tobacco_cessation_spec.rb +0 -81
  129. data/spec/validic/user_spec.rb +0 -81
  130. 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
@@ -0,0 +1,3 @@
1
+ describe Validic::Summary do
2
+
3
+ end
@@ -1,39 +1,27 @@
1
- # encoding: utf-8
2
1
  require 'spec_helper'
3
2
 
4
3
  describe Validic do
5
-
6
- let(:client) { Validic::Client.new }
7
-
8
- context "configure defaults" do
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
- it "uses default API VERSION" do
15
- client.api_version.should eq 'v1'
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
@@ -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.3.3
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: 2014-06-11 00:00:00.000000000 Z
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
- - ".gitignore"
218
- - ".rspec"
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/biometric.rb
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/request.rb
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/third_party_app.rb
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/diabetes_spec.rb
244
- - spec/validic/fitness_spec.rb
245
- - spec/validic/nutrition_spec.rb
246
- - spec/validic/organization_spec.rb
247
- - spec/validic/profile_spec.rb
248
- - spec/validic/routine_spec.rb
249
- - spec/validic/sleep_spec.rb
250
- - spec/validic/third_party_app_spec.rb
251
- - spec/validic/tobacco_cessation_spec.rb
252
- - spec/validic/user_spec.rb
253
- - spec/validic/weight_spec.rb
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.2.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/diabetes_spec.rb
285
- - spec/validic/fitness_spec.rb
286
- - spec/validic/nutrition_spec.rb
287
- - spec/validic/organization_spec.rb
288
- - spec/validic/profile_spec.rb
289
- - spec/validic/routine_spec.rb
290
- - spec/validic/sleep_spec.rb
291
- - spec/validic/third_party_app_spec.rb
292
- - spec/validic/tobacco_cessation_spec.rb
293
- - spec/validic/user_spec.rb
294
- - spec/validic/weight_spec.rb
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: