thegarage-gitx 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b56a879d33daf6209b8e0a9a921c968d376add4b
|
4
|
+
data.tar.gz: 95b83e8304ad4cfecadac685d71264b5e7d78527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7146b3e4f1c47734f923d15a85b155cd874aebea870cd27cad5edea6713f9dbde1e939a3b239e33789fd5f7d4518814ec32949bd8f3d1353d7980f42dac9b350
|
7
|
+
data.tar.gz: b862ca780f3ccedcaba97349024c5b001c9710d12b865df1a5bbe09a3c920557bda8e4bb0af32da3846812e3b885ff49aa782e2ff42ada5078c629eeb3b46dda
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'thor'
|
2
2
|
require 'thegarage/gitx'
|
3
3
|
require 'thegarage/gitx/cli/base_command'
|
4
|
+
require 'thegarage/gitx/cli/update_command'
|
4
5
|
require 'json'
|
5
6
|
require 'rest_client'
|
6
7
|
|
@@ -29,7 +30,7 @@ module Thegarage
|
|
29
30
|
branch = current_branch.name
|
30
31
|
pull_request = find_pull_request(branch)
|
31
32
|
if pull_request.nil?
|
32
|
-
update
|
33
|
+
UpdateCommand.new.update
|
33
34
|
changelog = run_cmd "git log #{Thegarage::Gitx::BASE_BRANCH}...#{branch} --no-merges --pretty=format:'* %s%n%b'"
|
34
35
|
pull_request = create_pull_request(branch, changelog, options)
|
35
36
|
say 'Pull request created: '
|
@@ -35,11 +35,13 @@ describe Thegarage::Gitx::Cli::ReviewRequestCommand do
|
|
35
35
|
context 'when pull request does not exist' do
|
36
36
|
let(:authorization_token) { '123123' }
|
37
37
|
let(:changelog) { '* made some fixes' }
|
38
|
+
let(:fake_update_command) { double('fake update command', update: nil) }
|
38
39
|
before do
|
40
|
+
expect(Thegarage::Gitx::Cli::UpdateCommand).to receive(:new).and_return(fake_update_command)
|
41
|
+
|
39
42
|
expect(cli).to receive(:authorization_token).and_return(authorization_token)
|
40
43
|
expect(cli).to receive(:find_pull_request).and_return(nil)
|
41
44
|
expect(cli).to receive(:create_pull_request).and_return(pull_request)
|
42
|
-
expect(cli).to receive(:update)
|
43
45
|
expect(cli).to receive(:run_cmd).with("git log master...feature-branch --no-merges --pretty=format:'* %s%n%b'").and_return("2013-01-01 did some stuff").ordered
|
44
46
|
cli.reviewrequest
|
45
47
|
end
|