worochi 0.0.7 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/worochi/agent/{sample.rb → #example.rb} +2 -14
  3. data/lib/worochi/agent/dropbox.rb +3 -13
  4. data/lib/worochi/agent/github.rb +8 -23
  5. data/lib/worochi/agent.rb +46 -18
  6. data/lib/worochi/config/#example.yml +35 -0
  7. data/lib/worochi/config/dropbox.yml +14 -0
  8. data/lib/worochi/config/github.yml +17 -0
  9. data/lib/worochi/config.rb +9 -84
  10. data/lib/worochi/configurator.rb +120 -0
  11. data/lib/worochi/helper/github_helper.rb +111 -0
  12. data/lib/worochi/helper.rb +28 -7
  13. data/lib/worochi/item.rb +5 -3
  14. data/lib/worochi/log.rb +8 -14
  15. data/lib/worochi/oauth.rb +69 -0
  16. data/lib/worochi/version.rb +1 -1
  17. data/lib/worochi.rb +20 -3
  18. data/spec/cassettes/Worochi/_push/pushes_with_agents.yml +512 -0
  19. data/spec/cassettes/Worochi_Agent_Dropbox/_push_item/pushes_it_chunked_if_size_exceeds_limit.yml +1049 -0
  20. data/spec/cassettes/Worochi_Agent_Dropbox/_push_item_chunked/raises_an_error.yml +44 -0
  21. data/spec/cassettes/Worochi_Agent_Dropbox/_push_items/pushes_multiple_items.yml +165 -0
  22. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files/raises_error_on_invalid_path.yml +38 -0
  23. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files_and_folders/shows_detailed_listing.yml +79 -0
  24. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files_and_folders/shows_detailed_listing_including_the_required_fields.yml +79 -0
  25. data/spec/cassettes/Worochi_Agent_Github/_list/works_with_absolute_paths.yml +12 -12
  26. data/spec/cassettes/Worochi_Agent_Github/_repos/lists_the_repos.yml +207 -0
  27. data/spec/cassettes/Worochi_Agent_Github/_source_branch/retrieves_the_master_branch_correctly.yml +6 -6
  28. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/accepts_a_different_relative_path.yml +12 -12
  29. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/contains_file1.yml +12 -12
  30. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/does_not_contain_folder1.yml +12 -12
  31. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/raises_error_on_invalid_path.yml +133 -0
  32. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files_and_folders/contains_folder1_and_file1.yml +24 -24
  33. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files_and_folders/shows_detailed_listing_including_the_required_fields.yml +133 -0
  34. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/accepts_a_different_relative_path.yml +12 -12
  35. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/contains_folder1.yml +12 -12
  36. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/does_not_contain_file1.yml +12 -12
  37. data/spec/cassettes/Worochi_Agent_Github/{_push_all → modifies_the_repo/_push_all}/pushes_a_list_of_items_to_create_a_new_commit.yml +80 -80
  38. data/spec/cassettes/Worochi_Agent_Github/{_push_all → modifies_the_repo/_push_all}/pushes_the_file_to_the_right_place.yml +60 -60
  39. data/spec/cassettes/Worochi_Agent_Github/modifies_the_repo/_push_blob/pushes_the_blob_even_when_it_is_larger_than_block_size.yml +181 -0
  40. data/spec/cassettes/Worochi_Agent_Github/modifies_the_repo/_push_item/pushes_a_single_item_and_makes_a_commit.yml +687 -0
  41. data/spec/cassettes/Worochi_Agent_Github/modifies_the_repo/_stream_blob/streams_the_file_as_an_Base64_JSON_field.yml +181 -0
  42. data/spec/cassettes/Worochi_OAuth/_flow_end/rejects_bad_code.yml +56 -0
  43. data/spec/{helper.rb → spec_helper.rb} +14 -1
  44. data/spec/support/aws_uri_matcher.rb +1 -1
  45. data/spec/support/shared_exampes_for_agents.rb +13 -2
  46. data/spec/support/test_files.rb +4 -4
  47. data/spec/worochi/agent/dropbox_spec.rb +29 -3
  48. data/spec/worochi/agent/github_spec.rb +54 -26
  49. data/spec/worochi/agent_spec.rb +34 -1
  50. data/spec/worochi/config_spec.rb +46 -30
  51. data/spec/worochi/helper/github_helper_spec.rb +94 -0
  52. data/spec/worochi/helper_spec.rb +15 -3
  53. data/spec/worochi/item_spec.rb +9 -6
  54. data/spec/worochi/log_spec.rb +30 -0
  55. data/spec/worochi/oauth_spec.rb +33 -0
  56. data/spec/worochi_spec.rb +25 -1
  57. data/worochi.gemspec +5 -1
  58. metadata +104 -11
  59. data/lib/worochi/helper/github.rb +0 -100
  60. data/spec/worochi/helper/github_spec.rb +0 -57
@@ -0,0 +1,687 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Octokit Ruby Gem 1.25.0
12
+ Accept:
13
+ - application/vnd.github.beta+json
14
+ Authorization:
15
+ - token <GITHUB_TOKEN>
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 422
21
+ message: Unprocessable Entity
22
+ headers:
23
+ Server:
24
+ - GitHub.com
25
+ Date:
26
+ - Thu, 15 Aug 2013 21:10:04 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Status:
30
+ - 422 Unprocessable Entity
31
+ X-Ratelimit-Limit:
32
+ - '5000'
33
+ X-Ratelimit-Remaining:
34
+ - '4696'
35
+ X-Ratelimit-Reset:
36
+ - '1376602835'
37
+ X-Oauth-Scopes:
38
+ - user, public_repo, repo, gist
39
+ X-Accepted-Oauth-Scopes:
40
+ - repo, public_repo, repo:status, delete_repo, site_admin
41
+ X-Github-Media-Type:
42
+ - github.beta; format=json
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ Content-Length:
46
+ - '31'
47
+ Access-Control-Allow-Credentials:
48
+ - 'true'
49
+ Access-Control-Expose-Headers:
50
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
51
+ X-Accepted-OAuth-Scopes
52
+ Access-Control-Allow-Origin:
53
+ - '*'
54
+ body:
55
+ encoding: UTF-8
56
+ string: '{"message":"Validation Failed"}'
57
+ http_version:
58
+ recorded_at: Thu, 15 Aug 2013 21:10:04 GMT
59
+ - request:
60
+ method: get
61
+ uri: https://api.github.com/repos/darkmirage/test/branches/master
62
+ body:
63
+ encoding: US-ASCII
64
+ string: ''
65
+ headers:
66
+ User-Agent:
67
+ - Octokit Ruby Gem 1.25.0
68
+ Accept:
69
+ - application/vnd.github.beta+json
70
+ Authorization:
71
+ - token <GITHUB_TOKEN>
72
+ Accept-Encoding:
73
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
74
+ response:
75
+ status:
76
+ code: 200
77
+ message: OK
78
+ headers:
79
+ Server:
80
+ - GitHub.com
81
+ Date:
82
+ - Thu, 15 Aug 2013 21:10:05 GMT
83
+ Content-Type:
84
+ - application/json; charset=utf-8
85
+ Transfer-Encoding:
86
+ - chunked
87
+ Status:
88
+ - 200 OK
89
+ X-Ratelimit-Limit:
90
+ - '5000'
91
+ X-Ratelimit-Remaining:
92
+ - '4695'
93
+ X-Ratelimit-Reset:
94
+ - '1376602835'
95
+ X-Oauth-Scopes:
96
+ - user, public_repo, repo, gist
97
+ X-Accepted-Oauth-Scopes:
98
+ - repo, public_repo, repo:status, delete_repo, site_admin
99
+ X-Github-Media-Type:
100
+ - github.beta; format=json
101
+ X-Content-Type-Options:
102
+ - nosniff
103
+ Access-Control-Allow-Credentials:
104
+ - 'true'
105
+ Access-Control-Expose-Headers:
106
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
107
+ X-Accepted-OAuth-Scopes
108
+ Access-Control-Allow-Origin:
109
+ - '*'
110
+ Etag:
111
+ - '"1e9a35ec492ea865f92a1b38b774b076"'
112
+ Cache-Control:
113
+ - max-age=0, private, must-revalidate
114
+ Vary:
115
+ - Accept-Encoding
116
+ body:
117
+ encoding: UTF-8
118
+ string: '{"name":"master","commit":{"sha":"cdddc3941866854cdb41c023d0f5240ed10df053","commit":{"author":{"name":"Raven
119
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-09T23:23:24Z"},"committer":{"name":"Raven
120
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-09T23:23:24Z"},"message":"Added
121
+ subfolder testing","tree":{"sha":"6553d302dfc55bf5cd09c07a6125753af023c7a5","url":"https://api.github.com/repos/darkmirage/test/git/trees/6553d302dfc55bf5cd09c07a6125753af023c7a5"},"url":"https://api.github.com/repos/darkmirage/test/git/commits/cdddc3941866854cdb41c023d0f5240ed10df053","comment_count":0},"url":"https://api.github.com/repos/darkmirage/test/commits/cdddc3941866854cdb41c023d0f5240ed10df053","html_url":"https://github.com/darkmirage/test/commit/cdddc3941866854cdb41c023d0f5240ed10df053","comments_url":"https://api.github.com/repos/darkmirage/test/commits/cdddc3941866854cdb41c023d0f5240ed10df053/comments","author":{"login":"darkmirage","id":1635019,"avatar_url":"https://0.gravatar.com/avatar/5111569f6bba258cfe81d12af3ba99a2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"5111569f6bba258cfe81d12af3ba99a2","url":"https://api.github.com/users/darkmirage","html_url":"https://github.com/darkmirage","followers_url":"https://api.github.com/users/darkmirage/followers","following_url":"https://api.github.com/users/darkmirage/following{/other_user}","gists_url":"https://api.github.com/users/darkmirage/gists{/gist_id}","starred_url":"https://api.github.com/users/darkmirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkmirage/subscriptions","organizations_url":"https://api.github.com/users/darkmirage/orgs","repos_url":"https://api.github.com/users/darkmirage/repos","events_url":"https://api.github.com/users/darkmirage/events{/privacy}","received_events_url":"https://api.github.com/users/darkmirage/received_events","type":"User"},"committer":{"login":"darkmirage","id":1635019,"avatar_url":"https://0.gravatar.com/avatar/5111569f6bba258cfe81d12af3ba99a2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"5111569f6bba258cfe81d12af3ba99a2","url":"https://api.github.com/users/darkmirage","html_url":"https://github.com/darkmirage","followers_url":"https://api.github.com/users/darkmirage/followers","following_url":"https://api.github.com/users/darkmirage/following{/other_user}","gists_url":"https://api.github.com/users/darkmirage/gists{/gist_id}","starred_url":"https://api.github.com/users/darkmirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkmirage/subscriptions","organizations_url":"https://api.github.com/users/darkmirage/orgs","repos_url":"https://api.github.com/users/darkmirage/repos","events_url":"https://api.github.com/users/darkmirage/events{/privacy}","received_events_url":"https://api.github.com/users/darkmirage/received_events","type":"User"},"parents":[{"sha":"9da46c5d5e0758a759f80de6283eba05c1f04735","url":"https://api.github.com/repos/darkmirage/test/commits/9da46c5d5e0758a759f80de6283eba05c1f04735","html_url":"https://github.com/darkmirage/test/commit/9da46c5d5e0758a759f80de6283eba05c1f04735"}]},"_links":{"self":"https://api.github.com/repos/darkmirage/test/branches/master","html":"https://github.com/darkmirage/test/tree/master"}}'
122
+ http_version:
123
+ recorded_at: Thu, 15 Aug 2013 21:10:05 GMT
124
+ - request:
125
+ method: post
126
+ uri: https://api.github.com/repos/darkmirage/test/git/blobs
127
+ body:
128
+ encoding: UTF-8
129
+ string: '{"content":"VGhpcyBpcyBhIGZpbGUgdXNlZCBmb3IgUlNwZWMgdGVzdHMgaW52b2x2aW5nIFdvcm9jaGk6Okl0ZW0u","encoding":"base64"}'
130
+ headers:
131
+ User-Agent:
132
+ - Octokit Ruby Gem 1.25.0
133
+ Accept:
134
+ - application/vnd.github.beta+json
135
+ Authorization:
136
+ - token <GITHUB_TOKEN>
137
+ Content-Type:
138
+ - application/json
139
+ Accept-Encoding:
140
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
141
+ response:
142
+ status:
143
+ code: 201
144
+ message: Created
145
+ headers:
146
+ Server:
147
+ - GitHub.com
148
+ Date:
149
+ - Thu, 15 Aug 2013 21:10:05 GMT
150
+ Content-Type:
151
+ - application/json; charset=utf-8
152
+ Status:
153
+ - 201 Created
154
+ X-Ratelimit-Limit:
155
+ - '5000'
156
+ X-Ratelimit-Remaining:
157
+ - '4694'
158
+ X-Ratelimit-Reset:
159
+ - '1376602835'
160
+ X-Oauth-Scopes:
161
+ - user, public_repo, repo, gist
162
+ X-Accepted-Oauth-Scopes:
163
+ - repo, public_repo, repo:status, delete_repo, site_admin
164
+ Location:
165
+ - https://api.github.com/repos/darkmirage/test/git/blobs/5df468c4497e072139462b88cb78e1df4357534b
166
+ X-Github-Media-Type:
167
+ - github.beta; format=json
168
+ X-Content-Type-Options:
169
+ - nosniff
170
+ Content-Length:
171
+ - '154'
172
+ Access-Control-Allow-Credentials:
173
+ - 'true'
174
+ Access-Control-Expose-Headers:
175
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
176
+ X-Accepted-OAuth-Scopes
177
+ Access-Control-Allow-Origin:
178
+ - '*'
179
+ Etag:
180
+ - '"0e380113ab3ae5bd4b7290693137935d"'
181
+ Cache-Control:
182
+ - max-age=0, private, must-revalidate
183
+ body:
184
+ encoding: UTF-8
185
+ string: '{"sha":"5df468c4497e072139462b88cb78e1df4357534b","url":"https://api.github.com/repos/darkmirage/test/git/blobs/5df468c4497e072139462b88cb78e1df4357534b"}'
186
+ http_version:
187
+ recorded_at: Thu, 15 Aug 2013 21:10:05 GMT
188
+ - request:
189
+ method: post
190
+ uri: https://api.github.com/repos/darkmirage/test/git/trees
191
+ body:
192
+ encoding: UTF-8
193
+ string: '{"base_tree":"cdddc3941866854cdb41c023d0f5240ed10df053","tree":[{"path":"folder2/test_file","sha":"5df468c4497e072139462b88cb78e1df4357534b","type":"blob","mode":"100644"}]}'
194
+ headers:
195
+ User-Agent:
196
+ - Octokit Ruby Gem 1.25.0
197
+ Accept:
198
+ - application/vnd.github.beta+json
199
+ Authorization:
200
+ - token <GITHUB_TOKEN>
201
+ Content-Type:
202
+ - application/json
203
+ Accept-Encoding:
204
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
205
+ response:
206
+ status:
207
+ code: 201
208
+ message: Created
209
+ headers:
210
+ Server:
211
+ - GitHub.com
212
+ Date:
213
+ - Thu, 15 Aug 2013 21:10:06 GMT
214
+ Content-Type:
215
+ - application/json; charset=utf-8
216
+ Status:
217
+ - 201 Created
218
+ X-Ratelimit-Limit:
219
+ - '5000'
220
+ X-Ratelimit-Remaining:
221
+ - '4693'
222
+ X-Ratelimit-Reset:
223
+ - '1376602835'
224
+ X-Oauth-Scopes:
225
+ - user, public_repo, repo, gist
226
+ X-Accepted-Oauth-Scopes:
227
+ - repo, public_repo, repo:status, delete_repo, site_admin
228
+ Location:
229
+ - https://api.github.com/repos/darkmirage/test/git/trees/9143bc4d904cad09b8bfe5d5f29d2640234b783a
230
+ X-Github-Media-Type:
231
+ - github.beta; format=json
232
+ X-Content-Type-Options:
233
+ - nosniff
234
+ Content-Length:
235
+ - '1407'
236
+ Access-Control-Allow-Credentials:
237
+ - 'true'
238
+ Access-Control-Expose-Headers:
239
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
240
+ X-Accepted-OAuth-Scopes
241
+ Access-Control-Allow-Origin:
242
+ - '*'
243
+ Etag:
244
+ - '"ee74a42523ad470d771f65bbe384ac8e"'
245
+ Cache-Control:
246
+ - max-age=0, private, must-revalidate
247
+ body:
248
+ encoding: UTF-8
249
+ string: '{"sha":"9143bc4d904cad09b8bfe5d5f29d2640234b783a","url":"https://api.github.com/repos/darkmirage/test/git/trees/9143bc4d904cad09b8bfe5d5f29d2640234b783a","tree":[{"mode":"100644","type":"blob","sha":"398cd945a422cff4321d613a3c5aef57b0b27da2","path":"LICENSE","size":1078,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/398cd945a422cff4321d613a3c5aef57b0b27da2"},{"mode":"100644","type":"blob","sha":"453312977f72f7e37d96bdc6c5b5e4c9c59072f1","path":"README.md","size":20,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/453312977f72f7e37d96bdc6c5b5e4c9c59072f1"},{"mode":"100644","type":"blob","sha":"38a226454dab3931dbb694b3c3ae94e02d110dcf","path":"file1","size":18,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/38a226454dab3931dbb694b3c3ae94e02d110dcf"},{"mode":"040000","type":"tree","sha":"ec677e6fb544f1f197f8f02bcbaaededaac23bb8","path":"folder1","url":"https://api.github.com/repos/darkmirage/test/git/trees/ec677e6fb544f1f197f8f02bcbaaededaac23bb8"},{"mode":"040000","type":"tree","sha":"d6c5d03064924906afd8288388dd9102380c6fe4","path":"folder2","url":"https://api.github.com/repos/darkmirage/test/git/trees/d6c5d03064924906afd8288388dd9102380c6fe4"},{"mode":"040000","type":"tree","sha":"d750655104da52a0f691c399528a29cf5fa594c2","path":"folder3","url":"https://api.github.com/repos/darkmirage/test/git/trees/d750655104da52a0f691c399528a29cf5fa594c2"}]}'
250
+ http_version:
251
+ recorded_at: Thu, 15 Aug 2013 21:10:06 GMT
252
+ - request:
253
+ method: get
254
+ uri: https://api.github.com/repos/darkmirage/test/branches/rspec
255
+ body:
256
+ encoding: US-ASCII
257
+ string: ''
258
+ headers:
259
+ User-Agent:
260
+ - Octokit Ruby Gem 1.25.0
261
+ Accept:
262
+ - application/vnd.github.beta+json
263
+ Authorization:
264
+ - token <GITHUB_TOKEN>
265
+ Accept-Encoding:
266
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
267
+ response:
268
+ status:
269
+ code: 404
270
+ message: Not Found
271
+ headers:
272
+ Server:
273
+ - GitHub.com
274
+ Date:
275
+ - Thu, 15 Aug 2013 21:10:06 GMT
276
+ Content-Type:
277
+ - application/json; charset=utf-8
278
+ Transfer-Encoding:
279
+ - chunked
280
+ Status:
281
+ - 404 Not Found
282
+ X-Ratelimit-Limit:
283
+ - '5000'
284
+ X-Ratelimit-Remaining:
285
+ - '4692'
286
+ X-Ratelimit-Reset:
287
+ - '1376602835'
288
+ X-Oauth-Scopes:
289
+ - user, public_repo, repo, gist
290
+ X-Accepted-Oauth-Scopes:
291
+ - repo, public_repo, repo:status, delete_repo, site_admin
292
+ X-Github-Media-Type:
293
+ - github.beta; format=json
294
+ X-Content-Type-Options:
295
+ - nosniff
296
+ Access-Control-Allow-Credentials:
297
+ - 'true'
298
+ Access-Control-Expose-Headers:
299
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
300
+ X-Accepted-OAuth-Scopes
301
+ Access-Control-Allow-Origin:
302
+ - '*'
303
+ body:
304
+ encoding: UTF-8
305
+ string: '{"message":"Branch not found"}'
306
+ http_version:
307
+ recorded_at: Thu, 15 Aug 2013 21:10:06 GMT
308
+ - request:
309
+ method: get
310
+ uri: https://api.github.com/repos/darkmirage/test/branches/master
311
+ body:
312
+ encoding: US-ASCII
313
+ string: ''
314
+ headers:
315
+ User-Agent:
316
+ - Octokit Ruby Gem 1.25.0
317
+ Accept:
318
+ - application/vnd.github.beta+json
319
+ Authorization:
320
+ - token <GITHUB_TOKEN>
321
+ Accept-Encoding:
322
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
323
+ response:
324
+ status:
325
+ code: 200
326
+ message: OK
327
+ headers:
328
+ Server:
329
+ - GitHub.com
330
+ Date:
331
+ - Thu, 15 Aug 2013 21:10:07 GMT
332
+ Content-Type:
333
+ - application/json; charset=utf-8
334
+ Transfer-Encoding:
335
+ - chunked
336
+ Status:
337
+ - 200 OK
338
+ X-Ratelimit-Limit:
339
+ - '5000'
340
+ X-Ratelimit-Remaining:
341
+ - '4691'
342
+ X-Ratelimit-Reset:
343
+ - '1376602835'
344
+ X-Oauth-Scopes:
345
+ - user, public_repo, repo, gist
346
+ X-Accepted-Oauth-Scopes:
347
+ - repo, public_repo, repo:status, delete_repo, site_admin
348
+ X-Github-Media-Type:
349
+ - github.beta; format=json
350
+ X-Content-Type-Options:
351
+ - nosniff
352
+ Access-Control-Allow-Credentials:
353
+ - 'true'
354
+ Access-Control-Expose-Headers:
355
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
356
+ X-Accepted-OAuth-Scopes
357
+ Access-Control-Allow-Origin:
358
+ - '*'
359
+ Etag:
360
+ - '"1e9a35ec492ea865f92a1b38b774b076"'
361
+ Cache-Control:
362
+ - max-age=0, private, must-revalidate
363
+ Vary:
364
+ - Accept-Encoding
365
+ body:
366
+ encoding: UTF-8
367
+ string: '{"name":"master","commit":{"sha":"cdddc3941866854cdb41c023d0f5240ed10df053","commit":{"author":{"name":"Raven
368
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-09T23:23:24Z"},"committer":{"name":"Raven
369
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-09T23:23:24Z"},"message":"Added
370
+ subfolder testing","tree":{"sha":"6553d302dfc55bf5cd09c07a6125753af023c7a5","url":"https://api.github.com/repos/darkmirage/test/git/trees/6553d302dfc55bf5cd09c07a6125753af023c7a5"},"url":"https://api.github.com/repos/darkmirage/test/git/commits/cdddc3941866854cdb41c023d0f5240ed10df053","comment_count":0},"url":"https://api.github.com/repos/darkmirage/test/commits/cdddc3941866854cdb41c023d0f5240ed10df053","html_url":"https://github.com/darkmirage/test/commit/cdddc3941866854cdb41c023d0f5240ed10df053","comments_url":"https://api.github.com/repos/darkmirage/test/commits/cdddc3941866854cdb41c023d0f5240ed10df053/comments","author":{"login":"darkmirage","id":1635019,"avatar_url":"https://0.gravatar.com/avatar/5111569f6bba258cfe81d12af3ba99a2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"5111569f6bba258cfe81d12af3ba99a2","url":"https://api.github.com/users/darkmirage","html_url":"https://github.com/darkmirage","followers_url":"https://api.github.com/users/darkmirage/followers","following_url":"https://api.github.com/users/darkmirage/following{/other_user}","gists_url":"https://api.github.com/users/darkmirage/gists{/gist_id}","starred_url":"https://api.github.com/users/darkmirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkmirage/subscriptions","organizations_url":"https://api.github.com/users/darkmirage/orgs","repos_url":"https://api.github.com/users/darkmirage/repos","events_url":"https://api.github.com/users/darkmirage/events{/privacy}","received_events_url":"https://api.github.com/users/darkmirage/received_events","type":"User"},"committer":{"login":"darkmirage","id":1635019,"avatar_url":"https://0.gravatar.com/avatar/5111569f6bba258cfe81d12af3ba99a2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"5111569f6bba258cfe81d12af3ba99a2","url":"https://api.github.com/users/darkmirage","html_url":"https://github.com/darkmirage","followers_url":"https://api.github.com/users/darkmirage/followers","following_url":"https://api.github.com/users/darkmirage/following{/other_user}","gists_url":"https://api.github.com/users/darkmirage/gists{/gist_id}","starred_url":"https://api.github.com/users/darkmirage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkmirage/subscriptions","organizations_url":"https://api.github.com/users/darkmirage/orgs","repos_url":"https://api.github.com/users/darkmirage/repos","events_url":"https://api.github.com/users/darkmirage/events{/privacy}","received_events_url":"https://api.github.com/users/darkmirage/received_events","type":"User"},"parents":[{"sha":"9da46c5d5e0758a759f80de6283eba05c1f04735","url":"https://api.github.com/repos/darkmirage/test/commits/9da46c5d5e0758a759f80de6283eba05c1f04735","html_url":"https://github.com/darkmirage/test/commit/9da46c5d5e0758a759f80de6283eba05c1f04735"}]},"_links":{"self":"https://api.github.com/repos/darkmirage/test/branches/master","html":"https://github.com/darkmirage/test/tree/master"}}'
371
+ http_version:
372
+ recorded_at: Thu, 15 Aug 2013 21:10:07 GMT
373
+ - request:
374
+ method: post
375
+ uri: https://api.github.com/repos/darkmirage/test/git/refs
376
+ body:
377
+ encoding: UTF-8
378
+ string: '{"ref":"refs/heads/rspec","sha":"cdddc3941866854cdb41c023d0f5240ed10df053"}'
379
+ headers:
380
+ User-Agent:
381
+ - Octokit Ruby Gem 1.25.0
382
+ Accept:
383
+ - application/vnd.github.beta+json
384
+ Authorization:
385
+ - token <GITHUB_TOKEN>
386
+ Content-Type:
387
+ - application/json
388
+ Accept-Encoding:
389
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
390
+ response:
391
+ status:
392
+ code: 201
393
+ message: Created
394
+ headers:
395
+ Server:
396
+ - GitHub.com
397
+ Date:
398
+ - Thu, 15 Aug 2013 21:10:08 GMT
399
+ Content-Type:
400
+ - application/json; charset=utf-8
401
+ Status:
402
+ - 201 Created
403
+ X-Ratelimit-Limit:
404
+ - '5000'
405
+ X-Ratelimit-Remaining:
406
+ - '4690'
407
+ X-Ratelimit-Reset:
408
+ - '1376602835'
409
+ X-Oauth-Scopes:
410
+ - user, public_repo, repo, gist
411
+ X-Accepted-Oauth-Scopes:
412
+ - repo, public_repo, repo:status, delete_repo, site_admin
413
+ Location:
414
+ - https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec
415
+ X-Github-Media-Type:
416
+ - github.beta; format=json
417
+ X-Content-Type-Options:
418
+ - nosniff
419
+ Content-Length:
420
+ - '282'
421
+ Access-Control-Allow-Credentials:
422
+ - 'true'
423
+ Access-Control-Expose-Headers:
424
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
425
+ X-Accepted-OAuth-Scopes
426
+ Access-Control-Allow-Origin:
427
+ - '*'
428
+ Etag:
429
+ - '"0877b16c88453759ce157491732ce0da"'
430
+ Cache-Control:
431
+ - max-age=0, private, must-revalidate
432
+ body:
433
+ encoding: UTF-8
434
+ string: '{"ref":"refs/heads/rspec","url":"https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec","object":{"sha":"cdddc3941866854cdb41c023d0f5240ed10df053","type":"commit","url":"https://api.github.com/repos/darkmirage/test/git/commits/cdddc3941866854cdb41c023d0f5240ed10df053"}}'
435
+ http_version:
436
+ recorded_at: Thu, 15 Aug 2013 21:10:08 GMT
437
+ - request:
438
+ method: post
439
+ uri: https://api.github.com/repos/darkmirage/test/git/commits
440
+ body:
441
+ encoding: UTF-8
442
+ string: '{"message":"RSpec Test","tree":"9143bc4d904cad09b8bfe5d5f29d2640234b783a","parents":["cdddc3941866854cdb41c023d0f5240ed10df053"]}'
443
+ headers:
444
+ User-Agent:
445
+ - Octokit Ruby Gem 1.25.0
446
+ Accept:
447
+ - application/vnd.github.beta+json
448
+ Authorization:
449
+ - token <GITHUB_TOKEN>
450
+ Content-Type:
451
+ - application/json
452
+ Accept-Encoding:
453
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
454
+ response:
455
+ status:
456
+ code: 201
457
+ message: Created
458
+ headers:
459
+ Server:
460
+ - GitHub.com
461
+ Date:
462
+ - Thu, 15 Aug 2013 21:10:08 GMT
463
+ Content-Type:
464
+ - application/json; charset=utf-8
465
+ Status:
466
+ - 201 Created
467
+ X-Ratelimit-Limit:
468
+ - '5000'
469
+ X-Ratelimit-Remaining:
470
+ - '4689'
471
+ X-Ratelimit-Reset:
472
+ - '1376602835'
473
+ X-Oauth-Scopes:
474
+ - user, public_repo, repo, gist
475
+ X-Accepted-Oauth-Scopes:
476
+ - repo, public_repo, repo:status, delete_repo, site_admin
477
+ Location:
478
+ - https://api.github.com/repos/darkmirage/test/git/commits/c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb
479
+ X-Github-Media-Type:
480
+ - github.beta; format=json
481
+ X-Content-Type-Options:
482
+ - nosniff
483
+ Content-Length:
484
+ - '895'
485
+ Access-Control-Allow-Credentials:
486
+ - 'true'
487
+ Access-Control-Expose-Headers:
488
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
489
+ X-Accepted-OAuth-Scopes
490
+ Access-Control-Allow-Origin:
491
+ - '*'
492
+ Etag:
493
+ - '"7bf78f0ef7c4c61a5b778c4dbbf9afd5"'
494
+ Cache-Control:
495
+ - max-age=0, private, must-revalidate
496
+ body:
497
+ encoding: UTF-8
498
+ string: '{"sha":"c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","url":"https://api.github.com/repos/darkmirage/test/git/commits/c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","html_url":"https://github.com/darkmirage/test/commits/c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","author":{"name":"Raven
499
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-15T21:10:08Z"},"committer":{"name":"Raven
500
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-15T21:10:08Z"},"tree":{"sha":"9143bc4d904cad09b8bfe5d5f29d2640234b783a","url":"https://api.github.com/repos/darkmirage/test/git/trees/9143bc4d904cad09b8bfe5d5f29d2640234b783a"},"message":"RSpec
501
+ Test","parents":[{"sha":"cdddc3941866854cdb41c023d0f5240ed10df053","url":"https://api.github.com/repos/darkmirage/test/git/commits/cdddc3941866854cdb41c023d0f5240ed10df053","html_url":"https://github.com/darkmirage/test/commits/cdddc3941866854cdb41c023d0f5240ed10df053"}]}'
502
+ http_version:
503
+ recorded_at: Thu, 15 Aug 2013 21:10:08 GMT
504
+ - request:
505
+ method: patch
506
+ uri: https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec
507
+ body:
508
+ encoding: UTF-8
509
+ string: '{"sha":"c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","force":true}'
510
+ headers:
511
+ User-Agent:
512
+ - Octokit Ruby Gem 1.25.0
513
+ Accept:
514
+ - application/vnd.github.beta+json
515
+ Authorization:
516
+ - token <GITHUB_TOKEN>
517
+ Content-Type:
518
+ - application/json
519
+ Accept-Encoding:
520
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
521
+ response:
522
+ status:
523
+ code: 200
524
+ message: OK
525
+ headers:
526
+ Server:
527
+ - GitHub.com
528
+ Date:
529
+ - Thu, 15 Aug 2013 21:10:09 GMT
530
+ Content-Type:
531
+ - application/json; charset=utf-8
532
+ Transfer-Encoding:
533
+ - chunked
534
+ Status:
535
+ - 200 OK
536
+ X-Ratelimit-Limit:
537
+ - '5000'
538
+ X-Ratelimit-Remaining:
539
+ - '4688'
540
+ X-Ratelimit-Reset:
541
+ - '1376602835'
542
+ X-Oauth-Scopes:
543
+ - user, public_repo, repo, gist
544
+ X-Accepted-Oauth-Scopes:
545
+ - repo, public_repo, repo:status, delete_repo, site_admin
546
+ X-Github-Media-Type:
547
+ - github.beta; format=json
548
+ X-Content-Type-Options:
549
+ - nosniff
550
+ Access-Control-Allow-Credentials:
551
+ - 'true'
552
+ Access-Control-Expose-Headers:
553
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
554
+ X-Accepted-OAuth-Scopes
555
+ Access-Control-Allow-Origin:
556
+ - '*'
557
+ Etag:
558
+ - '"743660bf35bdbc0a2ae59310b793d980"'
559
+ Cache-Control:
560
+ - max-age=0, private, must-revalidate
561
+ Vary:
562
+ - Accept-Encoding
563
+ body:
564
+ encoding: UTF-8
565
+ string: '{"ref":"refs/heads/rspec","url":"https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec","object":{"sha":"c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","type":"commit","url":"https://api.github.com/repos/darkmirage/test/git/commits/c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb"}}'
566
+ http_version:
567
+ recorded_at: Thu, 15 Aug 2013 21:10:09 GMT
568
+ - request:
569
+ method: get
570
+ uri: https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec
571
+ body:
572
+ encoding: US-ASCII
573
+ string: ''
574
+ headers:
575
+ User-Agent:
576
+ - Octokit Ruby Gem 1.25.0
577
+ Accept:
578
+ - application/vnd.github.beta+json
579
+ Authorization:
580
+ - token <GITHUB_TOKEN>
581
+ Accept-Encoding:
582
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
583
+ response:
584
+ status:
585
+ code: 200
586
+ message: OK
587
+ headers:
588
+ Server:
589
+ - GitHub.com
590
+ Date:
591
+ - Thu, 15 Aug 2013 21:10:10 GMT
592
+ Content-Type:
593
+ - application/json; charset=utf-8
594
+ Transfer-Encoding:
595
+ - chunked
596
+ Status:
597
+ - 200 OK
598
+ X-Ratelimit-Limit:
599
+ - '5000'
600
+ X-Ratelimit-Remaining:
601
+ - '4687'
602
+ X-Ratelimit-Reset:
603
+ - '1376602835'
604
+ Cache-Control:
605
+ - private, max-age=60, s-maxage=60
606
+ Last-Modified:
607
+ - Thu, 15 Aug 2013 21:10:10 GMT
608
+ Etag:
609
+ - '"2e0b3c7954d774d84fc87eb572cc5a41"'
610
+ X-Oauth-Scopes:
611
+ - user, public_repo, repo, gist
612
+ X-Accepted-Oauth-Scopes:
613
+ - repo, public_repo, repo:status, delete_repo, site_admin
614
+ Vary:
615
+ - Accept, Authorization, Cookie
616
+ - Accept-Encoding
617
+ X-Github-Media-Type:
618
+ - github.beta; format=json
619
+ X-Content-Type-Options:
620
+ - nosniff
621
+ Access-Control-Allow-Credentials:
622
+ - 'true'
623
+ Access-Control-Expose-Headers:
624
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
625
+ X-Accepted-OAuth-Scopes
626
+ Access-Control-Allow-Origin:
627
+ - '*'
628
+ body:
629
+ encoding: UTF-8
630
+ string: '{"ref":"refs/heads/rspec","url":"https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec","object":{"sha":"c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb","type":"commit","url":"https://api.github.com/repos/darkmirage/test/git/commits/c8db1fd96ffc5e421c77f763dfb3d26875f2a3fb"}}'
631
+ http_version:
632
+ recorded_at: Thu, 15 Aug 2013 21:10:10 GMT
633
+ - request:
634
+ method: delete
635
+ uri: https://api.github.com/repos/darkmirage/test/git/refs/heads/rspec
636
+ body:
637
+ encoding: US-ASCII
638
+ string: ''
639
+ headers:
640
+ User-Agent:
641
+ - Octokit Ruby Gem 1.25.0
642
+ Accept:
643
+ - application/vnd.github.beta+json
644
+ Authorization:
645
+ - token <GITHUB_TOKEN>
646
+ Accept-Encoding:
647
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
648
+ response:
649
+ status:
650
+ code: 204
651
+ message: No Content
652
+ headers:
653
+ Server:
654
+ - GitHub.com
655
+ Date:
656
+ - Thu, 15 Aug 2013 21:10:10 GMT
657
+ Status:
658
+ - 204 No Content
659
+ X-Ratelimit-Limit:
660
+ - '5000'
661
+ X-Ratelimit-Remaining:
662
+ - '4686'
663
+ X-Ratelimit-Reset:
664
+ - '1376602835'
665
+ X-Oauth-Scopes:
666
+ - user, public_repo, repo, gist
667
+ X-Accepted-Oauth-Scopes:
668
+ - repo, public_repo, repo:status, delete_repo, site_admin
669
+ X-Github-Media-Type:
670
+ - github.beta; format=json
671
+ X-Content-Type-Options:
672
+ - nosniff
673
+ Access-Control-Allow-Credentials:
674
+ - 'true'
675
+ Access-Control-Expose-Headers:
676
+ - ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes,
677
+ X-Accepted-OAuth-Scopes
678
+ Access-Control-Allow-Origin:
679
+ - '*'
680
+ Vary:
681
+ - Accept-Encoding
682
+ body:
683
+ encoding: UTF-8
684
+ string: ''
685
+ http_version:
686
+ recorded_at: Thu, 15 Aug 2013 21:10:10 GMT
687
+ recorded_with: VCR 2.5.0