git_cli_prompt 0.3.2 → 0.3.4
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 +4 -0
- data/Gemfile.lock +4 -4
- data/lib/git_cli_prompt/version.rb +1 -1
- data/lib/push.rb +36 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49db80a00db94f67d5c7fee451a74e9a01745dbd2f3d9610ac3f6e09e3354f08
|
4
|
+
data.tar.gz: c666a61fe99c0f38d81d7dbf78feb238f6380c1f2bdab12ed81b3402e3e3e746
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4db153c6d2fd08e2c14411297a2dadcfb657215805db6c35d340232883bbeb07c19f6bb314ffd910f21c7207d9f204bb5f311867964ae4225af628f93641777
|
7
|
+
data.tar.gz: 394fb11ad17f0b8d033ccc9f3d06b82de570e057275525753d8b0e12caee17a6288448a62cb21fc51dd4320551437ec6218859e3c5b1c6fcdb3dc51dd703b276
|
data/.release_history.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_cli_prompt (0.3.
|
4
|
+
git_cli_prompt (0.3.4)
|
5
5
|
teLogger
|
6
6
|
toolrack
|
7
7
|
tty-prompt
|
@@ -10,9 +10,9 @@ GEM
|
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
12
|
base58 (0.2.3)
|
13
|
-
devops_assist (0.3.
|
13
|
+
devops_assist (0.3.11)
|
14
14
|
git_cli
|
15
|
-
git_cli_prompt
|
15
|
+
git_cli_prompt (~> 0.3.3)
|
16
16
|
gvcs
|
17
17
|
teLogger
|
18
18
|
toolrack
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
rspec-expectations (3.12.2)
|
38
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
39
|
rspec-support (~> 3.12.0)
|
40
|
-
rspec-mocks (3.12.
|
40
|
+
rspec-mocks (3.12.5)
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
42
|
rspec-support (~> 3.12.0)
|
43
43
|
rspec-support (3.12.0)
|
data/lib/push.rb
CHANGED
@@ -27,23 +27,50 @@ 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
|
-
if
|
38
|
-
|
39
|
-
|
44
|
+
name = selRemote[0]
|
45
|
+
url = selRemote[1]
|
46
|
+
if confirm_push(name, url)
|
47
|
+
st, out = ws.push_changes_with_tags(name, branch)
|
48
|
+
if st
|
49
|
+
pmt.puts " "
|
50
|
+
pmt.say out
|
51
|
+
pmt.puts " "
|
52
|
+
block.call(:push_info, { name: name, url: url }) if block
|
40
53
|
else
|
41
|
-
|
54
|
+
pmt.say "\n Error while pushing changes with tag. Error was : #{out}", color: :red
|
42
55
|
end
|
43
56
|
else
|
44
|
-
|
57
|
+
pmt.say " Push is skipped ", color: :yellow
|
45
58
|
end
|
46
59
|
|
60
|
+
#if conf.keys.length == 1
|
61
|
+
# # direct push
|
62
|
+
# name = conf.keys.first
|
63
|
+
# url = conf.values.first["push"]
|
64
|
+
# if confirm_push(name, url)
|
65
|
+
# ws.push_changes_with_tags(name, branch)
|
66
|
+
# block.call(:push_info, { name: name }) if block
|
67
|
+
# else
|
68
|
+
# raise UserAborted
|
69
|
+
# end
|
70
|
+
#else
|
71
|
+
# raise UserChangedMind
|
72
|
+
#end
|
73
|
+
|
47
74
|
rescue TTY::Reader::InputInterrupt
|
48
75
|
end
|
49
76
|
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.4
|
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
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
|
-
rubygems_version: 3.4.
|
110
|
+
rubygems_version: 3.4.10
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: ''
|