worochi 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +20 -0
  3. data/lib/worochi/agent/dropbox.rb +26 -4
  4. data/lib/worochi/agent/github.rb +14 -9
  5. data/lib/worochi/agent/sample.rb +8 -3
  6. data/lib/worochi/agent.rb +64 -23
  7. data/lib/worochi/config.rb +34 -2
  8. data/lib/worochi/error.rb +1 -0
  9. data/lib/worochi/helper/github.rb +1 -0
  10. data/lib/worochi/helper.rb +10 -8
  11. data/lib/worochi/item.rb +18 -9
  12. data/lib/worochi/log.rb +11 -0
  13. data/lib/worochi/version.rb +4 -0
  14. data/lib/worochi.rb +23 -16
  15. data/spec/cassettes/Worochi_Agent_Dropbox/_list/works_with_absolute_paths.yml +60 -0
  16. data/spec/cassettes/Worochi_Agent_Dropbox/_push_item/pushes_a_single_item.yml +303 -0
  17. data/spec/cassettes/Worochi_Agent_Dropbox/_push_item_chunked/pushes_a_single_item_in_chunks.yml +349 -0
  18. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files/accepts_a_different_path.yml +60 -0
  19. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files/accepts_a_different_relative_path.yml +60 -0
  20. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_files/contains_file1.yml +79 -0
  21. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_folders/accepts_a_different_path.yml +60 -0
  22. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_folders/accepts_a_different_relative_path.yml +60 -0
  23. data/spec/cassettes/Worochi_Agent_Dropbox/it_should_behave_like_a_service_agent/_folders/contains_folder1.yml +79 -0
  24. data/spec/cassettes/Worochi_Agent_Github/_list/works_with_absolute_paths.yml +133 -0
  25. data/spec/cassettes/Worochi_Agent_Github/_push_all/pushes_a_list_of_items_to_create_a_new_commit.yml +989 -0
  26. data/spec/cassettes/Worochi_Agent_Github/_push_all/pushes_the_file_to_the_right_place.yml +687 -0
  27. data/spec/cassettes/Worochi_Agent_Github/_source_branch/retrieves_the_master_branch_correctly.yml +68 -0
  28. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/accepts_a_different_path.yml +133 -0
  29. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/accepts_a_different_relative_path.yml +133 -0
  30. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_files/contains_file1.yml +133 -0
  31. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/accepts_a_different_path.yml +133 -0
  32. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/accepts_a_different_relative_path.yml +133 -0
  33. data/spec/cassettes/Worochi_Agent_Github/it_should_behave_like_a_service_agent/_folders/contains_folder1.yml +133 -0
  34. data/spec/cassettes/Worochi_Item/_open/opens_a_single_file/with_Hash_parameter.yml +107 -0
  35. data/spec/cassettes/Worochi_Item/_open/opens_a_single_file/with_String_parameter.yml +107 -0
  36. data/spec/cassettes/Worochi_Item/_open/opens_multiple_files/with_Hash_parameters.yml +211 -0
  37. data/spec/cassettes/Worochi_Item/_open/opens_multiple_files/with_String_parameters.yml +107 -0
  38. data/spec/cassettes/Worochi_Item/_open_single/accepts_a_String.yml +107 -0
  39. data/spec/cassettes/Worochi_Item/_open_single/works_with_AWS_S3_paths.yml +46 -0
  40. data/spec/helper.rb +46 -0
  41. data/spec/support/aws_uri_matcher.rb +12 -0
  42. data/spec/support/shared_exampes_for_agents.rb +36 -0
  43. data/spec/support/test_file +1 -0
  44. data/spec/support/test_files.rb +34 -0
  45. data/spec/worochi/agent/dropbox_spec.rb +48 -0
  46. data/spec/worochi/agent/github_spec.rb +77 -0
  47. data/spec/worochi/agent_spec.rb +2 -0
  48. data/spec/worochi/helper/github_spec.rb +57 -0
  49. data/spec/worochi/helper_spec.rb +23 -0
  50. data/spec/worochi/item_spec.rb +85 -0
  51. data/spec/worochi_spec.rb +109 -0
  52. data/worochi.gemspec +27 -4
  53. metadata +193 -4
