git_helper 3.4.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +45 -40
- data/Guardfile +1 -1
- data/LICENSE.md +29 -0
- data/README.md +19 -7
- data/lib/git_helper/github_client.rb +70 -0
- data/lib/git_helper/gitlab_client.rb +46 -2
- data/lib/git_helper/merge_request.rb +34 -30
- data/lib/git_helper/pull_request.rb +33 -46
- data/lib/git_helper/setup.rb +1 -1
- data/lib/git_helper/version.rb +1 -1
- data/lib/git_helper.rb +1 -2
- data/spec/git_helper/code_request_spec.rb +1 -1
- data/spec/git_helper/github_client_spec.rb +131 -0
- data/spec/git_helper/gitlab_client_spec.rb +120 -4
- data/spec/git_helper/merge_request_spec.rb +12 -13
- data/spec/git_helper/pull_request_spec.rb +18 -19
- metadata +9 -65
- data/LICENSE +0 -22
- data/lib/git_helper/octokit_client.rb +0 -13
- data/spec/git_helper/octokit_client_spec.rb +0 -28
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'git_helper'
|
5
|
-
|
6
|
-
describe GitHelper::OctokitClient do
|
7
|
-
let(:git_config_reader) { double(:git_config_reader, github_token: :token) }
|
8
|
-
|
9
|
-
subject { GitHelper::OctokitClient.new }
|
10
|
-
|
11
|
-
before do
|
12
|
-
allow(GitHelper::GitConfigReader).to receive(:new).and_return(git_config_reader)
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '#client' do
|
16
|
-
it 'should call the GitLab client to make a new client' do
|
17
|
-
expect(Octokit::Client).to receive(:new)
|
18
|
-
subject.client
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe '#git_config_reader' do
|
23
|
-
it 'should make a new git config reader' do
|
24
|
-
expect(GitHelper::GitConfigReader).to receive(:new)
|
25
|
-
subject.send(:git_config_reader)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|