kaeruera 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/MIT-LICENSE +1 -1
- data/README.rdoc +2 -1
- data/lib/kaeruera/reporter.rb +14 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c5c76f355168d9dd344688216b1b5246d52c655
|
4
|
+
data.tar.gz: 0f060bfaab7d588bd97db596620df832c67d0781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929650d689a73141c0b447127dc9946a8dd3f330c342dbf86ad865dc4dcd4d424530240bc57c506a43dd5534bb383409f865ba16356c138e688bb579859e7478
|
7
|
+
data.tar.gz: f8f81dc4eac0ee9f6d33e92e747fc7847342095927cfcd13d831a5ee06fc3ec0519dd14bf6dcfa85a26446065f01eccf6481a333aebbae3b70791fa1bc6901d8
|
data/CHANGELOG
CHANGED
data/MIT-LICENSE
CHANGED
data/README.rdoc
CHANGED
data/lib/kaeruera/reporter.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
require '
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
2
3
|
require 'json'
|
3
4
|
|
4
5
|
module KaeruEra
|
@@ -50,8 +51,18 @@ module KaeruEra
|
|
50
51
|
h[:env] = v
|
51
52
|
end
|
52
53
|
|
53
|
-
|
54
|
-
|
54
|
+
url = URI.parse(@url)
|
55
|
+
req = Net::HTTP::Post.new(url.path)
|
56
|
+
req.body = {:data=>h, :id=>@application_id, :token=>@token}.to_json
|
57
|
+
req['Content-Type'] = 'application/json'
|
58
|
+
req['Accept'] = 'application/json'
|
59
|
+
req.basic_auth(url.user, url.password) if url.user
|
60
|
+
http = Net::HTTP.new(url.host, url.port)
|
61
|
+
http.use_ssl = true if url.scheme == 'https'
|
62
|
+
res = http.start do
|
63
|
+
http.request(req)
|
64
|
+
end
|
65
|
+
JSON.parse(res.body)['error_id']
|
55
66
|
rescue => e
|
56
67
|
e
|
57
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaeruera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
KaeruEra is a simple error tracking application. This
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
56
|
rubyforge_project:
|
57
|
-
rubygems_version: 2.
|
57
|
+
rubygems_version: 2.6.11
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: Reporter Libraries for KaeruEra
|