cp8_cli 8.2.1 → 9.0.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
- SHA1:
3
- metadata.gz: 1ff138421479066ef738c308282e9b57baab5e3e
4
- data.tar.gz: cbc59c229cd35cb4bdf9f1c416b05b0fa768b820
2
+ SHA256:
3
+ metadata.gz: 7ff81d68dd2f9edd4ffda07c3fb5e52b6fb430f366498f1572992f9a1f3185f1
4
+ data.tar.gz: 6daa5b195cce24f81c879846463c0376e7a9e2018acc066fa7ff4673809af2be
5
5
  SHA512:
6
- metadata.gz: 570b56fd867b5c0c9230819b63c181674d014ba190e9170bc0147bc7c20102d9780b0b21f70c7f532dcf7013ea673ac72c46ae4b5da35755bcadd2dc3392f38f
7
- data.tar.gz: 367fb70df2e7813794dbcd82de10d6eeeb7d39f252c00a4dd3c564aed362a141c1139ba1bea8d6bfcb2f1ea88124543dea24ed580903710e5c31fa0e79d4f3ce
6
+ metadata.gz: 8455a86f52a2eed299a712cb0646f21aca3313b53b793a92f93d6ba6d7c1c23944f639ca1f62c94b489c523e6e2a1d30ebcbfcb98215efb0cf88cbd92a7bfb57
7
+ data.tar.gz: 3e567f44d51e3d82322365a49d7b69f0ef42953ed843863030983c936b1204142d627cf22cd098d94bcac088f433e83bd20804cafdadb01a06c120f5ab458cfa
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency "bundler", "~> 2.0"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
25
25
  spec.add_development_dependency "minitest-line"
@@ -34,6 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "launchy"
35
35
  spec.add_dependency "octokit"
36
36
  spec.add_dependency "thor"
37
- spec.add_dependency "trollop"
38
37
  spec.add_dependency "tty-prompt"
39
38
  end
@@ -5,6 +5,7 @@ module Cp8Cli
5
5
  include Github::Api::Client
6
6
 
7
7
  def initials
8
+ Command.error("Please configure your git user.name using git config user.name Jane Doe") unless git_user_name
8
9
  git_user_name.parameterize(separator: " ").split.map(&:first).join
9
10
  end
10
11
 
@@ -35,7 +35,9 @@ module Cp8Cli
35
35
  to,
36
36
  from,
37
37
  title,
38
- body
38
+ body,
39
+ draft: true,
40
+ accept: "application/vnd.github.shadow-cat-preview" # waiting for https://github.com/octokit/octokit.rb/pull/1114
39
41
  )
40
42
  end
41
43
 
@@ -21,7 +21,7 @@ module Cp8Cli
21
21
  end
22
22
 
23
23
  def configure_github_token
24
- store.save :github_token, Command.ask("Input GitHub token")
24
+ store.save :github_token, Command.ask("Input GitHub token (https://github.com/settings/tokens)")
25
25
  end
26
26
  end
27
27
  end
@@ -2,7 +2,7 @@ module Cp8Cli
2
2
  class PullRequestTitle
3
3
  def initialize(title, prefixes: [])
4
4
  @title = title
5
- @prefixes = Array(*prefixes)
5
+ @prefixes = Array(prefixes)
6
6
  end
7
7
 
8
8
  def run
@@ -6,9 +6,9 @@ module Cp8Cli
6
6
  checkout_branch
7
7
  create_empty_commit
8
8
  push_branch
9
- create_wip_pull_request
9
+ create_draft_pull_request
10
10
  assign
11
- Command.title "Created WIP PR, run `cp8 open` to view."
11
+ Command.title "Created draft PR, run `cp8 open` to view."
12
12
  end
13
13
 
14
14
  private
@@ -33,10 +33,10 @@ module Cp8Cli
33
33
  branch.push
34
34
  end
35
35
 
36
- def create_wip_pull_request
36
+ def create_draft_pull_request
37
37
  Github::PullRequest.create(
38
38
  from: branch.name,
39
- title: PullRequestTitle.new(title, prefixes: :wip).run,
39
+ title: PullRequestTitle.new(title).run,
40
40
  body: PullRequestBody.new(self).run
41
41
  )
42
42
  end
@@ -1,5 +1,5 @@
1
1
  module Cp8Cli
2
- VERSION = "8.2.1"
2
+ VERSION = "9.0.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.2.1
4
+ version: 9.0.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-06-04 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.11'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.11'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -206,20 +206,6 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: trollop
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :runtime
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
209
  - !ruby/object:Gem::Dependency
224
210
  name: tty-prompt
225
211
  requirement: !ruby/object:Gem::Requirement
@@ -239,10 +225,6 @@ email:
239
225
  - jens@balvig.com
240
226
  executables:
241
227
  - cp8
242
- - git-cleanup
243
- - git-finish
244
- - git-open
245
- - git-start
246
228
  extensions: []
247
229
  extra_rdoc_files: []
248
230
  files:
@@ -255,10 +237,6 @@ files:
255
237
  - Rakefile
256
238
  - cp8_cli.gemspec
257
239
  - exe/cp8
258
- - exe/git-cleanup
259
- - exe/git-finish
260
- - exe/git-open
261
- - exe/git-start
262
240
  - lib/cp8_cli.rb
263
241
  - lib/cp8_cli/adhoc_story.rb
264
242
  - lib/cp8_cli/branch.rb
@@ -303,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
281
  version: '0'
304
282
  requirements: []
305
283
  rubyforge_project:
306
- rubygems_version: 2.6.14.1
284
+ rubygems_version: 2.7.6.2
307
285
  signing_key:
308
286
  specification_version: 4
309
287
  summary: Cookpad Global CLI.
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
-
5
- require "cp8_cli"
6
-
7
- Cp8Cli::Command.error "cleanup command has been removed, consider using https://github.com/Seinh/git-prune instead?"
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
-
5
- require "cp8_cli"
6
- require "trollop"
7
-
8
-
9
- options = Trollop::options do
10
- banner <<-EOS
11
- Pushes branch to GitHub and opens a PR
12
-
13
- Usage:
14
- git finish
15
- EOS
16
- opt :wip, "Open [WIP] PR"
17
- end
18
-
19
- puts "git finish is DEPRECATED, please use cp8 submit".red
20
- Cp8Cli::Main.new.submit(options)
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
-
5
- require "cp8_cli"
6
-
7
- puts "git open is DEPRECATED, please use cp8 open".red
8
- Cp8Cli::Main.new.open
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
-
5
- require "cp8_cli"
6
-
7
- puts "git start is DEPRECATED, please use cp8 start".red
8
- Cp8Cli::Main.new.start(ARGV.first)