medpass_resource_api 0.1.6 → 0.1.9

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 (2) hide show
  1. data/lib/medpass_resource_api.rb +7 -2
  2. metadata +5 -18
@@ -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).first rescue 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
- - 6
9
- version: 0.1.6
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-04-16 00:00:00 +02:00
17
+ date: 2010-09-02 00:00:00 +02:00
18
18
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
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: []