amee 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -215,8 +215,9 @@ module AMEE
215
215
  @http.start
216
216
  # Do request
217
217
  begin
218
- Logger.log.debug("Requesting #{request.class} at #{request.path} with #{request.body} in format #{format}")
218
+ timethen=Time.now
219
219
  response = send_request(request, format)
220
+ Logger.log.debug("Requesting #{request.class} at #{request.path} with #{request.body} in format #{format}, taking #{(Time.now-timethen)*1000} miliseconds")
220
221
  end while !response_ok?(response, request)
221
222
  # Return response
222
223
  return response
@@ -4,6 +4,18 @@ module AMEE
4
4
  end
5
5
 
6
6
  class BadData < Exception
7
+ def initialize(msg = nil)
8
+ super(msg)
9
+ @msg = msg
10
+ @last_err = $!
11
+ end
12
+ def to_s
13
+ if @last_err
14
+ [@msg, @last_err.message, @last_err.backtrace.first].join "\n"
15
+ else
16
+ super
17
+ end
18
+ end
7
19
  end
8
20
 
9
21
  class AuthFailed < Exception
@@ -33,7 +33,7 @@ module AMEE
33
33
 
34
34
  def initialize(data = {})
35
35
  @name = data[:name]
36
- @drill_downs = data[:drillDown]
36
+ @drill_downs = data[:drillDown] || []
37
37
  super
38
38
  end
39
39
 
data/lib/amee/version.rb CHANGED
@@ -2,8 +2,8 @@ module AMEE
2
2
 
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
- MINOR = 0
6
- TINY = 27
5
+ MINOR = 2
6
+ TINY = 1
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
9
9
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amee
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 0
10
- version: 2.2.0
9
+ - 1
10
+ version: 2.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Smith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-21 00:00:00 +01:00
18
+ date: 2010-08-24 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency