gitx 3.0.0 → 3.0.1.ci.200.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -3
- data/.ruby-version +1 -1
- data/gitx.gemspec +0 -4
- data/lib/gitx/cli/integrate_command.rb +7 -3
- data/lib/gitx/cli/release_command.rb +7 -1
- data/lib/gitx/cli/start_command.rb +8 -2
- data/lib/gitx/github.rb +2 -2
- data/lib/gitx/version.rb +1 -1
- data/spec/gitx/cli/base_command_spec.rb +6 -6
- data/spec/gitx/cli/integrate_command_spec.rb +6 -6
- data/spec/gitx/cli/nuke_command_spec.rb +2 -2
- data/spec/gitx/cli/release_command_spec.rb +6 -6
- data/spec/gitx/cli/start_command_spec.rb +7 -1
- metadata +5 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf53aada716be9720b1938456eaddcf0efa56777
|
4
|
+
data.tar.gz: 7fbad32c7a12394d708683dd5b243120f7cd11b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea84519a1ea126040f2a58d7a4d13df51c354528113d55a0a9daa2ccc255e74094c1e206c9cc75424b35bcafe8ce33c97ef6557608c64a0ac634ef4d8f938e62
|
7
|
+
data.tar.gz: 1f08f0c1a530a5f36f69b32252ecf2e21f1059e8419407810500b575d52947bce34e11e39f8a77a1f0fa79cb744a6dfb454528fb246f2c678d9a7251fcba4e2a
|
data/.rubocop.yml
CHANGED
@@ -6,6 +6,10 @@
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
FileName:
|
10
|
+
Exclude:
|
11
|
+
- bin/*
|
12
|
+
|
9
13
|
LineLength:
|
10
14
|
Max: 200
|
11
15
|
|
@@ -39,6 +43,10 @@ Style/RescueModifier:
|
|
39
43
|
- 'lib/gitx/cli/integrate_command.rb'
|
40
44
|
- 'lib/gitx/cli/nuke_command.rb'
|
41
45
|
|
42
|
-
|
43
|
-
|
44
|
-
|
46
|
+
# disable ruby 3 transition validation
|
47
|
+
Style/FrozenStringLiteralComment:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
# increase max block size (fixes gemspec validation)
|
51
|
+
Metrics/BlockLength:
|
52
|
+
Max: 50
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.1
|
data/gitx.gemspec
CHANGED
@@ -29,11 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'webmock'
|
30
30
|
spec.add_development_dependency 'timecop'
|
31
31
|
spec.add_development_dependency 'vcr'
|
32
|
-
spec.add_development_dependency 'guard'
|
33
|
-
spec.add_development_dependency 'guard-rspec'
|
34
32
|
spec.add_development_dependency 'coveralls'
|
35
|
-
spec.add_development_dependency 'terminal-notifier'
|
36
|
-
spec.add_development_dependency 'terminal-notifier-guard'
|
37
33
|
spec.add_development_dependency 'rubocop'
|
38
34
|
|
39
35
|
# configure gem version for continuous integration builds
|
@@ -39,16 +39,20 @@ module Gitx
|
|
39
39
|
|
40
40
|
def integrate_branch(branch, integration_branch, pull_request)
|
41
41
|
fetch_remote_branch(integration_branch)
|
42
|
-
commit_message = "[gitx] Integrating #{branch} into #{integration_branch}"
|
43
|
-
commit_message += " (Pull request ##{pull_request.number})" if pull_request
|
44
42
|
begin
|
45
|
-
run_git_cmd 'merge', '--no-ff', '--message', commit_message, branch
|
43
|
+
run_git_cmd 'merge', '--no-ff', '--message', commit_message(branch, integration_branch, pull_request), branch
|
46
44
|
rescue
|
47
45
|
raise MergeError, "Merge conflict occurred. Please fix merge conflict and rerun command with --resume #{branch} flag"
|
48
46
|
end
|
49
47
|
run_git_cmd 'push', 'origin', 'HEAD'
|
50
48
|
end
|
51
49
|
|
50
|
+
def commit_message(branch, integration_branch, pull_request)
|
51
|
+
commit_message = "[gitx] Integrate #{branch} into #{integration_branch}"
|
52
|
+
commit_message += "\n\nConnected to ##{pull_request.number}" if pull_request
|
53
|
+
commit_message
|
54
|
+
end
|
55
|
+
|
52
56
|
def feature_branch_name
|
53
57
|
@feature_branch ||= begin
|
54
58
|
feature_branch = options[:resume] || current_branch.name
|
@@ -23,7 +23,7 @@ module Gitx
|
|
23
23
|
|
24
24
|
checkout_branch config.base_branch
|
25
25
|
run_git_cmd 'pull', 'origin', config.base_branch
|
26
|
-
run_git_cmd 'merge', '--no-ff', '--message',
|
26
|
+
run_git_cmd 'merge', '--no-ff', '--message', commit_message(branch, pull_request), branch
|
27
27
|
run_git_cmd 'push', 'origin', 'HEAD'
|
28
28
|
|
29
29
|
after_release
|
@@ -31,6 +31,12 @@ module Gitx
|
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
+
def commit_message(branch, pull_request)
|
35
|
+
message = "[gitx] Release #{branch} to #{config.base_branch}"
|
36
|
+
message += "\n\nConnected to ##{pull_request.number}"
|
37
|
+
message
|
38
|
+
end
|
39
|
+
|
34
40
|
def confirm_branch_status?(branch)
|
35
41
|
status = branch_status(branch)
|
36
42
|
if status == 'success'
|
@@ -5,7 +5,7 @@ require 'gitx/cli/base_command'
|
|
5
5
|
module Gitx
|
6
6
|
module Cli
|
7
7
|
class StartCommand < BaseCommand
|
8
|
-
EXAMPLE_BRANCH_NAMES = %w(
|
8
|
+
EXAMPLE_BRANCH_NAMES = %w(api-fix-invalid-auth desktop-cleanup-avatar-markup share-form-add-edit-link).freeze
|
9
9
|
VALID_BRANCH_NAME_REGEX = /^[A-Za-z0-9\-_]+$/
|
10
10
|
|
11
11
|
desc 'start', 'start a new git branch with latest changes from master'
|
@@ -19,11 +19,17 @@ module Gitx
|
|
19
19
|
run_git_cmd 'pull'
|
20
20
|
repo.create_branch branch_name, config.base_branch
|
21
21
|
checkout_branch branch_name
|
22
|
-
run_git_cmd('commit', '--allow-empty', '--message',
|
22
|
+
run_git_cmd('commit', '--allow-empty', '--message', commit_message(branch_name))
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
+
def commit_message(branch_name)
|
28
|
+
message = "[gitx] Start work on #{branch_name}"
|
29
|
+
message += "\n\nConnected to ##{options[:issue]}" if options[:issue]
|
30
|
+
message
|
31
|
+
end
|
32
|
+
|
27
33
|
def valid_new_branch_name?(branch)
|
28
34
|
return false if repo_branches.include?(branch)
|
29
35
|
Rugged::Reference.valid_name?("refs/heads/#{branch}")
|
data/lib/gitx/github.rb
CHANGED
@@ -161,14 +161,14 @@ module Gitx
|
|
161
161
|
|
162
162
|
def save_global_config(options)
|
163
163
|
config_dir = File.dirname(global_config_file)
|
164
|
-
::FileUtils.mkdir_p(config_dir, mode:
|
164
|
+
::FileUtils.mkdir_p(config_dir, mode: 0o700) unless File.exist?(config_dir)
|
165
165
|
|
166
166
|
@config = global_config.merge(options)
|
167
167
|
File.open(global_config_file, 'a+') do |file|
|
168
168
|
file.truncate(0)
|
169
169
|
file.write(@config.to_yaml)
|
170
170
|
end
|
171
|
-
File.chmod(
|
171
|
+
File.chmod(0o600, global_config_file)
|
172
172
|
end
|
173
173
|
|
174
174
|
def ask_without_echo(message)
|
data/lib/gitx/version.rb
CHANGED
@@ -24,9 +24,9 @@ describe Gitx::Cli::BaseCommand do
|
|
24
24
|
describe 'with custom .gitx.yml config file' do
|
25
25
|
let(:config) do
|
26
26
|
{
|
27
|
-
'aggregate_branches' => %w(
|
28
|
-
'reserved_branches' => %w(
|
29
|
-
'taggable_branches' => %w(
|
27
|
+
'aggregate_branches' => %w(foo bar),
|
28
|
+
'reserved_branches' => %w(baz qux),
|
29
|
+
'taggable_branches' => %w(quux corge)
|
30
30
|
}
|
31
31
|
end
|
32
32
|
before do
|
@@ -36,9 +36,9 @@ describe Gitx::Cli::BaseCommand do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
it 'overrides default options' do
|
39
|
-
expect(cli.send(:config).aggregate_branches).to eq(%w(
|
40
|
-
expect(cli.send(:config).reserved_branches).to eq(%w(
|
41
|
-
expect(cli.send(:config).taggable_branches).to eq(%w(
|
39
|
+
expect(cli.send(:config).aggregate_branches).to eq(%w(foo bar))
|
40
|
+
expect(cli.send(:config).reserved_branches).to eq(%w(baz qux))
|
41
|
+
expect(cli.send(:config).taggable_branches).to eq(%w(quux corge))
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -34,7 +34,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
34
34
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
35
35
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
|
36
36
|
expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
|
37
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
37
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Integrate feature-branch into staging\n\nConnected to #10", 'feature-branch').ordered
|
38
38
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
39
39
|
expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
|
40
40
|
|
@@ -55,7 +55,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
55
55
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
56
56
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
|
57
57
|
expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
|
58
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', '[gitx]
|
58
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', '[gitx] Integrate master into staging', 'master').ordered
|
59
59
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
60
60
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
61
61
|
|
@@ -88,7 +88,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
88
88
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
89
89
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
|
90
90
|
expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
|
91
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
91
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Integrate feature-branch into staging\n\nConnected to #10", 'feature-branch').ordered
|
92
92
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
93
93
|
expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
|
94
94
|
|
@@ -115,7 +115,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
115
115
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
116
116
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').and_raise(Gitx::Executor::ExecutionError).ordered
|
117
117
|
expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
|
118
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
118
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Integrate feature-branch into staging\n\nConnected to #10", 'feature-branch').ordered
|
119
119
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
120
120
|
expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
|
121
121
|
|
@@ -134,7 +134,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
134
134
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
135
135
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'prototype').ordered
|
136
136
|
expect(executor).to receive(:execute).with('git', 'checkout', 'prototype').ordered
|
137
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
137
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Integrate feature-branch into prototype\n\nConnected to #10", 'feature-branch').ordered
|
138
138
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
139
139
|
expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
|
140
140
|
|
@@ -158,7 +158,7 @@ describe Gitx::Cli::IntegrateCommand do
|
|
158
158
|
expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
|
159
159
|
expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
|
160
160
|
expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
|
161
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
161
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Integrate feature-branch into staging\n\nConnected to #10", 'feature-branch')
|
162
162
|
.and_raise('git merge feature-branch failed').ordered
|
163
163
|
|
164
164
|
VCR.use_cassette('pull_request_does_exist_with_success_status') do
|
@@ -108,7 +108,7 @@ describe Gitx::Cli::NukeCommand do
|
|
108
108
|
let(:good_branch) { 'master' }
|
109
109
|
let(:bad_branch) { 'prototype' }
|
110
110
|
let(:migrations) do
|
111
|
-
%w(
|
111
|
+
%w(db/migrate/20140715194946_create_users.rb db/migrate/20140730063034_update_user_account.rb).join("\n")
|
112
112
|
end
|
113
113
|
before do
|
114
114
|
FileUtils.mkdir_p('db/migrate')
|
@@ -134,7 +134,7 @@ describe Gitx::Cli::NukeCommand do
|
|
134
134
|
let(:good_branch) { 'master' }
|
135
135
|
let(:bad_branch) { 'prototype' }
|
136
136
|
let(:migrations) do
|
137
|
-
%w(
|
137
|
+
%w(db/migrate/20140715194946_create_users.rb db/migrate/20140730063034_update_user_account.rb).join("\n")
|
138
138
|
end
|
139
139
|
before do
|
140
140
|
FileUtils.mkdir_p('db/migrate')
|
@@ -42,7 +42,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
42
42
|
expect(executor).to receive(:execute).with('git', 'update').ordered
|
43
43
|
expect(executor).to_not receive(:execute).with('git', 'checkout', 'master')
|
44
44
|
expect(executor).to_not receive(:execute).with('git', 'pull', 'origin', 'master')
|
45
|
-
expect(executor).to_not receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
45
|
+
expect(executor).to_not receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch')
|
46
46
|
expect(executor).to_not receive(:execute).with('git', 'push', 'origin', 'HEAD')
|
47
47
|
|
48
48
|
VCR.use_cassette('pull_request_does_exist_with_failure_status') do
|
@@ -64,7 +64,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
64
64
|
expect(executor).to receive(:execute).with('git', 'update').ordered
|
65
65
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
66
66
|
expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
|
67
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
67
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch').ordered
|
68
68
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
69
69
|
expect(executor).to receive(:execute).with('git integrate').ordered
|
70
70
|
|
@@ -94,7 +94,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
94
94
|
expect(executor).to receive(:execute).with('git', 'update').ordered
|
95
95
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
96
96
|
expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
|
97
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
97
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch').ordered
|
98
98
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
99
99
|
expect(executor).to receive(:execute).with('echo hello').ordered
|
100
100
|
|
@@ -117,7 +117,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
117
117
|
expect(executor).to receive(:execute).with('git', 'update').ordered
|
118
118
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
119
119
|
expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
|
120
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
120
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch').ordered
|
121
121
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
122
122
|
expect(executor).to receive(:execute).with('git integrate').ordered
|
123
123
|
|
@@ -155,7 +155,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
155
155
|
expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', '--pretty=format:* %B').and_return('2013-01-01 did some stuff').ordered
|
156
156
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
157
157
|
expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
|
158
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
158
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch').ordered
|
159
159
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
160
160
|
expect(executor).to receive(:execute).with('git integrate').ordered
|
161
161
|
|
@@ -187,7 +187,7 @@ describe Gitx::Cli::ReleaseCommand do
|
|
187
187
|
expect(executor).to receive(:execute).with('git', 'update').ordered
|
188
188
|
expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
|
189
189
|
expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
|
190
|
-
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message',
|
190
|
+
expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', "[gitx] Release feature-branch to master\n\nConnected to #10", 'feature-branch').ordered
|
191
191
|
expect(executor).to receive(:execute).with('git', 'push', 'origin', 'HEAD').ordered
|
192
192
|
expect(executor).to receive(:execute).with('git integrate').ordered
|
193
193
|
expect(executor).to receive(:execute).with('git cleanup').ordered
|
@@ -20,6 +20,7 @@ describe Gitx::Cli::StartCommand do
|
|
20
20
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
21
21
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
22
22
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
23
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on new-branch').ordered
|
23
24
|
|
24
25
|
cli.start 'new-branch'
|
25
26
|
end
|
@@ -33,6 +34,7 @@ describe Gitx::Cli::StartCommand do
|
|
33
34
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
34
35
|
expect(repo).to receive(:create_branch).with('foo/ryan', 'master').ordered
|
35
36
|
expect(cli).to receive(:checkout_branch).with('foo/ryan').ordered
|
37
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on foo/ryan').ordered
|
36
38
|
|
37
39
|
cli.start 'foo/ryan'
|
38
40
|
end
|
@@ -48,6 +50,7 @@ describe Gitx::Cli::StartCommand do
|
|
48
50
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
49
51
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
50
52
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
53
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on new-branch').ordered
|
51
54
|
|
52
55
|
cli.start
|
53
56
|
end
|
@@ -63,6 +66,7 @@ describe Gitx::Cli::StartCommand do
|
|
63
66
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
64
67
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
65
68
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
69
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on new-branch').ordered
|
66
70
|
|
67
71
|
cli.start 'a bad_branch-name?'
|
68
72
|
end
|
@@ -81,6 +85,7 @@ describe Gitx::Cli::StartCommand do
|
|
81
85
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
82
86
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
83
87
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
88
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on new-branch').ordered
|
84
89
|
|
85
90
|
cli.start 'bar'
|
86
91
|
end
|
@@ -99,6 +104,7 @@ describe Gitx::Cli::StartCommand do
|
|
99
104
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
100
105
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
101
106
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
107
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', '[gitx] Start work on new-branch').ordered
|
102
108
|
|
103
109
|
cli.start 'bar'
|
104
110
|
end
|
@@ -117,7 +123,7 @@ describe Gitx::Cli::StartCommand do
|
|
117
123
|
expect(executor).to receive(:execute).with('git', 'pull').ordered
|
118
124
|
expect(repo).to receive(:create_branch).with('new-branch', 'master').ordered
|
119
125
|
expect(cli).to receive(:checkout_branch).with('new-branch').ordered
|
120
|
-
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message',
|
126
|
+
expect(executor).to receive(:execute).with('git', 'commit', '--allow-empty', '--message', "[gitx] Start work on new-branch\n\nConnected to #10").ordered
|
121
127
|
|
122
128
|
cli.start 'new-branch'
|
123
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1.ci.200.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|
@@ -150,34 +150,6 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: guard
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: guard-rspec
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
153
|
- !ruby/object:Gem::Dependency
|
182
154
|
name: coveralls
|
183
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,34 +164,6 @@ dependencies:
|
|
192
164
|
- - ">="
|
193
165
|
- !ruby/object:Gem::Version
|
194
166
|
version: '0'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: terminal-notifier
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - ">="
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: terminal-notifier-guard
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
167
|
- !ruby/object:Gem::Dependency
|
224
168
|
name: rubocop
|
225
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,12 +277,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
333
277
|
version: '0'
|
334
278
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
335
279
|
requirements:
|
336
|
-
- - "
|
280
|
+
- - ">"
|
337
281
|
- !ruby/object:Gem::Version
|
338
|
-
version:
|
282
|
+
version: 1.3.1
|
339
283
|
requirements: []
|
340
284
|
rubyforge_project:
|
341
|
-
rubygems_version: 2.5
|
285
|
+
rubygems_version: 2.4.5
|
342
286
|
signing_key:
|
343
287
|
specification_version: 4
|
344
288
|
summary: Utility scripts for Git to increase productivity for common operations
|
@@ -367,4 +311,3 @@ test_files:
|
|
367
311
|
- spec/support/timecop.rb
|
368
312
|
- spec/support/vcr.rb
|
369
313
|
- spec/support/webmock.rb
|
370
|
-
has_rdoc:
|