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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 969cb244a650ca14812ef6f7454a2cbdea677f2b
4
- data.tar.gz: 20a7b23cb3ae0b02bc1440c3cafc0a43525ea8f9
2
+ SHA256:
3
+ metadata.gz: 5d969e634122aa2f3460d217853f0b816e09d7564b874300d32a4e15a707ba00
4
+ data.tar.gz: d85b5bbda33a66180830521cbcb99543271365abeefe8df90c71b4e4d528ae9e
5
5
  SHA512:
6
- metadata.gz: e842aebb979330fde81462e234af617fdc85e09540c8ba26e05f2580ee6ac26671b5fc662db98c723cef0e349ff7dda5ebac69a240fbdf1d4991de5ed78002fe
7
- data.tar.gz: a4e61d67dbd07f0d36ef7a14b7d291248a13946db606ab05d1a938c2b90177e269d11eb170a7f068319bdbbe6ab12ef4e6d93d8a57dab6cef8065daba174525b
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
@@ -1,3 +1,3 @@
1
1
  module T1k
2
- VERSION = "4.0.3"
2
+ VERSION = "4.0.4"
3
3
  end
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.3
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-10-15 00:00:00.000000000 Z
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.6.14
213
+ rubygems_version: 2.7.3
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: T1K - Automated Git and Trello Workflow