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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ee7761c9d61e44c73482ef227fc9123600d575a
4
- data.tar.gz: 8886340b86465108a75cd34f4e07c6e15a85a73a
3
+ metadata.gz: 6c5c76f355168d9dd344688216b1b5246d52c655
4
+ data.tar.gz: 0f060bfaab7d588bd97db596620df832c67d0781
5
5
  SHA512:
6
- metadata.gz: 36ccbf2659c148f47c43d0bb7f3169c48da70f34138769b7835fae2592f55ca1f27a8e107eb67e14696b4ffde8e01a5da436b9f9b999cbfc5d462fb24447ae26
7
- data.tar.gz: 9a20b8dc4bc7b03192d5ddf16aa27da1dc8b66b4714ea079b5bebd0b51b4cb33ac4c65ac113fa43c0104855b3e1ec46a13ac4941493abcc08c2b689b09aedefa
6
+ metadata.gz: 929650d689a73141c0b447127dc9946a8dd3f330c342dbf86ad865dc4dcd4d424530240bc57c506a43dd5534bb383409f865ba16356c138e688bb579859e7478
7
+ data.tar.gz: f8f81dc4eac0ee9f6d33e92e747fc7847342095927cfcd13d831a5ee06fc3ec0519dd14bf6dcfa85a26446065f01eccf6481a333aebbae3b70791fa1bc6901d8
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.3.0 (2017-07-26)
2
+
3
+ * Use uri and net/http from stdlib instead of rest-client for the reporter (jeremyevans)
4
+
1
5
  === 0.2.0 (2016-05-24)
2
6
 
3
7
  * Use jsonb instead of hstore/json for env/params/session (jeremyevans)
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2016 Jeremy Evans
1
+ Copyright (c) 2013-2017 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
@@ -200,7 +200,8 @@ similar to this to report errors to KaeruEra:
200
200
 
201
201
  === KaeruEra::Reporter / KaeruEra::AsyncReporter
202
202
 
203
- * rest-client
203
+ * uri
204
+ * net/http
204
205
  * json
205
206
 
206
207
  == Heroku Setup
@@ -1,4 +1,5 @@
1
- require 'rest-client'
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
- res = RestClient.post @url, {:data=>h, :id=>@application_id, :token=>@token}.to_json, :content_type => :json, :accept => :json
54
- JSON.parse(res)['error_id']
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.2.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: 2016-05-24 00:00:00.000000000 Z
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.5.1
57
+ rubygems_version: 2.6.11
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: Reporter Libraries for KaeruEra