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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50169dd82bc2b8f921aadab88d2c38a63e6ded59
4
- data.tar.gz: d8ec5f4dce80beb0406e69cc090e2321db3c9971
3
+ metadata.gz: 5001f339309f7d7c9c4d1ecef73ab79a6c0ec95c
4
+ data.tar.gz: 7018a8a4194eca97c5840ef1408f0cf5821f8abc
5
5
  SHA512:
6
- metadata.gz: 80c04ff4a4ba5c17e73bca5e8e978e6b2bfb5d2787d9f0596cfcd475ce3d4b5494537d4e5614180c4f1852d68220903785b1f569a3d12424d67ca61dd9df34bc
7
- data.tar.gz: 7a14bf8881cea917cb80ab00e4135f1ef102cff82b59869b3a65e344673b240c90f09b8759b9d7f2dd132af1deb68b42feea519b5aae47605750b15ece338cf8
6
+ metadata.gz: 0c81c17664bfdd39c77cb5cee5b3480adfc678ef992dee7c4475e5540e7ddc661c92692fa01a30c07c58cc3191062d773f123eef2f7fbc022ec205a4b5db0c90
7
+ data.tar.gz: d3bc00d25109f08fdb3c2a10a2d98e90e3533fc0bf695704f7e024db9bb06b344ed60a337a3cb36ca14d7bb532e7743386d78ef6f93b753756cfc8faf6f2f9a1
@@ -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("git reset --hard origin/#{name}")
46
+ Command.run "git reset --hard origin/#{name}", title: "Resetting branch"
47
47
  end
48
48
  end
49
49
 
@@ -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(command)
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.say "Created WIP PR, run `cp8 open` to view."
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
@@ -1,5 +1,5 @@
1
1
  module Cp8Cli
2
- VERSION = "8.1.0"
2
+ VERSION = "8.2.0"
3
3
 
4
4
  class Version
5
5
  def self.latest?
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.1.0
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-10 00:00:00.000000000 Z
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.13
306
+ rubygems_version: 2.6.14.1
307
307
  signing_key:
308
308
  specification_version: 4
309
309
  summary: Cookpad Global CLI.