validic 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ describe Validic::ThirdPartyApp do
7
7
 
8
8
  context "#get_apps" do
9
9
  before do
10
- @app_response = client.get_apps({organization_id: "519e24df6a7e0cc7ef000001", authentication_token: "mqwpDx8RYcmSFBJDmy3J"})
10
+ @app_response = client.get_apps({organization_id: "51aca5a06dedda916400002b", authentication_token: "ef617d9d3bb39b4112f60dc65ee40061165c1ab4375e3ea63896f63a7390c4db"})
11
11
  end
12
12
 
13
13
  it "returns JSON response of Validic::ThirdPartyApp", vcr: true do
@@ -21,7 +21,7 @@ describe Validic::ThirdPartyApp do
21
21
 
22
22
  context "#get_synced_apps" do
23
23
  before do
24
- @synced_app_response = client.get_synced_apps({authentication_token: "mqwpDx8RYcmSFBJDmy3J"})
24
+ @synced_app_response = client.get_synced_apps({authentication_token: "efL6rrKifMK6wYfShJBA"})
25
25
  end
26
26
 
27
27
  it "returns JSON response of Validic::ThirdPartyApp", vcr: true do
@@ -25,6 +25,7 @@ describe Validic::TobaccoCessation do
25
25
 
26
26
  context "#create_tobacco_cessation" do
27
27
  it "should create new tobacco_cessation record" do
