octokit 1.18.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/.document +1 -1
  2. data/.rspec +1 -0
  3. data/CHANGELOG.md +25 -0
  4. data/{LICENSE → LICENSE.md} +0 -0
  5. data/README.md +25 -8
  6. data/lib/faraday/response/raise_octokit_error.rb +4 -1
  7. data/lib/octokit/client.rb +6 -0
  8. data/lib/octokit/client/authorizations.rb +20 -7
  9. data/lib/octokit/client/commits.rb +120 -13
  10. data/lib/octokit/client/contents.rb +3 -4
  11. data/lib/octokit/client/downloads.rb +4 -3
  12. data/lib/octokit/client/emojis.rb +1 -1
  13. data/lib/octokit/client/events.rb +4 -4
  14. data/lib/octokit/client/gists.rb +33 -31
  15. data/lib/octokit/client/issues.rb +15 -15
  16. data/lib/octokit/client/labels.rb +13 -13
  17. data/lib/octokit/client/markdown.rb +2 -1
  18. data/lib/octokit/client/milestones.rb +6 -6
  19. data/lib/octokit/client/notifications.rb +222 -0
  20. data/lib/octokit/client/objects.rb +4 -4
  21. data/lib/octokit/client/organizations.rb +65 -20
  22. data/lib/octokit/client/pub_sub_hubbub.rb +2 -2
  23. data/lib/octokit/client/pulls.rb +91 -3
  24. data/lib/octokit/client/rate_limit.rb +20 -0
  25. data/lib/octokit/client/refs.rb +4 -4
  26. data/lib/octokit/client/repositories.rb +106 -37
  27. data/lib/octokit/client/say.rb +14 -0
  28. data/lib/octokit/client/statuses.rb +2 -2
  29. data/lib/octokit/client/users.rb +92 -24
  30. data/lib/octokit/connection.rb +21 -21
  31. data/lib/octokit/request.rb +47 -36
  32. data/lib/octokit/version.rb +1 -1
  33. data/octokit.gemspec +25 -25
  34. data/spec/fixtures/{v3/authorization.json → authorization.json} +0 -0
  35. data/spec/fixtures/{v3/authorizations.json → authorizations.json} +0 -0
  36. data/spec/fixtures/{v3/blob.json → blob.json} +0 -0
  37. data/spec/fixtures/{v3/blob_create.json → blob_create.json} +0 -0
  38. data/spec/fixtures/{v3/branches.json → branches.json} +0 -0
  39. data/spec/fixtures/{v3/collaborators.json → collaborators.json} +0 -0
  40. data/spec/fixtures/{v3/comment.json → comment.json} +0 -0
  41. data/spec/fixtures/{v3/comments.json → comments.json} +0 -0
  42. data/spec/fixtures/{v3/commit.json → commit.json} +0 -0
  43. data/spec/fixtures/{v3/commit_comment.json → commit_comment.json} +0 -0
  44. data/spec/fixtures/{v3/commit_comment_create.json → commit_comment_create.json} +0 -0
  45. data/spec/fixtures/{v3/commit_comment_update.json → commit_comment_update.json} +0 -0
  46. data/spec/fixtures/{v3/commit_comments.json → commit_comments.json} +0 -0
  47. data/spec/fixtures/{v3/commit_create.json → commit_create.json} +0 -0
  48. data/spec/fixtures/{v3/commits.json → commits.json} +0 -0
  49. data/spec/fixtures/{v3/compare.json → compare.json} +0 -0
  50. data/spec/fixtures/{v3/contents.json → contents.json} +0 -0
  51. data/spec/fixtures/{v3/contributors.json → contributors.json} +0 -0
  52. data/spec/fixtures/{v3/download.json → download.json} +0 -0
  53. data/spec/fixtures/{v3/download_create.json → download_create.json} +0 -0
  54. data/spec/fixtures/{v3/downloads.json → downloads.json} +0 -0
  55. data/spec/fixtures/{v3/emails.json → emails.json} +0 -0
  56. data/spec/fixtures/{v3/emojis.json → emojis.json} +0 -0
  57. data/spec/fixtures/{v3/followers.json → followers.json} +0 -0
  58. data/spec/fixtures/{v3/following.json → following.json} +0 -0
  59. data/spec/fixtures/{v3/forks.json → forks.json} +0 -0
  60. data/spec/fixtures/{v3/gist.json → gist.json} +0 -0
  61. data/spec/fixtures/{v3/gist_comment.json → gist_comment.json} +0 -0
  62. data/spec/fixtures/{v3/gist_comment_create.json → gist_comment_create.json} +0 -0
  63. data/spec/fixtures/{v3/gist_comment_update.json → gist_comment_update.json} +0 -0
  64. data/spec/fixtures/{v3/gist_comments.json → gist_comments.json} +0 -0
  65. data/spec/fixtures/{v3/gists.json → gists.json} +0 -0
  66. data/spec/fixtures/{v3/hook.json → hook.json} +0 -0
  67. data/spec/fixtures/{v3/hooks.json → hooks.json} +0 -0
  68. data/spec/fixtures/{v3/issue.json → issue.json} +0 -0
  69. data/spec/fixtures/{v3/issue_closed.json → issue_closed.json} +0 -0
  70. data/spec/fixtures/{v3/issue_event.json → issue_event.json} +0 -0
  71. data/spec/fixtures/{v3/issue_events.json → issue_events.json} +0 -0
  72. data/spec/fixtures/issue_full.json +38 -0
  73. data/spec/fixtures/{v3/issues.json → issues.json} +0 -0
  74. data/spec/fixtures/{v3/label.json → label.json} +0 -0
  75. data/spec/fixtures/{v3/labels.json → labels.json} +0 -0
  76. data/spec/fixtures/{v3/languages.json → languages.json} +0 -0
  77. data/spec/fixtures/{v3/list_commit_comments.json → list_commit_comments.json} +0 -0
  78. data/spec/fixtures/{v3/markdown_gfm → markdown_gfm} +0 -0
  79. data/spec/fixtures/{v3/merge.json → merge.json} +0 -0
  80. data/spec/fixtures/{v3/milestone.json → milestone.json} +0 -0
  81. data/spec/fixtures/{v3/milestones.json → milestones.json} +0 -0
  82. data/spec/fixtures/{v3/not_found.json → not_found.json} +0 -0
  83. data/spec/fixtures/notification_thread.json +32 -0
  84. data/spec/fixtures/notifications.json +32 -0
  85. data/spec/fixtures/{v3/organization-repositories.json → organization-repositories.json} +0 -0
  86. data/spec/fixtures/{v3/organization-repository.json → organization-repository.json} +0 -0
  87. data/spec/fixtures/{v3/organization.json → organization.json} +0 -0
  88. data/spec/fixtures/{v3/organization_members.json → organization_members.json} +0 -0
  89. data/spec/fixtures/{v3/organization_team_members.json → organization_team_members.json} +0 -0
  90. data/spec/fixtures/{v3/organization_team_repos.json → organization_team_repos.json} +0 -0
  91. data/spec/fixtures/{v3/organizations.json → organizations.json} +0 -0
  92. data/spec/fixtures/{v3/public_events.json → public_events.json} +0 -0
  93. data/spec/fixtures/{v3/public_gists.json → public_gists.json} +0 -0
  94. data/spec/fixtures/{v3/public_key.json → public_key.json} +0 -0
  95. data/spec/fixtures/public_key_update.json +5 -0
  96. data/spec/fixtures/{v3/public_keys.json → public_keys.json} +0 -0
  97. data/spec/fixtures/{v3/pull_created.json → pull_created.json} +0 -0
  98. data/spec/fixtures/{v3/pull_request.json → pull_request.json} +0 -0
  99. data/spec/fixtures/pull_request_comment.json +35 -0
  100. data/spec/fixtures/pull_request_comment_create.json +35 -0
  101. data/spec/fixtures/pull_request_comment_reply.json +35 -0
  102. data/spec/fixtures/pull_request_comment_update.json +35 -0
  103. data/spec/fixtures/{v3/pull_request_comments.json → pull_request_comments.json} +0 -0
  104. data/spec/fixtures/{v3/pull_request_commits.json → pull_request_commits.json} +0 -0
  105. data/spec/fixtures/{v3/pull_request_files.json → pull_request_files.json} +0 -0
  106. data/spec/fixtures/{v3/pull_request_merged.json → pull_request_merged.json} +0 -0
  107. data/spec/fixtures/{v3/pull_requests.json → pull_requests.json} +0 -0
  108. data/spec/fixtures/{v3/pull_update.json → pull_update.json} +0 -0
  109. data/spec/fixtures/{v3/readme.json → readme.json} +0 -0
  110. data/spec/fixtures/{v3/ref.json → ref.json} +0 -0
  111. data/spec/fixtures/{v3/ref_create.json → ref_create.json} +0 -0
  112. data/spec/fixtures/{v3/ref_update.json → ref_update.json} +0 -0
  113. data/spec/fixtures/{v3/refs.json → refs.json} +0 -0
  114. data/spec/fixtures/{v3/refs_tags.json → refs_tags.json} +0 -0
  115. data/spec/fixtures/{v3/repo_assignees.json → repo_assignees.json} +0 -0
  116. data/spec/fixtures/{v3/repo_events.json → repo_events.json} +0 -0
  117. data/spec/fixtures/{v3/repo_issues_events.json → repo_issues_events.json} +0 -0
  118. data/spec/fixtures/{v3/repositories.json → repositories.json} +0 -0
  119. data/spec/fixtures/{v3/repository.json → repository.json} +0 -0
  120. data/spec/fixtures/repository_notifications.json +32 -0
  121. data/spec/fixtures/say.txt +22 -0
  122. data/spec/fixtures/say_custom.txt +22 -0
  123. data/spec/fixtures/{v3/stargazers.json → stargazers.json} +0 -0
  124. data/spec/fixtures/{v3/starred.json → starred.json} +0 -0
  125. data/spec/fixtures/{v3/starred_gists.json → starred_gists.json} +0 -0
  126. data/spec/fixtures/{v3/status.json → status.json} +0 -0
  127. data/spec/fixtures/{v3/statuses.json → statuses.json} +0 -0
  128. data/spec/fixtures/subscribers.json +9 -0
  129. data/spec/fixtures/subscription.json +8 -0
  130. data/spec/fixtures/subscription_update.json +8 -0
  131. data/spec/fixtures/subscriptions.json +39 -0
  132. data/spec/fixtures/{v3/tag.json → tag.json} +0 -0
  133. data/spec/fixtures/{v3/tag_create.json → tag_create.json} +0 -0
  134. data/spec/fixtures/{v3/tags.json → tags.json} +0 -0
  135. data/spec/fixtures/{v3/team.json → team.json} +0 -0
  136. data/spec/fixtures/{v3/teams.json → teams.json} +0 -0
  137. data/spec/fixtures/thread_subscription.json +8 -0
  138. data/spec/fixtures/thread_subscription_update.json +8 -0
  139. data/spec/fixtures/{v3/tree.json → tree.json} +0 -0
  140. data/spec/fixtures/{v3/tree_create.json → tree_create.json} +0 -0
  141. data/spec/fixtures/{v3/user.json → user.json} +0 -0
  142. data/spec/fixtures/{v3/user_events.json → user_events.json} +0 -0
  143. data/spec/fixtures/validation_failed.json +11 -0
  144. data/spec/fixtures/{v3/watched.json → watched.json} +0 -0
  145. data/spec/fixtures/{v3/watchers.json → watchers.json} +0 -0
  146. data/spec/helper.rb +13 -2
  147. data/spec/octokit/client/authorizations_spec.rb +44 -7
  148. data/spec/octokit/client/commits_spec.rb +136 -11
  149. data/spec/octokit/client/contents_spec.rb +6 -3
  150. data/spec/octokit/client/downloads_spec.rb +5 -6
  151. data/spec/octokit/client/emojis_spec.rb +1 -1
  152. data/spec/octokit/client/events_spec.rb +5 -5
  153. data/spec/octokit/client/gists_spec.rb +20 -20
  154. data/spec/octokit/client/issue_events_spec.rb +2 -2
  155. data/spec/octokit/client/issues_spec.rb +25 -14
  156. data/spec/octokit/client/labels_spec.rb +18 -22
  157. data/spec/octokit/client/markdown_spec.rb +1 -1
  158. data/spec/octokit/client/milestones_spec.rb +8 -8
  159. data/spec/octokit/client/notifications_spec.rb +141 -0
  160. data/spec/octokit/client/objects_spec.rb +6 -6
  161. data/spec/octokit/client/organizations_spec.rb +65 -13
  162. data/spec/octokit/client/pub_sub_hubbub/service_hooks_spec.rb +4 -4
  163. data/spec/octokit/client/pub_sub_hubbub_spec.rb +3 -3
  164. data/spec/octokit/client/pulls_spec.rb +81 -10
  165. data/spec/octokit/client/refs_spec.rb +7 -7
  166. data/spec/octokit/client/repositories_spec.rb +86 -34
  167. data/spec/octokit/client/say_spec.rb +37 -0
  168. data/spec/octokit/client/statuses_spec.rb +2 -2
  169. data/spec/octokit/client/users_spec.rb +65 -16
  170. data/spec/octokit/client_spec.rb +37 -11
  171. data/spec/{repository_spec.rb → octokit/repository_spec.rb} +0 -0
  172. data/spec/octokit_spec.rb +1 -1
  173. metadata +240 -196
