honeybadger-api 1.0.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/honeybadger-api/client.rb +4 -3
- data/lib/honeybadger-api/version.rb +1 -1
- data/spec/comment_spec.rb +8 -8
- data/spec/deploy_spec.rb +7 -7
- data/spec/environment_spec.rb +8 -6
- data/spec/fault_spec.rb +15 -15
- data/spec/notice_spec.rb +6 -6
- data/spec/paginator_spec.rb +8 -12
- data/spec/project_spec.rb +22 -22
- data/spec/spec_helper.rb +1 -1
- data/spec/team_invitation_spec.rb +8 -8
- data/spec/team_member_spec.rb +12 -12
- data/spec/team_spec.rb +5 -5
- data/spec/user_spec.rb +2 -2
- data/spec/version_spec.rb +2 -2
- metadata +17 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 02a19b5eefd04af19947190bbb210c2f0957ec6a
|
4
|
+
data.tar.gz: fca869c763fb3a255c747f78f2a9898bdd25be70
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d7e97259bf2f3dc12f90619e9b675f7434124b2c8bee6ed691cb2f34b75d48b9bd603ec59123a126aac77c0906c9e54cfdd270de95ff2e3b09ab3a203194316c
|
7
|
+
data.tar.gz: 959328f58d65f0e570d18aa1dd3816499ae89ee9bd13f995ef959300c98074645fad66ed83f2aa3345e22cd836710ed119b7bb1c8e03eb0874e4b553d70586a1
|
data/spec/comment_spec.rb
CHANGED
@@ -8,35 +8,35 @@ describe Honeybadger::Api::Comment do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have a identifier" do
|
11
|
-
@comment.id.
|
11
|
+
expect(@comment.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a fault identifier" do
|
15
|
-
@comment.fault_id.
|
15
|
+
expect(@comment.fault_id).to eql(2)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an event" do
|
19
|
-
@comment.event.
|
19
|
+
expect(@comment.event).to eql("an event")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have a source" do
|
23
|
-
@comment.source.
|
23
|
+
expect(@comment.source).to eql("app")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a notice count" do
|
27
|
-
@comment.notices_count.
|
27
|
+
expect(@comment.notices_count).to eql(5)
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should have an author" do
|
31
|
-
@comment.author.
|
31
|
+
expect(@comment.author).to eql("John")
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should have a body" do
|
35
|
-
@comment.body.
|
35
|
+
expect(@comment.body).to eql("This is a comment")
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should have the date the comment was created" do
|
39
|
-
@comment.created_at.
|
39
|
+
expect(@comment.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
data/spec/deploy_spec.rb
CHANGED
@@ -8,31 +8,31 @@ describe Honeybadger::Api::Deploy do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have a identifier" do
|
11
|
-
@deploy.id.
|
11
|
+
expect(@deploy.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a project identifier" do
|
15
|
-
@deploy.project_id.
|
15
|
+
expect(@deploy.project_id).to eql(2)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have a repository" do
|
19
|
-
@deploy.repository.
|
19
|
+
expect(@deploy.repository).to eql("honeybadger-api")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have a revision" do
|
23
|
-
@deploy.revision.
|
23
|
+
expect(@deploy.revision).to eql("11111")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a environment" do
|
27
|
-
@deploy.environment.
|
27
|
+
expect(@deploy.environment).to eql("production")
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should have a local_username" do
|
31
|
-
@deploy.local_username.
|
31
|
+
expect(@deploy.local_username).to eql("deploy")
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should have the date the deploy was made" do
|
35
|
-
@deploy.created_at.
|
35
|
+
expect(@deploy.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
data/spec/environment_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
1
3
|
describe Honeybadger::Api::Environment do
|
2
4
|
describe "initializing a new environment" do
|
3
5
|
before :all do
|
@@ -5,27 +7,27 @@ describe Honeybadger::Api::Environment do
|
|
5
7
|
end
|
6
8
|
|
7
9
|
it "should have an identifier" do
|
8
|
-
@environment.id.
|
10
|
+
expect(@environment.id).to eql(1)
|
9
11
|
end
|
10
12
|
|
11
13
|
it "should have a name" do
|
12
|
-
@environment.name.
|
14
|
+
expect(@environment.name).to eql("production")
|
13
15
|
end
|
14
16
|
|
15
17
|
it "should have a project identifier" do
|
16
|
-
@environment.project_id.
|
18
|
+
expect(@environment.project_id).to eql(2)
|
17
19
|
end
|
18
20
|
|
19
21
|
it "should raise notifications" do
|
20
|
-
@environment.notifications
|
22
|
+
expect(@environment.notifications?).to be_truthy
|
21
23
|
end
|
22
24
|
|
23
25
|
it "should have the date the environment was updated" do
|
24
|
-
@environment.updated_at.
|
26
|
+
expect(@environment.updated_at).to eql(DateTime.parse("2012-01-01T00:02:00Z"))
|
25
27
|
end
|
26
28
|
|
27
29
|
it "should have the date the environment was created" do
|
28
|
-
@environment.created_at.
|
30
|
+
expect(@environment.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
data/spec/fault_spec.rb
CHANGED
@@ -8,47 +8,47 @@ describe Honeybadger::Api::Fault do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have a identifier" do
|
11
|
-
@fault.id.
|
11
|
+
expect(@fault.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a project identifier" do
|
15
|
-
@fault.project_id.
|
15
|
+
expect(@fault.project_id).to eql(2)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an exception klass" do
|
19
|
-
@fault.klass.
|
19
|
+
expect(@fault.klass).to eql("RuntimeError")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have an action where the fault occurs" do
|
23
|
-
@fault.action.
|
23
|
+
expect(@fault.action).to eql("runtime_error")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a component where the fault occurs" do
|
27
|
-
@fault.component.
|
27
|
+
expect(@fault.component).to eql("pages")
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should have a message" do
|
31
|
-
@fault.message.
|
31
|
+
expect(@fault.message).to eql("This is a runtime error")
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should have an environment" do
|
35
|
-
@fault.environment.
|
35
|
+
expect(@fault.environment).to eql("production")
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should have a notice count" do
|
39
|
-
@fault.notices_count.
|
39
|
+
expect(@fault.notices_count).to eql(7)
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should have a comment count" do
|
43
|
-
@fault.comments_count.
|
43
|
+
expect(@fault.comments_count).to eql(0)
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should have a last notice at" do
|
47
|
-
@fault.last_notice_at.
|
47
|
+
expect(@fault.last_notice_at).to eql(DateTime.parse("2012-01-01T00:02:00Z"))
|
48
48
|
end
|
49
49
|
|
50
50
|
it "should have a created_at" do
|
51
|
-
@fault.created_at.
|
51
|
+
expect(@fault.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -58,7 +58,7 @@ describe Honeybadger::Api::Fault do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should identify the fault as ignored" do
|
61
|
-
@fault.ignored
|
61
|
+
expect(@fault.ignored?).to be_truthy
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -68,7 +68,7 @@ describe Honeybadger::Api::Fault do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should identify the fault as resolved" do
|
71
|
-
@fault.resolved
|
71
|
+
expect(@fault.resolved?).to be_truthy
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -78,11 +78,11 @@ describe Honeybadger::Api::Fault do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should identify the fault as unresolved" do
|
81
|
-
@fault.resolved
|
81
|
+
expect(@fault.resolved?).to be_falsey
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should identify the fault as not ignored" do
|
85
|
-
@fault.ignored
|
85
|
+
expect(@fault.ignored?).to be_falsey
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
data/spec/notice_spec.rb
CHANGED
@@ -8,27 +8,27 @@ describe Honeybadger::Api::Notice do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have a identifier" do
|
11
|
-
@notice.id.
|
11
|
+
expect(@notice.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a fault identifier" do
|
15
|
-
@notice.fault_id.
|
15
|
+
expect(@notice.fault_id).to eql(2)
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have a message" do
|
19
|
-
@notice.message.
|
19
|
+
expect(@notice.message).to eql("This is a runtime error")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have an environment" do
|
23
|
-
@notice.environment.
|
23
|
+
expect(@notice.environment).to eql("production")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a request" do
|
27
|
-
@notice.request.empty
|
27
|
+
expect(@notice.request.empty?).to be_falsey
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should have a created_at" do
|
31
|
-
@notice.created_at.
|
31
|
+
expect(@notice.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
data/spec/paginator_spec.rb
CHANGED
@@ -2,10 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Honeybadger::Api::Paginator do
|
4
4
|
|
5
|
-
describe "initializing a new paginator" do
|
6
|
-
|
7
|
-
end
|
8
|
-
|
9
5
|
describe "next? and previous?" do
|
10
6
|
before :all do
|
11
7
|
@client_stub = stub('client')
|
@@ -26,11 +22,11 @@ describe Honeybadger::Api::Paginator do
|
|
26
22
|
end
|
27
23
|
|
28
24
|
it "should not have a next page" do
|
29
|
-
@paginator.next
|
25
|
+
expect(@paginator.next?).to be_falsey
|
30
26
|
end
|
31
27
|
|
32
28
|
it "should not have a previous page" do
|
33
|
-
@paginator.previous
|
29
|
+
expect(@paginator.previous?).to be_falsey
|
34
30
|
end
|
35
31
|
end
|
36
32
|
|
@@ -49,11 +45,11 @@ describe Honeybadger::Api::Paginator do
|
|
49
45
|
end
|
50
46
|
|
51
47
|
it "should have a next page" do
|
52
|
-
@paginator.next
|
48
|
+
expect(@paginator.next?).to be_truthy
|
53
49
|
end
|
54
50
|
|
55
51
|
it "should not have a previous page" do
|
56
|
-
@paginator.previous
|
52
|
+
expect(@paginator.previous?).to be_falsey
|
57
53
|
end
|
58
54
|
end
|
59
55
|
|
@@ -72,11 +68,11 @@ describe Honeybadger::Api::Paginator do
|
|
72
68
|
end
|
73
69
|
|
74
70
|
it "should not have a next page" do
|
75
|
-
@paginator.next
|
71
|
+
expect(@paginator.next?).to be_falsey
|
76
72
|
end
|
77
73
|
|
78
74
|
it "should have a previous page" do
|
79
|
-
@paginator.previous
|
75
|
+
expect(@paginator.previous?).to be_truthy
|
80
76
|
end
|
81
77
|
end
|
82
78
|
|
@@ -95,11 +91,11 @@ describe Honeybadger::Api::Paginator do
|
|
95
91
|
end
|
96
92
|
|
97
93
|
it "should have a next page" do
|
98
|
-
@paginator.next
|
94
|
+
expect(@paginator.next?).to be_truthy
|
99
95
|
end
|
100
96
|
|
101
97
|
it "should have a previous page" do
|
102
|
-
@paginator.previous
|
98
|
+
expect(@paginator.previous?).to be_truthy
|
103
99
|
end
|
104
100
|
end
|
105
101
|
end
|
data/spec/project_spec.rb
CHANGED
@@ -8,47 +8,47 @@ describe Honeybadger::Api::Project do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have an identifier" do
|
11
|
-
@project.id.
|
11
|
+
expect(@project.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a name" do
|
15
|
-
@project.name.
|
15
|
+
expect(@project.name).to eql("Rails")
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an owner" do
|
19
|
-
@project.owner.name.
|
20
|
-
@project.owner.email.
|
19
|
+
expect(@project.owner.name).to eql("Tom Smith")
|
20
|
+
expect(@project.owner.email).to eql("tom.smith@example.com")
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should have users" do
|
24
|
-
@project.users.length.
|
25
|
-
@project.users.first.name.
|
26
|
-
@project.users.first.email.
|
24
|
+
expect(@project.users.length).to eql(1)
|
25
|
+
expect(@project.users.first.name).to eql("user")
|
26
|
+
expect(@project.users.first.email).to eql("user@example.com")
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should have a token" do
|
30
|
-
@project.token.
|
30
|
+
expect(@project.token).to eql("098sflj2")
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should have a list of environments" do
|
34
|
-
@project.environments.length.
|
35
|
-
@project.environments.first.
|
34
|
+
expect(@project.environments.length).to eql(1)
|
35
|
+
expect(@project.environments.first).to be_kind_of(Honeybadger::Api::Environment)
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should have a fault count" do
|
39
|
-
@project.fault_count.
|
39
|
+
expect(@project.fault_count).to eql(14)
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should have an unresolved fault count" do
|
43
|
-
@project.unresolved_fault_count.
|
43
|
+
expect(@project.unresolved_fault_count).to eql(1)
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should have a last notice at" do
|
47
|
-
@project.last_notice_at.
|
47
|
+
expect(@project.last_notice_at).to eql(DateTime.parse("2012-01-01T00:02:00Z"))
|
48
48
|
end
|
49
49
|
|
50
50
|
it "should have a created_at" do
|
51
|
-
@project.created_at.
|
51
|
+
expect(@project.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -58,11 +58,11 @@ describe Honeybadger::Api::Project do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should identify the project as active" do
|
61
|
-
@project.active
|
61
|
+
expect(@project.active?).to be_truthy
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should not identify the project as inactive" do
|
65
|
-
@project.inactive
|
65
|
+
expect(@project.inactive?).to be_falsey
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -72,11 +72,11 @@ describe Honeybadger::Api::Project do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should identify the project as inactive" do
|
75
|
-
@project.inactive
|
75
|
+
expect(@project.inactive?).to be_truthy
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should not identify the project as active" do
|
79
|
-
@project.active
|
79
|
+
expect(@project.active?).to be_falsey
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -86,11 +86,11 @@ describe Honeybadger::Api::Project do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
it "should identify as publicly linked" do
|
89
|
-
@project.public_links
|
89
|
+
expect(@project.public_links?).to be_truthy
|
90
90
|
end
|
91
91
|
|
92
92
|
it "should not identify as privately linked" do
|
93
|
-
@project.private_links
|
93
|
+
expect(@project.private_links?).to be_falsey
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -100,11 +100,11 @@ describe Honeybadger::Api::Project do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
it "should identify as privately linked" do
|
103
|
-
@project.private_links
|
103
|
+
expect(@project.private_links?).to be_truthy
|
104
104
|
end
|
105
105
|
|
106
106
|
it "should not identify as publicly linked" do
|
107
|
-
@project.public_links
|
107
|
+
expect(@project.public_links?).to be_falsey
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
data/spec/spec_helper.rb
CHANGED
@@ -8,27 +8,27 @@ describe Honeybadger::Api::TeamInvitation do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have a identifier" do
|
11
|
-
@team_invitation.id.
|
11
|
+
expect(@team_invitation.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a token" do
|
15
|
-
@team_invitation.token.
|
15
|
+
expect(@team_invitation.token).to eql("e62394d2")
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an email" do
|
19
|
-
@team_invitation.email.
|
19
|
+
expect(@team_invitation.email).to eql("invitation@example.com")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have an accepted_at date" do
|
23
|
-
@team_invitation.accepted_at.
|
23
|
+
expect(@team_invitation.accepted_at).to eql(DateTime.parse("2012-01-01T00:02:00Z"))
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have a created_at date" do
|
27
|
-
@team_invitation.created_at.
|
27
|
+
expect(@team_invitation.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should have a invitation message" do
|
31
|
-
@team_invitation.message.
|
31
|
+
expect(@team_invitation.message).to eql("Come join in")
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -38,7 +38,7 @@ describe Honeybadger::Api::TeamInvitation do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should identify as an admin invitation" do
|
41
|
-
@team_invitation.admin
|
41
|
+
expect(@team_invitation.admin?).to be_truthy
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -48,7 +48,7 @@ describe Honeybadger::Api::TeamInvitation do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
it "should not identify as an admin invitation" do
|
51
|
-
@team_invitation.admin
|
51
|
+
expect(@team_invitation.admin?).to be_falsey
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
data/spec/team_member_spec.rb
CHANGED
@@ -8,23 +8,23 @@ describe Honeybadger::Api::TeamMember do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have an identifier" do
|
11
|
-
@team_member.id.
|
11
|
+
expect(@team_member.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a name" do
|
15
|
-
@team_member.name.
|
15
|
+
expect(@team_member.name).to eql("John Smith")
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an email address" do
|
19
|
-
@team_member.email.
|
19
|
+
expect(@team_member.email).to eql("john.smith@example.com")
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should have an admin flag" do
|
23
|
-
@team_member.admin.
|
23
|
+
expect(@team_member.admin).to eql(false)
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should have the date the team member was created" do
|
27
|
-
@team_member.created_at.
|
27
|
+
expect(@team_member.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -34,35 +34,35 @@ describe Honeybadger::Api::TeamMember do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it "should have an identifier" do
|
37
|
-
@team_member.id.
|
37
|
+
expect(@team_member.id).to eql(1)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should have a name" do
|
41
|
-
@team_member.name.
|
41
|
+
expect(@team_member.name).to eql("John Smith")
|
42
42
|
end
|
43
43
|
|
44
44
|
it "should have an email address" do
|
45
|
-
@team_member.email.
|
45
|
+
expect(@team_member.email).to eql("john.smith@example.com")
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should have an admin flag" do
|
49
|
-
@team_member.admin.
|
49
|
+
expect(@team_member.admin).to eql(true)
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should have the date the team member was created" do
|
53
|
-
@team_member.created_at.
|
53
|
+
expect(@team_member.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
describe "admin?" do
|
58
58
|
it "should be an admin" do
|
59
59
|
@team_member = FactoryGirl.build :admin_team_member
|
60
|
-
@team_member.admin
|
60
|
+
expect(@team_member.admin?).to be_truthy
|
61
61
|
end
|
62
62
|
|
63
63
|
it "should not be an admin" do
|
64
64
|
@team_member = FactoryGirl.build :normal_team_member
|
65
|
-
@team_member.admin
|
65
|
+
expect(@team_member.admin?).to be_falsey
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
data/spec/team_spec.rb
CHANGED
@@ -8,20 +8,20 @@ describe Honeybadger::Api::Team do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "should have an identifier" do
|
11
|
-
@team.id.
|
11
|
+
expect(@team.id).to eql(1)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should have a name" do
|
15
|
-
@team.name.
|
15
|
+
expect(@team.name).to eql("team")
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should have an owner" do
|
19
|
-
@team.owner.name.
|
20
|
-
@team.owner.email.
|
19
|
+
expect(@team.owner.name).to eql("Tom Smith")
|
20
|
+
expect(@team.owner.email).to eql("tom.smith@example.com")
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should have a created_at" do
|
24
|
-
@team.created_at.
|
24
|
+
expect(@team.created_at).to eql(DateTime.parse("2012-01-01T00:01:00Z"))
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
data/spec/user_spec.rb
CHANGED
@@ -7,11 +7,11 @@ describe Honeybadger::Api::User do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
it "should have a name" do
|
10
|
-
@user.name.
|
10
|
+
expect(@user.name).to eql("Tom Smith")
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should have an email address" do
|
14
|
-
@user.email.
|
14
|
+
expect(@user.email).to eql("tom.smith@example.com")
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/spec/version_spec.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybadger-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: '1.1'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Murray Summers
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rspec
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,49 +41,43 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: webmock
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: mocha
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: factory_girl
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: A Ruby Library for the Honeybadger Read API for easily pulling your data
|
@@ -99,7 +88,7 @@ executables: []
|
|
99
88
|
extensions: []
|
100
89
|
extra_rdoc_files: []
|
101
90
|
files:
|
102
|
-
- .gitignore
|
91
|
+
- ".gitignore"
|
103
92
|
- Gemfile
|
104
93
|
- LICENSE.txt
|
105
94
|
- README.md
|
@@ -147,27 +136,26 @@ files:
|
|
147
136
|
homepage: https://github.com/murraysum/honeybadger-api
|
148
137
|
licenses:
|
149
138
|
- MIT
|
139
|
+
metadata: {}
|
150
140
|
post_install_message:
|
151
141
|
rdoc_options: []
|
152
142
|
require_paths:
|
153
143
|
- lib
|
154
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
-
none: false
|
156
145
|
requirements:
|
157
|
-
- -
|
146
|
+
- - ">="
|
158
147
|
- !ruby/object:Gem::Version
|
159
148
|
version: '0'
|
160
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
150
|
requirements:
|
163
|
-
- -
|
151
|
+
- - ">="
|
164
152
|
- !ruby/object:Gem::Version
|
165
153
|
version: '0'
|
166
154
|
requirements: []
|
167
155
|
rubyforge_project:
|
168
|
-
rubygems_version:
|
156
|
+
rubygems_version: 2.2.5
|
169
157
|
signing_key:
|
170
|
-
specification_version:
|
158
|
+
specification_version: 4
|
171
159
|
summary: Honeybadger Read API
|
172
160
|
test_files:
|
173
161
|
- spec/comment_spec.rb
|
@@ -193,3 +181,4 @@ test_files:
|
|
193
181
|
- spec/team_spec.rb
|
194
182
|
- spec/user_spec.rb
|
195
183
|
- spec/version_spec.rb
|
184
|
+
has_rdoc:
|