octokit 1.17.0 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1 -0
- data/README.md +8 -0
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +1 -1
- data/spec/faraday/response_spec.rb +6 -6
- data/spec/helper.rb +7 -0
- data/spec/octokit/client/authorizations_spec.rb +12 -12
- data/spec/octokit/client/commits_spec.rb +31 -31
- data/spec/octokit/client/contents_spec.rb +10 -10
- data/spec/octokit/client/downloads_spec.rb +11 -11
- data/spec/octokit/client/emojis_spec.rb +2 -2
- data/spec/octokit/client/events_spec.rb +8 -8
- data/spec/octokit/client/gists_spec.rb +26 -26
- data/spec/octokit/client/issue_events_spec.rb +6 -6
- data/spec/octokit/client/issues_spec.rb +30 -30
- data/spec/octokit/client/labels_spec.rb +28 -28
- data/spec/octokit/client/markdown_spec.rb +2 -2
- data/spec/octokit/client/milestones_spec.rb +10 -10
- data/spec/octokit/client/objects_spec.rb +11 -11
- data/spec/octokit/client/organizations_spec.rb +41 -41
- data/spec/octokit/client/pub_sub_hubbub/service_hooks_spec.rb +2 -2
- data/spec/octokit/client/pub_sub_hubbub_spec.rb +4 -4
- data/spec/octokit/client/pulls_spec.rb +20 -20
- data/spec/octokit/client/refs_spec.rb +15 -15
- data/spec/octokit/client/repositories_spec.rb +83 -83
- data/spec/octokit/client/statuses_spec.rb +6 -6
- data/spec/octokit/client/users_spec.rb +48 -48
- data/spec/octokit/client_spec.rb +27 -27
- data/spec/octokit/gist_spec.rb +14 -14
- data/spec/octokit_spec.rb +6 -6
- data/spec/repository_spec.rb +21 -21
- metadata +9 -9
data/spec/octokit/gist_spec.rb
CHANGED
@@ -4,9 +4,9 @@ require 'helper'
|
|
4
4
|
describe Octokit::Gist do
|
5
5
|
|
6
6
|
context "when given a URL" do
|
7
|
-
it "
|
7
|
+
it "sets the id" do
|
8
8
|
gist = Octokit::Gist.from_url("https://gist.github.com/12345")
|
9
|
-
gist.id.
|
9
|
+
expect(gist.id).to eq('12345')
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -15,16 +15,16 @@ describe Octokit::Gist do
|
|
15
15
|
@gist = Octokit::Gist.new('12345')
|
16
16
|
end
|
17
17
|
|
18
|
-
it "
|
19
|
-
@gist.id.
|
18
|
+
it "sets the gist ID" do
|
19
|
+
expect(@gist.id).to eq('12345')
|
20
20
|
end
|
21
21
|
|
22
|
-
it "
|
23
|
-
@gist.url.
|
22
|
+
it "sets the url" do
|
23
|
+
expect(@gist.url).to eq('https://gist.github.com/12345')
|
24
24
|
end
|
25
25
|
|
26
|
-
it "
|
27
|
-
@gist.to_s.
|
26
|
+
it "renders id as string" do
|
27
|
+
expect(@gist.to_s).to eq(@gist.id)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -33,16 +33,16 @@ describe Octokit::Gist do
|
|
33
33
|
@gist = Octokit::Gist.new(12345)
|
34
34
|
end
|
35
35
|
|
36
|
-
it "
|
37
|
-
@gist.id.
|
36
|
+
it "sets the gist ID as a string" do
|
37
|
+
expect(@gist.id).to eq('12345')
|
38
38
|
end
|
39
39
|
|
40
|
-
it "
|
41
|
-
@gist.url.
|
40
|
+
it "sets the url" do
|
41
|
+
expect(@gist.url).to eq('https://gist.github.com/12345')
|
42
42
|
end
|
43
43
|
|
44
|
-
it "
|
45
|
-
@gist.to_s.
|
44
|
+
it "renders id as string" do
|
45
|
+
expect(@gist.to_s).to eq(@gist.id)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
data/spec/octokit_spec.rb
CHANGED
@@ -7,23 +7,23 @@ describe Octokit do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe ".respond_to?" do
|
10
|
-
it "
|
11
|
-
Octokit.respond_to?(:new, true).
|
10
|
+
it "is true if method exists" do
|
11
|
+
expect(Octokit.respond_to?(:new, true)).to be_true
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
describe ".new" do
|
16
|
-
it "
|
17
|
-
Octokit.new.
|
16
|
+
it "is a Octokit::Client" do
|
17
|
+
expect(Octokit.new).to be_a Octokit::Client
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
describe ".delegate" do
|
22
|
-
it "
|
22
|
+
it "delegates missing methods to Octokit::Client" do
|
23
23
|
stub_get("/repos/pengwynn/octokit/issues").
|
24
24
|
to_return(:status => 200, :body => fixture('v3/issues.json'))
|
25
25
|
issues = Octokit.issues('pengwynn/octokit')
|
26
|
-
issues.last.user.login.
|
26
|
+
expect(issues.last.user.login).to eq('fellix')
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
data/spec/repository_spec.rb
CHANGED
@@ -7,49 +7,49 @@ describe Octokit::Repository do
|
|
7
7
|
@repository = Octokit::Repository.new("sferik/octokit")
|
8
8
|
end
|
9
9
|
|
10
|
-
it "
|
11
|
-
@repository.name.
|
12
|
-
@repository.username.
|
10
|
+
it "sets the repository name and username" do
|
11
|
+
expect(@repository.name).to eq("octokit")
|
12
|
+
expect(@repository.username).to eq("sferik")
|
13
13
|
end
|
14
14
|
|
15
|
-
it "
|
16
|
-
@repository.repo.
|
17
|
-
@repository.user.
|
15
|
+
it "responds to repo and user" do
|
16
|
+
expect(@repository.repo).to eq("octokit")
|
17
|
+
expect(@repository.user).to eq("sferik")
|
18
18
|
end
|
19
19
|
|
20
|
-
it "
|
21
|
-
@repository.slug.
|
22
|
-
@repository.to_s.
|
20
|
+
it "renders slug as string" do
|
21
|
+
expect(@repository.slug).to eq("sferik/octokit")
|
22
|
+
expect(@repository.to_s).to eq(@repository.slug)
|
23
23
|
end
|
24
24
|
|
25
|
-
it "
|
26
|
-
@repository.url.
|
25
|
+
it "renders url as string" do
|
26
|
+
expect(@repository.url).to eq('https://github.com/sferik/octokit')
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
30
30
|
|
31
31
|
context "when passed a hash" do
|
32
|
-
it "
|
32
|
+
it "sets the repository name and username" do
|
33
33
|
repository = Octokit::Repository.new({:username => 'sferik', :name => 'octokit'})
|
34
|
-
repository.name.
|
35
|
-
repository.username.
|
34
|
+
expect(repository.name).to eq("octokit")
|
35
|
+
expect(repository.username).to eq("sferik")
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
context "when passed a Repo" do
|
40
|
-
it "
|
40
|
+
it "sets the repository name and username" do
|
41
41
|
repository = Octokit::Repository.new(Octokit::Repository.new('sferik/octokit'))
|
42
|
-
repository.name.
|
43
|
-
repository.username.
|
44
|
-
repository.url.
|
42
|
+
expect(repository.name).to eq("octokit")
|
43
|
+
expect(repository.username).to eq("sferik")
|
44
|
+
expect(repository.url).to eq('https://github.com/sferik/octokit')
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
context "when given a URL" do
|
49
|
-
it "
|
49
|
+
it "sets the repository name and username" do
|
50
50
|
repository = Octokit::Repository.from_url("https://github.com/sferik/octokit")
|
51
|
-
repository.name.
|
52
|
-
repository.username.
|
51
|
+
expect(repository.name).to eq("octokit")
|
52
|
+
expect(repository.username).to eq("sferik")
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-10-
|
14
|
+
date: 2012-10-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
@@ -78,13 +78,13 @@ dependencies:
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '1.2'
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
|
-
name:
|
81
|
+
name: multi_json
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '1.
|
87
|
+
version: '1.3'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -92,23 +92,23 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - ~>
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '1.
|
95
|
+
version: '1.3'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
|
-
name:
|
97
|
+
name: json
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
none: false
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
104
|
-
type: :
|
103
|
+
version: '1.7'
|
104
|
+
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ~>
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '1.
|
111
|
+
version: '1.7'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: maruku
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|