gitnetworkitis 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/Gemfile +6 -5
  2. data/Gemfile.lock +26 -20
  3. data/VERSION +1 -1
  4. data/get_token.rb +40 -0
  5. data/gitnetworkitis.gemspec +41 -76
  6. data/lib/gitnetworkitis/base.rb +10 -40
  7. data/lib/gitnetworkitis/batch_response.rb +24 -0
  8. data/lib/gitnetworkitis/branch.rb +10 -31
  9. data/lib/gitnetworkitis/commit.rb +2 -5
  10. data/lib/gitnetworkitis/commit_getter.rb +50 -0
  11. data/lib/gitnetworkitis/getter.rb +64 -0
  12. data/lib/gitnetworkitis/json_helper.rb +24 -0
  13. data/lib/gitnetworkitis/repository.rb +11 -30
  14. data/lib/gitnetworkitis.rb +10 -5
  15. data/spec/base_spec.rb +13 -20
  16. data/spec/branch_spec.rb +63 -19
  17. data/spec/getter_spec.rb +36 -0
  18. data/spec/github_config.yml.example +2 -0
  19. data/spec/repository_spec.rb +27 -39
  20. data/spec/spec_helper.rb +3 -64
  21. data/spec/support/vcr_setup.rb +8 -0
  22. data/spec/vcr_cassettes/all_branches.json +67 -0
  23. data/spec/vcr_cassettes/all_repos.json +67 -0
  24. data/spec/vcr_cassettes/bad_creds.json +58 -0
  25. data/spec/vcr_cassettes/find_repo.json +67 -0
  26. data/spec/vcr_cassettes/spec-branch-1_commits.json +2277 -0
  27. data/spec/vcr_cassettes/spec-branch-1_since_date.json +1 -0
  28. data/spec/vcr_cassettes/spec-branch-1_since_sha.json +67 -0
  29. data/spec/vcr_cassettes/spec-branch-2_commits.json +70 -0
  30. data/spec/vcr_cassettes/spec-branch-3_commits.json +67 -0
  31. metadata +84 -124
  32. data/lib/gitnetworkitis/network_data.rb +0 -66
  33. data/lib/gitnetworkitis/network_meta.rb +0 -17
  34. data/spec/commit_spec.rb +0 -8
  35. data/spec/network_data_spec.rb +0 -153
  36. data/spec/network_meta_spec.rb +0 -59
  37. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=0.json +0 -1
  38. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=1.json +0 -1
  39. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=2.json +0 -1
  40. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=3.json +0 -1
  41. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=4.json +0 -1
  42. data/spec/responses/branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=5.json +0 -1
  43. data/spec/responses/branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=0.json +0 -1
  44. data/spec/responses/branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=1.json +0 -1
  45. data/spec/responses/branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=2.json +0 -1
  46. data/spec/responses/branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=3.json +0 -1
  47. data/spec/responses/branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=4.json +0 -1
  48. data/spec/responses/branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=0.json +0 -1
  49. data/spec/responses/branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=1.json +0 -1
  50. data/spec/responses/branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=2.json +0 -1
  51. data/spec/responses/branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=3.json +0 -1
  52. data/spec/responses/branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=4.json +0 -1
  53. data/spec/responses/girlambition/0-500.json +0 -1
  54. data/spec/responses/girlambition/1002-1502.json +0 -1
  55. data/spec/responses/girlambition/1503-2003.json +0 -1
  56. data/spec/responses/girlambition/2004-2504.json +0 -1
  57. data/spec/responses/girlambition/2505-3005.json +0 -1
  58. data/spec/responses/girlambition/3006-3506.json +0 -1
  59. data/spec/responses/girlambition/3507-4007.json +0 -1
  60. data/spec/responses/girlambition/4008-4508.json +0 -1
  61. data/spec/responses/girlambition/4509-4999.json +0 -1
  62. data/spec/responses/girlambition/501-1001.json +0 -1
  63. data/spec/responses/girlambition/repos_show_turingstudio_website-girlambition_branches.json +0 -1
  64. data/spec/responses/girlambition/turingstudio_website-girlambition_network_meta.json +0 -1
  65. data/spec/responses/loupe/repos_show_turingstudio_loupe.json +0 -1
  66. data/spec/responses/loupe/repos_show_turingstudio_loupe_branches.json +0 -1
  67. data/spec/responses/loupe/turingstudio_loupe_068161e2c05a6b8029a7eb410dd27b1dfa531338?start=1&end=5.json +0 -1
  68. data/spec/responses/loupe/turingstudio_loupe_068161e2c05a6b8029a7eb410dd27b1dfa531338?start=130.json +0 -1
  69. data/spec/responses/loupe/turingstudio_loupe_branch.json +0 -1
  70. data/spec/responses/loupe/turingstudio_loupe_network_data.json +0 -1
  71. data/spec/responses/loupe/turingstudio_loupe_network_meta.json +0 -1
  72. data/spec/responses/repos_show_jcoutu.json +0 -1
  73. data/spec/responses/repos_watched_jcoutu.json +0 -1
data/spec/base_spec.rb CHANGED
@@ -1,46 +1,39 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
- describe "Gitnetworkitis::Base" do
3
+ describe GitNetworkitis::Base do
4
+ let(:base_class) { GitNetworkitis::Base.new(@token) }
5
+ let(:success_response) { double(:response => double(:code => "200")) }
6
+ let(:failure_response) { double(:response => double(:code => "404")) }
4
7
 
5
8
  context "#initialize" do
6
- it "should allow for username and token to be set on init" do
7
- c = GitNetworkitis::Base.new("jcoutu", "0ea98987469a2ef1daee5d1e30b42fd8")
8
- c.username.should == "jcoutu"
9
+ it "should allow for the OAuth 2 access token to be set on init" do
10
+ c = GitNetworkitis::Base.new("0ea98987469a2ef1daee5d1e30b42fd8")
9
11
  c.token.should == "0ea98987469a2ef1daee5d1e30b42fd8"
10
12
  end
11
13
  end
12
-
13
- context "#get" do
14
- let(:base_class){GitNetworkitis::Base.new("jcoutu", "0ea98987469a2ef1daee5d1e30b42fd8")}
15
- let(:success_response){double(:response => double(:code=>"200"))}
16
- let(:failure_response){double(:response => double(:code=>"404"))}
17
14
 
15
+ context "#get" do
18
16
  it "should return the response when successful" do
19
- base_class.class.should_receive(:get).and_return success_response
17
+ GitNetworkitis::Getter.should_receive(:get).and_return success_response
20
18
  t = base_class.get("http://google.com")
21
19
  t.should == success_response
22
20
  end
23
21
 
24
22
  it "should raise an exception when unsuccessful" do
25
- base_class.class.should_receive(:get).and_return failure_response
26
- lambda {base_class.get("http://google.com")}.should raise_error "Unable to find Github Repository"
23
+ GitNetworkitis::Getter.should_receive(:get).and_return failure_response
24
+ lambda { base_class.get("http://google.com") }.should raise_error "Unable to find Github Repository"
27
25
  end
28
26
 
29
27
  end
30
-
31
- context "#parse_json" do
32
-
33
- let(:base_class){GitNetworkitis::Base.new("jcoutu", "0ea98987469a2ef1daee5d1e30b42fd8")}
34
- let(:success_response){double(:response => double(:code=>"200"))}
35
- let(:failure_response){double(:response => double(:code=>"404"))}
36
28
 
29
+ context "#parse_json" do
37
30
  it "should return the response when successful" do
38
31
  t = base_class.parse_json('{"test":"test"}')
39
32
  t["test"].should == "test"
40
33
  end
41
34
 
42
35
  it "should raise an exception when unsuccessful" do
43
- lambda {base_class.parse_json("http://google.com")}.should raise_error "Unable to parse JSON result"
36
+ lambda { base_class.parse_json("http://google.com") }.should raise_error "Unable to parse JSON result"
44
37
  end
45
38
  end
46
- end
39
+ end
data/spec/branch_spec.rb CHANGED
@@ -1,31 +1,75 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Gitnetworkitis::Branch" do
4
+ let(:branch) { GitNetworkitis::Branch.new(@token) }
5
+ let(:branches) { branch.find_all({:owner => "jcoutu", :repo => "gitnetworkitis"}) }
4
6
 
5
- before :each do
6
- fake_responses
7
+ context "#find_all" do
8
+ it "should return a collection of branches for a specific repo" do
9
+ VCR.use_cassette("all_branches") do
10
+ branches.should_not be_empty
11
+ branches.select {|b| b.name == "master" }.size.should == 1
12
+ branches.select {|b| b.name == "spec-branch-1" }.size.should == 1
13
+ branches.select {|b| b.name == "spec-branch-2" }.size.should == 1
14
+ branches.select {|b| b.name == "spec-branch-3" }.size.should == 1
15
+ end
16
+ end
7
17
  end
8
18
 
9
- context "find_all" do
10
- let(:branch){GitNetworkitis::Branch.new(@username, @token)}
11
- let(:test){branch.find_all({:owner=>"turingstudio", :repo => "loupe", :nethash => "068161e2c05a6b8029a7eb410dd27b1dfa531338"})}
19
+ context "#commits" do
20
+ attr_reader :spec_branch_1, :spec_branch_2, :spec_branch_3
12
21
 
13
- it "should return a collection of branches for a specific repo" do
14
- test.should_not be_empty
15
- test.first.name.should_not be_empty
16
- test.length.should == 3
22
+ before :each do
23
+ @spec_branch_1, @spec_branch_2, @spec_branch_3 = nil
24
+
25
+ VCR.use_cassette("all_branches") do
26
+ @spec_branch_1 = branches.detect {|b| b.name == "spec-branch-1" }
27
+ @spec_branch_2 = branches.detect {|b| b.name == "spec-branch-2" }
28
+ @spec_branch_3 = branches.detect {|b| b.name == "spec-branch-3" }
29
+ end
17
30
  end
18
- end
19
-
20
- context "commits" do
21
- let(:branch){GitNetworkitis::Branch.new(@username, @token)}
22
- let(:test){branch.find_all({:owner=>"turingstudio", :repo => "loupe", :nethash => "068161e2c05a6b8029a7eb410dd27b1dfa531338"})}
23
31
 
24
32
  it "should return an array of commits for the branch" do