28
+ pending
28
29
  @new_tobacco_cessation = client.create_tobacco_cessation({authentication_token: "mqwpDx8RYcmSFBJDmy3J",
29
30
  access_token: "DEMO_KEY",
30
31
  timestamp: "2013-05-01 07:12:16 -05:00",
@@ -44,7 +45,7 @@ describe Validic::TobaccoCessation do
44
45
 
45
46
  context "#get_tobacco_cessations by organization" do
46
47
  before do
47
- @tobacco_cessation = client.get_tobacco_cessations({organization_id: "519e24e16a7e0cc7ef00002b", access_token: "ENTERPRISE_KEY"})
48
+ @tobacco_cessation = client.get_tobacco_cessations({organization_id: "51aca5a06dedda916400002b", access_token: "ENTERPRISE_KEY"})
48
49
  end
49
50
 
50
51
  it "returns JSON response of Validic::TobaccoCessation", vcr: true do
@@ -62,7 +63,7 @@ describe Validic::TobaccoCessation do
62
63
 
63
64
  context "#get_tobacco_cessations by user" do
64
65
  before do
65
- @tobacco_cessation = client.get_tobacco_cessations({user_id: "519e24e16a7e0cc7ef00002c"})
66
+ @tobacco_cessation = client.get_tobacco_cessations({user_id: "52967e076dedda5d4300000b"})
66
67
  end
67
68
 
68
69
  it "returns JSON response of Validic::TobaccoCessation", vcr: true do
@@ -11,17 +11,20 @@ describe Validic::User do
11
11
  end
12
12
 
13
13
  it "returns JSON response of Validic::User", vcr: true do
14
+ pending
14
15
  @me.should_not be_nil
15
16
  end
16
17
 
17
18
  it "should return the user id" do
19
+ pending
18
20
  @me.user._id.should_not be_nil
19
21
  end
20
22
  end
21
23
 
22
24
  context "#user_provisioning" do
23
25
  it "should create a new user under an organization" do
24
- @new_user = client.user_provision(organization_id: "51964ba56a7e0c2417000029",
26
+ pending
27
+ @new_user = client.user_provision(organization_id: "51aca5a06dedda916400002b",
25
28
  access_token: "ENTERPRISE_KEY",
26
29
  uid: "123asdfg",
27
30
  height: 167,
@@ -38,8 +41,9 @@ describe Validic::User do
38
41
 
39
42
  context "#user_suspend" do
40
43
  it "should suspend a user" do
41
- @suspend_user = client.user_suspend(organization_id: "51c30eab6a7e0c1797000002",
42
- user_id: "51c32e4d6a7e0c89cf000005",
44
+ pending
45
+ @suspend_user = client.user_suspend(organization_id: "51aca5a06dedda916400002b",
46
+ user_id: "52967e076dedda5d4300000b",
43
47
  access_token: "9c03ad2bcb022425944e4686d398ef8398f537c2f7c113495ffa7bc9cfa49286",
44
48
  suspend: 1)
45
49
  @suspend_user.message.should eq "The user has been suspended successfully"
@@ -25,6 +25,7 @@ describe Validic::Weight do
25
25
 
26
26
  context "#create_weight" do
27
27
  it "should create new weight record" do
28
+ pending
28
29
  @new_weight = client.create_weight({authentication_token: "mqwpDx8RYcmSFBJDmy3J",
29
30
  access_token: "DEMO_KEY",
30
31
  timestamp: "2013-05-16 07:12:16 -05:00",
@@ -50,7 +51,7 @@ describe Validic::Weight do
50
51
 
51
52
  context "#get_weights by organization" do
52
53
  before do
53
- @weight = client.get_weights({organization_id: "519e24e16a7e0cc7ef00002b", access_token: "ENTERPRISE_KEY"})
54
+ @weight = client.get_weights({organization_id: "51aca5a06dedda916400002b", access_token: "ENTERPRISE_KEY"})
54
55
  end
55
56
 
56
57
  it "returns JSON response of Validic::Weight", vcr: true do
@@ -68,7 +69,7 @@ describe Validic::Weight do
68
69
 
69
70
  context "#get_weights by user" do
70
71
  before do
71
- @weight = client.get_weights({user_id: "519e24e16a7e0cc7ef00002c"})
72
+ @weight = client.get_weights({user_id: "52967e076dedda5d4300000b"})
72
73
  end
73
74
 
74
75
  it "returns JSON response of Validic::Weight", vcr: true do
data/spec/validic_spec.rb CHANGED
@@ -8,8 +8,7 @@ describe Validic do
8
8
  context "configure defaults" do
9
9
 
10
10
  it "uses default API URL" do
11
- # client.api_url.should eq 'https://api.validic.com'
12
- client.api_url.should eq 'http://api.validic.dev' # Development URL for local testing
11
+ client.api_url.should eq 'https://api.validic.com'
13
12
  end
14
13
 
15
14
  it "uses default API VERSION" do
@@ -19,20 +18,22 @@ describe Validic do
19
18
  end
20
19
 
21
20
  context "handles custom configuration" do
22
- let(:new_client) { Validic::Client.new(api_url: 'https://api.validic.net', api_version: 'v2')}#, access_token: 'MYTOKEN')}
21
+ let(:new_client) { Validic::Client
22
+ .new(api_url: 'https://api.validic.net',
23
+ api_version: 'v2',
24
+ organization_id: '1234567') }
23
25
 
24
26
  it "::Client API_URL configuration" do
25
27
  new_client.api_url.should eq 'https://api.validic.net'
26
28
  end
27
29
 
28
- # it "::Client ACCESS_TOKEN configuration" do
29
- # new_client.access_token.should eq 'MYTOKEN'
30
- # end
31
-
32
30
  it "::Client API_VERSION configuration" do
33
31
  new_client.api_version.should eq 'v2'
34
32
  end
35
33
 
34
+ it "::Client Organization ID configuration" do
35
+ new_client.organization_id.should eq '1234567'
36
+ end
36
37
  end
37
38
 
38
39
  end
data/validic.gemspec CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "validic"
8
8
  spec.version = Validic::VERSION
9
9
  spec.authors = ["Julius Francisco & Jay Balanay"]
10
- spec.email = ["julius@motivationscience.com", "jay@motivationscience.com"]
10
+ spec.email = ["julius@validic.com", "jay@validic.com"]
11
11
  spec.description = %q{API Wrapper for Validic}
12
12
  spec.summary = spec.description
13
- spec.homepage = "https://www.validic.com"
13
+ spec.homepage = "https://validic.com"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -18,20 +18,19 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'faraday', '~> 0.8'
22
- spec.add_dependency 'faraday_middleware', '~> 0.9'
21
+ spec.add_dependency 'faraday_middleware', '~> 0.9.0'
23
22
  spec.add_dependency 'hashie', '~> 2.0.3'
24
23
  spec.add_dependency 'activesupport'
25
24
  spec.add_dependency 'multi_json'
26
25
 
27
- spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "bundler"
28
27
  spec.add_development_dependency "rake"
29
28
  spec.add_development_dependency "rspec"
30
29
  spec.add_development_dependency "simplecov"
31
30
  spec.add_development_dependency "simplecov-rcov"
32
31
  spec.add_development_dependency "yard"
33
- spec.add_development_dependency "vcr"
32
+ spec.add_development_dependency "vcr", '~> 2.8.0'
34
33
  spec.add_development_dependency "shoulda"
35
- spec.add_development_dependency "webmock"
34
+ spec.add_development_dependency "webmock", '~> 1.8.0'
36
35
  spec.add_development_dependency "api_matchers"
37
36
  end
metadata CHANGED
@@ -1,52 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Julius Francisco & Jay Balanay
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-30 00:00:00.000000000 Z
11
+ date: 2014-01-25 00:00:00.000000000 Z
13
12
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: faraday
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '0.8'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '0.8'
30
13
  - !ruby/object:Gem::Dependency
31
14
  name: faraday_middleware
32
15
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
16
  requirements:
35
17
  - - ~>
36
18
  - !ruby/object:Gem::Version
37
- version: '0.9'
19
+ version: 0.9.0
38
20
  type: :runtime
39
21
  prerelease: false
40
22
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
23
  requirements:
43
24
  - - ~>
44
25
  - !ruby/object:Gem::Version
45
- version: '0.9'
26
+ version: 0.9.0
46
27
  - !ruby/object:Gem::Dependency
47
28
  name: hashie
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
31
  - - ~>
52
32
  - !ruby/object:Gem::Version
@@ -54,7 +34,6 @@ dependencies:
54
34
  type: :runtime
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
38
  - - ~>
60
39
  - !ruby/object:Gem::Version
@@ -62,199 +41,175 @@ dependencies:
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: activesupport
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - '>='
68
46
  - !ruby/object:Gem::Version
69
47
  version: '0'
70
48
  type: :runtime
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - '>='
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  - !ruby/object:Gem::Dependency
79
56
  name: multi_json
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ! '>='
59
+ - - '>='
84
60
  - !ruby/object:Gem::Version
85
61
  version: '0'
86
62
  type: :runtime
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ! '>='
66
+ - - '>='
92
67
  - !ruby/object:Gem::Version
93
68
  version: '0'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: bundler
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
- - - ~>
73
+ - - '>='
100
74
  - !ruby/object:Gem::Version
101
- version: '1.3'
75
+ version: '0'
102
76
  type: :development
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
- - - ~>
80
+ - - '>='
108
81
  - !ruby/object:Gem::Version
109
- version: '1.3'
82
+ version: '0'
110
83
  - !ruby/object:Gem::Dependency
111
84
  name: rake
112
85
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
86
  requirements:
115
- - - ! '>='
87
+ - - '>='
116
88
  - !ruby/object:Gem::Version
117
89
  version: '0'
118
90
  type: :development
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
93
  requirements:
123
- - - ! '>='
94
+ - - '>='
124
95
  - !ruby/object:Gem::Version
125
96
  version: '0'
126
97
  - !ruby/object:Gem::Dependency
127
98
  name: rspec
128
99
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
100
  requirements:
131
- - - ! '>='
101
+ - - '>='
132
102
  - !ruby/object:Gem::Version
133
103
  version: '0'
134
104
  type: :development
135
105
  prerelease: false
136
106
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
107
  requirements:
139
- - - ! '>='
108
+ - - '>='
140
109
  - !ruby/object:Gem::Version
141
110
  version: '0'
142
111
  - !ruby/object:Gem::Dependency
143
112
  name: simplecov
144
113
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
114
  requirements:
147
- - - ! '>='
115
+ - - '>='
148
116
  - !ruby/object:Gem::Version
149
117
  version: '0'
150
118
  type: :development
151
119
  prerelease: false
152
120
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
121
  requirements:
155
- - - ! '>='
122
+ - - '>='
156
123
  - !ruby/object:Gem::Version
157
124
  version: '0'
158
125
  - !ruby/object:Gem::Dependency
159
126
  name: simplecov-rcov
160
127
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
128
  requirements:
163
- - - ! '>='
129
+ - - '>='
164
130
  - !ruby/object:Gem::Version
165
131
  version: '0'
166
132
  type: :development
167
133
  prerelease: false
168
134
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
135
  requirements:
171
- - - ! '>='
136
+ - - '>='
172
137
  - !ruby/object:Gem::Version
173
138
  version: '0'
174
139
  - !ruby/object:Gem::Dependency
175
140
  name: yard
176
141
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
142
  requirements:
179
- - - ! '>='
143
+ - - '>='
180
144
  - !ruby/object:Gem::Version
181
145
  version: '0'
182
146
  type: :development
183
147
  prerelease: false
184
148
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
149
  requirements:
187
- - - ! '>='
150
+ - - '>='
188
151
  - !ruby/object:Gem::Version
189
152
  version: '0'
190
153
  - !ruby/object:Gem::Dependency
191
154
  name: vcr
192
155
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
156
  requirements:
195
- - - ! '>='
157
+ - - ~>
196
158
  - !ruby/object:Gem::Version
197
- version: '0'
159
+ version: 2.8.0
198
160
  type: :development
199
161
  prerelease: false
200
162
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
163
  requirements:
203
- - - ! '>='
164
+ - - ~>
204
165
  - !ruby/object:Gem::Version
205
- version: '0'
166
+ version: 2.8.0
206
167
  - !ruby/object:Gem::Dependency
207
168
  name: shoulda
208
169
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
170
  requirements:
211
- - - ! '>='
171
+ - - '>='
212
172
  - !ruby/object:Gem::Version
213
173
  version: '0'
214
174
  type: :development
215
175
  prerelease: false
216
176
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
177
  requirements:
219
- - - ! '>='
178
+ - - '>='
220
179
  - !ruby/object:Gem::Version
221
180
  version: '0'
222
181
  - !ruby/object:Gem::Dependency
223
182
  name: webmock
224
183
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
184
  requirements:
227
- - - ! '>='
185
+ - - ~>
228
186
  - !ruby/object:Gem::Version
229
- version: '0'
187
+ version: 1.8.0
230
188
  type: :development
231
189
  prerelease: false
232
190
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
191
  requirements:
235
- - - ! '>='
192
+ - - ~>
236
193
  - !ruby/object:Gem::Version
237
- version: '0'
194
+ version: 1.8.0
238
195
  - !ruby/object:Gem::Dependency
239
196
  name: api_matchers
240
197
  requirement: !ruby/object:Gem::Requirement
241
- none: false
242
198
  requirements:
243
- - - ! '>='
199
+ - - '>='
244
200
  - !ruby/object:Gem::Version
245
201
  version: '0'
246
202
  type: :development
247
203
  prerelease: false
248
204
  version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
205
  requirements:
251
- - - ! '>='
206
+ - - '>='
252
207
  - !ruby/object:Gem::Version
253
208
  version: '0'
254
209
  description: API Wrapper for Validic
255
210
  email:
256
- - julius@motivationscience.com
257
- - jay@motivationscience.com
211
+ - julius@validic.com
212
+ - jay@validic.com
258
213
  executables: []
259
214
  extensions: []
260
215
  extra_rdoc_files: []
@@ -267,11 +222,10 @@ files:
267
222
  - README.md
268
223
  - Rakefile
269
224
  - lib/validic.rb
270
- - lib/validic/activity.rb
225
+ - lib/validic/biometric.rb
271
226
  - lib/validic/client.rb
272
227
  - lib/validic/diabetes.rb
273
228
  - lib/validic/fitness.rb
274
- - lib/validic/general_measurement.rb
275
229
  - lib/validic/nutrition.rb
276
230
  - lib/validic/organization.rb
277
231
  - lib/validic/profile.rb
@@ -283,13 +237,11 @@ files:
283
237
  - lib/validic/user.rb
284
238
  - lib/validic/version.rb
285
239
  - lib/validic/weight.rb
286
- - spec/.DS_Store
287
240
  - spec/spec_helper.rb
288
- - spec/validic/activity_spec.rb
241
+ - spec/validic/biometrics_spec.rb
289
242
  - spec/validic/client_spec.rb
290
243
  - spec/validic/diabetes_spec.rb
291
244
  - spec/validic/fitness_spec.rb
292
- - spec/validic/general_measurement_spec.rb
293
245
  - spec/validic/nutrition_spec.rb
294
246
  - spec/validic/organization_spec.rb
295
247
  - spec/validic/profile_spec.rb
@@ -301,45 +253,36 @@ files:
301
253
  - spec/validic/weight_spec.rb
302
254
  - spec/validic_spec.rb
303
255
  - validic.gemspec
304
- homepage: https://www.validic.com
256
+ homepage: https://validic.com
305
257
  licenses:
306
258
  - MIT
259
+ metadata: {}
307
260
  post_install_message:
308
261
  rdoc_options: []
309
262
  require_paths:
310
263
  - lib
311
264
  required_ruby_version: !ruby/object:Gem::Requirement
312
- none: false
313
265
  requirements:
314
- - - ! '>='
266
+ - - '>='
315
267
  - !ruby/object:Gem::Version
316
268
  version: '0'
317
- segments:
318
- - 0
319
- hash: -1698205356989235883
320
269
  required_rubygems_version: !ruby/object:Gem::Requirement
321
- none: false
322
270
  requirements:
323
- - - ! '>='
271
+ - - '>='
324
272
  - !ruby/object:Gem::Version
325
273
  version: '0'
326
- segments:
327
- - 0
328
- hash: -1698205356989235883
329
274
  requirements: []
330
275
  rubyforge_project:
331
- rubygems_version: 1.8.25
276
+ rubygems_version: 2.2.1
332
277
  signing_key:
333
- specification_version: 3
278
+ specification_version: 4
334
279
  summary: API Wrapper for Validic
335
280
  test_files:
336
- - spec/.DS_Store
337
281
  - spec/spec_helper.rb
338
- - spec/validic/activity_spec.rb
282
+ - spec/validic/biometrics_spec.rb
339
283
  - spec/validic/client_spec.rb
340
284
  - spec/validic/diabetes_spec.rb
341
285
  - spec/validic/fitness_spec.rb
342
- - spec/validic/general_measurement_spec.rb
343
286
  - spec/validic/nutrition_spec.rb
344
287
  - spec/validic/organization_spec.rb
345
288
  - spec/validic/profile_spec.rb