t1k 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0764df51973aececa4ea017db567b069034eed9
4
- data.tar.gz: dd02b07f3c521598ac9536324f419b5e1505632b
3
+ metadata.gz: b0ac343a1d40e6f6f93980ed30e9433d8e757227
4
+ data.tar.gz: 6e1d04961678159cc4b08bb77106ff78b3942dae
5
5
  SHA512:
6
- metadata.gz: 6be56803a0c99f500a513eae59564b70c0a0fea55bc03e09da0973b26cad69e449a245f0355a3959a1c9c8caefa8c7830cabc2e267df8c507127e3527917d410
7
- data.tar.gz: 9d3d4fd0ea95e31e9a7d8938e37234bc06754bebd715e6cf213a90db433d8f8a54cbe40acbc57b4eb0e50b0c7236a3c793863f5ae3eaa19f22ee24dc1182df68
6
+ metadata.gz: da789a64807229b32351d755970695f01a25db78b68c3a566b9d26250bbddde707c88903220be0264fb8851d52235ae40eaa4e6bee8dd2a2d1e72920036616c9
7
+ data.tar.gz: b1040d4d332a51750dbe50a7e4644a6d9bd6ba15cfa108444d56669f294342549721dcd191266db2045df5d4c1a24c18556edabf8693c9a6e59579dc90e3b0b6
@@ -3,32 +3,19 @@ module T1k
3
3
  class Sink
4
4
  def self.run
5
5
  T1k.setup_credentials
6
-
7
- default_remote_branch = T1k::Repository.default_remote_branch
8
- branch = T1k::Commands::Branch.actual_branch
9
-
10
- if default_remote_branch == :master
11
- commands_if_master(branch)
12
- elsif default_remote_branch == :branch
13
- commands_if_branch(branch)
14
- else
15
- puts "Invalid default_remote_branch"
16
- end
6
+ branch = T1k::Commands::Branch.actual_branch
7
+ self.rebasing(branch)
17
8
  end
18
9
 
19
- def self.commands_if_master(branch)
20
- [ "git checkout master",
10
+ def self.rebasing(branch)
11
+ [
12
+ "git checkout master",
21
13
  "git pull --rebase origin master",
22
- "git checkout #{branch.strip}",
23
- "git rebase master"
24
- ].each do |cmd|
25
- system cmd
26
- end
27
- end
28
14
 
29
- def self.commands_if_branch(branch)
30
- [ "git checkout #{branch}",
15
+ "git checkout #{branch}",
31
16
  "git pull --rebase origin #{branch}",
17
+
18
+ "git merge master"
32
19
  ].each do |cmd|
33
20
  system cmd
34
21
  end
data/lib/t1k/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module T1k
2
- VERSION = "3.0.3"
2
+ VERSION = "3.0.4"
3
3
  end
@@ -21,6 +21,7 @@ describe T1k::Commands::PullRequest do
21
21
  "git checkout master",
22
22
  "git pull --rebase origin master",
23
23
  "git checkout branch_name",
24
+ "git pull --rebase origin branch_name",
24
25
  "git rebase master"
25
26
  ].each do |cmd|
26
27
  allow_any_instance_of(Kernel).to receive(:system).with( cmd )
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.3
4
+ version: 3.0.4
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-15 00:00:00.000000000 Z
13
+ date: 2016-09-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler