t1k 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/t1k/command.rb +6 -6
- data/lib/t1k/commands/pull_request.rb +5 -4
- data/lib/t1k/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5d969e634122aa2f3460d217853f0b816e09d7564b874300d32a4e15a707ba00
|
4
|
+
data.tar.gz: d85b5bbda33a66180830521cbcb99543271365abeefe8df90c71b4e4d528ae9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b26f7d8342704320316d453decf24329da1b7f8f76a75f6c869c905b215210512a536975401b69cdaa5f970a4e0b202cefcb1d2537243f2381e45d52aac59b8f
|
7
|
+
data.tar.gz: 2e33d699d9c2e9838cc08f166873d8b5ce5455b364a1971c3bcba183102f08d7530c29b8ad1ec0016284a1e5d9628f1bea6b55d3ee27d3cf67939fedcc32ccb0
|
data/lib/t1k/command.rb
CHANGED
@@ -68,16 +68,16 @@ module T1k
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
opt :v, :version, 'Display the current version' do
|
72
|
-
puts T1k::VERSION
|
73
|
-
end
|
74
|
-
|
75
71
|
desc 'Send your code to remote branch. Not to master'
|
76
|
-
command :pr do
|
72
|
+
command :pr, arg: '<dest_branch>' do
|
77
73
|
|
78
74
|
action do
|
79
|
-
Commands::PullRequest.run
|
75
|
+
Commands::PullRequest.run dest_branch
|
80
76
|
end
|
81
77
|
end
|
78
|
+
|
79
|
+
opt :v, :version, 'Display the current version' do
|
80
|
+
puts T1k::VERSION
|
81
|
+
end
|
82
82
|
end
|
83
83
|
end
|
@@ -2,20 +2,21 @@ module T1k
|
|
2
2
|
module Commands
|
3
3
|
class PullRequest
|
4
4
|
|
5
|
-
def self.run
|
5
|
+
def self.run(dest_branch)
|
6
|
+
dest_branch ||= 'master'
|
6
7
|
T1k::Commands::Sink.run
|
7
8
|
|
8
9
|
branch = T1k::Commands::Branch.actual_branch
|
9
10
|
pull = `git push origin #{branch.strip}`
|
10
|
-
self.open_browser pull
|
11
|
+
self.open_browser pull, dest_branch
|
11
12
|
end
|
12
13
|
|
13
|
-
def self.open_browser pull
|
14
|
+
def self.open_browser pull, dest_branch
|
14
15
|
return 1 if pull.nil?
|
15
16
|
match = pull.match( /(https:\/\/[a-zA-Z].*=1)/)
|
16
17
|
if match
|
17
18
|
uri = match[0]
|
18
|
-
system "open #{uri}"
|
19
|
+
system "open #{uri}?dest=#{dest_branch}"
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
data/lib/t1k/version.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: 4.0.
|
4
|
+
version: 4.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: 2018-
|
13
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.7.3
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: T1K - Automated Git and Trello Workflow
|