limbo 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/limbo/client.rb +6 -4
- data/lib/limbo/version.rb +1 -1
- metadata +2 -2
data/lib/limbo/client.rb
CHANGED
@@ -21,7 +21,7 @@ module Limbo
|
|
21
21
|
|
22
22
|
def post
|
23
23
|
headers = { "X-LIMBO-KEY" => Limbo.key,
|
24
|
-
"content-type" => "application/json"}
|
24
|
+
"content-type" => "application/json;charset=utf-8"}
|
25
25
|
path = '/log'
|
26
26
|
request = Net::HTTP::Post.new(path, headers)
|
27
27
|
|
@@ -39,10 +39,12 @@ module Limbo
|
|
39
39
|
|
40
40
|
def body
|
41
41
|
begin
|
42
|
-
JSON.generate(@body)
|
43
|
-
rescue
|
42
|
+
JSON.generate(@body).encode("UTF-8", invalid: :replace, undef: :replace)
|
43
|
+
rescue => e
|
44
44
|
@valid_data = false
|
45
|
-
|
45
|
+
%Q|{"client-error": "error generating JSON",
|
46
|
+
"message": #{e.message.inspect},
|
47
|
+
"backtrace": "#{e.backtrace.join('\n')}"}|
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
data/lib/limbo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: limbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|