party_foul 1.5.2 → 1.5.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/README.md +4 -4
- data/lib/party_foul/exception_handler.rb +3 -3
- data/lib/party_foul/version.rb +1 -1
- data/test/party_foul/exception_handler_test.rb +11 -11
- data/test/tmp/config/initializers/party_foul.rb +0 -0
- 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: 6575194523a851257256bc44d76a5befdb1fc02c
|
|
4
|
+
data.tar.gz: 6a77266579b0acc364a62ac17d4311a0461a73eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd1da991378bda5a86c0612a51f1378a9391d40d7a519ba742aba08fe69c21d56d7c86a21e75f519051f77065df506a83ed77a422542b563fe45a30034020051
|
|
7
|
+
data.tar.gz: 58fc27acf716c994f8f9e09af0f83eaa959b7f52600c1dc166adb695e45bf04dd7a487b461bf07ec9df9780acb698bc0d75b24045d5b928a3d539345a4d8068e
|
data/README.md
CHANGED
|
@@ -17,14 +17,14 @@ GitHub](https://github.com/dockyard/party_foul/issues).
|
|
|
17
17
|
following:
|
|
18
18
|
|
|
19
19
|
1. Attempt to find a matching issue in your GitHub repo
|
|
20
|
-
2. If no matching issue is found a new issue is created with a
|
|
20
|
+
2. If no matching issue is found, a new issue is created with a
|
|
21
21
|
unique title, session information, and stack trace. The issue is
|
|
22
22
|
tagged as a `bug`. A new comment is added with relevant data on the
|
|
23
23
|
application state.
|
|
24
|
-
3. If an open issue is found the occurence count and time stamp is
|
|
24
|
+
3. If an open issue is found, the occurence count and time stamp is
|
|
25
25
|
updated. A new comment is added with relevant data on the
|
|
26
26
|
application state.
|
|
27
|
-
4. If a closed issue is found the occurence count and time stamp is
|
|
27
|
+
4. If a closed issue is found, the occurence count and time stamp is
|
|
28
28
|
updated. The issue is reopened and a `regression` tag is
|
|
29
29
|
added. A new comment is added with relevant data on the
|
|
30
30
|
application state.
|
|
@@ -190,7 +190,7 @@ end
|
|
|
190
190
|
|
|
191
191
|
## Tracking errors outside of an HTTP request
|
|
192
192
|
|
|
193
|
-
You may want to track errors outside of a
|
|
193
|
+
You may want to track errors outside of a regular HTTP stack. In that
|
|
194
194
|
case you will need to make sure of the
|
|
195
195
|
`PartyFoul::RacklessExceptionHandler`.
|
|
196
196
|
|
|
@@ -89,8 +89,8 @@ class PartyFoul::ExceptionHandler
|
|
|
89
89
|
def comment_limit_met?(body)
|
|
90
90
|
!!PartyFoul.comment_limit && PartyFoul.comment_limit <= occurrence_count(body)
|
|
91
91
|
end
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
def find_first_issue(state)
|
|
94
|
-
PartyFoul.github.
|
|
95
|
-
end
|
|
94
|
+
PartyFoul.github.search_issues(fingerprint, repo: PartyFoul.repo_path, state: state).first
|
|
95
|
+
end
|
|
96
96
|
end
|
data/lib/party_foul/version.rb
CHANGED
|
@@ -17,8 +17,8 @@ describe 'Party Foul Exception Handler' do
|
|
|
17
17
|
it 'will open a new error on GitHub' do
|
|
18
18
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:body).returns('Test Body')
|
|
19
19
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:comment).returns('Test Comment')
|
|
20
|
-
PartyFoul.github.expects(:
|
|
21
|
-
PartyFoul.github.expects(:
|
|
20
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns([])
|
|
21
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'closed').returns([])
|
|
22
22
|
PartyFoul.github.expects(:create_issue).with('test_owner/test_repo', 'Test Title', 'Test Body', labels: ['bug']).returns( {number: 1} )
|
|
23
23
|
PartyFoul.github.expects(:references).with('test_owner/test_repo', 'heads/deploy').returns( sawyer_resource({object: {sha: 'abcdefg1234567890'}}) )
|
|
24
24
|
PartyFoul.github.expects(:add_comment).with('test_owner/test_repo', 1, 'Test Comment')
|
|
@@ -37,8 +37,8 @@ describe 'Party Foul Exception Handler' do
|
|
|
37
37
|
it 'will open a new error on GitHub with the additional labels' do
|
|
38
38
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:body).returns('Test Body')
|
|
39
39
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:comment).returns('Test Comment')
|
|
40
|
-
PartyFoul.github.expects(:
|
|
41
|
-
PartyFoul.github.expects(:
|
|
40
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns([])
|
|
41
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'closed').returns([])
|
|
42
42
|
PartyFoul.github.expects(:create_issue).with('test_owner/test_repo', 'Test Title', 'Test Body', :labels => ['bug', 'custom', 'label']).returns( { number: 1 } )
|
|
43
43
|
PartyFoul.github.expects(:references).with('test_owner/test_repo', 'heads/deploy').returns( sawyer_resource({object: {sha: 'abcdefg1234567890'}}) )
|
|
44
44
|
PartyFoul.github.expects(:add_comment).with('test_owner/test_repo', 1, 'Test Comment')
|
|
@@ -59,8 +59,8 @@ describe 'Party Foul Exception Handler' do
|
|
|
59
59
|
end
|
|
60
60
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:body).returns('Test Body')
|
|
61
61
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:comment).returns('Test Comment')
|
|
62
|
-
PartyFoul.github.expects(:
|
|
63
|
-
PartyFoul.github.expects(:
|
|
62
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns([])
|
|
63
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'closed').returns([])
|
|
64
64
|
PartyFoul.github.expects(:references).with('test_owner/test_repo', 'heads/deploy').returns( sawyer_resource({object: {sha: 'abcdefg1234567890'}}) )
|
|
65
65
|
PartyFoul.github.expects(:add_comment).with('test_owner/test_repo', 1, 'Test Comment')
|
|
66
66
|
end
|
|
@@ -93,7 +93,7 @@ describe 'Party Foul Exception Handler' do
|
|
|
93
93
|
|
|
94
94
|
context 'and open' do
|
|
95
95
|
before do
|
|
96
|
-
PartyFoul.github.expects(:
|
|
96
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns(
|
|
97
97
|
[sawyer_resource({title: 'Test Title', body: 'Test Body', state: 'open', number: 1})] )
|
|
98
98
|
PartyFoul.github.expects(:update_issue).with('test_owner/test_repo', 1, 'Test Title', 'New Body', state: 'open')
|
|
99
99
|
PartyFoul.github.expects(:references).with('test_owner/test_repo', 'heads/deploy').returns(
|
|
@@ -117,8 +117,8 @@ describe 'Party Foul Exception Handler' do
|
|
|
117
117
|
|
|
118
118
|
context 'and closed' do
|
|
119
119
|
it 'will update the count on the body and re-open the issue' do
|
|
120
|
-
PartyFoul.github.expects(:
|
|
121
|
-
PartyFoul.github.expects(:
|
|
120
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns([])
|
|
121
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'closed').returns(
|
|
122
122
|
[sawyer_resource({title: 'Test Title', body: 'Test Body', state: 'closed', number: 1, labels: ['staging']})] )
|
|
123
123
|
PartyFoul.github.expects(:update_issue).with('test_owner/test_repo', 1, 'Test Title', 'New Body', state: 'open', labels: ['bug', 'regression', 'staging'])
|
|
124
124
|
PartyFoul.github.expects(:add_comment).with('test_owner/test_repo', 1, 'Test Comment')
|
|
@@ -131,8 +131,8 @@ describe 'Party Foul Exception Handler' do
|
|
|
131
131
|
context 'when issue is marked as "wontfix"' do
|
|
132
132
|
it 'does nothing' do
|
|
133
133
|
PartyFoul::IssueRenderers::Rails.any_instance.stubs(:body).returns('Test Body')
|
|
134
|
-
PartyFoul.github.expects(:
|
|
135
|
-
PartyFoul.github.expects(:
|
|
134
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'open').returns([])
|
|
135
|
+
PartyFoul.github.expects(:search_issues).with('test_fingerprint', repo: 'test_owner/test_repo', state: 'closed').returns(
|
|
136
136
|
[sawyer_resource({title: 'Test Title', body: 'Test Body', state: 'closed', number: 1, labels: ['wontfix']})] )
|
|
137
137
|
PartyFoul.github.expects(:create_issue).never
|
|
138
138
|
PartyFoul.github.expects(:update_issue).never
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: party_foul
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Cardarella
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-03-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: octokit
|
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
196
196
|
version: '0'
|
|
197
197
|
requirements: []
|
|
198
198
|
rubyforge_project:
|
|
199
|
-
rubygems_version: 2.
|
|
199
|
+
rubygems_version: 2.0.3
|
|
200
200
|
signing_key:
|
|
201
201
|
specification_version: 4
|
|
202
202
|
summary: Auto-submit Rails exceptions as new issues on GitHub
|