cp8_cli 8.1.0 → 8.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cp8_cli/branch.rb +3 -3
- data/lib/cp8_cli/command.rb +7 -6
- data/lib/cp8_cli/story.rb +2 -2
- data/lib/cp8_cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5001f339309f7d7c9c4d1ecef73ab79a6c0ec95c
|
4
|
+
data.tar.gz: 7018a8a4194eca97c5840ef1408f0cf5821f8abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c81c17664bfdd39c77cb5cee5b3480adfc678ef992dee7c4475e5540e7ddc661c92692fa01a30c07c58cc3191062d773f123eef2f7fbc022ec205a4b5db0c90
|
7
|
+
data.tar.gz: d3bc00d25109f08fdb3c2a10a2d98e90e3533fc0bf695704f7e024db9bb06b344ed60a337a3cb36ca14d7bb532e7743386d78ef6f93b753756cfc8faf6f2f9a1
|
data/lib/cp8_cli/branch.rb
CHANGED
@@ -24,11 +24,11 @@ module Cp8Cli
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def checkout
|
27
|
-
Command.run "git checkout #{name} >/dev/null 2>&1 || git checkout -b #{name}"
|
27
|
+
Command.run "git checkout #{name} >/dev/null 2>&1 || git checkout -b #{name}", title: "Checking out new branch"
|
28
28
|
end
|
29
29
|
|
30
30
|
def push
|
31
|
-
Command.run "git push origin #{name} -u"
|
31
|
+
Command.run "git push origin #{name} -u", title: "Pushing to origin"
|
32
32
|
end
|
33
33
|
|
34
34
|
def open_pr
|
@@ -43,7 +43,7 @@ module Cp8Cli
|
|
43
43
|
if dirty?
|
44
44
|
Command.error "Dirty working directory, not resetting."
|
45
45
|
else
|
46
|
-
Command.run
|
46
|
+
Command.run "git reset --hard origin/#{name}", title: "Resetting branch"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
data/lib/cp8_cli/command.rb
CHANGED
@@ -17,6 +17,10 @@ module Cp8Cli
|
|
17
17
|
`open \"#{url}\"`
|
18
18
|
end
|
19
19
|
|
20
|
+
def title(message)
|
21
|
+
highline.say(message.bold)
|
22
|
+
end
|
23
|
+
|
20
24
|
def say(*args)
|
21
25
|
highline.say(*args)
|
22
26
|
end
|
@@ -29,17 +33,14 @@ module Cp8Cli
|
|
29
33
|
tty.ask(message, required: required, default: default)
|
30
34
|
end
|
31
35
|
|
32
|
-
def title(message)
|
33
|
-
highline.say(message.bold)
|
34
|
-
end
|
35
|
-
|
36
36
|
def error(message)
|
37
37
|
say(message.red.bold)
|
38
38
|
exit(false)
|
39
39
|
end
|
40
40
|
|
41
|
-
def run(command)
|
42
|
-
title(
|
41
|
+
def run(command, title: nil)
|
42
|
+
title(title) if title
|
43
|
+
say(command)
|
43
44
|
system(command) || error("Error running: #{command}")
|
44
45
|
end
|
45
46
|
|
data/lib/cp8_cli/story.rb
CHANGED
@@ -6,7 +6,7 @@ module Cp8Cli
|
|
6
6
|
push_branch
|
7
7
|
create_wip_pull_request
|
8
8
|
assign
|
9
|
-
Command.
|
9
|
+
Command.title "Created WIP PR, run `cp8 open` to view."
|
10
10
|
end
|
11
11
|
|
12
12
|
private
|
@@ -16,7 +16,7 @@ module Cp8Cli
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def create_empty_commit
|
19
|
-
Command.run "git commit --allow-empty -m\"#{commit_message}\""
|
19
|
+
Command.run "git commit --allow-empty -m\"#{commit_message}\"", title: "Creating initial commit"
|
20
20
|
end
|
21
21
|
|
22
22
|
def commit_message
|
data/lib/cp8_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cp8_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
303
|
version: '0'
|
304
304
|
requirements: []
|
305
305
|
rubyforge_project:
|
306
|
-
rubygems_version: 2.6.
|
306
|
+
rubygems_version: 2.6.14.1
|
307
307
|
signing_key:
|
308
308
|
specification_version: 4
|
309
309
|
summary: Cookpad Global CLI.
|