amee 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/amee/connection.rb +2 -1
- data/lib/amee/exceptions.rb +12 -0
- data/lib/amee/item_definition.rb +1 -1
- data/lib/amee/version.rb +2 -2
- metadata +4 -4
data/lib/amee/connection.rb
CHANGED
@@ -215,8 +215,9 @@ module AMEE
|
|
215
215
|
@http.start
|
216
216
|
# Do request
|
217
217
|
begin
|
218
|
-
|
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
|
data/lib/amee/exceptions.rb
CHANGED
@@ -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
|
data/lib/amee/item_definition.rb
CHANGED
data/lib/amee/version.rb
CHANGED
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:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 2.2.
|
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-
|
18
|
+
date: 2010-08-24 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|