git_cli_prompt 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.release_history.yml +2 -0
- data/lib/git_cli_prompt/version.rb +1 -1
- data/lib/push.rb +31 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d2aa443819b0dc7d3577c77ef08fdf53974dd0678e50e73c6cde089bd03a072
|
4
|
+
data.tar.gz: '059102d73442db5e1ec584faeb983eed5929d829db84db54ae5471add417c2c7'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 729639587d2024425e15e08a9e625685b6d816316c43c2f9035892ecaedbf57622dd0a156cfc1aeca2db868c25a8d4702241b65b0d7824839888e4e068b931f4
|
7
|
+
data.tar.gz: 9df5649bdab0dc3334739f97b9f86bbe89b6e80b74159a75236052f3e2a9024bf5b5a421779c26cbf579c4407ec73166958e715bcd85d4686e99cc419320080c
|
data/.release_history.yml
CHANGED
data/lib/push.rb
CHANGED
@@ -27,23 +27,43 @@ module GitCliPrompt
|
|
27
27
|
conf = ws.remote_config
|
28
28
|
end
|
29
29
|
|
30
|
+
if conf.keys.length > 1
|
31
|
+
selRemote = pmt.select(" There are more than one remote repository found. Please select which is intended to be push to : ") do |m|
|
32
|
+
conf.each do |k,v|
|
33
|
+
m.choice "#{k} [#{v["push"]}]", [k, v["push"]]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
else
|
38
|
+
selRemote = [conf.keys.first,conf[conf.keys.first]["push"]]
|
39
|
+
end
|
40
|
+
|
30
41
|
branch = block.call(:push_to_branch) if block
|
31
42
|
branch = ws.current_branch if is_empty?(branch)
|
32
43
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
ws.push_changes_with_tags(name, branch)
|
39
|
-
block.call(:push_info, { name: name }) if block
|
40
|
-
else
|
41
|
-
raise UserAborted
|
42
|
-
end
|
44
|
+
name = selRemote[0]
|
45
|
+
url = selRemote[1]
|
46
|
+
if confirm_push(name, url)
|
47
|
+
ws.push_changes_with_tags(name, branch)
|
48
|
+
block.call(:push_info, { name: name, url: url }) if block
|
43
49
|
else
|
44
|
-
|
50
|
+
pmt.say " Push is skipped ", color: :yellow
|
45
51
|
end
|
46
52
|
|
53
|
+
#if conf.keys.length == 1
|
54
|
+
# # direct push
|
55
|
+
# name = conf.keys.first
|
56
|
+
# url = conf.values.first["push"]
|
57
|
+
# if confirm_push(name, url)
|
58
|
+
# ws.push_changes_with_tags(name, branch)
|
59
|
+
# block.call(:push_info, { name: name }) if block
|
60
|
+
# else
|
61
|
+
# raise UserAborted
|
62
|
+
# end
|
63
|
+
#else
|
64
|
+
# raise UserChangedMind
|
65
|
+
#end
|
66
|
+
|
47
67
|
rescue TTY::Reader::InputInterrupt
|
48
68
|
end
|
49
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_cli_prompt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Liaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: teLogger
|