amee 2.0.28 → 2.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -143,7 +143,7 @@ module AMEE
143
143
  response = @http.request(post)
144
144
  @auth_token = response['authToken']
145
145
  unless authenticated?
146
- raise AMEE::AuthFailed.new("Authentication failed. Please check your username and password.")
146
+ raise AMEE::AuthFailed.new("Authentication failed. Please check your username and password. (tried #{@username},#{@password})")
147
147
  end
148
148
  # Detect API version
149
149
  if response.body.is_json?
@@ -61,7 +61,7 @@ module AMEE
61
61
  choice_data[:value] = choice['value']
62
62
  data[:choices] << choice_data
63
63
  end
64
- data[:start_date] = DateTime.parse(doc['dataItem']['startDate'])
64
+ data[:start_date] = DateTime.parse(doc['dataItem']['startDate']) rescue nil
65
65
  # Create object
66
66
  Item.new(data)
67
67
  rescue
@@ -106,7 +106,7 @@ module AMEE
106
106
  choice_data[:value] = (choice.elements['Value']).text || ""
107
107
  data[:choices] << choice_data
108
108
  end
109
- data[:start_date] = DateTime.parse(REXML::XPath.first(doc, "/Resources/DataItemResource/DataItem/StartDate").text)
109
+ data[:start_date] = DateTime.parse(REXML::XPath.first(doc, "/Resources/DataItemResource/DataItem/StartDate").text) rescue nil
110
110
  # Create object
111
111
  Item.new(data)
112
112
  rescue
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.28
4
+ version: 2.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 +01:00
12
+ date: 2009-11-24 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency