croket 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/croket.rb +16 -14
- data/lib/croket/version.rb +1 -1
- 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: 0b7692e4bd8759efa523ca8ec3be7496f36a7ce3
|
4
|
+
data.tar.gz: 748a0a8131af7d1c7ef337f66bdcb31ffa063ffe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8930f92e4ec5ea6a64423bcbe41bc5869a7244d2de501d97b956c6f9c2fc2529d061de7034260c92b5e008ef447ff8e9ecd017c3f9a112304d1fb1f226dfbbb3
|
7
|
+
data.tar.gz: c49be86f6f6f70a465fa33100c0b97f3c018748aed941c956935306c915a13ca3acd58698c7cca80f04485e2236027a4a5e2c08116d025f129698f543a91d874
|
data/lib/croket.rb
CHANGED
@@ -34,20 +34,22 @@ module Croket
|
|
34
34
|
request = ::Rack::Request.new(opts)
|
35
35
|
params = request.env['action_dispatch.request.parameters']
|
36
36
|
version = "Rails/#{::Rails.version}" if defined?(::Rails)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
37
|
+
begin
|
38
|
+
r = RestClient::Request.execute url: "http://#{configuration.host}/v1/issues.json", method: :post,
|
39
|
+
payload: {
|
40
|
+
issue: {
|
41
|
+
description: "#{exception}\n#{generate_description(request, controller, params, exception)}",
|
42
|
+
category: 'crash',
|
43
|
+
package: configuration.package,
|
44
|
+
environment: configuration.environment,
|
45
|
+
version: version
|
46
|
+
}
|
47
|
+
}, headers: {'Authorization' => "Token token=#{configuration.api_key}"}, content_type: :json, accept: :json
|
48
|
+
r = JSON.parse r
|
49
|
+
l.debug "[CROKET] id: #{r['issue']['id']}, number: #{r['issue']['tracker_number']}, dup: #{r['issue']['duplication']}"
|
50
|
+
rescue RestClient::RequestFailed => e
|
51
|
+
l.error "Request to http://#{configuration.host}/v1/issues.json was failed:" + e.message
|
52
|
+
end
|
51
53
|
end
|
52
54
|
|
53
55
|
private
|
data/lib/croket/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: croket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikolay Moskvin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.5.1
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Croket for Ruby
|