autowow 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 377f624b3071e863142cec2311ba2a1e258bdd06
4
- data.tar.gz: b81afbe55166c43c4b9194642a3248bf37157bec
3
+ metadata.gz: 289ce64a634f3297f81da70a511249754e54f685
4
+ data.tar.gz: 38c90399124d04ec9edbb2df02dafcd2256f3fb9
5
5
  SHA512:
6
- metadata.gz: 25fe454c8297af9485927b08efcaa319647558c5b7ec8da91bdfb1cf4278349876f833a21f93ae057e7a63636bb171ff86e62bdda49a67cb3800a3eee08b72b0
7
- data.tar.gz: baa2dda886be3e0a45c88c692d2226f7c5b7d158ca4ba6d33251c2206b44547e21a056bda8bbeaea6182b1d0a53f1ea3462a72138be1c4325e965bb486972cb8
6
+ metadata.gz: f58cc3df543c4526912bd6d6b85beef61b83c373b479798ca5066199121d097a6c4f6552b85e0710784b53f11627f0df324c487ae83f21446c7d6f2c9c559d39
7
+ data.tar.gz: 588ce7f67c9e6b3c3d2448bb2c2a847d78c8df845b828d4989afcbf489ea14b460175bcb95e0ad487f9a55f06616d6997ed3574b19f30a03e4652ad76f292e7d
@@ -5,80 +5,80 @@ module Autowow
5
5
  ['git']
6
6
  end
7
7
 
8
- def default_options
8
+ def terminal_options
9
9
  ['--no-pager']
10
10
  end
11
11
 
12
12
  def changes_not_on_remote(branch)
13
- cmd + default_options + ['log', branch, '--not', '--remotes']
13
+ cmd + terminal_options + ['log', branch, '--not', '--remotes']
14
14
  end
15
15
 
16
16
  def branch_list
17
- cmd + default_options + ['for-each-ref', "--format=%(refname)", 'refs/heads/']
17
+ cmd + ['for-each-ref', "--format=%(refname)", 'refs/heads/']
18
18
  end
19
19
 
20
20
  def push(branch = nil, remote = nil)
21
- cmd + default_options + ['push'] + [branch, remote].compact
21
+ cmd + ['push'] + [branch, remote].compact
22
22
  end
23
23
 
24
24
  def rebase(branch)
25
- cmd + default_options + ['rebase', branch]
25
+ cmd + ['rebase', branch]
26
26
  end
27
27
 
28
28
  def git_status
29
- cmd + default_options + ['status']
29
+ cmd + ['status']
30
30
  end
31
31
 
32
32
  def stash
33
- cmd + default_options + ['stash']
33
+ cmd + ['stash']
34
34
  end
35
35
 
36
36
  def stash_pop
37
- cmd + default_options + ['stash', 'pop']
37
+ cmd + ['stash', 'pop']
38
38
  end
39
39
 
40
40
  def current_branch
41
- cmd + default_options + ['symbolic-ref', '--short', 'HEAD']
41
+ cmd + ['symbolic-ref', '--short', 'HEAD']
42
42
  end
43
43
 
44
44
  def checkout(existing_branch)
45
- cmd + default_options + ['checkout', existing_branch]
45
+ cmd + ['checkout', existing_branch]
46
46
  end
47
47
 
48
48
  def pull
49
- cmd + default_options + ['pull']
49
+ cmd + ['pull']
50
50
  end
51
51
 
52
52
  def branch_force_delete(branch)
53
- cmd + default_options + ['branch', '-D', branch]
53
+ cmd + ['branch', '-D', branch]
54
54
  end
55
55
 
56
56
  def create(branch)
57
- cmd + default_options + ['checkout', '-b', branch]
57
+ cmd + ['checkout', '-b', branch]
58
58
  end
59
59
 
60
60
  def set_upstream(remote, branch)
61
- cmd + default_options + ['push', '--set-upstream', remote, branch]
61
+ cmd + ['push', '--set-upstream', remote, branch]
62
62
  end
63
63
 
64
64
  def remotes
65
- cmd + default_options + ['remote', '-v']
65
+ cmd + ['remote', '-v']
66
66
  end
67
67
 
68
68
  def fetch(remote)
69
- cmd + default_options + ['fetch', remote]
69
+ cmd + ['fetch', remote]
70
70
  end
71
71
 
72
72
  def merge(compare)
73
- cmd + default_options + ['merge', compare]
73
+ cmd + ['merge', compare]
74
74
  end
75
75
 
76
76
  def branch
77
- cmd + default_options + ['branch']
77
+ cmd + ['branch']
78
78
  end
79
79
 
80
80
  def add_remote(name, url)
81
- cmd + default_options + ['remote', 'add', name, url]
81
+ cmd + ['remote', 'add', name, url]
82
82
  end
83
83
 
84
84
  include ReflectionUtils::CreateModuleFunctions
@@ -136,7 +136,7 @@ module Autowow
136
136
  end
137
137
 
138
138
  on_branch('master') do
139
- has_upstream? ? pull_upstream : pretty.run(pull)
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
- pretty.run(fetch(upstream_remote)).out
148
- pretty.run(merge("#{upstream_remote}/#{branch}")).out
149
- pretty.run(push(remote, branch))
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
- pretty.run(checkout('master'))
180
- pretty.run(pull)
179
+ pretty_with_output.run(checkout('master'))
180
+ pretty_with_output.run(pull)
181
181
  end
182
- pretty.run(branch_force_delete(branch))
182
+ pretty_with_output.run(branch_force_delete(branch))
183
183
 
184
184
  pretty_with_output.run(git_status)
185
185
  end
@@ -1,3 +1,3 @@
1
1
  module Autowow
2
- VERSION = "0.6.3"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autowow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thisismydesign