github_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +13 -4
- data/lib/github_api.rb +2 -1
- data/lib/github_api/api.rb +29 -14
- data/lib/github_api/client.rb +10 -7
- data/lib/github_api/configuration.rb +16 -1
- data/lib/github_api/connection.rb +2 -1
- data/lib/github_api/core_ext/array.rb +14 -0
- data/lib/github_api/core_ext/hash.rb +38 -0
- data/lib/github_api/repos.rb +42 -14
- data/lib/github_api/repos/hooks.rb +126 -25
- data/lib/github_api/repos/keys.rb +3 -3
- data/lib/github_api/repos/pub_sub_hubbub.rb +12 -0
- data/lib/github_api/request/basic_auth.rb +26 -0
- data/lib/github_api/request/oauth2.rb +2 -2
- data/lib/github_api/version.rb +1 -1
- data/spec/fixtures/repos/branches.json +9 -0
- data/spec/fixtures/repos/contributors.json +8 -0
- data/spec/fixtures/repos/hook.json +15 -0
- data/spec/fixtures/repos/hooks.json +10 -0
- data/spec/fixtures/repos/languages.json +4 -0
- data/spec/fixtures/repos/repo.json +90 -0
- data/spec/fixtures/repos/repos.json +29 -0
- data/spec/fixtures/repos/tags.json +11 -0
- data/spec/fixtures/repos/teams.json +7 -0
- data/spec/github/client_spec.rb +46 -2
- data/spec/github/core_ext/hash_spec.rb +34 -0
- data/spec/github/repos/hooks_spec.rb +304 -2
- data/spec/github/repos/keys_spec.rb +14 -3
- data/spec/github/repos/watching_spec.rb +7 -3
- data/spec/github/repos_spec.rb +555 -22
- data/spec/github_spec.rb +12 -0
- data/spec/spec_helper.rb +8 -0
- metadata +30 -4
data/spec/github_spec.rb
CHANGED
@@ -2,6 +2,11 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
2
|
|
3
3
|
describe Github do
|
4
4
|
|
5
|
+
before do
|
6
|
+
Github.user = nil
|
7
|
+
Github.repo = nil
|
8
|
+
end
|
9
|
+
|
5
10
|
it "should respond to 'new' message" do
|
6
11
|
Github.should respond_to :new
|
7
12
|
end
|
@@ -77,6 +82,13 @@ describe Github do
|
|
77
82
|
Github.faraday_options.should be_empty
|
78
83
|
end
|
79
84
|
|
85
|
+
it "shoulve have not set user's login" do
|
86
|
+
Github.login.should be_nil
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should have not set user's password" do
|
90
|
+
Github.password.should be_nil
|
91
|
+
end
|
80
92
|
end
|
81
93
|
|
82
94
|
describe ".configure" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Piotr Murach
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-10-
|
17
|
+
date: 2011-10-22 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -168,7 +168,19 @@ dependencies:
|
|
168
168
|
version: "0.4"
|
169
169
|
type: :development
|
170
170
|
version_requirements: *id011
|
171
|
-
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: guard-rspec
|
173
|
+
prerelease: false
|
174
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
segments:
|
179
|
+
- 0
|
180
|
+
version: "0"
|
181
|
+
type: :development
|
182
|
+
version_requirements: *id012
|
183
|
+
description: " Ruby wrapper that supports all of the GitHub API v3 methods(nearly 200). It's build in a modular way, that is, you can either instantiate the whole api wrapper Github.new or use parts of it e.i. Github::Repos.new if working solely with repositories is your main concern. "
|
172
184
|
email: ""
|
173
185
|
executables: []
|
174
186
|
|
@@ -188,6 +200,8 @@ files:
|
|
188
200
|
- lib/github_api/client.rb
|
189
201
|
- lib/github_api/configuration.rb
|
190
202
|
- lib/github_api/connection.rb
|
203
|
+
- lib/github_api/core_ext/array.rb
|
204
|
+
- lib/github_api/core_ext/hash.rb
|
191
205
|
- lib/github_api/error.rb
|
192
206
|
- lib/github_api/gists/comments.rb
|
193
207
|
- lib/github_api/gists.rb
|
@@ -213,8 +227,10 @@ files:
|
|
213
227
|
- lib/github_api/repos/forks.rb
|
214
228
|
- lib/github_api/repos/hooks.rb
|
215
229
|
- lib/github_api/repos/keys.rb
|
230
|
+
- lib/github_api/repos/pub_sub_hubbub.rb
|
216
231
|
- lib/github_api/repos/watching.rb
|
217
232
|
- lib/github_api/repos.rb
|
233
|
+
- lib/github_api/request/basic_auth.rb
|
218
234
|
- lib/github_api/request/oauth2.rb
|
219
235
|
- lib/github_api/request.rb
|
220
236
|
- lib/github_api/response/jsonize.rb
|
@@ -229,14 +245,24 @@ files:
|
|
229
245
|
- lib/github_api.rb
|
230
246
|
- spec/fixtures/collaborators_list.json
|
231
247
|
- spec/fixtures/commits_list.json
|
248
|
+
- spec/fixtures/repos/branches.json
|
249
|
+
- spec/fixtures/repos/contributors.json
|
250
|
+
- spec/fixtures/repos/hook.json
|
251
|
+
- spec/fixtures/repos/hooks.json
|
232
252
|
- spec/fixtures/repos/key.json
|
233
253
|
- spec/fixtures/repos/keys.json
|
254
|
+
- spec/fixtures/repos/languages.json
|
255
|
+
- spec/fixtures/repos/repo.json
|
256
|
+
- spec/fixtures/repos/repos.json
|
257
|
+
- spec/fixtures/repos/tags.json
|
258
|
+
- spec/fixtures/repos/teams.json
|
234
259
|
- spec/fixtures/repos/watched.json
|
235
260
|
- spec/fixtures/repos/watchers.json
|
236
261
|
- spec/fixtures/repos_branches_list.json
|
237
262
|
- spec/fixtures/repos_list.json
|
238
263
|
- spec/github/api_spec.rb
|
239
264
|
- spec/github/client_spec.rb
|
265
|
+
- spec/github/core_ext/hash_spec.rb
|
240
266
|
- spec/github/gists/comments_spec.rb
|
241
267
|
- spec/github/gists_spec.rb
|
242
268
|
- spec/github/git_data/blobs_spec.rb
|