autowow 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autowow/commands/vcs.rb +19 -19
- data/lib/autowow/features/vcs.rb +7 -7
- data/lib/autowow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 289ce64a634f3297f81da70a511249754e54f685
|
4
|
+
data.tar.gz: 38c90399124d04ec9edbb2df02dafcd2256f3fb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f58cc3df543c4526912bd6d6b85beef61b83c373b479798ca5066199121d097a6c4f6552b85e0710784b53f11627f0df324c487ae83f21446c7d6f2c9c559d39
|
7
|
+
data.tar.gz: 588ce7f67c9e6b3c3d2448bb2c2a847d78c8df845b828d4989afcbf489ea14b460175bcb95e0ad487f9a55f06616d6997ed3574b19f30a03e4652ad76f292e7d
|
data/lib/autowow/commands/vcs.rb
CHANGED
@@ -5,80 +5,80 @@ module Autowow
|
|
5
5
|
['git']
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
8
|
+
def terminal_options
|
9
9
|
['--no-pager']
|
10
10
|
end
|
11
11
|
|
12
12
|
def changes_not_on_remote(branch)
|
13
|
-
cmd +
|
13
|
+
cmd + terminal_options + ['log', branch, '--not', '--remotes']
|
14
14
|
end
|
15
15
|
|
16
16
|
def branch_list
|
17
|
-
cmd +
|
17
|
+
cmd + ['for-each-ref', "--format=%(refname)", 'refs/heads/']
|
18
18
|
end
|
19
19
|
|
20
20
|
def push(branch = nil, remote = nil)
|
21
|
-
cmd +
|
21
|
+
cmd + ['push'] + [branch, remote].compact
|
22
22
|
end
|
23
23
|
|
24
24
|
def rebase(branch)
|
25
|
-
cmd +
|
25
|
+
cmd + ['rebase', branch]
|
26
26
|
end
|
27
27
|
|
28
28
|
def git_status
|
29
|
-
cmd +
|
29
|
+
cmd + ['status']
|
30
30
|
end
|
31
31
|
|
32
32
|
def stash
|
33
|
-
cmd +
|
33
|
+
cmd + ['stash']
|
34
34
|
end
|
35
35
|
|
36
36
|
def stash_pop
|
37
|
-
cmd +
|
37
|
+
cmd + ['stash', 'pop']
|
38
38
|
end
|
39
39
|
|
40
40
|
def current_branch
|
41
|
-
cmd +
|
41
|
+
cmd + ['symbolic-ref', '--short', 'HEAD']
|
42
42
|
end
|
43
43
|
|
44
44
|
def checkout(existing_branch)
|
45
|
-
cmd +
|
45
|
+
cmd + ['checkout', existing_branch]
|
46
46
|
end
|
47
47
|
|
48
48
|
def pull
|
49
|
-
cmd +
|
49
|
+
cmd + ['pull']
|
50
50
|
end
|
51
51
|
|
52
52
|
def branch_force_delete(branch)
|
53
|
-
cmd +
|
53
|
+
cmd + ['branch', '-D', branch]
|
54
54
|
end
|
55
55
|
|
56
56
|
def create(branch)
|
57
|
-
cmd +
|
57
|
+
cmd + ['checkout', '-b', branch]
|
58
58
|
end
|
59
59
|
|
60
60
|
def set_upstream(remote, branch)
|
61
|
-
cmd +
|
61
|
+
cmd + ['push', '--set-upstream', remote, branch]
|
62
62
|
end
|
63
63
|
|
64
64
|
def remotes
|
65
|
-
cmd +
|
65
|
+
cmd + ['remote', '-v']
|
66
66
|
end
|
67
67
|
|
68
68
|
def fetch(remote)
|
69
|
-
cmd +
|
69
|
+
cmd + ['fetch', remote]
|
70
70
|
end
|
71
71
|
|
72
72
|
def merge(compare)
|
73
|
-
cmd +
|
73
|
+
cmd + ['merge', compare]
|
74
74
|
end
|
75
75
|
|
76
76
|
def branch
|
77
|
-
cmd +
|
77
|
+
cmd + ['branch']
|
78
78
|
end
|
79
79
|
|
80
80
|
def add_remote(name, url)
|
81
|
-
cmd +
|
81
|
+
cmd + ['remote', 'add', name, url]
|
82
82
|
end
|
83
83
|
|
84
84
|
include ReflectionUtils::CreateModuleFunctions
|
data/lib/autowow/features/vcs.rb
CHANGED
@@ -136,7 +136,7 @@ module Autowow
|
|
136
136
|
end
|
137
137
|
|
138
138
|
on_branch('master') do
|
139
|
-
has_upstream? ? pull_upstream :
|
139
|
+
has_upstream? ? pull_upstream : pretty_with_output.run(pull)
|
140
140
|
end
|
141
141
|
end
|
142
142
|
|
@@ -144,9 +144,9 @@ module Autowow
|
|
144
144
|
upstream_remote = 'upstream'
|
145
145
|
remote = 'origin'
|
146
146
|
branch = 'master'
|
147
|
-
|
148
|
-
|
149
|
-
|
147
|
+
pretty_with_output.run(fetch(upstream_remote)).out
|
148
|
+
pretty_with_output.run(merge("#{upstream_remote}/#{branch}")).out
|
149
|
+
pretty_with_output.run(push(remote, branch))
|
150
150
|
end
|
151
151
|
|
152
152
|
def has_upstream?
|
@@ -176,10 +176,10 @@ module Autowow
|
|
176
176
|
logger.error("Nothing to do.") and return if branch.eql?('master')
|
177
177
|
|
178
178
|
keep_changes do
|
179
|
-
|
180
|
-
|
179
|
+
pretty_with_output.run(checkout('master'))
|
180
|
+
pretty_with_output.run(pull)
|
181
181
|
end
|
182
|
-
|
182
|
+
pretty_with_output.run(branch_force_delete(branch))
|
183
183
|
|
184
184
|
pretty_with_output.run(git_status)
|
185
185
|
end
|
data/lib/autowow/version.rb
CHANGED