@@ -0,0 +1,37 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ describe Octokit::Client::Say do
5
+ before do
6
+ @client = Octokit::Client.new
7
+ end
8
+
9
+ describe ".say" do
10
+ it "returns an ASCII octocat" do
11
+ stub_get("/octocat").
12
+ to_return \
13
+ :status => 200,
14
+ :body => fixture("say.txt"),
15
+ :headers => {
16
+ :content_type => 'text/plain'
17
+ }
18
+
19
+ text = @client.say
20
+ expect(text).to match(/Half measures/)
21
+ end
22
+
23
+ it "returns an ASCII octocat with custom text" do
24
+ stub_get("/octocat").
25
+ to_return \
26
+ :status => 200,
27
+ :body => fixture("say_custom.txt"),
28
+ :headers => {
29
+ :content_type => 'text/plain'
30
+ }
31
+
32
+ text = @client.say
33
+ expect(text).to match(/upset/)
34
+ end
35
+ end
36
+
37
+ end
@@ -11,7 +11,7 @@ describe Octokit::Client::Statuses do
11
11
 
12
12
  it "lists commit statuses" do
13
13
  stub_get('https://api.github.com/repos/pengwynn/octokit/statuses/7d069dedd4cb56bf57760688657abd0e6b5a28b8').
14
- to_return(:body => fixture('v3/statuses.json'))
14
+ to_return(json_response('statuses.json'))
15
15
  statuses = @client.statuses('pengwynn/octokit', '7d069dedd4cb56bf57760688657abd0e6b5a28b8')
