t1k 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/t1k/commands/ship.rb +2 -2
- data/lib/t1k/commands/sink.rb +2 -2
- data/lib/t1k/version.rb +1 -1
- data/spec/t1k/commands/pull_request_spec.rb +8 -2
- data/spec/t1k/commands/ship_spec.rb +36 -10
- data/spec/t1k_spec.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0764df51973aececa4ea017db567b069034eed9
|
4
|
+
data.tar.gz: dd02b07f3c521598ac9536324f419b5e1505632b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be56803a0c99f500a513eae59564b70c0a0fea55bc03e09da0973b26cad69e449a245f0355a3959a1c9c8caefa8c7830cabc2e267df8c507127e3527917d410
|
7
|
+
data.tar.gz: 9d3d4fd0ea95e31e9a7d8938e37234bc06754bebd715e6cf213a90db433d8f8a54cbe40acbc57b4eb0e50b0c7236a3c793863f5ae3eaa19f22ee24dc1182df68
|
data/lib/t1k/commands/ship.rb
CHANGED
@@ -19,7 +19,7 @@ module T1k
|
|
19
19
|
|
20
20
|
def self.commands_if_master(branch)
|
21
21
|
[ "git checkout master",
|
22
|
-
"git pull --rebase",
|
22
|
+
"git pull --rebase master",
|
23
23
|
"git merge #{branch}",
|
24
24
|
"git commit -v",
|
25
25
|
"git push origin master"
|
@@ -30,7 +30,7 @@ module T1k
|
|
30
30
|
|
31
31
|
def self.commands_if_branch(branch)
|
32
32
|
[ "git checkout #{branch}",
|
33
|
-
"git pull --rebase",
|
33
|
+
"git pull --rebase #{branch}",
|
34
34
|
"git commit -v",
|
35
35
|
"git push origin #{branch}"
|
36
36
|
].each do |cmd|
|
data/lib/t1k/commands/sink.rb
CHANGED
@@ -20,7 +20,7 @@ module T1k
|
|
20
20
|
[ "git checkout master",
|
21
21
|
"git pull --rebase origin master",
|
22
22
|
"git checkout #{branch.strip}",
|
23
|
-
"git rebase master
|
23
|
+
"git rebase master"
|
24
24
|
].each do |cmd|
|
25
25
|
system cmd
|
26
26
|
end
|
@@ -28,7 +28,7 @@ module T1k
|
|
28
28
|
|
29
29
|
def self.commands_if_branch(branch)
|
30
30
|
[ "git checkout #{branch}",
|
31
|
-
"git pull --rebase",
|
31
|
+
"git pull --rebase origin #{branch}",
|
32
32
|
].each do |cmd|
|
33
33
|
system cmd
|
34
34
|
end
|
data/lib/t1k/version.rb
CHANGED
@@ -2,7 +2,14 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe T1k::Commands::PullRequest do
|
4
4
|
subject { T1k::Commands::PullRequest }
|
5
|
+
|
5
6
|
context '#run' do
|
7
|
+
before do
|
8
|
+
T1k.setup do |config|
|
9
|
+
config.repository.default_remote_branch = :master
|
10
|
+
config.repository.adapter = :bitbucket
|
11
|
+
end
|
12
|
+
end
|
6
13
|
it 'have to sink' do
|
7
14
|
expect(T1k::Commands::Sink).to receive(:run)
|
8
15
|
|
@@ -14,8 +21,7 @@ describe T1k::Commands::PullRequest do
|
|
14
21
|
"git checkout master",
|
15
22
|
"git pull --rebase origin master",
|
16
23
|
"git checkout branch_name",
|
17
|
-
"git rebase master
|
18
|
-
"git push origin branch_name"
|
24
|
+
"git rebase master"
|
19
25
|
].each do |cmd|
|
20
26
|
allow_any_instance_of(Kernel).to receive(:system).with( cmd )
|
21
27
|
end
|
@@ -3,19 +3,45 @@ require 'spec_helper'
|
|
3
3
|
describe T1k::Commands::Ship do
|
4
4
|
describe '#self.run' do
|
5
5
|
|
6
|
-
|
6
|
+
context "when default_remote_branch is :master" do
|
7
|
+
before do
|
8
|
+
T1k.setup do |config|
|
9
|
+
config.repository.default_remote_branch = :master
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should checkout to master" do
|
14
|
+
[ "git checkout master",
|
15
|
+
"git pull --rebase master",
|
16
|
+
"git merge branch_name",
|
17
|
+
"git commit -v",
|
18
|
+
"git push origin master"
|
19
|
+
].each do |cmd|
|
20
|
+
allow_any_instance_of(Kernel).to receive(:system).with( cmd )
|
21
|
+
end
|
7
22
|
|
8
|
-
|
9
|
-
"git checkout master",
|
10
|
-
"git pull --rebase",
|
11
|
-
"git merge branch_name",
|
12
|
-
"git commit -v",
|
13
|
-
"git push origin master"
|
14
|
-
].each do |cmd|
|
15
|
-
allow_any_instance_of(Kernel).to receive(:system).with( cmd )
|
23
|
+
T1k::Commands::Ship.run
|
16
24
|
end
|
25
|
+
end
|
17
26
|
|
18
|
-
|
27
|
+
context "when default_remote_branch is :branch" do
|
28
|
+
before do
|
29
|
+
T1k.setup do |config|
|
30
|
+
config.repository.default_remote_branch = :branch
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should checkout to branch_name" do
|
35
|
+
[ "git checkout branch_name",
|
36
|
+
"git pull --rebase branch_name",
|
37
|
+
"git commit -v",
|
38
|
+
"git push origin branch_name"
|
39
|
+
].each do |cmd|
|
40
|
+
allow_any_instance_of(Kernel).to receive(:system).with( cmd )
|
41
|
+
end
|
42
|
+
|
43
|
+
T1k::Commands::Ship.run
|
44
|
+
end
|
19
45
|
end
|
20
46
|
end
|
21
47
|
end
|
data/spec/t1k_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t1k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Maia
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-09-
|
13
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|