25
- test[0].commits.length.should == 158
26
- test[1].commits.length.should == 140
27
- test[2].commits.length.should == 138
33
+ VCR.use_cassette("spec-branch-1_commits", :record => :new_episodes) do
34
+ commits = spec_branch_1.commits(batch: true, per_page: 15)
35
+ commits.length.should == 43
36
+ commits.first.message.should == "modifies test file so that there's something to commit"
37
+ end
38
+
39
+ VCR.use_cassette("spec-branch-2_commits", :record => :new_episodes) do
40
+ commits = spec_branch_2.commits(batch: false, per_page: 15)
41
+ commits.length.should == 15
42
+ commits.first.message.should == "adds otro test file"
43
+ end
44
+
45
+ VCR.use_cassette("spec-branch-3_commits") do
46
+ commits = spec_branch_3.commits
47
+ commits.length.should == 41
48
+ commits.first.message.should == "adds VCR for saner handling of responses in specs, converts Base and Repository to Github API v3 and OAuth 2"
49
+ end
50
+ end
51
+
52
+ it "should return only commits since a certain SHA if one is specified" do
53
+ VCR.use_cassette("spec-branch-1_since_sha") do
54
+ commits = spec_branch_1.commits(since: '8e6f9227f646bfe17d296cf418f2ba5ccdca4b48')
55
+ commits.length.should == 2
56
+ commits.first.message.should == "modifies test file so that there's something to commit"
57
+ commits.last.message.should == "adds test file"
58
+ commits.map(&:sha).should_not include("8e6f9227f646bfe17d296cf418f2ba5ccdca4b48")
59
+ end
60
+ end
61
+
62
+ it "should return only commits since a certain date/time if one is specified" do
63
+ VCR.use_cassette("spec-branch-1_since_date") do
64
+ commits = spec_branch_1.commits(since: '2012-04-06T14:14:59-07:00')
65
+ commits.length.should == 3
66
+ commit_shas = commits.map(&:sha)
67
+ commit_shas.should include('3d68c13854c8898f8817e2cc60757c41c72ec1de')
68
+ commit_shas.should include('b1907bcca525cb5fcacaa492b828126d0c8cc91c')
69
+ commit_shas.should include('8e6f9227f646bfe17d296cf418f2ba5ccdca4b48')
70
+ commit_shas.should_not include('ce44c956380073a04ef28eee76b4dc0749d4fa6e')
71
+ end
28
72
  end
29
-
30
73
  end
31
- end
74
+
75
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe GitNetworkitis::Getter do
4
+
5
+ describe ".initialize" do
6
+ it "should separate local options from query options" do
7
+ getter = GitNetworkitis::Getter.new('url',
8
+ access_token: "token",
9
+ per_page: 100,
10
+ batch: true,
11
+ branch: 'branch',
12
+ since: 'sha')
13
+ getter.local_options.should == {batch: true, branch: 'branch', since: 'sha'}
14
+ getter.query_options.should == {access_token: "token", per_page: 100}
15
+ end
16
+ end
17
+
18
+ describe "#get" do
19
+ it "should default the per_page option to 100" do
20
+
21
+ end
22
+
23
+ it "should perform a regular GET when no batch nor since options are set" do
24
+ getter = GitNetworkitis::Getter.new('url', access_token: 'token')
25
+ getter.should_receive(:single_get)
26
+ getter.get
27
+ end
28
+
29
+ it "should perform a batched GET when batch is true and since isn't set" do
30
+ getter = GitNetworkitis::Getter.new('url', access_token: 'token', batch: true)
31
+ getter.should_receive(:batched_get)
32
+ getter.get
33
+ end
34
+ end
35
+
36
+ end
@@ -0,0 +1,2 @@
1
+ access_token: Oauth 2 access token
2
+ test_repos: ["this repo name", "that repo name"]
@@ -1,56 +1,44 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Gitnetworkitis::Repository" do
4
-
5
- before :each do
6
- fake_responses
7
- end
8
-
9
- context "#find_all_watched" do
10
- it "should return an empty array if no credentials are found" do
11
- c = GitNetworkitis::Repository.new(nil, nil)
12
- repos = c.find_all_watched
13
- repos.length.should == 0
4
+ let(:repo) { GitNetworkitis::Repository.new(@token) }
5
+ let(:test_repos) { @test_repos }
6
+
7
+ context "#find_all" do
8
+ #NOTE #find_all_watched and #find_all_owned swallowed the error and returned an empty
9
+ # array instead. Should that happen here, instead?
10
+ it "should fail if no credentials are found" do
11
+ VCR.use_cassette("bad_creds") do
12
+ repo = GitNetworkitis::Repository.new "bad creds"
13
+ expect { repo.find_all }.to raise_error("Unable to find Github Repository")
14
+ end
14
15
  end
15
16
 