16
16
  expect(statuses.first.target_url).to eq('http://travis-ci.org/pengwynn/octokit/builds/2092930')
17
17
  end
@@ -22,7 +22,7 @@ describe Octokit::Client::Statuses do
22
22
 
23
23
  it "creates status" do
24
24
  stub_post('https://api.github.com/repos/pengwynn/octokit/statuses/7d069dedd4cb56bf57760688657abd0e6b5a28b8').
25
- to_return(:body => fixture('v3/status.json'))
25
+ to_return(json_response('status.json'))
26
26
  info = {
27
27
  :target_url => 'http://wynnnetherland.com'
28
28
  }
@@ -13,7 +13,7 @@ describe Octokit::Client::Users do
13
13
 
14
14
  it "returns matching username" do
15
15
  stub_get("https://api.github.com/legacy/user/search/sferik").
16
- to_return(:body => fixture("legacy/users.json"))
16
+ to_return(json_response("legacy/users.json"))
17
17
  users = @client.search_users("sferik")
18
18
  expect(users.first.username).to eq("sferik")
19
19
  end
@@ -28,7 +28,7 @@ describe Octokit::Client::Users do
28
28
 
29
29
  it "returns the user" do
30
30
  stub_get("/users/sferik").
31
- to_return(:body => fixture("v3/user.json"))
31
+ to_return(json_response("user.json"))
32
32
  user = @client.user("sferik")
33
33
  expect(user.login).to eq("sferik")
34
34
  end
@@ -39,7 +39,7 @@ describe Octokit::Client::Users do
39
39
 
40
40
  it "returns the authenticated user" do
41
41
  stub_get("/user").
42
- to_return(:body => fixture("v3/user.json"))
42
+ to_return(json_response("user.json"))
43
43
  user = @client.user
44
44
  expect(user.login).to eq("sferik")
45
45
  end
@@ -48,6 +48,15 @@ describe Octokit::Client::Users do
48
48
 
49
49
  end
50
50
 
51
+ describe ".validate_credentials" do
52
+ it "validates username and password" do
53
+ stub_get("https://sferik:foobar@api.github.com/user").
54
+ to_return(json_response("user.json"))
55
+
56
+ expect(Octokit.validate_credentials(:login => 'sferik', :password => 'foobar')).to eq(true)
57
+ end
58
+ end
59
+
51
60
  describe ".update_user" do
52
61
 
53
62
  context "with a location passed" do
@@ -55,7 +64,7 @@ describe Octokit::Client::Users do
55
64
  it "updates the user's location" do
56
65
  stub_patch("/user").
57
66
  with(:body => {:name => "Erik Michaels-Ober", :email => "sferik@gmail.com", :company => "Code for America", :location => "San Francisco", :hireable => false}).
58
- to_return(:body => fixture("v3/user.json"))
67
+ to_return(json_response("user.json"))
59
68
  user = @client.update_user(:name => "Erik Michaels-Ober", :email => "sferik@gmail.com", :company => "Code for America", :location => "San Francisco", :hireable => false)
60
69
  expect(user.login).to eq("sferik")
61
70
  end
@@ -70,7 +79,7 @@ describe Octokit::Client::Users do
70
79
 
71
80
  it "returns the user's followers" do
72
81
  stub_get("https://api.github.com/users/sferik/followers").
73
- to_return(:body => fixture("v3/followers.json"))
82
+ to_return(json_response("followers.json"))
74
83
  users = @client.followers("sferik")
75
84
  expect(users.first.login).to eq("puls")
76
85
  end
@@ -81,7 +90,7 @@ describe Octokit::Client::Users do
81
90
 
82
91
  it "returns the user's followers" do
83
92
  stub_get("https://api.github.com/users/sferik/followers").
84
- to_return(:body => fixture("v3/followers.json"))
93
+ to_return(json_response("followers.json"))
85
94
  users = @client.followers
86
95
  expect(users.first.login).to eq("puls")
87
96
  end
@@ -96,7 +105,7 @@ describe Octokit::Client::Users do
96
105
 
97
106
  it "returns the user's following" do
98
107
  stub_get("https://api.github.com/users/sferik/following").
99
- to_return(:body => fixture("v3/following.json"))
108
+ to_return(json_response("following.json"))
100
109
  users = @client.following("sferik")
101
110
  expect(users.first.login).to eq("rails")
102
111
  end
@@ -107,7 +116,7 @@ describe Octokit::Client::Users do
107
116
 
108
117
  it "returns the user's following" do
109
118
  stub_get("https://api.github.com/users/sferik/following").
110
- to_return(:body => fixture("v3/following.json"))
119
+ to_return(json_response("following.json"))
111
120
  users = @client.following
112
121
  expect(users.first.login).to eq("rails")
113
122
  end
@@ -196,7 +205,7 @@ describe Octokit::Client::Users do
196
205
 
197
206
  it "returns starred repositories" do
198
207
  stub_get("https://api.github.com/users/sferik/starred").
199
- to_return(:body => fixture("v3/starred.json"))
208
+ to_return(json_response("starred.json"))
200
209
  repositories = @client.starred("sferik")
201
210
  expect(repositories.first.name).to eq("grit")
202
211
  end
@@ -207,7 +216,7 @@ describe Octokit::Client::Users do
207
216
 
208
217
  it "returns starred repositories" do
209
218
  stub_get("https://api.github.com/users/sferik/starred").
210
- to_return(:body => fixture("v3/starred.json"))
219
+ to_return(json_response("starred.json"))
211
220
  repositories = @client.starred
212
221
  expect(repositories.first.name).to eq("grit")
213
222
  end
@@ -222,7 +231,7 @@ describe Octokit::Client::Users do
222
231
 
223
232
  it "returns watched repositories" do
224
233
  stub_get("https://api.github.com/users/sferik/watched").
225
- to_return(:body => fixture("v3/watched.json"))
234
+ to_return(json_response("watched.json"))
226
235
  repositories = @client.watched("sferik")
227
236
  expect(repositories.first.name).to eq("grit")
228
237
  end
@@ -233,7 +242,7 @@ describe Octokit::Client::Users do
233
242
 
234
243
  it "returns watched repositories" do
235
244
  stub_get("https://api.github.com/users/sferik/watched").
236
- to_return(:body => fixture("v3/watched.json"))
245
+ to_return(json_response("watched.json"))
237
246
  repositories = @client.watched
238
247
  expect(repositories.first.name).to eq("grit")
239
248
  end
@@ -242,11 +251,23 @@ describe Octokit::Client::Users do
242
251
 
243
252
  end
244
253
 
254
+ describe ".key" do
255
+
256
+ it "returns a public key" do
257
+ stub_get("https://api.github.com/user/keys/103205").
258
+ to_return(json_response('public_key.json'))
259
+ public_key = @client.key(103205)
260
+ expect(public_key.id).to eq(103205)
261
+ expect(public_key[:key]).to include("ssh-dss AAAAB")
262
+ end
263
+
264
+ end
265
+
245
266
  describe ".keys" do