@@ -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
+ - Sat, 10 Aug 2013 00:15:13 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
+ - '4895'
35
+ X-Ratelimit-Reset:
36
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:13 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
+ - Sat, 10 Aug 2013 00:15:13 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
+ - '4894'
93
+ X-Ratelimit-Reset:
94
+ - '1376096590'
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
+ - '"9f1960e9f71a26ef10999b56127f5ff5"'
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://secure.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://secure.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: Sat, 10 Aug 2013 00:15:13 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
+ - Sat, 10 Aug 2013 00:15:14 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
+ - '4893'
158
+ X-Ratelimit-Reset:
159
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:14 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
+ - Sat, 10 Aug 2013 00:15:15 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
+ - '4892'
222
+ X-Ratelimit-Reset:
223
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:15 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
+ - Sat, 10 Aug 2013 00:15:15 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
+ - '4891'
286
+ X-Ratelimit-Reset:
287
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:15 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
+ - Sat, 10 Aug 2013 00:15:16 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
+ - '4890'
342
+ X-Ratelimit-Reset:
343
+ - '1376096590'
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
+ - '"9f1960e9f71a26ef10999b56127f5ff5"'
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://secure.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://secure.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: Sat, 10 Aug 2013 00:15:16 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
+ - Sat, 10 Aug 2013 00:15:16 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
+ - '4889'
407
+ X-Ratelimit-Reset:
408
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:16 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
+ - Sat, 10 Aug 2013 00:15:17 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
+ - '4888'
471
+ X-Ratelimit-Reset:
472
+ - '1376096590'
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/43fc2494134f208608d0f5953b5a384512849f24
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
+ - '"51258d87c028d3d078451f5f3da555db"'
494
+ Cache-Control:
495
+ - max-age=0, private, must-revalidate
496
+ body:
497
+ encoding: UTF-8
498
+ string: '{"sha":"43fc2494134f208608d0f5953b5a384512849f24","url":"https://api.github.com/repos/darkmirage/test/git/commits/43fc2494134f208608d0f5953b5a384512849f24","html_url":"https://github.com/darkmirage/test/commits/43fc2494134f208608d0f5953b5a384512849f24","author":{"name":"Raven
499
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-10T00:15:17Z"},"committer":{"name":"Raven
500
+ Jiang","email":"raven@cs.stanford.edu","date":"2013-08-10T00:15:17Z"},"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: Sat, 10 Aug 2013 00:15:17 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":"43fc2494134f208608d0f5953b5a384512849f24","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
+ - Sat, 10 Aug 2013 00:15:18 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
+ - '4887'
540
+ X-Ratelimit-Reset:
541
+ - '1376096590'
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
+ - '"159f360948ede6cd7a773cf41078cc64"'
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":"43fc2494134f208608d0f5953b5a384512849f24","type":"commit","url":"https://api.github.com/repos/darkmirage/test/git/commits/43fc2494134f208608d0f5953b5a384512849f24"}}'
566
+ http_version:
567
+ recorded_at: Sat, 10 Aug 2013 00:15:18 GMT
568
+ - request:
569
+ method: get
570
+ uri: https://api.github.com/repos/darkmirage/test/git/trees/43fc2494134f208608d0f5953b5a384512849f24?recursive=true
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
+ - Sat, 10 Aug 2013 00:15:19 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
+ - '4886'
602
+ X-Ratelimit-Reset:
603
+ - '1376096590'
604
+ Cache-Control:
605
+ - private, max-age=60, s-maxage=60
606
+ Last-Modified:
607
+ - Sat, 10 Aug 2013 00:15:18 GMT
608
+ Etag:
609
+ - '"d569991ada4c7ec35db0651c7c21d8c0"'
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: '{"sha":"43fc2494134f208608d0f5953b5a384512849f24","url":"https://api.github.com/repos/darkmirage/test/git/trees/43fc2494134f208608d0f5953b5a384512849f24","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":"100644","type":"blob","sha":"b69c5ab7d022a2fc12f5a3395e337e4c227845c8","path":"folder1/test.txt","size":6,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/b69c5ab7d022a2fc12f5a3395e337e4c227845c8"},{"mode":"040000","type":"tree","sha":"d6c5d03064924906afd8288388dd9102380c6fe4","path":"folder2","url":"https://api.github.com/repos/darkmirage/test/git/trees/d6c5d03064924906afd8288388dd9102380c6fe4"},{"mode":"100644","type":"blob","sha":"0d6c64027338c994e23ee2a254eb30229c2b474a","path":"folder2/lolcatsdotcomlikemyself.jpg","size":46054,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/0d6c64027338c994e23ee2a254eb30229c2b474a"},{"mode":"040000","type":"tree","sha":"54051fb94eb639fb429e656b4c888bc3aba44742","path":"folder2/subfolder","url":"https://api.github.com/repos/darkmirage/test/git/trees/54051fb94eb639fb429e656b4c888bc3aba44742"},{"mode":"040000","type":"tree","sha":"14c178a91bd3eda9ac179b373c8ee35e8f3c53ad","path":"folder2/subfolder/test","url":"https://api.github.com/repos/darkmirage/test/git/trees/14c178a91bd3eda9ac179b373c8ee35e8f3c53ad"},{"mode":"100644","type":"blob","sha":"c50b9ab72268ccbaf75a53676696940cccb66b89","path":"folder2/subfolder/test/abc.txt","size":32,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/c50b9ab72268ccbaf75a53676696940cccb66b89"},{"mode":"100644","type":"blob","sha":"5df468c4497e072139462b88cb78e1df4357534b","path":"folder2/test_file","size":60,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/5df468c4497e072139462b88cb78e1df4357534b"},{"mode":"040000","type":"tree","sha":"d750655104da52a0f691c399528a29cf5fa594c2","path":"folder3","url":"https://api.github.com/repos/darkmirage/test/git/trees/d750655104da52a0f691c399528a29cf5fa594c2"},{"mode":"100644","type":"blob","sha":"131bbc4355114ce79bd3456abb10114bcc4b0ef8","path":"folder3/1000Hz-5sec.mp3","size":30440,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/131bbc4355114ce79bd3456abb10114bcc4b0ef8"},{"mode":"100644","type":"blob","sha":"3904c0889abcfc104bed5970c6a53d81773ac515","path":"folder3/440Hz-5sec.mp3","size":30439,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/3904c0889abcfc104bed5970c6a53d81773ac515"},{"mode":"100644","type":"blob","sha":"c45c70657ec69cd6482a4b189772d8b3aa8857be","path":"folder3/mp3tones.zip","size":32711,"url":"https://api.github.com/repos/darkmirage/test/git/blobs/c45c70657ec69cd6482a4b189772d8b3aa8857be"}]}'
631
+ http_version:
632
+ recorded_at: Sat, 10 Aug 2013 00:15:19 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
+ - Sat, 10 Aug 2013 00:15:19 GMT
657
+ Status:
658
+ - 204 No Content
659
+ X-Ratelimit-Limit:
660
+ - '5000'
661
+ X-Ratelimit-Remaining:
662
+ - '4885'
663
+ X-Ratelimit-Reset:
664
+ - '1376096590'
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: Sat, 10 Aug 2013 00:15:19 GMT
687
+ recorded_with: VCR 2.5.0