github_api 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -43
- data/features/cassettes/pagination/repos.yml +129 -0
- data/features/cassettes/pagination/repos/commits.yml +133 -0
- data/features/cassettes/pagination/repos/commits/sha/next.yml +129 -0
- data/features/cassettes/pagination/repos/diff/next.yml +130 -0
- data/lib/github_api/gists/comments.rb +5 -5
- data/lib/github_api/issues.rb +5 -5
- data/lib/github_api/issues/comments.rb +5 -5
- data/lib/github_api/issues/events.rb +1 -1
- data/lib/github_api/pull_requests.rb +8 -8
- data/lib/github_api/pull_requests/comments.rb +5 -5
- data/lib/github_api/repos/collaborators.rb +1 -1
- data/lib/github_api/users/followers.rb +2 -2
- data/lib/github_api/version.rb +1 -1
- data/spec/fixtures/users/emails.json +4 -0
- data/spec/fixtures/users/followers.json +9 -0
- data/spec/fixtures/users/key.json +6 -0
- data/spec/fixtures/users/keys.json +8 -0
- data/spec/github/gists_spec.rb +5 -0
- data/spec/github/issues/comments_spec.rb +3 -3
- data/spec/github/issues/events_spec.rb +8 -11
- data/spec/github/pull_requests_spec.rb +7 -7
- data/spec/github/result_spec.rb +1 -1
- data/spec/github/users/followers_spec.rb +238 -1
- data/spec/github/users_spec.rb +6 -14
- data/spec/github_spec.rb +2 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/authentication.rb +9 -0
- data/spec/support/base.rb +10 -5
- metadata +23 -18
data/spec/github_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -18,8 +18,26 @@ end
|
|
18
18
|
# in ./support/ and its subdirectories.
|
19
19
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
20
20
|
|
21
|
+
module Github
|
22
|
+
def reset!
|
23
|
+
instance_variables.each do |ivar|
|
24
|
+
instance_variable_set(ivar, nil)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
21
29
|
RSpec.configure do |config|
|
22
30
|
config.include WebMock::API
|
31
|
+
# config.order = :rand
|
32
|
+
config.color_enabled = true
|
33
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
34
|
+
|
35
|
+
config.before(:each) do
|
36
|
+
WebMock.reset!
|
37
|
+
end
|
38
|
+
config.after(:each) do
|
39
|
+
WebMock.reset!
|
40
|
+
end
|
23
41
|
end
|
24
42
|
|
25
43
|
def stub_get(path, endpoint = Github.endpoint.to_s)
|
data/spec/support/base.rb
CHANGED
@@ -3,11 +3,16 @@ module SpecHelpers
|
|
3
3
|
|
4
4
|
def self.included(base)
|
5
5
|
base.class_eval do
|
6
|
-
let(:github) { Github.new }
|
7
|
-
let(:user) { 'peter-murach' }
|
8
|
-
let(:repo) { 'github' }
|
9
|
-
let(:org) { 'github' }
|
10
|
-
let(:collaborator) { 'octocat' }
|
6
|
+
let!(:github) { Github.new }
|
7
|
+
let!(:user) { 'peter-murach' }
|
8
|
+
let!(:repo) { 'github' }
|
9
|
+
let!(:org) { 'github' }
|
10
|
+
let!(:collaborator) { 'octocat' }
|
11
|
+
|
12
|
+
before(:each) do
|
13
|
+
github.login = nil
|
14
|
+
github.password = nil
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
18
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: github_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.4.
|
5
|
+
version: 0.4.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Piotr Murach
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-27 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.7.
|
35
|
+
version: 0.7.6
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.0
|
46
|
+
version: 1.1.0
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.5.
|
57
|
+
version: 0.5.2
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
@@ -102,47 +102,47 @@ dependencies:
|
|
102
102
|
type: :development
|
103
103
|
version_requirements: *id008
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
105
|
+
name: webmock
|
106
106
|
prerelease: false
|
107
107
|
requirement: &id009 !ruby/object:Gem::Requirement
|
108
108
|
none: false
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ~>
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version:
|
112
|
+
version: 1.8.0
|
113
113
|
type: :development
|
114
114
|
version_requirements: *id009
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
|
-
name:
|
116
|
+
name: vcr
|
117
117
|
prerelease: false
|
118
118
|
requirement: &id010 !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|
121
121
|
- - ~>
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 1.
|
123
|
+
version: 1.11.3
|
124
124
|
type: :development
|
125
125
|
version_requirements: *id010
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: simplecov
|
128
128
|
prerelease: false
|
129
129
|
requirement: &id011 !ruby/object:Gem::Requirement
|
130
130
|
none: false
|
131
131
|
requirements:
|
132
132
|
- - ~>
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
134
|
+
version: 0.6.1
|
135
135
|
type: :development
|
136
136
|
version_requirements: *id011
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
|
-
name:
|
138
|
+
name: guard
|
139
139
|
prerelease: false
|
140
140
|
requirement: &id012 !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
143
143
|
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 0.8.8
|
146
146
|
type: :development
|
147
147
|
version_requirements: *id012
|
148
148
|
- !ruby/object:Gem::Dependency
|
@@ -151,9 +151,9 @@ dependencies:
|
|
151
151
|
requirement: &id013 !ruby/object:Gem::Requirement
|
152
152
|
none: false
|
153
153
|
requirements:
|
154
|
-
- - "
|
154
|
+
- - "="
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
156
|
+
version: 0.5.7
|
157
157
|
type: :development
|
158
158
|
version_requirements: *id013
|
159
159
|
- !ruby/object:Gem::Dependency
|
@@ -162,9 +162,9 @@ dependencies:
|
|
162
162
|
requirement: &id014 !ruby/object:Gem::Requirement
|
163
163
|
none: false
|
164
164
|
requirements:
|
165
|
-
- - "
|
165
|
+
- - "="
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
167
|
+
version: 0.7.4
|
168
168
|
type: :development
|
169
169
|
version_requirements: *id014
|
170
170
|
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. "
|
@@ -352,6 +352,10 @@ files:
|
|
352
352
|
- spec/fixtures/repos/teams.json
|
353
353
|
- spec/fixtures/repos/watched.json
|
354
354
|
- spec/fixtures/repos/watchers.json
|
355
|
+
- spec/fixtures/users/emails.json
|
356
|
+
- spec/fixtures/users/followers.json
|
357
|
+
- spec/fixtures/users/key.json
|
358
|
+
- spec/fixtures/users/keys.json
|
355
359
|
- spec/fixtures/users/user.json
|
356
360
|
- spec/github/api_factory_spec.rb
|
357
361
|
- spec/github/api_spec.rb
|
@@ -405,6 +409,7 @@ files:
|
|
405
409
|
- spec/github_spec.rb
|
406
410
|
- spec/README.rdoc
|
407
411
|
- spec/spec_helper.rb
|
412
|
+
- spec/support/authentication.rb
|
408
413
|
- spec/support/base.rb
|
409
414
|
- spec/support/file_ops.rb
|
410
415
|
- spec/support/github_api_shared_examples.rb
|