medpass_resource_api 0.1.6 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/medpass_resource_api.rb +7 -2
- metadata +5 -18
data/lib/medpass_resource_api.rb
CHANGED
@@ -9,6 +9,7 @@ module MedpassResourceApi
|
|
9
9
|
class Configuration
|
10
10
|
attr_accessor :api_key
|
11
11
|
attr_accessor :medpass_url
|
12
|
+
attr_accessor :trust_root
|
12
13
|
end
|
13
14
|
|
14
15
|
def self.configure(&block)
|
@@ -72,7 +73,7 @@ module MedpassResourceApi
|
|
72
73
|
def self.get_user_profile(login_or_openid_url, timestamp = nil)
|
73
74
|
login = get_login(login_or_openid_url)
|
74
75
|
res = begin
|
75
|
-
MedpassUser.find(login, :params =>{:timestamp => timestamp, :full_profile => true, :api_key => @@configuration.api_key})
|
76
|
+
MedpassUser.find(login, :params =>{:timestamp => timestamp, :full_profile => true, :api_key => @@configuration.api_key, :trust_root => @@configuration.trust_root})
|
76
77
|
rescue ArgumentError
|
77
78
|
nil
|
78
79
|
end
|
@@ -177,7 +178,11 @@ module MedpassResourceApi
|
|
177
178
|
end
|
178
179
|
|
179
180
|
def first_error_on(field)
|
180
|
-
errors_on(field).
|
181
|
+
if errors_on(field).is_a?(Array)
|
182
|
+
errors_on(field).first
|
183
|
+
else
|
184
|
+
errors_on(field)
|
185
|
+
end
|
181
186
|
end
|
182
187
|
|
183
188
|
def errors
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 9
|
9
|
+
version: 0.1.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Wojciech Pasternak - voytee
|
@@ -14,23 +14,10 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-09-02 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
|
-
dependencies:
|
20
|
-
|
21
|
-
name: activeresource
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 2
|
29
|
-
- 0
|
30
|
-
- 2
|
31
|
-
version: 2.0.2
|
32
|
-
type: :runtime
|
33
|
-
version_requirements: *id001
|
19
|
+
dependencies: []
|
20
|
+
|
34
21
|
description: For Activeweb company purpose only
|
35
22
|
email: wpasternak@gmail.com
|
36
23
|
executables: []
|