246
267
 
247
268
  it "returns public keys" do
248
269
  stub_get("https://api.github.com/user/keys").
249
- to_return(:body => fixture("v3/public_keys.json"))
270
+ to_return(json_response("public_keys.json"))
250
271
  public_keys = @client.keys
251
272
  expect(public_keys.first.id).to eq(103205)
252
273
  end
@@ -259,13 +280,30 @@ describe Octokit::Client::Users do
259
280
  title, key = "Moss", "ssh-dss AAAAB3NzaC1kc3MAAACBAJz7HanBa18ad1YsdFzHO5Wy1/WgXd4BV+czbKq7q23jungbfjN3eo2a0SVdxux8GG+RZ9ia90VD/X+PE4s3LV60oXZ7PDAuyPO1CTF0TaDoKf9mPaHcPa6agMJVocMsgBgwviWT1Q9VgN1SccDsYVDtxkIAwuw25YeHZlG6myx1AAAAFQCgW+OvXWUdUJPBGkRJ8ML7uf0VHQAAAIAlP5G96tTss0SKYVSCJCyocn9cyGQdNjxah4/aYuYFTbLI1rxk7sr/AkZfJNIoF2UFyO5STbbratykIQGUPdUBg1a2t72bu31x+4ZYJMngNsG/AkZ2oqLiH6dJKHD7PFx2oSPalogwsUV7iSMIZIYaPa03A9763iFsN0qJjaed+gAAAIBxz3Prxdzt/os4XGXSMNoWcS03AFC/05NOkoDMrXxQnTTpp1wrOgyRqEnKz15qC5dWk1ynzK+LJXHDZGA8lXPfCjHpJO3zrlZ/ivvLhgPdDpt13MAhIJFH06hTal0woxbk/fIdY71P3kbgXC0Ppx/0S7BC+VxqRCA4/wcM+BoDbA== host"
260
281
  stub_post("https://api.github.com/user/keys").
261
282
  with(:title => title, :key => key).
262
- to_return(:status => 201, :body => fixture("v3/public_key.json"))
283
+ to_return(json_response("public_key.json"))
263
284
  public_key = @client.add_key(title, key)
264
285
  expect(public_key.id).to eq(103205)
265
286
  end
266
287
 
267
288
  end
268
289
 
290
+ describe ".update_key" do
291
+
292
+ it "updates a public key" do
293
+ updated_key = {
294
+ :title => "updated title",
295
+ :key => "ssh-rsa BBBB..."
296
+ }
297
+ stub_patch("https://api.github.com/user/keys/1").
298
+ with(updated_key).
299
+ to_return(json_response("public_key_update.json"))
300
+ public_key = @client.update_key(1, updated_key)
301
+ expect(public_key[:title]).to eq(updated_key[:title])
302
+ expect(public_key[:key]).to eq(updated_key[:key])
303
+ end
304
+
305
+ end
306
+
269
307
  describe ".remove_key" do
270
308
 
271
309
  it "removes a public key" do
@@ -281,7 +319,7 @@ describe Octokit::Client::Users do
281
319
 
282
320
  it "returns email addresses" do
283
321
  stub_get("https://api.github.com/user/emails").
284
- to_return(:body => fixture("v3/emails.json"))
322
+ to_return(json_response("emails.json"))
285
323
  emails = @client.emails
286
324
  expect(emails.first).to eq("sferik@gmail.com")
287
325
  end
@@ -293,7 +331,7 @@ describe Octokit::Client::Users do
293
331
  it "adds an email address" do
294
332
  stub_post("https://api.github.com/user/emails").
295
333
  with(:email => "sferik@gmail.com").
296
- to_return(:body => fixture("v3/emails.json"))
334
+ to_return(json_response("emails.json"))
297
335
  emails = @client.add_email("sferik@gmail.com")
298
336
  expect(emails.first).to eq("sferik@gmail.com")
299
337
  end
@@ -311,4 +349,15 @@ describe Octokit::Client::Users do
311
349
 
312
350
  end
313
351
 
352
+ describe ".subscriptions" do
353
+
354
+ it "returns the repositories the user watches for notifications" do
355
+ stub_get("https://api.github.com/users/pengwynn/subscriptions").
356
+ to_return(json_response("subscriptions.json"))
357
+ subscriptions = @client.subscriptions("pengwynn")
358
+ expect(subscriptions.first.id).to eq(11560)
359
+ expect(subscriptions.first.name).to eq("ujs_sort_helper")
360
+ end
361
+ end
362
+
314
363
  end
@@ -3,7 +3,6 @@ require 'helper'
3
3
  describe Octokit::Client do
4
4
  it "works with basic auth and password" do
5
5
  stub_get("https://foo:bar@api.github.com/repos/baz/quux/commits?per_page=35&sha=master").
6
- with(:headers => {'Accept'=>'*/*'}).
7
6
  to_return(:status => 200, :body => '{"commits":[]}', :headers => {})
