github_api 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -0
- data/features/README.rdoc +4 -0
- data/features/cassettes/errors/repos/create.yml +76 -34
- data/features/cassettes/gists/comments/all.yml +118 -119
- data/features/cassettes/gists/comments/first.yml +43 -44
- data/features/cassettes/gists/gist.yml +62 -63
- data/features/cassettes/gists/gists/public_all.yml +34 -34
- data/features/cassettes/gists/gists/user_all.yml +45 -46
- data/features/cassettes/gists/starred.yml +34 -38
- data/features/cassettes/git_data/references/all.yml +379 -0
- data/features/cassettes/git_data/references/all_tags.yml +141 -0
- data/features/cassettes/git_data/references/one.yml +97 -0
- data/features/cassettes/pagination/repos/commits/list.yml +180 -180
- data/features/cassettes/pagination/repos/commits/next.yml +166 -350
- data/features/cassettes/pagination/repos/commits/sha.yml +138 -129
- data/features/cassettes/pagination/repos/commits/sha/next.yml +139 -133
- data/features/cassettes/pagination/repos/diff.yml +131 -129
- data/features/cassettes/pagination/repos/diff/next.yml +131 -172
- data/features/cassettes/pagination/repos/list.yml +168 -163
- data/features/cassettes/pagination/repos/list/next.yml +171 -209
- data/features/cassettes/pagination/repos/per_page/each_page.yml +441 -412
- data/features/cassettes/pagination/repos/per_page/first.yml +130 -129
- data/features/cassettes/repos/branches.yml +40 -40
- data/features/cassettes/repos/create.yml +46 -0
- data/features/cassettes/repos/get.yml +59 -0
- data/features/cassettes/repos/languages.yml +44 -0
- data/features/cassettes/repos/list.yml +79 -79
- data/features/cassettes/repos/tags.yml +59 -142
- data/features/cassettes/repos/teams.yml +48 -0
- data/features/error_codes.feature +1 -0
- data/features/git_data/references.feature +49 -0
- data/features/repos.feature +32 -2
- data/features/settings.yml +6 -0
- data/features/settings.yml.sample +6 -0
- data/features/step_definitions/github_api_steps.rb +14 -2
- data/features/support/settings.rb +7 -0
- data/features/support/vcr.rb +3 -1
- data/lib/github_api/authorizations.rb +5 -0
- data/lib/github_api/git_data/commits.rb +10 -10
- data/lib/github_api/git_data/references.rb +10 -7
- data/lib/github_api/repos.rb +1 -1
- data/lib/github_api/repos/downloads.rb +5 -0
- data/lib/github_api/version.rb +1 -1
- data/spec/github/git_data/references_spec.rb +17 -14
- metadata +153 -154
- data/features/cassettes/gists/gist/first.yml +0 -65
- data/features/cassettes/pagination/repos/commits.yml +0 -189
@@ -0,0 +1,49 @@
|
|
1
|
+
Feature: Accessing GitData References API
|
2
|
+
|
3
|
+
In order to interact with github git data references
|
4
|
+
GithubAPI gem
|
5
|
+
Should return the expected results depending on passed parameters
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I have "Github::GitData::References" instance
|
9
|
+
|
10
|
+
Scenario: Lists all references on a repository
|
11
|
+
Given I want to list resources with the following params:
|
12
|
+
| user | repo |
|
13
|
+
| wycats | thor |
|
14
|
+
When I make request within a cassette named "git_data/references/all"
|
15
|
+
Then the response should be "200"
|
16
|
+
And the response type should be "JSON"
|
17
|
+
And the response should not be empty
|
18
|
+
|
19
|
+
Scenario: Lists all references on a repository scoped by branch
|
20
|
+
Given I want to list resources with the following params:
|
21
|
+
| user | repo |
|
22
|
+
| wycats | thor |
|
23
|
+
And I pass the following request options:
|
24
|
+
| ref |
|
25
|
+
| tags |
|
26
|
+
When I make request within a cassette named "git_data/references/all_tags"
|
27
|
+
Then the response should be "200"
|
28
|
+
And the response type should be "JSON"
|
29
|
+
And the response should not be empty
|
30
|
+
|
31
|
+
Scenario: Gets a single reference
|
32
|
+
Given I want to get resource with the following params:
|
33
|
+
| user | repo | ref |
|
34
|
+
| wycats | thor | heads/gh-pages |
|
35
|
+
When I make request within a cassette named "git_data/references/one"
|
36
|
+
Then the response should be "200"
|
37
|
+
And the response type should be "JSON"
|
38
|
+
And the response should not be empty
|
39
|
+
|
40
|
+
# Scenario: Create a reference
|
41
|
+
# Given I want to create resource with the following params:
|
42
|
+
# | user | repo |
|
43
|
+
# | murek | github_api_test |
|
44
|
+
# And I pass the following request options:
|
45
|
+
# | ref | sha |
|
46
|
+
# | refs/heads/master | 827efc6d56897b048c772eb4087f854f46256132 |
|
47
|
+
# When I make request within a cassette named "git_data/references/create"
|
48
|
+
# Then the response should be "200"
|
49
|
+
# And the response type should be "JSON"
|
data/features/repos.feature
CHANGED
@@ -13,6 +13,7 @@ Feature: Accessing Repos Main API
|
|
13
13
|
And I make request within a cassette named "repos/branches"
|
14
14
|
Then the response should be "200"
|
15
15
|
And the response type should be "JSON"
|
16
|
+
And the response should not be empty
|
16
17
|
|
17
18
|
Scenario: Returning all repository tags
|
18
19
|
When I am looking for "tags" with the following params:
|
@@ -21,12 +22,41 @@ Feature: Accessing Repos Main API
|
|
21
22
|
And I make request within a cassette named "repos/tags"
|
22
23
|
Then the response should be "200"
|
23
24
|
And the response type should be "JSON"
|
25
|
+
And the response should not be empty
|
24
26
|
|
25
27
|
Scenario: Returning all repositories for the user
|
26
|
-
|
28
|
+
Given I want to list resources
|
27
29
|
And I pass the following request options:
|
28
30
|
| user |
|
29
31
|
| peter-murach |
|
30
|
-
|
32
|
+
When I make request within a cassette named "repos/list"
|
31
33
|
Then the response should be "200"
|
32
34
|
And the response type should be "JSON"
|
35
|
+
And the response should not be empty
|
36
|
+
|
37
|
+
Scenario: Get a repository
|
38
|
+
Given I want to get resource with the following params:
|
39
|
+
| user | repo |
|
40
|
+
| wycats | thor |
|
41
|
+
When I make request within a cassette named "repos/get"
|
42
|
+
Then the response should be "200"
|
43
|
+
And the response type should be "JSON"
|
44
|
+
And the response should not be empty
|
45
|
+
|
46
|
+
Scenario: Listing repository languages
|
47
|
+
When I am looking for "languages" with the following params:
|
48
|
+
| user | repo |
|
49
|
+
| peter-murach | github |
|
50
|
+
And I make request within a cassette named "repos/languages"
|
51
|
+
Then the response should be "200"
|
52
|
+
And the response type should be "JSON"
|
53
|
+
|
54
|
+
Scenario: Create repository
|
55
|
+
Given I want to create resource
|
56
|
+
And I pass the following request options:
|
57
|
+
| name |
|
58
|
+
| github_api_test |
|
59
|
+
When I make request within a cassette named "repos/create"
|
60
|
+
Then the response should be "201"
|
61
|
+
And the response type should be "JSON"
|
62
|
+
And the response should not be empty
|
@@ -1,9 +1,21 @@
|
|
1
1
|
Given /^I have github instance$/ do
|
2
|
-
@github = Github.new
|
2
|
+
@github = Github.new(
|
3
|
+
:basic_auth => SETTINGS['basic_auth'],
|
4
|
+
:oauth_token => SETTINGS['oauth_token']
|
5
|
+
)
|
3
6
|
end
|
4
7
|
|
5
8
|
Given /^I have "([^"]*)" instance$/ do |api_classes|
|
6
|
-
@instance = convert_to_constant(api_classes).new
|
9
|
+
@instance = convert_to_constant(api_classes).new(
|
10
|
+
:basic_auth => SETTINGS['basic_auth'],
|
11
|
+
:oauth_token => SETTINGS['oauth_token']
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
When /^I am not authorized$/ do
|
16
|
+
[:basic_auth, :login, :password, :oauth_token].each do |attr|
|
17
|
+
@instance.send("#{attr}=", nil)
|
18
|
+
end
|
7
19
|
end
|
8
20
|
|
9
21
|
When /^I fetch "([^"]*)"$/ do |method|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
def settings_file
|
4
|
+
Pathname.new(File.expand_path("../../settings.yml", __FILE__))
|
5
|
+
end
|
6
|
+
|
7
|
+
SETTINGS = (File.exists?(settings_file) && yaml= YAML.load_file(settings_file)) ? yaml : {'basic_auth' => 'login:password', 'oauth_token' => 'as79asfd79ads', 'user'=> 'octokat', 'repo' => 'dummy'}
|
data/features/support/vcr.rb
CHANGED
@@ -4,7 +4,9 @@ VCR.configure do |conf|
|
|
4
4
|
conf.hook_into :webmock
|
5
5
|
conf.cassette_library_dir = 'features/cassettes'
|
6
6
|
conf.default_cassette_options = { :record => :new_episodes }
|
7
|
-
conf.filter_sensitive_data('
|
7
|
+
conf.filter_sensitive_data('<TOKEN>') { SETTINGS['oauth_token'] }
|
8
|
+
conf.filter_sensitive_data('<BASIC_AUTH>') { SETTINGS['basic_auth'] }
|
9
|
+
conf.filter_sensitive_data('<USER>') { SETTINGS['user'] }
|
8
10
|
end
|
9
11
|
|
10
12
|
VCR.cucumber_tags do |t|
|
@@ -50,6 +50,9 @@ module Github
|
|
50
50
|
#
|
51
51
|
# = Inputs
|
52
52
|
# * <tt>:scopes</tt> - Optional array - A list of scopes that this authorization is in.
|
53
|
+
# * <tt>:note</tt> - Optional string - A note to remind you what the OAuth token is for.
|
54
|
+
# * <tt>:note_url</tt> - Optional string - A URL to remind you what the OAuth token is for.
|
55
|
+
#
|
53
56
|
# = Examples
|
54
57
|
# github = Github.new :basic_auth => 'login:password'
|
55
58
|
# github.oauth.create
|
@@ -69,6 +72,8 @@ module Github
|
|
69
72
|
# * <tt>:scopes</tt> - Optional array - A list of scopes that this authorization is in.
|
70
73
|
# * <tt>:add_scopes</tt> - Optional array - A list of scopes to add to this authorization.
|
71
74
|
# * <tt>:remove_scopes</tt> - Optional array - A list of scopes to remove from this authorization.
|
75
|
+
# * <tt>:note</tt> - Optional string - A note to remind you what the OAuth token is for.
|
76
|
+
# * <tt>:note_url</tt> - Optional string - A URL to remind you what the OAuth token is for.
|
72
77
|
#
|
73
78
|
# = Examples
|
74
79
|
# github = Github.new :basic_auth => 'login:password'
|
@@ -28,8 +28,8 @@ module Github
|
|
28
28
|
# Get a commit
|
29
29
|
#
|
30
30
|
# = Examples
|
31
|
-
#
|
32
|
-
#
|
31
|
+
# github = Github.new
|
32
|
+
# github.git_data.commits.get 'user-name', 'repo-name', 'sha'
|
33
33
|
#
|
34
34
|
def get(user_name, repo_name, sha, params={})
|
35
35
|
_update_user_repo_params(user_name, repo_name)
|
@@ -52,16 +52,16 @@ module Github
|
|
52
52
|
#
|
53
53
|
# The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated users information and the current date.
|
54
54
|
#
|
55
|
-
# * author.name
|
56
|
-
# * author.email
|
57
|
-
# * author.date
|
58
|
-
# * committer.name
|
59
|
-
# * committer.email
|
60
|
-
# * committer.date
|
55
|
+
# * author.name - String of the name of the author of the commit
|
56
|
+
# * author.email - String of the email of the author of the commit
|
57
|
+
# * author.date - Timestamp of when this commit was authored
|
58
|
+
# * committer.name - String of the name of the committer of the commit
|
59
|
+
# * committer.email - String of the email of the committer of the commit
|
60
|
+
# * committer.date - Timestamp of when this commit was committed
|
61
61
|
#
|
62
62
|
# = Examples
|
63
|
-
#
|
64
|
-
#
|
63
|
+
# github = Github.new
|
64
|
+
# github.git_data.commits.create 'user-name', 'repo-name',
|
65
65
|
# "message": "my commit message",
|
66
66
|
# "author": {
|
67
67
|
# "name": "Scott Chacon",
|
@@ -6,7 +6,7 @@ module Github
|
|
6
6
|
VALID_REF_PARAM_NAMES = %w[ ref sha force ].freeze
|
7
7
|
|
8
8
|
VALID_REF_PARAM_VALUES = {
|
9
|
-
'ref' => %r{^refs\/\w
|
9
|
+
'ref' => %r{^refs\/\w+(\/\w+)*} # test fully qualified reference
|
10
10
|
}
|
11
11
|
|
12
12
|
# Creates new GitData::References API
|
@@ -25,14 +25,15 @@ module Github
|
|
25
25
|
# github = Github.new
|
26
26
|
# github.git_data.references.list 'user-name', 'repo-name'
|
27
27
|
#
|
28
|
-
# github.git_data.references.list 'user-name', 'repo-name', 'tags'
|
28
|
+
# github.git_data.references.list 'user-name', 'repo-name', ref:'tags'
|
29
29
|
#
|
30
|
-
def list(user_name, repo_name,
|
30
|
+
def list(user_name, repo_name, params={})
|
31
31
|
_update_user_repo_params(user_name, repo_name)
|
32
32
|
_validate_user_repo_params(user, repo) unless user? && repo?
|
33
33
|
_normalize_params_keys(params)
|
34
34
|
|
35
|
-
response = if ref
|
35
|
+
response = if params['ref']
|
36
|
+
ref = params.delete('ref')
|
36
37
|
_validate_reference ref
|
37
38
|
get_request("/repos/#{user}/#{repo}/git/refs/#{ref}", params)
|
38
39
|
else
|
@@ -52,7 +53,7 @@ module Github
|
|
52
53
|
#
|
53
54
|
# = Examples
|
54
55
|
# github = Github.new
|
55
|
-
# github.git_data.references.get 'user-name', 'repo-name', '
|
56
|
+
# github.git_data.references.get 'user-name', 'repo-name', 'heads/branch'
|
56
57
|
#
|
57
58
|
def get(user_name, repo_name, ref, params={})
|
58
59
|
_update_user_repo_params(user_name, repo_name)
|
@@ -85,6 +86,7 @@ module Github
|
|
85
86
|
|
86
87
|
_normalize_params_keys params
|
87
88
|
_filter_params_keys VALID_REF_PARAM_NAMES, params
|
89
|
+
_validate_presence_of params['ref']
|
88
90
|
_validate_reference params['ref']
|
89
91
|
_validate_inputs(%w[ ref sha ], params)
|
90
92
|
|
@@ -99,7 +101,7 @@ module Github
|
|
99
101
|
#
|
100
102
|
# = Examples
|
101
103
|
# github = Github.new
|
102
|
-
# github.git_data.references.update 'user-name', 'repo-name',
|
104
|
+
# github.git_data.references.update 'user-name', 'repo-name', 'heads/master',
|
103
105
|
# "sha" => "827efc6d56897b048c772eb4087f854f46256132",
|
104
106
|
# "force" => true
|
105
107
|
#
|
@@ -136,7 +138,8 @@ module Github
|
|
136
138
|
private
|
137
139
|
|
138
140
|
def _validate_reference ref
|
139
|
-
|
141
|
+
refs = ref.index('ref') ? ref : "refs/#{ref}"
|
142
|
+
unless VALID_REF_PARAM_VALUES['ref'] =~ refs
|
140
143
|
raise ArgumentError, "Provided 'reference' is invalid"
|
141
144
|
end
|
142
145
|
end
|
data/lib/github_api/repos.rb
CHANGED
@@ -108,7 +108,7 @@ module Github
|
|
108
108
|
# <tt>:name</tt> - Required string
|
109
109
|
# <tt>:description</tt> - Optional string
|
110
110
|
# <tt>:homepage</tt> - Optional string
|
111
|
-
# <tt>:private</tt> - Optional boolean - <tt>
|
111
|
+
# <tt>:private</tt> - Optional boolean - <tt>true</tt> to create a private repository, <tt>false</tt> to create a public one.
|
112
112
|
# <tt>:has_issues</tt> - Optional boolean - <tt>true</tt> to enable issues for this repository, <tt>false</tt> to disable them
|
113
113
|
# <tt>:has_wiki</tt> - Optional boolean - <tt>true</tt> to enable the wiki for this repository, <tt>false</tt> to disable it. Default is <tt>true</tt>
|
114
114
|
# <tt>:has_downloads</tt> Optional boolean - <tt>true</tt> to enable downloads for this repository
|
@@ -100,6 +100,11 @@ module Github
|
|
100
100
|
# * <tt>resource</tt> - Required resource of the create_download call.
|
101
101
|
# * <tt>:filename</tt> - Required filename, a path to a file location.
|
102
102
|
#
|
103
|
+
# = Examples
|
104
|
+
# resource = github.repos.downloads.create 'user-name', 'repo-name'
|
105
|
+
#
|
106
|
+
# github.repos.downloads.upload resource, '/users/octokit/image.jpg'
|
107
|
+
#
|
103
108
|
def upload(resource, filename)
|
104
109
|
_validate_presence_of resource, filename
|
105
110
|
|
data/lib/github_api/version.rb
CHANGED
@@ -9,7 +9,7 @@ describe Github::GitData::References do
|
|
9
9
|
let(:ref) { "heads/master" }
|
10
10
|
let(:sha) { "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" }
|
11
11
|
|
12
|
-
after {
|
12
|
+
after { reset_authentication_for github }
|
13
13
|
|
14
14
|
it { described_class::VALID_REF_PARAM_NAMES.should_not be_nil }
|
15
15
|
it { described_class::VALID_REF_PARAM_VALUES.should_not be_nil }
|
@@ -17,6 +17,7 @@ describe Github::GitData::References do
|
|
17
17
|
describe "#list" do
|
18
18
|
it { github.git_data.references.should respond_to :all }
|
19
19
|
|
20
|
+
|
20
21
|
context "get all the refernces based on sub-namespace" do
|
21
22
|
before do
|
22
23
|
stub_get("/repos/#{user}/#{repo}/git/refs/#{ref}").
|
@@ -31,42 +32,43 @@ describe Github::GitData::References do
|
|
31
32
|
|
32
33
|
it "should fail to call with invalid reference" do
|
33
34
|
expect {
|
34
|
-
github.git_data.references.list user, repo, 'branch'
|
35
|
+
github.git_data.references.list user, repo, :ref => '/branch/featureA'
|
35
36
|
}.to raise_error(ArgumentError)
|
36
37
|
end
|
37
38
|
|
38
39
|
it "should get the resources" do
|
39
|
-
github.git_data.references.list user, repo, ref
|
40
|
+
github.git_data.references.list user, repo, :ref => ref
|
40
41
|
a_get("/repos/#{user}/#{repo}/git/refs/#{ref}").should have_been_made
|
41
42
|
end
|
42
43
|
|
43
44
|
it "should return array of resources" do
|
44
|
-
references = github.git_data.references.list user, repo, ref
|
45
|
+
references = github.git_data.references.list user, repo, :ref => ref
|
45
46
|
references.should be_an Array
|
46
47
|
references.should have(3).items
|
47
48
|
end
|
48
49
|
|
49
50
|
it "should be a mash type" do
|
50
|
-
references = github.git_data.references.list user, repo, ref
|
51
|
+
references = github.git_data.references.list user, repo, :ref => ref
|
51
52
|
references.first.should be_a Hashie::Mash
|
52
53
|
end
|
53
54
|
|
54
55
|
it "should get reference information" do
|
55
|
-
references = github.git_data.references.list user, repo, ref
|
56
|
+
references = github.git_data.references.list user, repo, :ref => ref
|
56
57
|
references.first.ref.should eql 'refs/heads/master'
|
57
58
|
end
|
58
59
|
|
59
60
|
it "should yield to a block" do
|
60
61
|
github.git_data.references.should_receive(:list).
|
61
|
-
with(user, repo, ref).and_yield('web')
|
62
|
-
github.git_data.references.list(user, repo, ref) { |param| 'web' }
|
62
|
+
with(user, repo, :ref => ref).and_yield('web')
|
63
|
+
github.git_data.references.list(user, repo, :ref => ref) { |param| 'web' }
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
66
67
|
context "get all the references on the system" do
|
67
68
|
before do
|
68
69
|
stub_get("/repos/#{user}/#{repo}/git/refs").
|
69
|
-
to_return(:body => fixture('git_data/references.json'), :status => 200,
|
70
|
+
to_return(:body => fixture('git_data/references.json'), :status => 200,
|
71
|
+
:headers => {:content_type => "application/json; charset=utf-8"})
|
70
72
|
end
|
71
73
|
|
72
74
|
it "should get the resources" do
|
@@ -83,7 +85,7 @@ describe Github::GitData::References do
|
|
83
85
|
|
84
86
|
it "should return 404 with a message 'Not Found'" do
|
85
87
|
expect {
|
86
|
-
github.git_data.references.list user, repo, ref
|
88
|
+
github.git_data.references.list user, repo, :ref => ref
|
87
89
|
}.to raise_error(Github::Error::NotFound)
|
88
90
|
end
|
89
91
|
end
|
@@ -106,7 +108,7 @@ describe Github::GitData::References do
|
|
106
108
|
|
107
109
|
it "should fail to get resource with wrong ref" do
|
108
110
|
expect {
|
109
|
-
github.git_data.references.get user, repo, 'branch'
|
111
|
+
github.git_data.references.get user, repo, '/branch'
|
110
112
|
}.to raise_error(ArgumentError)
|
111
113
|
end
|
112
114
|
|
@@ -153,7 +155,8 @@ describe Github::GitData::References do
|
|
153
155
|
before do
|
154
156
|
stub_post("/repos/#{user}/#{repo}/git/refs").
|
155
157
|
with(:body => JSON.generate(inputs.except('unrelated'))).
|
156
|
-
to_return(:body => fixture('git_data/reference.json'), :status => 201,
|
158
|
+
to_return(:body => fixture('git_data/reference.json'), :status => 201,
|
159
|
+
:headers => {:content_type => "application/json; charset=utf-8"})
|
157
160
|
end
|
158
161
|
|
159
162
|
it "should fail to create resource if 'ref' input is missing" do
|
@@ -170,7 +173,7 @@ describe Github::GitData::References do
|
|
170
173
|
|
171
174
|
it "should fail to create resource if 'ref' is wrong" do
|
172
175
|
expect {
|
173
|
-
github.git_data.references.create user, repo, '
|
176
|
+
github.git_data.references.create user, repo, :ref => '/heads/master', :sha => '13t2a1r3'
|
174
177
|
}.to raise_error(ArgumentError)
|
175
178
|
end
|
176
179
|
|
@@ -229,7 +232,7 @@ describe Github::GitData::References do
|
|
229
232
|
|
230
233
|
it "should fail to update resource if 'ref' is wrong" do
|
231
234
|
expect {
|
232
|
-
github.git_data.references.update user, repo,
|
235
|
+
github.git_data.references.update user, repo, nil, inputs
|
233
236
|
}.to raise_error(ArgumentError)
|
234
237
|
end
|
235
238
|
|
metadata
CHANGED
@@ -1,217 +1,216 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_api
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
4
5
|
prerelease:
|
5
|
-
version: 0.5.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Piotr Murach
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-07 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: hashie
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2153652820 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
18
|
+
requirements:
|
22
19
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
20
|
+
- !ruby/object:Gem::Version
|
24
21
|
version: 1.2.0
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: faraday
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *2153652820
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: faraday
|
27
|
+
requirement: &2153652320 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
29
|
+
requirements:
|
33
30
|
- - ~>
|
34
|
-
- !ruby/object:Gem::Version
|
31
|
+
- !ruby/object:Gem::Version
|
35
32
|
version: 0.7.6
|
36
33
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: multi_json
|
40
34
|
prerelease: false
|
41
|
-
|
35
|
+
version_requirements: *2153652320
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: multi_json
|
38
|
+
requirement: &2153651860 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
40
|
+
requirements:
|
44
41
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.3'
|
47
44
|
type: :runtime
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: oauth2
|
51
45
|
prerelease: false
|
52
|
-
|
46
|
+
version_requirements: *2153651860
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: oauth2
|
49
|
+
requirement: &2153651400 !ruby/object:Gem::Requirement
|
53
50
|
none: false
|
54
|
-
requirements:
|
51
|
+
requirements:
|
55
52
|
- - ~>
|
56
|
-
- !ruby/object:Gem::Version
|
53
|
+
- !ruby/object:Gem::Version
|
57
54
|
version: 0.5.2
|
58
55
|
type: :runtime
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: nokogiri
|
62
56
|
prerelease: false
|
63
|
-
|
57
|
+
version_requirements: *2153651400
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: nokogiri
|
60
|
+
requirement: &2153650940 !ruby/object:Gem::Requirement
|
64
61
|
none: false
|
65
|
-
requirements:
|
62
|
+
requirements:
|
66
63
|
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
64
|
+
- !ruby/object:Gem::Version
|
68
65
|
version: 1.5.2
|
69
66
|
type: :runtime
|
70
|
-
version_requirements: *id005
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rspec
|
73
67
|
prerelease: false
|
74
|
-
|
68
|
+
version_requirements: *2153650940
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: &2153650480 !ruby/object:Gem::Requirement
|
75
72
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
80
77
|
type: :development
|
81
|
-
version_requirements: *id006
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: cucumber
|
84
78
|
prerelease: false
|
85
|
-
|
79
|
+
version_requirements: *2153650480
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: cucumber
|
82
|
+
requirement: &2153670220 !ruby/object:Gem::Requirement
|
86
83
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
91
88
|
type: :development
|
92
|
-
version_requirements: *id007
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: yajl-ruby
|
95
89
|
prerelease: false
|
96
|
-
|
90
|
+
version_requirements: *2153670220
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: yajl-ruby
|
93
|
+
requirement: &2153669760 !ruby/object:Gem::Requirement
|
97
94
|
none: false
|
98
|
-
requirements:
|
95
|
+
requirements:
|
99
96
|
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
97
|
+
- !ruby/object:Gem::Version
|
101
98
|
version: 1.1.0
|
102
99
|
type: :development
|
103
|
-
version_requirements: *id008
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
name: webmock
|
106
100
|
prerelease: false
|
107
|
-
|
101
|
+
version_requirements: *2153669760
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: webmock
|
104
|
+
requirement: &2153669300 !ruby/object:Gem::Requirement
|
108
105
|
none: false
|
109
|
-
requirements:
|
106
|
+
requirements:
|
110
107
|
- - ~>
|
111
|
-
- !ruby/object:Gem::Version
|
108
|
+
- !ruby/object:Gem::Version
|
112
109
|
version: 1.8.0
|
113
110
|
type: :development
|
114
|
-
version_requirements: *id009
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: vcr
|
117
111
|
prerelease: false
|
118
|
-
|
112
|
+
version_requirements: *2153669300
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: vcr
|
115
|
+
requirement: &2153668840 !ruby/object:Gem::Requirement
|
119
116
|
none: false
|
120
|
-
requirements:
|
117
|
+
requirements:
|
121
118
|
- - ~>
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: 2.
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 2.1.0
|
124
121
|
type: :development
|
125
|
-
version_requirements: *id010
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: simplecov
|
128
122
|
prerelease: false
|
129
|
-
|
123
|
+
version_requirements: *2153668840
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: simplecov
|
126
|
+
requirement: &2153668380 !ruby/object:Gem::Requirement
|
130
127
|
none: false
|
131
|
-
requirements:
|
128
|
+
requirements:
|
132
129
|
- - ~>
|
133
|
-
- !ruby/object:Gem::Version
|
130
|
+
- !ruby/object:Gem::Version
|
134
131
|
version: 0.6.1
|
135
132
|
type: :development
|
136
|
-
version_requirements: *id011
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: guard
|
139
133
|
prerelease: false
|
140
|
-
|
134
|
+
version_requirements: *2153668380
|
135
|
+
- !ruby/object:Gem::Dependency
|
136
|
+
name: guard
|
137
|
+
requirement: &2153667920 !ruby/object:Gem::Requirement
|
141
138
|
none: false
|
142
|
-
requirements:
|
139
|
+
requirements:
|
143
140
|
- - ~>
|
144
|
-
- !ruby/object:Gem::Version
|
141
|
+
- !ruby/object:Gem::Version
|
145
142
|
version: 0.8.8
|
146
143
|
type: :development
|
147
|
-
version_requirements: *id012
|
148
|
-
- !ruby/object:Gem::Dependency
|
149
|
-
name: guard-rspec
|
150
144
|
prerelease: false
|
151
|
-
|
145
|
+
version_requirements: *2153667920
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
name: guard-rspec
|
148
|
+
requirement: &2153667460 !ruby/object:Gem::Requirement
|
152
149
|
none: false
|
153
|
-
requirements:
|
154
|
-
- -
|
155
|
-
- !ruby/object:Gem::Version
|
150
|
+
requirements:
|
151
|
+
- - =
|
152
|
+
- !ruby/object:Gem::Version
|
156
153
|
version: 0.5.7
|
157
154
|
type: :development
|
158
|
-
version_requirements: *id013
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: guard-cucumber
|
161
155
|
prerelease: false
|
162
|
-
|
156
|
+
version_requirements: *2153667460
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: guard-cucumber
|
159
|
+
requirement: &2153667000 !ruby/object:Gem::Requirement
|
163
160
|
none: false
|
164
|
-
requirements:
|
165
|
-
- -
|
166
|
-
- !ruby/object:Gem::Version
|
161
|
+
requirements:
|
162
|
+
- - =
|
163
|
+
- !ruby/object:Gem::Version
|
167
164
|
version: 0.7.4
|
168
165
|
type: :development
|
169
|
-
version_requirements: *id014
|
170
|
-
- !ruby/object:Gem::Dependency
|
171
|
-
name: rake
|
172
166
|
prerelease: false
|
173
|
-
|
167
|
+
version_requirements: *2153667000
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: rake
|
170
|
+
requirement: &2153666620 !ruby/object:Gem::Requirement
|
174
171
|
none: false
|
175
|
-
requirements:
|
176
|
-
- -
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version:
|
172
|
+
requirements:
|
173
|
+
- - ! '>='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: '0'
|
179
176
|
type: :development
|
180
|
-
version_requirements: *id015
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: bundler
|
183
177
|
prerelease: false
|
184
|
-
|
178
|
+
version_requirements: *2153666620
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: bundler
|
181
|
+
requirement: &2153666160 !ruby/object:Gem::Requirement
|
185
182
|
none: false
|
186
|
-
requirements:
|
187
|
-
- -
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version:
|
183
|
+
requirements:
|
184
|
+
- - ! '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
190
187
|
type: :development
|
191
|
-
|
192
|
-
|
193
|
-
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: *2153666160
|
190
|
+
description: ! ' Ruby wrapper that supports all of the GitHub API v3 methods(nearly
|
191
|
+
200). It''s build in a modular way, that is, you can either instantiate the whole
|
192
|
+
api wrapper Github.new or use parts of it e.i. Github::Repos.new if working solely
|
193
|
+
with repositories is your main concern. '
|
194
|
+
email: ''
|
194
195
|
executables: []
|
195
|
-
|
196
196
|
extensions: []
|
197
|
-
|
198
197
|
extra_rdoc_files: []
|
199
|
-
|
200
|
-
files:
|
198
|
+
files:
|
201
199
|
- Rakefile
|
202
200
|
- features/cassettes/errors/repos/create.yml
|
203
201
|
- features/cassettes/gists/comments/all.yml
|
204
202
|
- features/cassettes/gists/comments/first.yml
|
205
|
-
- features/cassettes/gists/gist/first.yml
|
206
203
|
- features/cassettes/gists/gist.yml
|
207
204
|
- features/cassettes/gists/gists/public_all.yml
|
208
205
|
- features/cassettes/gists/gists/user_all.yml
|
209
206
|
- features/cassettes/gists/starred.yml
|
207
|
+
- features/cassettes/git_data/references/all.yml
|
208
|
+
- features/cassettes/git_data/references/all_tags.yml
|
209
|
+
- features/cassettes/git_data/references/one.yml
|
210
210
|
- features/cassettes/pagination/repos/commits/list.yml
|
211
211
|
- features/cassettes/pagination/repos/commits/next.yml
|
212
212
|
- features/cassettes/pagination/repos/commits/sha/next.yml
|
213
213
|
- features/cassettes/pagination/repos/commits/sha.yml
|
214
|
-
- features/cassettes/pagination/repos/commits.yml
|
215
214
|
- features/cassettes/pagination/repos/diff/next.yml
|
216
215
|
- features/cassettes/pagination/repos/diff.yml
|
217
216
|
- features/cassettes/pagination/repos/list/next.yml
|
@@ -219,20 +218,28 @@ files:
|
|
219
218
|
- features/cassettes/pagination/repos/per_page/each_page.yml
|
220
219
|
- features/cassettes/pagination/repos/per_page/first.yml
|
221
220
|
- features/cassettes/repos/branches.yml
|
221
|
+
- features/cassettes/repos/create.yml
|
222
|
+
- features/cassettes/repos/get.yml
|
223
|
+
- features/cassettes/repos/languages.yml
|
222
224
|
- features/cassettes/repos/list.yml
|
223
225
|
- features/cassettes/repos/tags.yml
|
226
|
+
- features/cassettes/repos/teams.yml
|
224
227
|
- features/error_codes.feature
|
225
228
|
- features/gists/comments.feature
|
226
229
|
- features/gists.feature
|
230
|
+
- features/git_data/references.feature
|
227
231
|
- features/github_api.feature
|
228
232
|
- features/options.feature
|
229
233
|
- features/pagination.feature
|
230
234
|
- features/README.rdoc
|
231
235
|
- features/repos.feature
|
236
|
+
- features/settings.yml
|
237
|
+
- features/settings.yml.sample
|
232
238
|
- features/step_definitions/common_steps.rb
|
233
239
|
- features/step_definitions/github_api_steps.rb
|
234
240
|
- features/support/env.rb
|
235
241
|
- features/support/helpers.rb
|
242
|
+
- features/support/settings.rb
|
236
243
|
- features/support/vcr.rb
|
237
244
|
- lib/github_api/api/actions.rb
|
238
245
|
- lib/github_api/api.rb
|
@@ -453,45 +460,37 @@ files:
|
|
453
460
|
- spec/support/file_ops.rb
|
454
461
|
- README.md
|
455
462
|
- LICENSE.txt
|
456
|
-
has_rdoc: true
|
457
463
|
homepage: https://github.com/peter-murach/github
|
458
464
|
licenses: []
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
Again sorry for the inconvenience but I trust that this will help in easier access to\n\
|
470
|
-
the GitHub API and library .\n\n\
|
471
|
-
For more information: http://rubydoc.info/github/peter-murach/github/master/frames\n\n\
|
472
|
-
--------------------------------------------------------------------------------\n "
|
465
|
+
post_install_message: ! "\n--------------------------------------------------------------------------------\nThank
|
466
|
+
you for installing github_api-0.5.1.\n\n*NOTE*: Version 0.5.0 introduces breaking
|
467
|
+
changes to the way github api is queried.\nThe interface has been rewritten to be
|
468
|
+
more consistent with REST verbs that\ninteract with GitHub hypermedia resources.
|
469
|
+
Thus, to list resources 'list' or 'all'\nverbs are used, to retrieve individual
|
470
|
+
resource 'get' or 'find' verbs are used.\nOther CRUDE operations on all resources
|
471
|
+
use preditable verbs as well, such as\n'create', 'delete' etc...\n\nAgain sorry
|
472
|
+
for the inconvenience but I trust that this will help in easier access to\nthe GitHub
|
473
|
+
API and library .\n\nFor more information: http://rubydoc.info/github/peter-murach/github/master/frames\n\n--------------------------------------------------------------------------------\n
|
474
|
+
\ "
|
473
475
|
rdoc_options: []
|
474
|
-
|
475
|
-
require_paths:
|
476
|
+
require_paths:
|
476
477
|
- lib
|
477
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
478
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
478
479
|
none: false
|
479
|
-
requirements:
|
480
|
-
- -
|
481
|
-
- !ruby/object:Gem::Version
|
482
|
-
version:
|
483
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
480
|
+
requirements:
|
481
|
+
- - ! '>='
|
482
|
+
- !ruby/object:Gem::Version
|
483
|
+
version: '0'
|
484
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
484
485
|
none: false
|
485
|
-
requirements:
|
486
|
-
- -
|
487
|
-
- !ruby/object:Gem::Version
|
488
|
-
version:
|
486
|
+
requirements:
|
487
|
+
- - ! '>='
|
488
|
+
- !ruby/object:Gem::Version
|
489
|
+
version: '0'
|
489
490
|
requirements: []
|
490
|
-
|
491
491
|
rubyforge_project:
|
492
|
-
rubygems_version: 1.
|
492
|
+
rubygems_version: 1.8.10
|
493
493
|
signing_key:
|
494
494
|
specification_version: 3
|
495
495
|
summary: Ruby wrapper for the GitHub API v3
|
496
496
|
test_files: []
|
497
|
-
|