16
- it "should list a users watched repositories" do
17
- c = GitNetworkitis::Repository.new(@username, @token)
18
- repos = c.find_all_watched
19
- repos.should_not be_empty
20
- repos.length.should == 15
21
- end
22
- end
23
-
24
- context "#find_all_owned" do
25
- it "should return an empty array if no credentials are found" do
26
- c = GitNetworkitis::Repository.new(nil, nil)
27
- repos = c.find_all_owned
28
- repos.length.should == 0
29
- end
30
-
31
- it "should list a users repositories" do
32
- c = GitNetworkitis::Repository.new(@username, @token)
33
- repos = c.find_all_owned
34
- repos.should_not be_empty
35
- repos.length.should == 1
17
+ it "should find all repositories for the user by default" do
18
+ VCR.use_cassette("all_repos") do
19
+ repo_names = repo.find_all.map(&:name)
20
+ test_repos.each {|tr| repo_names.should include(tr) }
21
+ end
36
22
  end
37
23
  end
38
24
 
39
25
  context "#find" do
40
26
  it "should allow a user to search for a repo based on owner and repo name" do
41
- c = GitNetworkitis::Repository.new(@username, @token)
42
- repo = c.find({:owner=>"turingstudio", :repo => "loupe"})
43
- repo.owner.should == "turingstudio"
27
+ VCR.use_cassette("find_repo") do
28
+ found_repo = repo.find({:owner=>"jcoutu", :repo => "gitnetworkitis"})
29
+ found_repo.owner['login'].should == "jcoutu"
30
+ found_repo.name.should == "gitnetworkitis"
31
+ end
44
32
  end
45
33
  end
46
-
34
+
47
35
  context "#remote_id" do
48
36
  it "should set the remote_id to owner/name" do
49
- c = GitNetworkitis::Repository.new(@username, @token)
50
- repo = c.find({:owner=>"turingstudio", :repo => "loupe"})
51
- repo.remote_id.should == "turingstudio/loupe"
37
+ VCR.use_cassette("find_repo") do
38
+ found_repo = repo.find({:owner=>"jcoutu", :repo => "gitnetworkitis"})
39
+ found_repo.remote_id.should == "jcoutu/gitnetworkitis"
40
+ end
52
41
  end
53
-
54
42
  end
55
43
 
56
- end
44
+ end
data/spec/spec_helper.rb CHANGED
@@ -10,69 +10,8 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
10
 
11
11
  RSpec.configure do |config|
12
12
  config.before(:each) {
13
- #Github username
14
- @username = "jcoutu"
15
-
16
- #Github Toekn
17
- @token = "0ea98987469a2ef1daee5d1e30b42fd8"
18
-
19
- #This will tell the tests to use fakeweb responses or not. Removing this will mostly likely cause test failures
20
- @fake_web_requests = true
21
-
13
+ #Github OAuth 2 Access Token
14
+ github_config = YAML.load_file(File.join(File.dirname(__FILE__), "github_config.yml"))
15
+ @token, @test_repos = github_config['access_token'], github_config['test_repos']
22
16
  }
23
17
  end
24
-
25
-
26
- def response_file(*path)
27
- File.join(File.dirname(__FILE__), "responses", path)
28
- end
29
-
30
- def fake_responses
31
- if @fake_web_requests
32
- FakeWeb.allow_net_connect = true
33
- FakeWeb.clean_registry
34
- auth = "#{@username}%2Ftoken:#{@token}@"
35
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/repos/watched/jcoutu", :body => response_file('repos_watched_jcoutu.json'))
36
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/repos/show/jcoutu", :body => response_file('repos_show_jcoutu.json'))
37
-
38
- #Loupe Responses
39
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/repos/show/turingstudio/loupe", :body => response_file('loupe/repos_show_turingstudio_loupe.json'))
40
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/loupe/network_meta", :body => response_file('loupe/turingstudio_loupe_network_meta.json'))
41
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/loupe/network_data_chunk?nethash=068161e2c05a6b8029a7eb410dd27b1dfa531338&start=0&end=133", :body => response_file('loupe/turingstudio_loupe_network_data.json'))
42
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/repos/show/turingstudio/loupe/branches", :body => response_file('loupe/repos_show_turingstudio_loupe_branches.json'))
43
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/loupe/network_data_chunk?nethash=068161e2c05a6b8029a7eb410dd27b1dfa531338&start=130&end=133", :body => response_file('loupe/turingstudio_loupe_068161e2c05a6b8029a7eb410dd27b1dfa531338?start=130.json'))
44
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/loupe/network_data_chunk?nethash=068161e2c05a6b8029a7eb410dd27b1dfa531338&start=1&end=5", :body => response_file('loupe/turingstudio_loupe_068161e2c05a6b8029a7eb410dd27b1dfa531338?start=1&end=5.json'))
45
-
46
- #Girl-Ambition Responses
47
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_meta", :body => response_file('girlambition/turingstudio_website-girlambition_network_meta.json'))
48
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/repos/show/turingstudio/website-girlambition/branches", :body => response_file('girlambition/repos_show_turingstudio_website-girlambition_branches.json'))
49
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=0&end=500", :body => response_file('girlambition/0-500.json'), :content_length => 1)
50
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=501&end=1001", :body => response_file('girlambition/501-1001.json'), :content_length => 1)
51
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=1002&end=1502", :body => response_file('girlambition/1002-1502.json'), :content_length => 1)
52
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=1503&end=2003", :body => response_file('girlambition/1503-2003.json'), :content_length => 1)
53
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=2004&end=2504", :body => response_file('girlambition/2004-2504.json'), :content_length => 1)
54
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=2505&end=3005", :body => response_file('girlambition/2505-3005.json'), :content_length => 1)
55
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=3006&end=3506", :body => response_file('girlambition/3006-3506.json'), :content_length => 1)
56
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=3507&end=4007", :body => response_file('girlambition/3507-4007.json'), :content_length => 1)
57
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=4008&end=4508", :body => response_file('girlambition/4008-4508.json'), :content_length => 1)
58
- FakeWeb.register_uri(:get, "https://#{auth}github.com/turingstudio/website-girlambition/network_data_chunk?nethash=0ead14b395f02f065083a6865dd06ede8b3153bc&start=4509&end=4999", :body => response_file('girlambition/4509-4999.json'), :content_length => 1)
59
-
60
- #This needs to be refactored. It's dumb to do this!
61
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=0", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=0.json'))
62
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=1", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=1.json'))
63
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=2", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=2.json'))
64
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=3", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=3.json'))
65
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=4", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=4.json'))
66
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=5", :body => response_file('branch_pages/turingstudio_loupe_51ac36280d2dfe16c37b66ef344859c9c714c8e1?page=5.json'))
67
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=0", :body => response_file('branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=0.json'))
68
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=1", :body => response_file('branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=1.json'))
69
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=2", :body => response_file('branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=2.json'))
70
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=3", :body => response_file('branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=3.json'))
71
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=4", :body => response_file('branch_pages/turingstudio_loupe_bec7b23dc57b14d89fa2829e8c32a108a18e7248?page=4.json'))
72
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=0", :body => response_file('branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=0.json'))
73
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=1", :body => response_file('branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=1.json'))
74
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=2", :body => response_file('branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=2.json'))
75
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=3", :body => response_file('branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=3.json'))
76
- FakeWeb.register_uri(:get, "https://#{auth}github.com/api/v2/json/commits/list/turingstudio/loupe/c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=4", :body => response_file('branch_pages/turingstudio_loupe_c3aeb61e37f94bbb67c4f14b52c23b8e54d30d0e?page=4.json'))
77
- end
78
- end
@@ -0,0 +1,8 @@
1
+ require 'vcr'
2
+
3
+ VCR.configure do |config|
4
+ config.cassette_library_dir = "spec/vcr_cassettes"
5
+ config.hook_into :fakeweb
6
+ config.default_cassette_options = { serialize_with: :json }
7
+ config.filter_sensitive_data('<ACCESS TOKEN>') { YAML.load_file(File.join(File.dirname(__FILE__), '../', 'github_config.yml'))['access_token'] }
8
+ end
@@ -0,0 +1,67 @@
1
+ {
2
+ "http_interactions": [
3
+ {
4
+ "recorded_at": "Tue, 17 Apr 2012 15:12:15 GMT",
5
+ "request": {
6
+ "body": {
7
+ "encoding": "US-ASCII",
8
+ "string": ""
9
+ },
10
+ "headers": {
11
+ "connection": [
12
+ "close"
13
+ ]
14
+ },
15
+ "method": "get",
16
+ "uri": "https://api.github.com/repos/jcoutu/gitnetworkitis/branches?access_token=<ACCESS TOKEN>"
17
+ },
18
+ "response": {
19
+ "body": {
20
+ "encoding": "US-ASCII",
21
+ "string": "[{\"commit\":{\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis/commits/3d68c13854c8898f8817e2cc60757c41c72ec1de\",\"sha\":\"3d68c13854c8898f8817e2cc60757c41c72ec1de\"},\"name\":\"spec-branch-1\"},{\"commit\":{\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis/commits/6809600539c207aa2515db635085fd2b10c0ff91\",\"sha\":\"6809600539c207aa2515db635085fd2b10c0ff91\"},\"name\":\"master\"},{\"commit\":{\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis/commits/72c84bde00c67616390ba7b3af29a5c029a2c8f5\",\"sha\":\"72c84bde00c67616390ba7b3af29a5c029a2c8f5\"},\"name\":\"spec-branch-2\"},{\"commit\":{\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis/commits/8e6f9227f646bfe17d296cf418f2ba5ccdca4b48\",\"sha\":\"8e6f9227f646bfe17d296cf418f2ba5ccdca4b48\"},\"name\":\"spec-branch-3\"},{\"commit\":{\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis/commits/caa9bccac6ad018acf1e8509be186479aa30adac\",\"sha\":\"caa9bccac6ad018acf1e8509be186479aa30adac\"},\"name\":\"v3\"}]"
22
+ },
23
+ "headers": {
24
+ "connection": [
25
+ "close"
26
+ ],
27
+ "content-length": [
28
+ "948"
29
+ ],
30
+ "content-type": [
31
+ "application/json; charset=utf-8"
32
+ ],
33
+ "date": [
34
+ "Tue, 17 Apr 2012 15:12:15 GMT"
35
+ ],
36
+ "etag": [
37
+ "\"3fca1f7c5a00c708a1074a8e2528d655\""
38
+ ],
39
+ "server": [
40
+ "nginx/1.0.13"
41
+ ],
42
+ "status": [
43
+ "200 OK"
44
+ ],
45
+ "x-accepted-oauth-scopes": [
46
+ "repo"
47
+ ],
48
+ "x-oauth-scopes": [
49
+ ""
50
+ ],
51
+ "x-ratelimit-limit": [
52
+ "5000"
53
+ ],
54
+ "x-ratelimit-remaining": [
55
+ "4987"
56
+ ]
57
+ },
58
+ "http_version": "1.1",
59
+ "status": {
60
+ "code": 200,
61
+ "message": "OK"
62
+ }
63
+ }
64
+ }
65
+ ],
66
+ "recorded_with": "VCR 2.0.1"
67
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "http_interactions": [
3
+ {
4
+ "recorded_at": "Tue, 17 Apr 2012 15:12:24 GMT",
5
+ "request": {
6
+ "body": {
7
+ "encoding": "US-ASCII",
8
+ "string": ""
9
+ },
10
+ "headers": {
11
+ "connection": [
12
+ "close"
13
+ ]
14
+ },
15
+ "method": "get",
16
+ "uri": "https://api.github.com/user/repos?access_token=<ACCESS TOKEN>&type=all"
17
+ },
18
+ "response": {
19
+ "body": {
20
+ "encoding": "US-ASCII",
21
+ "string": "[{\"mirror_url\":null,\"description\":\"Git Workshop Test Repo\",\"git_url\":\"git://github.com/cdidyk/hellogitworld.git\",\"updated_at\":\"2012-03-14T20:53:19Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/hellogitworld\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":0,\"homepage\":\"\",\"created_at\":\"2012-03-14T20:53:19Z\",\"open_issues\":0,\"language\":\"Groovy\",\"html_url\":\"https://github.com/cdidyk/hellogitworld\",\"size\":2244,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/hellogitworld\",\"ssh_url\":\"git@github.com:cdidyk/hellogitworld.git\",\"pushed_at\":\"2012-03-14T20:42:16Z\",\"name\":\"hellogitworld\",\"private\":false,\"id\":3722211,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/hellogitworld.git\"},{\"mirror_url\":null,\"description\":\"A Ruby Wrapper for the Harvest API http://www.getharvest.com/\",\"git_url\":\"git://github.com/cdidyk/harvested.git\",\"updated_at\":\"2011-10-04T05:52:47Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/harvested\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":0,\"homepage\":\"http://rdoc.info/projects/zmoazeni/harvested\",\"created_at\":\"2011-03-04T18:31:03Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/harvested\",\"size\":592,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/harvested\",\"ssh_url\":\"git@github.com:cdidyk/harvested.git\",\"pushed_at\":\"2011-03-31T22:01:53Z\",\"name\":\"harvested\",\"private\":false,\"id\":1440506,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/harvested.git\"},{\"mirror_url\":null,\"description\":\"\",\"git_url\":\"git://github.com/jcoutu/gitnetworkitis.git\",\"updated_at\":\"2012-04-13T18:13:12Z\",\"owner\":{\"url\":\"https://api.github.com/users/jcoutu\",\"login\":\"jcoutu\",\"gravatar_id\":\"4c464291fe5328e507a80deb38c50bd3\",\"avatar_url\":\"https://secure.gravatar.com/avatar/4c464291fe5328e507a80deb38c50bd3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":76799},\"url\":\"https://api.github.com/repos/jcoutu/gitnetworkitis\",\"has_wiki\":true,\"has_issues\":true,\"permissions\":{\"push\":true,\"admin\":false,\"pull\":true},\"forks\":1,\"homepage\":\"\",\"created_at\":\"2010-12-14T03:16:28Z\",\"open_issues\":1,\"language\":\"Ruby\",\"html_url\":\"https://github.com/jcoutu/gitnetworkitis\",\"size\":2784,\"fork\":false,\"svn_url\":\"https://github.com/jcoutu/gitnetworkitis\",\"ssh_url\":\"git@github.com:jcoutu/gitnetworkitis.git\",\"pushed_at\":\"2012-04-13T18:13:12Z\",\"name\":\"gitnetworkitis\",\"private\":false,\"id\":1166948,\"has_downloads\":true,\"watchers\":3,\"clone_url\":\"https://github.com/jcoutu/gitnetworkitis.git\"},{\"mirror_url\":null,\"description\":\"Ruby gem that provides an AR-style interface for the Pivotal Tracker API\",\"git_url\":\"git://github.com/cdidyk/pivotal-tracker.git\",\"updated_at\":\"2011-10-04T04:27:52Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/pivotal-tracker\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":0,\"homepage\":\"http://github.com/jsmestad/pivotal-tracker\",\"created_at\":\"2010-12-13T21:53:46Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/pivotal-tracker\",\"size\":172,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/pivotal-tracker\",\"ssh_url\":\"git@github.com:cdidyk/pivotal-tracker.git\",\"pushed_at\":\"2010-12-14T23:14:10Z\",\"name\":\"pivotal-tracker\",\"private\":false,\"id\":1166109,\"has_downloads\":false,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/pivotal-tracker.git\"},{\"mirror_url\":null,\"description\":\"easily and transparently use subdomains as parameters in a Rails 3 application\",\"git_url\":\"git://github.com/stephenjudkins/subdomainitis.git\",\"updated_at\":\"2012-04-01T11:58:34Z\",\"owner\":{\"url\":\"https://api.github.com/users/stephenjudkins\",\"login\":\"stephenjudkins\",\"gravatar_id\":\"b12ead92306a438050ef9001cf8247c0\",\"avatar_url\":\"https://secure.gravatar.com/avatar/b12ead92306a438050ef9001cf8247c0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":8593},\"url\":\"https://api.github.com/repos/stephenjudkins/subdomainitis\",\"has_wiki\":true,\"has_issues\":true,\"permissions\":{\"push\":true,\"admin\":false,\"pull\":true},\"forks\":2,\"homepage\":\"\",\"created_at\":\"2010-10-22T01:44:12Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/stephenjudkins/subdomainitis\",\"size\":640,\"fork\":false,\"svn_url\":\"https://github.com/stephenjudkins/subdomainitis\",\"ssh_url\":\"git@github.com:stephenjudkins/subdomainitis.git\",\"pushed_at\":\"2011-02-02T22:20:31Z\",\"name\":\"subdomainitis\",\"private\":false,\"id\":1013936,\"has_downloads\":true,\"watchers\":5,\"clone_url\":\"https://github.com/stephenjudkins/subdomainitis.git\"},{\"mirror_url\":null,\"description\":\"A Ruby gem to interact with the Zendesk API\",\"git_url\":\"git://github.com/cdidyk/zendesk-api.git\",\"updated_at\":\"2011-10-04T03:25:14Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/zendesk-api\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":0,\"homepage\":\"http://github.com/pgericson/zendesk-api\",\"created_at\":\"2010-10-04T23:37:54Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/zendesk-api\",\"size\":140,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/zendesk-api\",\"ssh_url\":\"git@github.com:cdidyk/zendesk-api.git\",\"pushed_at\":\"2010-10-04T23:56:01Z\",\"name\":\"zendesk-api\",\"private\":false,\"id\":962170,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/zendesk-api.git\"},{\"mirror_url\":null,\"description\":\"Hominid is a Ruby gem that provides a wrapper for interacting with the Mailchimp API.\",\"git_url\":\"git://github.com/cdidyk/hominid.git\",\"updated_at\":\"2011-10-04T02:15:25Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/hominid\",\"has_wiki\":false,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":1,\"homepage\":\"http://terra-firma-design.com\",\"created_at\":\"2010-06-10T14:53:40Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/hominid\",\"size\":2548,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/hominid\",\"ssh_url\":\"git@github.com:cdidyk/hominid.git\",\"pushed_at\":\"2010-06-21T19:25:56Z\",\"name\":\"hominid\",\"private\":false,\"id\":713689,\"has_downloads\":false,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/hominid.git\"},{\"mirror_url\":null,\"description\":\"Rdockery probably doesn't need to exist. It generates a single HTML file out of a Rails app's rdoc (--one-file didn't work right for me).\",\"git_url\":\"git://github.com/cdidyk/rdockery.git\",\"updated_at\":\"2011-10-04T01:29:55Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/rdockery\",\"has_wiki\":true,\"has_issues\":true,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":1,\"homepage\":\"\",\"created_at\":\"2010-03-04T00:14:38Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/rdockery\",\"size\":376,\"fork\":false,\"svn_url\":\"https://github.com/cdidyk/rdockery\",\"ssh_url\":\"git@github.com:cdidyk/rdockery.git\",\"pushed_at\":\"2010-03-04T16:47:35Z\",\"name\":\"rdockery\",\"private\":false,\"id\":545608,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/rdockery.git\"},{\"mirror_url\":null,\"description\":\"Mr. T says, \\\"It's my blog, foo!\\\"\",\"git_url\":\"git://github.com/cdidyk/chrisdidyk.com.git\",\"updated_at\":\"2011-10-04T01:14:49Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/chrisdidyk.com\",\"has_wiki\":true,\"has_issues\":true,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":1,\"homepage\":\"chrisdidyk.com\",\"created_at\":\"2010-01-29T19:56:10Z\",\"open_issues\":0,\"language\":null,\"html_url\":\"https://github.com/cdidyk/chrisdidyk.com\",\"size\":740,\"fork\":false,\"svn_url\":\"https://github.com/cdidyk/chrisdidyk.com\",\"ssh_url\":\"git@github.com:cdidyk/chrisdidyk.com.git\",\"pushed_at\":\"2010-02-03T23:01:14Z\",\"name\":\"chrisdidyk.com\",\"private\":false,\"id\":494115,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/chrisdidyk.com.git\"},{\"mirror_url\":null,\"description\":\"A base rails app featuring: RESTful Authentication, Will Paginate, Rspec &amp; Rspec-rails, Exception Notifier, Asset Packager, Cap Recipe (multi-stage). Put together by Fudge to remove the need for boring project setup.\",\"git_url\":\"git://github.com/cdidyk/bort.git\",\"updated_at\":\"2011-10-04T00:20:50Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/bort\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":1,\"homepage\":\"\",\"created_at\":\"2009-09-03T02:42:45Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/bort\",\"size\":308,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/bort\",\"ssh_url\":\"git@github.com:cdidyk/bort.git\",\"pushed_at\":\"2009-09-03T03:44:30Z\",\"name\":\"bort\",\"private\":false,\"id\":295995,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/bort.git\"},{\"mirror_url\":null,\"description\":\"the wiki on wheels: a Ruby on Rails app for building dynamic, structured websites out of wiki cards\",\"git_url\":\"git://github.com/cdidyk/wagn.git\",\"updated_at\":\"2011-10-04T00:08:38Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/wagn\",\"has_wiki\":true,\"has_issues\":false,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":1,\"homepage\":\"http://www.wagn.org\",\"created_at\":\"2009-07-18T01:09:13Z\",\"open_issues\":0,\"language\":\"Ruby\",\"html_url\":\"https://github.com/cdidyk/wagn\",\"size\":124,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/wagn\",\"ssh_url\":\"git@github.com:cdidyk/wagn.git\",\"pushed_at\":\"2009-07-18T01:12:10Z\",\"name\":\"wagn\",\"private\":false,\"id\":254075,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/wagn.git\"},{\"mirror_url\":null,\"description\":\"An RSpec minor mode for Emacs\",\"git_url\":\"git://github.com/cdidyk/rspec-mode.git\",\"updated_at\":\"2011-10-03T23:48:05Z\",\"owner\":{\"url\":\"https://api.github.com/users/cdidyk\",\"login\":\"cdidyk\",\"gravatar_id\":\"5c3fdf85d582cd802b60971445eefb59\",\"avatar_url\":\"https://secure.gravatar.com/avatar/5c3fdf85d582cd802b60971445eefb59?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\"id\":13943},\"url\":\"https://api.github.com/repos/cdidyk/rspec-mode\",\"has_wiki\":true,\"has_issues\":true,\"permissions\":{\"push\":true,\"admin\":true,\"pull\":true},\"forks\":0,\"homepage\":\"http://pezra.barelyenough.org/projects/rspec-mode\",\"created_at\":\"2009-04-09T21:04:03Z\",\"open_issues\":0,\"language\":\"Emacs Lisp\",\"html_url\":\"https://github.com/cdidyk/rspec-mode\",\"size\":136,\"fork\":true,\"svn_url\":\"https://github.com/cdidyk/rspec-mode\",\"ssh_url\":\"git@github.com:cdidyk/rspec-mode.git\",\"pushed_at\":\"2009-04-09T21:20:41Z\",\"name\":\"rspec-mode\",\"private\":false,\"id\":172271,\"has_downloads\":true,\"watchers\":1,\"clone_url\":\"https://github.com/cdidyk/rspec-mode.git\"}]"
22
+ },
23
+ "headers": {
24
+ "connection": [
25
+ "close"
26
+ ],
27
+ "content-length": [
28
+ "13260"
29
+ ],
30
+ "content-type": [
31
+ "application/json; charset=utf-8"
32
+ ],
33
+ "date": [
34
+ "Tue, 17 Apr 2012 15:12:24 GMT"
35
+ ],
36
+ "etag": [
37
+ "\"a01b0647880ace87900b9ffea1a91de5\""
38
+ ],
39
+ "server": [
40
+ "nginx/1.0.13"
41
+ ],
42
+ "status": [
43
+ "200 OK"
44
+ ],
45
+ "x-accepted-oauth-scopes": [
46
+ "repo"
47
+ ],
48
+ "x-oauth-scopes": [
49
+ ""
50
+ ],
51
+ "x-ratelimit-limit": [
52
+ "5000"
53
+ ],
54
+ "x-ratelimit-remaining": [
55
+ "4981"
56
+ ]
57
+ },
58
+ "http_version": "1.1",
59
+ "status": {
60
+ "code": 200,
61
+ "message": "OK"
62
+ }
63
+ }
64
+ }
65
+ ],
66
+ "recorded_with": "VCR 2.0.1"
67
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "http_interactions": [
3
+ {
4
+ "recorded_at": "Tue, 17 Apr 2012 15:12:23 GMT",
5
+ "request": {
6
+ "body": {
7
+ "encoding": "US-ASCII",
8
+ "string": ""
9
+ },
10
+ "headers": {
11
+ "connection": [
12
+ "close"
13
+ ]
14
+ },
15
+ "method": "get",
16
+ "uri": "https://api.github.com/user/repos?access_token=bad%20creds&type=all"
17
+ },
18
+ "response": {
19
+ "body": {
20
+ "encoding": "US-ASCII",
21
+ "string": "{\"message\":\"Bad credentials\"}"
22
+ },
23
+ "headers": {
24
+ "connection": [
25
+ "close"
26
+ ],
27
+ "content-length": [
28
+ "29"
29
+ ],
30
+ "content-type": [
31
+ "application/json; charset=utf-8"
32
+ ],
33
+ "date": [
34
+ "Tue, 17 Apr 2012 15:12:23 GMT"
35
+ ],
36
+ "etag": [
37
+ "\"ca6a3702f840b6bff0bb1bca6be0337c\""
38
+ ],
39
+ "server": [
40
+ "nginx/1.0.13"
41
+ ],
42
+ "status": [
43
+ "401 Unauthorized"
44
+ ],
45
+ "www-authenticate": [
46
+ "Basic realm=\"GitHub\""
47
+ ]
48
+ },
49
+ "http_version": "1.1",
50
+ "status": {
51
+ "code": 401,
52
+ "message": "Unauthorized"
53
+ }
54
+ }
55
+ }
56
+ ],
57
+ "recorded_with": "VCR 2.0.1"
58
+ }