added VCR and specs for original fetcher

This commit is contained in:
Andrew Waage
2016-05-19 12:05:18 -07:00
committed by Olle Jonsson
parent df64ab5ba1
commit 8277aa4319
11 changed files with 827 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,76 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/skywinder/changelog_test/git/commits/decfe840d1a1b86e0c28700de5362d3365a29555
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
Accept-Charset:
- utf-8
User-Agent:
- Github API Ruby Gem 0.13.1
response:
status:
code: 200
message:
headers:
server:
- GitHub.com
date:
- Thu, 19 May 2016 19:00:27 GMT
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
connection:
- close
status:
- 200 OK
x-ratelimit-limit:
- '60'
x-ratelimit-remaining:
- '43'
x-ratelimit-reset:
- '1463684440'
cache-control:
- public, max-age=60, s-maxage=60
vary:
- Accept, Accept-Encoding
etag:
- W/"391047306d50dcb964a83bc94e45c33d"
last-modified:
- Thu, 16 Jul 2015 12:11:01 GMT
x-github-media-type:
- github.v3; format=json
access-control-expose-headers:
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
access-control-allow-origin:
- "*"
content-security-policy:
- default-src 'none'
strict-transport-security:
- max-age=31536000; includeSubdomains; preload
x-content-type-options:
- nosniff
x-frame-options:
- deny
x-xss-protection:
- 1; mode=block
x-served-by:
- ef96c2e493b28ffea49b891b085ed2dd
x-github-request-id:
- 6C2F0F69:7F90:A1B77F1:573E0D4B
body:
encoding: ASCII-8BIT
string: '{"sha":"decfe840d1a1b86e0c28700de5362d3365a29555","url":"https://api.github.com/repos/skywinder/changelog_test/git/commits/decfe840d1a1b86e0c28700de5362d3365a29555","html_url":"https://github.com/skywinder/changelog_test/commit/decfe840d1a1b86e0c28700de5362d3365a29555","author":{"name":"Petr
Korolev","email":"sky4winder@gmail.com","date":"2015-07-16T12:11:01Z"},"committer":{"name":"Petr
Korolev","email":"sky4winder@gmail.com","date":"2015-07-16T12:11:01Z"},"tree":{"sha":"0699c15258a7c2b2e157051fe19851d4f705cac8","url":"https://api.github.com/repos/skywinder/changelog_test/git/trees/0699c15258a7c2b2e157051fe19851d4f705cac8"},"message":"fix
#14","parents":[{"sha":"7ec095e5e3caceacedabf44d0b9b10da17c92e51","url":"https://api.github.com/repos/skywinder/changelog_test/git/commits/7ec095e5e3caceacedabf44d0b9b10da17c92e51","html_url":"https://github.com/skywinder/changelog_test/commit/7ec095e5e3caceacedabf44d0b9b10da17c92e51"}]}'
http_version:
recorded_at: Thu, 19 May 2016 19:00:30 GMT
recorded_with: VCR 3.0.1

View File

@@ -0,0 +1,76 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/skywinder/changelog_test/git/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
Accept-Charset:
- utf-8
User-Agent:
- Github API Ruby Gem 0.13.1
response:
status:
code: 200
message:
headers:
server:
- GitHub.com
date:
- Thu, 19 May 2016 18:25:19 GMT
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
connection:
- close
status:
- 200 OK
x-ratelimit-limit:
- '60'
x-ratelimit-remaining:
- '44'
x-ratelimit-reset:
- '1463684440'
cache-control:
- public, max-age=60, s-maxage=60
vary:
- Accept, Accept-Encoding
etag:
- W/"70e24649f6eca2e822b32129a2e73312"
last-modified:
- Wed, 04 Mar 2015 19:01:48 GMT
x-github-media-type:
- github.v3; format=json
access-control-expose-headers:
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
access-control-allow-origin:
- "*"
content-security-policy:
- default-src 'none'
strict-transport-security:
- max-age=31536000; includeSubdomains; preload
x-content-type-options:
- nosniff
x-frame-options:
- deny
x-xss-protection:
- 1; mode=block
x-served-by:
- cee4c0729c8e9147e7abcb45b9d69689
x-github-request-id:
- 6C2F0F69:7F8E:5B42511:573E050F
body:
encoding: ASCII-8BIT
string: '{"sha":"a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90","url":"https://api.github.com/repos/skywinder/changelog_test/git/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90","html_url":"https://github.com/skywinder/changelog_test/commit/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90","author":{"name":"Petr
Korolev","email":"sky4winder@gmail.com","date":"2015-03-04T19:01:48Z"},"committer":{"name":"Petr
Korolev","email":"sky4winder@gmail.com","date":"2015-03-04T19:01:48Z"},"tree":{"sha":"1ff276df2dcd58d90a1267ff219ced923acc3da8","url":"https://api.github.com/repos/skywinder/changelog_test/git/trees/1ff276df2dcd58d90a1267ff219ced923acc3da8"},"message":"Merge
branch ''hotfix/fix-3''","parents":[{"sha":"6a28f64bbe783d7ac171c38cefcb109e1b8e0911","url":"https://api.github.com/repos/skywinder/changelog_test/git/commits/6a28f64bbe783d7ac171c38cefcb109e1b8e0911","html_url":"https://github.com/skywinder/changelog_test/commit/6a28f64bbe783d7ac171c38cefcb109e1b8e0911"},{"sha":"68445f5d2bd8df612e25b37058aea7f123439fa1","url":"https://api.github.com/repos/skywinder/changelog_test/git/commits/68445f5d2bd8df612e25b37058aea7f123439fa1","html_url":"https://github.com/skywinder/changelog_test/commit/68445f5d2bd8df612e25b37058aea7f123439fa1"}]}'
http_version:
recorded_at: Thu, 19 May 2016 18:25:23 GMT
recorded_with: VCR 3.0.1

View File

@@ -0,0 +1,71 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/skywinder/changelog_test/issues/14/events
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
Accept-Charset:
- utf-8
User-Agent:
- Github API Ruby Gem 0.13.1
response:
status:
code: 200
message:
headers:
server:
- GitHub.com
date:
- Thu, 19 May 2016 18:19:40 GMT
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
connection:
- close
status:
- 200 OK
x-ratelimit-limit:
- '60'
x-ratelimit-remaining:
- '45'
x-ratelimit-reset:
- '1463684440'
cache-control:
- public, max-age=60, s-maxage=60
vary:
- Accept, Accept-Encoding
etag:
- W/"9e001bcf4bf22abb6602f57d114ce205"
x-github-media-type:
- github.v3; format=json
access-control-expose-headers:
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
access-control-allow-origin:
- "*"
content-security-policy:
- default-src 'none'
strict-transport-security:
- max-age=31536000; includeSubdomains; preload
x-content-type-options:
- nosniff
x-frame-options:
- deny
x-xss-protection:
- 1; mode=block
x-served-by:
- bae57931a6fe678a3dffe9be8e7819c8
x-github-request-id:
- 6C2F0F69:7F91:BA87215:573E03BC
body:
encoding: ASCII-8BIT
string: '[{"id":357462189,"url":"https://api.github.com/repos/skywinder/changelog_test/issues/events/357462189","actor":{"login":"skywinder","id":3356474,"avatar_url":"https://avatars.githubusercontent.com/u/3356474?v=3","gravatar_id":"","url":"https://api.github.com/users/skywinder","html_url":"https://github.com/skywinder","followers_url":"https://api.github.com/users/skywinder/followers","following_url":"https://api.github.com/users/skywinder/following{/other_user}","gists_url":"https://api.github.com/users/skywinder/gists{/gist_id}","starred_url":"https://api.github.com/users/skywinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywinder/subscriptions","organizations_url":"https://api.github.com/users/skywinder/orgs","repos_url":"https://api.github.com/users/skywinder/repos","events_url":"https://api.github.com/users/skywinder/events{/privacy}","received_events_url":"https://api.github.com/users/skywinder/received_events","type":"User","site_admin":false},"event":"referenced","commit_id":"decfe840d1a1b86e0c28700de5362d3365a29555","commit_url":"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555","created_at":"2015-07-16T12:21:16Z"},{"id":357462542,"url":"https://api.github.com/repos/skywinder/changelog_test/issues/events/357462542","actor":{"login":"skywinder","id":3356474,"avatar_url":"https://avatars.githubusercontent.com/u/3356474?v=3","gravatar_id":"","url":"https://api.github.com/users/skywinder","html_url":"https://github.com/skywinder","followers_url":"https://api.github.com/users/skywinder/followers","following_url":"https://api.github.com/users/skywinder/following{/other_user}","gists_url":"https://api.github.com/users/skywinder/gists{/gist_id}","starred_url":"https://api.github.com/users/skywinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywinder/subscriptions","organizations_url":"https://api.github.com/users/skywinder/orgs","repos_url":"https://api.github.com/users/skywinder/repos","events_url":"https://api.github.com/users/skywinder/events{/privacy}","received_events_url":"https://api.github.com/users/skywinder/received_events","type":"User","site_admin":false},"event":"closed","commit_id":"decfe840d1a1b86e0c28700de5362d3365a29555","commit_url":"https://api.github.com/repos/skywinder/changelog_test/commits/decfe840d1a1b86e0c28700de5362d3365a29555","created_at":"2015-07-16T12:21:42Z"}]'
http_version:
recorded_at: Thu, 19 May 2016 18:19:43 GMT
recorded_with: VCR 3.0.1

View File

@@ -0,0 +1,73 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/skywinder/changelog_test/tags
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
Accept-Charset:
- utf-8
User-Agent:
- Github API Ruby Gem 0.13.1
response:
status:
code: 200
message:
headers:
server:
- GitHub.com
date:
- Thu, 19 May 2016 18:14:27 GMT
content-type:
- application/json; charset=utf-8
transfer-encoding:
- chunked
connection:
- close
status:
- 200 OK
x-ratelimit-limit:
- '60'
x-ratelimit-remaining:
- '49'
x-ratelimit-reset:
- '1463684440'
cache-control:
- public, max-age=60, s-maxage=60
vary:
- Accept, Accept-Encoding
etag:
- W/"012a78339961d33825609e388f651a3e"
last-modified:
- Thu, 05 Mar 2015 10:27:55 GMT
x-github-media-type:
- github.v3; format=json
access-control-expose-headers:
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
access-control-allow-origin:
- "*"
content-security-policy:
- default-src 'none'
strict-transport-security:
- max-age=31536000; includeSubdomains; preload
x-content-type-options:
- nosniff
x-frame-options:
- deny
x-xss-protection:
- 1; mode=block
x-served-by:
- a7f8a126c9ed3f1c4715a34c0ddc7290
x-github-request-id:
- 6C2F0F69:1C0C4:91D639E:573E0283
body:
encoding: ASCII-8BIT
string: '[{"name":"v0.0.3","zipball_url":"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.3","tarball_url":"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.3","commit":{"sha":"a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90","url":"https://api.github.com/repos/skywinder/changelog_test/commits/a0cba2b1a1ea9011ab07ee1ac140ba5a5eb8bd90"}},{"name":"v0.0.2","zipball_url":"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.2","tarball_url":"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.2","commit":{"sha":"9b35bb13dcd15b68e7bcbf10cde5eb937a54f710","url":"https://api.github.com/repos/skywinder/changelog_test/commits/9b35bb13dcd15b68e7bcbf10cde5eb937a54f710"}},{"name":"v0.0.1","zipball_url":"https://api.github.com/repos/skywinder/changelog_test/zipball/v0.0.1","tarball_url":"https://api.github.com/repos/skywinder/changelog_test/tarball/v0.0.1","commit":{"sha":"4c2d6d1ed58bdb24b870dcb5d9f2ceed0283d69d","url":"https://api.github.com/repos/skywinder/changelog_test/commits/4c2d6d1ed58bdb24b870dcb5d9f2ceed0283d69d"}},{"name":"0.0.4","zipball_url":"https://api.github.com/repos/skywinder/changelog_test/zipball/0.0.4","tarball_url":"https://api.github.com/repos/skywinder/changelog_test/tarball/0.0.4","commit":{"sha":"ece0c3ab7142b21064b885061c55ede00ef6ce94","url":"https://api.github.com/repos/skywinder/changelog_test/commits/ece0c3ab7142b21064b885061c55ede00ef6ce94"}}]'
http_version:
recorded_at: Thu, 19 May 2016 18:14:31 GMT
recorded_with: VCR 3.0.1

View File

@@ -0,0 +1,65 @@
---
http_interactions:
- request:
method: get
uri: https://api.github.com/repos/skywinder/changelog_test/tags?access_token=0000000000000000
body:
encoding: US-ASCII
string: ''
headers:
Accept:
- application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1
Accept-Charset:
- utf-8
User-Agent:
- Github API Ruby Gem 0.13.1
Authorization:
- token 0000000000000000
response:
status:
code: 401
message:
headers:
server:
- GitHub.com
date:
- Thu, 19 May 2016 18:14:28 GMT
content-type:
- application/json; charset=utf-8
content-length:
- '83'
connection:
- close
status:
- 401 Unauthorized
x-github-media-type:
- github.v3; format=json
x-ratelimit-limit:
- '60'
x-ratelimit-remaining:
- '48'
x-ratelimit-reset:
- '1463684440'
access-control-expose-headers:
- ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,
X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
access-control-allow-origin:
- "*"
content-security-policy:
- default-src 'none'
strict-transport-security:
- max-age=31536000; includeSubdomains; preload
x-content-type-options:
- nosniff
x-frame-options:
- deny
x-xss-protection:
- 1; mode=block
x-github-request-id:
- 6C2F0F69:1C0C3:706D8F5:573E0284
body:
encoding: UTF-8
string: '{"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}'
http_version:
recorded_at: Thu, 19 May 2016 18:14:31 GMT
recorded_with: VCR 3.0.1