8
7
  expect {
9
8
  Octokit::Client.new(:login => 'foo', :password => 'bar').commits('baz/quux')
@@ -28,30 +27,45 @@ describe Octokit::Client do
28
27
 
29
28
  it "traverses a paginated response using the maximum allowed number of items per page" do
30
29
  stub_get("https://api.github.com/foo/bar?per_page=100").
31
- to_return(:status => 200, :body => %q{["stuff"]}, :headers =>
32
- { 'Link' => %q{<https://api.github.com/foo/bar?page=2>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last"} })
30
+ to_return \
31
+ :status => 200,
32
+ :body => %q{["stuff"]},
33
+ :headers => {
34
+ :content_type => 'application/json; charset=utf-8',
35
+ :link => %q{<https://api.github.com/foo/bar?page=2>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last"}
36
+ }
33
37
 
34
38
  stub_get("https://api.github.com/foo/bar?page=2&per_page=100").
35
- to_return(:status => 200, :body => %q{["even more stuff"]}, :headers =>
36
- { 'Link' => %q{<https://api.github.com/foo/bar?page=3>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last", <https://api.github.com/foo/bar?page=1>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"} })
39
+ to_return \
40
+ :status => 200,
41
+ :body => %q{["even more stuff"]},
42
+ :headers => {
43
+ :content_type => 'application/json; charset=utf-8',
44
+ :link => %q{<https://api.github.com/foo/bar?page=3>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last", <https://api.github.com/foo/bar?page=1>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"}
45
+ }
37
46
 
38
47
  stub_get("https://api.github.com/foo/bar?page=3&per_page=100").
39
- to_return(:status => 200, :body => %q{["stuffapalooza"]}, :headers =>
40
- { 'Link' => %q{<https://api.github.com/foo/bar?page=2>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"} })
48
+ to_return \
49
+ :status => 200,
50
+ :body => %q{["stuffapalooza"]},
51
+ :headers => {
52
+ :content_type => 'application/json; charset=utf-8',
53
+ :link => %q{<https://api.github.com/foo/bar?page=2>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"}
54
+ }
41
55
 
42
- expect(Octokit::Client.new(:auto_traversal => true).get("https://api.github.com/foo/bar", {}, 3)).to eq(['stuff', 'even more stuff', 'stuffapalooza'])
56
+ expect(Octokit::Client.new(:auto_traversal => true).get("https://api.github.com/foo/bar")).to eq(['stuff', 'even more stuff', 'stuffapalooza'])
43
57
  end
44
58
 
45
59
  it "uses the number set in the per_page configuration option when present" do
46
60
  stub_get("https://api.github.com/foo/bar?per_page=50").
47
61
  to_return(:status => 200, :body => %q{["stuff"]}, :headers =>
48
- { 'Link' => %q{<https://api.github.com/foo/bar?page=2>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last"} })
62
+ { :link => %q{<https://api.github.com/foo/bar?page=2>; rel="next", <https://api.github.com/foo/bar?page=3>; rel="last"} })
49
63
 
50
64
  stub_get("https://api.github.com/foo/bar?page=2&per_page=50").
51
65
  to_return(:status => 200, :body => %q{["even more stuff"]}, :headers =>
52
- { 'Link' => %q{<https://api.github.com/foo/bar?page=3>; rel="last", <https://api.github.com/foo/bar?page=1>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"} })
66
+ { :link => %q{<https://api.github.com/foo/bar?page=3>; rel="last", <https://api.github.com/foo/bar?page=1>; rel="prev", <https://api.github.com/foo/bar?page=1>; rel="first"} })
53
67
 
54
- expect(Octokit::Client.new(:auto_traversal => true, :per_page => 50).get("https://api.github.com/foo/bar", {}, 3)).to be
68
+ expect(Octokit::Client.new(:auto_traversal => true, :per_page => 50).get("https://api.github.com/foo/bar")).to be
55
69
  end
56
70
 
57
71
  end
@@ -152,5 +166,17 @@ describe Octokit::Client do
152
166
  end
153
167
  end
154
168
 
169
+ describe "error handling" do
170
+
171
+ it "displays validation errors" do
172
+ stub_patch("https://foo:bar@api.github.com/repos/pengwynn/api-sandbox").
173
+ to_return(json_response("validation_failed.json"))
174
+
175
+ response = Octokit::Client.new(:login => 'foo', :password => 'bar').update_repository('pengwynn/api-sandbox')
176
+ expect(response.errors.first.message).to eq('name is too short (minimum is 1 characters)')
177
+ end
178
+
179
+ end
180
+
155
181
 
156
182
  end
data/spec/octokit_spec.rb CHANGED
@@ -21,7 +21,7 @@ describe Octokit do
21
21
  describe ".delegate" do
22
22
  it "delegates missing methods to Octokit::Client" do
23
23
  stub_get("/repos/pengwynn/octokit/issues").
24
- to_return(:status => 200, :body => fixture('v3/issues.json'))
24
+ to_return(json_response('issues.json'))
25
25
  issues = Octokit.issues('pengwynn/octokit')
26
26
  expect(issues.last.user.login).to eq('fellix')
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-10-15 00:00:00.000000000 Z
14
+ date: 2012-11-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: addressable
@@ -52,7 +52,7 @@ dependencies:
52
52
  requirements:
53
53
  - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: '0.8'
55
+ version: '0.9'
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ~>
62
62
  - !ruby/object:Gem::Version
63
- version: '0.8'
63
+ version: '0.9'
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: hashie
66
66
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +221,7 @@ files:
221
221
  - .travis.yml
222
222
  - CHANGELOG.md
223
223
  - Gemfile
224
- - LICENSE
224
+ - LICENSE.md
225
225
  - README.md
226
226
  - Rakefile
227
227
  - lib/faraday/response/raise_octokit_error.rb
@@ -239,13 +239,16 @@ files:
239
239
  - lib/octokit/client/labels.rb
240
240
  - lib/octokit/client/markdown.rb
241
241
  - lib/octokit/client/milestones.rb
242
+ - lib/octokit/client/notifications.rb
242
243
  - lib/octokit/client/objects.rb
243
244
  - lib/octokit/client/organizations.rb
244
245
  - lib/octokit/client/pub_sub_hubbub.rb
245
246
  - lib/octokit/client/pub_sub_hubbub/service_hooks.rb
246
247
  - lib/octokit/client/pulls.rb
248
+ - lib/octokit/client/rate_limit.rb
247
249
  - lib/octokit/client/refs.rb
248
250
  - lib/octokit/client/repositories.rb
251
+ - lib/octokit/client/say.rb
249
252
  - lib/octokit/client/statuses.rb
250
253
  - lib/octokit/client/users.rb
251
254
  - lib/octokit/configuration.rb
@@ -257,103 +260,121 @@ files:
257
260
  - lib/octokit/version.rb
258
261
  - octokit.gemspec
259
262
  - spec/faraday/response_spec.rb
263
+ - spec/fixtures/authorization.json
264
+ - spec/fixtures/authorizations.json
265
+ - spec/fixtures/blob.json
266
+ - spec/fixtures/blob_create.json
267
+ - spec/fixtures/branches.json
268
+ - spec/fixtures/collaborators.json
269
+ - spec/fixtures/comment.json
270
+ - spec/fixtures/comments.json
271
+ - spec/fixtures/commit.json
272
+ - spec/fixtures/commit_comment.json
273
+ - spec/fixtures/commit_comment_create.json
274
+ - spec/fixtures/commit_comment_update.json
275
+ - spec/fixtures/commit_comments.json
276
+ - spec/fixtures/commit_create.json
277
+ - spec/fixtures/commits.json
278
+ - spec/fixtures/compare.json
279
+ - spec/fixtures/contents.json
280
+ - spec/fixtures/contributors.json
281
+ - spec/fixtures/download.json
282
+ - spec/fixtures/download_create.json
283
+ - spec/fixtures/downloads.json
284
+ - spec/fixtures/emails.json
285
+ - spec/fixtures/emojis.json
286
+ - spec/fixtures/followers.json
287
+ - spec/fixtures/following.json
288
+ - spec/fixtures/forks.json
289
+ - spec/fixtures/gist.json
290
+ - spec/fixtures/gist_comment.json
291
+ - spec/fixtures/gist_comment_create.json
292
+ - spec/fixtures/gist_comment_update.json
293
+ - spec/fixtures/gist_comments.json
294
+ - spec/fixtures/gists.json
295
+ - spec/fixtures/hook.json
296
+ - spec/fixtures/hooks.json
297
+ - spec/fixtures/issue.json
298
+ - spec/fixtures/issue_closed.json
299
+ - spec/fixtures/issue_event.json
300
+ - spec/fixtures/issue_events.json
301
+ - spec/fixtures/issue_full.json
302
+ - spec/fixtures/issues.json
303
+ - spec/fixtures/label.json
304
+ - spec/fixtures/labels.json
305
+ - spec/fixtures/languages.json
260
306
  - spec/fixtures/legacy/issues.json
261
307
  - spec/fixtures/legacy/repositories.json
262
308
  - spec/fixtures/legacy/users.json
263
- - spec/fixtures/v3/authorization.json
264
- - spec/fixtures/v3/authorizations.json
265
- - spec/fixtures/v3/blob.json
266
- - spec/fixtures/v3/blob_create.json
267
- - spec/fixtures/v3/branches.json
268
- - spec/fixtures/v3/collaborators.json
269
- - spec/fixtures/v3/comment.json
270
- - spec/fixtures/v3/comments.json
271
- - spec/fixtures/v3/commit.json
272
- - spec/fixtures/v3/commit_comment.json
273
- - spec/fixtures/v3/commit_comment_create.json
274
- - spec/fixtures/v3/commit_comment_update.json
275
- - spec/fixtures/v3/commit_comments.json
276
- - spec/fixtures/v3/commit_create.json
277
- - spec/fixtures/v3/commits.json
278
- - spec/fixtures/v3/compare.json
279
- - spec/fixtures/v3/contents.json
280
- - spec/fixtures/v3/contributors.json
281
- - spec/fixtures/v3/download.json
282
- - spec/fixtures/v3/download_create.json
283
- - spec/fixtures/v3/downloads.json
284
- - spec/fixtures/v3/emails.json
285
- - spec/fixtures/v3/emojis.json
286
- - spec/fixtures/v3/followers.json
287
- - spec/fixtures/v3/following.json
288
- - spec/fixtures/v3/forks.json
289
- - spec/fixtures/v3/gist.json
290
- - spec/fixtures/v3/gist_comment.json
291
- - spec/fixtures/v3/gist_comment_create.json
292
- - spec/fixtures/v3/gist_comment_update.json
293
- - spec/fixtures/v3/gist_comments.json
294
- - spec/fixtures/v3/gists.json
295
- - spec/fixtures/v3/hook.json
296
- - spec/fixtures/v3/hooks.json
297
- - spec/fixtures/v3/issue.json
298
- - spec/fixtures/v3/issue_closed.json
299
- - spec/fixtures/v3/issue_event.json
300
- - spec/fixtures/v3/issue_events.json
301
- - spec/fixtures/v3/issues.json
302
- - spec/fixtures/v3/label.json
303
- - spec/fixtures/v3/labels.json
304
- - spec/fixtures/v3/languages.json
305
- - spec/fixtures/v3/list_commit_comments.json
306
- - spec/fixtures/v3/markdown_gfm
307
- - spec/fixtures/v3/merge.json
308
- - spec/fixtures/v3/milestone.json
309
- - spec/fixtures/v3/milestones.json
310
- - spec/fixtures/v3/not_found.json
311
- - spec/fixtures/v3/organization-repositories.json
312
- - spec/fixtures/v3/organization-repository.json
313
- - spec/fixtures/v3/organization.json
314
- - spec/fixtures/v3/organization_members.json
315
- - spec/fixtures/v3/organization_team_members.json
316
- - spec/fixtures/v3/organization_team_repos.json
317
- - spec/fixtures/v3/organizations.json
318
- - spec/fixtures/v3/public_events.json
319
- - spec/fixtures/v3/public_gists.json
320
- - spec/fixtures/v3/public_key.json
321
- - spec/fixtures/v3/public_keys.json
322
- - spec/fixtures/v3/pull_created.json
323
- - spec/fixtures/v3/pull_request.json
324
- - spec/fixtures/v3/pull_request_comments.json
325
- - spec/fixtures/v3/pull_request_commits.json
326
- - spec/fixtures/v3/pull_request_files.json
327
- - spec/fixtures/v3/pull_request_merged.json
328
- - spec/fixtures/v3/pull_requests.json
329
- - spec/fixtures/v3/pull_update.json
330
- - spec/fixtures/v3/readme.json
331
- - spec/fixtures/v3/ref.json
332
- - spec/fixtures/v3/ref_create.json
333
- - spec/fixtures/v3/ref_update.json
334
- - spec/fixtures/v3/refs.json
335
- - spec/fixtures/v3/refs_tags.json
336
- - spec/fixtures/v3/repo_assignees.json
337
- - spec/fixtures/v3/repo_events.json
338
- - spec/fixtures/v3/repo_issues_events.json
339
- - spec/fixtures/v3/repositories.json
340
- - spec/fixtures/v3/repository.json
341
- - spec/fixtures/v3/stargazers.json
342
- - spec/fixtures/v3/starred.json
343
- - spec/fixtures/v3/starred_gists.json
344
- - spec/fixtures/v3/status.json
345
- - spec/fixtures/v3/statuses.json
346
- - spec/fixtures/v3/tag.json
347
- - spec/fixtures/v3/tag_create.json
348
- - spec/fixtures/v3/tags.json
349
- - spec/fixtures/v3/team.json
350
- - spec/fixtures/v3/teams.json
351
- - spec/fixtures/v3/tree.json
352
- - spec/fixtures/v3/tree_create.json
353
- - spec/fixtures/v3/user.json
354
- - spec/fixtures/v3/user_events.json
355
- - spec/fixtures/v3/watched.json
356
- - spec/fixtures/v3/watchers.json
309
+ - spec/fixtures/list_commit_comments.json
310
+ - spec/fixtures/markdown_gfm
311
+ - spec/fixtures/merge.json
312
+ - spec/fixtures/milestone.json
313
+ - spec/fixtures/milestones.json
314
+ - spec/fixtures/not_found.json
315
+ - spec/fixtures/notification_thread.json
316
+ - spec/fixtures/notifications.json
317
+ - spec/fixtures/organization-repositories.json
318
+ - spec/fixtures/organization-repository.json
319
+ - spec/fixtures/organization.json
320
+ - spec/fixtures/organization_members.json
321
+ - spec/fixtures/organization_team_members.json
322
+ - spec/fixtures/organization_team_repos.json
323
+ - spec/fixtures/organizations.json
324
+ - spec/fixtures/public_events.json
325
+ - spec/fixtures/public_gists.json
326
+ - spec/fixtures/public_key.json
327
+ - spec/fixtures/public_key_update.json
328
+ - spec/fixtures/public_keys.json
329
+ - spec/fixtures/pull_created.json
330
+ - spec/fixtures/pull_request.json
331
+ - spec/fixtures/pull_request_comment.json
332
+ - spec/fixtures/pull_request_comment_create.json
333
+ - spec/fixtures/pull_request_comment_reply.json
334
+ - spec/fixtures/pull_request_comment_update.json
335
+ - spec/fixtures/pull_request_comments.json
336
+ - spec/fixtures/pull_request_commits.json
337
+ - spec/fixtures/pull_request_files.json
338
+ - spec/fixtures/pull_request_merged.json
339
+ - spec/fixtures/pull_requests.json
340
+ - spec/fixtures/pull_update.json
341
+ - spec/fixtures/readme.json
342
+ - spec/fixtures/ref.json
343
+ - spec/fixtures/ref_create.json
344
+ - spec/fixtures/ref_update.json
345
+ - spec/fixtures/refs.json
346
+ - spec/fixtures/refs_tags.json
347
+ - spec/fixtures/repo_assignees.json
348
+ - spec/fixtures/repo_events.json
349
+ - spec/fixtures/repo_issues_events.json
350
+ - spec/fixtures/repositories.json
351
+ - spec/fixtures/repository.json
352
+ - spec/fixtures/repository_notifications.json
353
+ - spec/fixtures/say.txt
354
+ - spec/fixtures/say_custom.txt
355
+ - spec/fixtures/stargazers.json
356
+ - spec/fixtures/starred.json
357
+ - spec/fixtures/starred_gists.json
358
+ - spec/fixtures/status.json
359
+ - spec/fixtures/statuses.json
360
+ - spec/fixtures/subscribers.json
361
+ - spec/fixtures/subscription.json
362
+ - spec/fixtures/subscription_update.json
363
+ - spec/fixtures/subscriptions.json
364
+ - spec/fixtures/tag.json
365
+ - spec/fixtures/tag_create.json
366
+ - spec/fixtures/tags.json
367
+ - spec/fixtures/team.json
368
+ - spec/fixtures/teams.json
369
+ - spec/fixtures/thread_subscription.json
370
+ - spec/fixtures/thread_subscription_update.json
371
+ - spec/fixtures/tree.json
372
+ - spec/fixtures/tree_create.json
373
+ - spec/fixtures/user.json
374
+ - spec/fixtures/user_events.json
375
+ - spec/fixtures/validation_failed.json
376
+ - spec/fixtures/watched.json
377
+ - spec/fixtures/watchers.json
357
378
  - spec/helper.rb
358
379
  - spec/octokit/client/authorizations_spec.rb
359
380
  - spec/octokit/client/commits_spec.rb
@@ -367,6 +388,7 @@ files:
367
388
  - spec/octokit/client/labels_spec.rb
368
389
  - spec/octokit/client/markdown_spec.rb
369
390
  - spec/octokit/client/milestones_spec.rb
391
+ - spec/octokit/client/notifications_spec.rb
370
392
  - spec/octokit/client/objects_spec.rb
371
393
  - spec/octokit/client/organizations_spec.rb
372
394
  - spec/octokit/client/pub_sub_hubbub/service_hooks_spec.rb
@@ -374,14 +396,16 @@ files:
374
396
  - spec/octokit/client/pulls_spec.rb
375
397
  - spec/octokit/client/refs_spec.rb
376
398
  - spec/octokit/client/repositories_spec.rb
399
+ - spec/octokit/client/say_spec.rb
377
400
  - spec/octokit/client/statuses_spec.rb
378
401
  - spec/octokit/client/users_spec.rb
379
402
  - spec/octokit/client_spec.rb
380
403
  - spec/octokit/gist_spec.rb
404
+ - spec/octokit/repository_spec.rb
381
405
  - spec/octokit_spec.rb
382
- - spec/repository_spec.rb
383
406
  homepage: https://github.com/pengwynn/octokit
384
- licenses: []
407
+ licenses:
408
+ - MIT
385
409
  post_install_message:
386
410
  rdoc_options: []
387
411
  require_paths:
@@ -406,103 +430,121 @@ specification_version: 3
406
430
  summary: Simple wrapper for the GitHub v3 API
407
431
  test_files:
408
432
  - spec/faraday/response_spec.rb
433
+ - spec/fixtures/authorization.json
434
+ - spec/fixtures/authorizations.json
435
+ - spec/fixtures/blob.json
436
+ - spec/fixtures/blob_create.json
437
+ - spec/fixtures/branches.json
438
+ - spec/fixtures/collaborators.json
439
+ - spec/fixtures/comment.json
440
+ - spec/fixtures/comments.json
441
+ - spec/fixtures/commit.json
442
+ - spec/fixtures/commit_comment.json
443
+ - spec/fixtures/commit_comment_create.json
444
+ - spec/fixtures/commit_comment_update.json
445
+ - spec/fixtures/commit_comments.json
446
+ - spec/fixtures/commit_create.json
447
+ - spec/fixtures/commits.json
448
+ - spec/fixtures/compare.json
449
+ - spec/fixtures/contents.json
450
+ - spec/fixtures/contributors.json
451
+ - spec/fixtures/download.json
452
+ - spec/fixtures/download_create.json
453
+ - spec/fixtures/downloads.json
454
+ - spec/fixtures/emails.json
455
+ - spec/fixtures/emojis.json
456
+ - spec/fixtures/followers.json
457
+ - spec/fixtures/following.json
458
+ - spec/fixtures/forks.json
459
+ - spec/fixtures/gist.json
460
+ - spec/fixtures/gist_comment.json
461
+ - spec/fixtures/gist_comment_create.json
462
+ - spec/fixtures/gist_comment_update.json
463
+ - spec/fixtures/gist_comments.json
464
+ - spec/fixtures/gists.json
465
+ - spec/fixtures/hook.json
466
+ - spec/fixtures/hooks.json
467
+ - spec/fixtures/issue.json
468
+ - spec/fixtures/issue_closed.json
469
+ - spec/fixtures/issue_event.json
470
+ - spec/fixtures/issue_events.json
471
+ - spec/fixtures/issue_full.json
472
+ - spec/fixtures/issues.json
473
+ - spec/fixtures/label.json
474
+ - spec/fixtures/labels.json
475
+ - spec/fixtures/languages.json
409
476
  - spec/fixtures/legacy/issues.json
410
477
  - spec/fixtures/legacy/repositories.json
411
478
  - spec/fixtures/legacy/users.json
412
- - spec/fixtures/v3/authorization.json
413
- - spec/fixtures/v3/authorizations.json
414
- - spec/fixtures/v3/blob.json
415
- - spec/fixtures/v3/blob_create.json
416
- - spec/fixtures/v3/branches.json
417
- - spec/fixtures/v3/collaborators.json
418
- - spec/fixtures/v3/comment.json
419
- - spec/fixtures/v3/comments.json
420
- - spec/fixtures/v3/commit.json
421
- - spec/fixtures/v3/commit_comment.json
422
- - spec/fixtures/v3/commit_comment_create.json
423
- - spec/fixtures/v3/commit_comment_update.json
424
- - spec/fixtures/v3/commit_comments.json
425
- - spec/fixtures/v3/commit_create.json
426
- - spec/fixtures/v3/commits.json
427
- - spec/fixtures/v3/compare.json
428
- - spec/fixtures/v3/contents.json
429
- - spec/fixtures/v3/contributors.json
430
- - spec/fixtures/v3/download.json
431
- - spec/fixtures/v3/download_create.json
432
- - spec/fixtures/v3/downloads.json
433
- - spec/fixtures/v3/emails.json
434
- - spec/fixtures/v3/emojis.json
435
- - spec/fixtures/v3/followers.json
436
- - spec/fixtures/v3/following.json
437
- - spec/fixtures/v3/forks.json
438
- - spec/fixtures/v3/gist.json
439
- - spec/fixtures/v3/gist_comment.json
440
- - spec/fixtures/v3/gist_comment_create.json
441
- - spec/fixtures/v3/gist_comment_update.json
442
- - spec/fixtures/v3/gist_comments.json
443
- - spec/fixtures/v3/gists.json
444
- - spec/fixtures/v3/hook.json
445
- - spec/fixtures/v3/hooks.json
446
- - spec/fixtures/v3/issue.json
447
- - spec/fixtures/v3/issue_closed.json
448
- - spec/fixtures/v3/issue_event.json
449
- - spec/fixtures/v3/issue_events.json
450
- - spec/fixtures/v3/issues.json
451
- - spec/fixtures/v3/label.json
452
- - spec/fixtures/v3/labels.json
453
- - spec/fixtures/v3/languages.json
454
- - spec/fixtures/v3/list_commit_comments.json
455
- - spec/fixtures/v3/markdown_gfm
456
- - spec/fixtures/v3/merge.json
457
- - spec/fixtures/v3/milestone.json
458
- - spec/fixtures/v3/milestones.json
459
- - spec/fixtures/v3/not_found.json
460
- - spec/fixtures/v3/organization-repositories.json
461
- - spec/fixtures/v3/organization-repository.json
462
- - spec/fixtures/v3/organization.json
463
- - spec/fixtures/v3/organization_members.json
464
- - spec/fixtures/v3/organization_team_members.json
465
- - spec/fixtures/v3/organization_team_repos.json
466
- - spec/fixtures/v3/organizations.json
467
- - spec/fixtures/v3/public_events.json
468
- - spec/fixtures/v3/public_gists.json
469
- - spec/fixtures/v3/public_key.json
470
- - spec/fixtures/v3/public_keys.json
471
- - spec/fixtures/v3/pull_created.json
472
- - spec/fixtures/v3/pull_request.json
473
- - spec/fixtures/v3/pull_request_comments.json
474
- - spec/fixtures/v3/pull_request_commits.json
475
- - spec/fixtures/v3/pull_request_files.json
476
- - spec/fixtures/v3/pull_request_merged.json
477
- - spec/fixtures/v3/pull_requests.json
478
- - spec/fixtures/v3/pull_update.json
479
- - spec/fixtures/v3/readme.json
480
- - spec/fixtures/v3/ref.json
481
- - spec/fixtures/v3/ref_create.json
482
- - spec/fixtures/v3/ref_update.json
483
- - spec/fixtures/v3/refs.json
484
- - spec/fixtures/v3/refs_tags.json
485
- - spec/fixtures/v3/repo_assignees.json
486
- - spec/fixtures/v3/repo_events.json
487
- - spec/fixtures/v3/repo_issues_events.json
488
- - spec/fixtures/v3/repositories.json
489
- - spec/fixtures/v3/repository.json
490
- - spec/fixtures/v3/stargazers.json
491
- - spec/fixtures/v3/starred.json
492
- - spec/fixtures/v3/starred_gists.json
493
- - spec/fixtures/v3/status.json
494
- - spec/fixtures/v3/statuses.json
495
- - spec/fixtures/v3/tag.json
496
- - spec/fixtures/v3/tag_create.json
497
- - spec/fixtures/v3/tags.json
498
- - spec/fixtures/v3/team.json
499
- - spec/fixtures/v3/teams.json
500
- - spec/fixtures/v3/tree.json
501
- - spec/fixtures/v3/tree_create.json
502
- - spec/fixtures/v3/user.json
503
- - spec/fixtures/v3/user_events.json
504
- - spec/fixtures/v3/watched.json
505
- - spec/fixtures/v3/watchers.json
479
+ - spec/fixtures/list_commit_comments.json
480
+ - spec/fixtures/markdown_gfm
481
+ - spec/fixtures/merge.json
482
+ - spec/fixtures/milestone.json
483
+ - spec/fixtures/milestones.json
484
+ - spec/fixtures/not_found.json
485
+ - spec/fixtures/notification_thread.json
486
+ - spec/fixtures/notifications.json
487
+ - spec/fixtures/organization-repositories.json
488
+ - spec/fixtures/organization-repository.json
489
+ - spec/fixtures/organization.json
490
+ - spec/fixtures/organization_members.json
491
+ - spec/fixtures/organization_team_members.json
492
+ - spec/fixtures/organization_team_repos.json
493
+ - spec/fixtures/organizations.json
494
+ - spec/fixtures/public_events.json
495
+ - spec/fixtures/public_gists.json
496
+ - spec/fixtures/public_key.json
497
+ - spec/fixtures/public_key_update.json
498
+ - spec/fixtures/public_keys.json
499
+ - spec/fixtures/pull_created.json
500
+ - spec/fixtures/pull_request.json
501
+ - spec/fixtures/pull_request_comment.json
502
+ - spec/fixtures/pull_request_comment_create.json
503
+ - spec/fixtures/pull_request_comment_reply.json
504
+ - spec/fixtures/pull_request_comment_update.json
505
+ - spec/fixtures/pull_request_comments.json
506
+ - spec/fixtures/pull_request_commits.json
507
+ - spec/fixtures/pull_request_files.json
508
+ - spec/fixtures/pull_request_merged.json
509
+ - spec/fixtures/pull_requests.json
510
+ - spec/fixtures/pull_update.json
511
+ - spec/fixtures/readme.json
512
+ - spec/fixtures/ref.json
513
+ - spec/fixtures/ref_create.json
514
+ - spec/fixtures/ref_update.json
515
+ - spec/fixtures/refs.json
516
+ - spec/fixtures/refs_tags.json
517
+ - spec/fixtures/repo_assignees.json
518
+ - spec/fixtures/repo_events.json
519
+ - spec/fixtures/repo_issues_events.json
520
+ - spec/fixtures/repositories.json
521
+ - spec/fixtures/repository.json
522
+ - spec/fixtures/repository_notifications.json
523
+ - spec/fixtures/say.txt
524
+ - spec/fixtures/say_custom.txt
525
+ - spec/fixtures/stargazers.json
526
+ - spec/fixtures/starred.json
527
+ - spec/fixtures/starred_gists.json
528
+ - spec/fixtures/status.json
529
+ - spec/fixtures/statuses.json
530
+ - spec/fixtures/subscribers.json
531
+ - spec/fixtures/subscription.json
532
+ - spec/fixtures/subscription_update.json
533
+ - spec/fixtures/subscriptions.json
534
+ - spec/fixtures/tag.json
535
+ - spec/fixtures/tag_create.json
536
+ - spec/fixtures/tags.json
537
+ - spec/fixtures/team.json
538
+ - spec/fixtures/teams.json
539
+ - spec/fixtures/thread_subscription.json
540
+ - spec/fixtures/thread_subscription_update.json
541
+ - spec/fixtures/tree.json
542
+ - spec/fixtures/tree_create.json
543
+ - spec/fixtures/user.json
544
+ - spec/fixtures/user_events.json
545
+ - spec/fixtures/validation_failed.json
546
+ - spec/fixtures/watched.json
547
+ - spec/fixtures/watchers.json
506
548
  - spec/helper.rb
507
549
  - spec/octokit/client/authorizations_spec.rb
508
550
  - spec/octokit/client/commits_spec.rb
@@ -516,6 +558,7 @@ test_files:
516
558
  - spec/octokit/client/labels_spec.rb
517
559
  - spec/octokit/client/markdown_spec.rb
518
560
  - spec/octokit/client/milestones_spec.rb
561
+ - spec/octokit/client/notifications_spec.rb
519
562
  - spec/octokit/client/objects_spec.rb
520
563
  - spec/octokit/client/organizations_spec.rb
521
564
  - spec/octokit/client/pub_sub_hubbub/service_hooks_spec.rb
@@ -523,10 +566,11 @@ test_files:
523
566
  - spec/octokit/client/pulls_spec.rb
524
567
  - spec/octokit/client/refs_spec.rb
525
568
  - spec/octokit/client/repositories_spec.rb
569
+ - spec/octokit/client/say_spec.rb
526
570
  - spec/octokit/client/statuses_spec.rb
527
571
  - spec/octokit/client/users_spec.rb
528
572
  - spec/octokit/client_spec.rb
529
573
  - spec/octokit/gist_spec.rb
574
+ - spec/octokit/repository_spec.rb
530
575
  - spec/octokit_spec.rb
531
- - spec/repository_spec.rb
532
576
  has_rdoc: