jive 0.3.3 → 0.4.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
  SHA256:
3
- metadata.gz: 3205ae4955fafc394318f7daccceacf3d7728b15450649e66c198ce514ecef22
4
- data.tar.gz: 128bdd0f9d8cf584503a714e0a92b4064d3cbb94f227ed9e4f50622a212e14b4
3
+ metadata.gz: 154a09fc65037768dd5356b9b09c02f2f25f8548be75663893e6867922d0f0d1
4
+ data.tar.gz: 9fa27240f2f7e0f009f271e95606ac3c162b8836fa5cf4b79b31ef79271bcf2d
5
5
  SHA512:
6
- metadata.gz: e4e02857d8f45d0a4d678418f4e9a56b009e96256ea23dcf763f67bf2e1af568509af8162303979b7ad3f998cbba0e11ff9d9ba224df1df379d90bd4ff4ed125
7
- data.tar.gz: ecb75b2857218cd72ab6a6693e15320bed3aa77f219437f4e616afe6fa66d9d23153e037920060e7cf9b91b4402cb7e8fc4d12a98709cb895bb53a84a05a16d0
6
+ metadata.gz: 3dffd40c02972768c156c6755b9f01af441ae64dc715f27fd515ed10f0a4d849c5c69919129dffaf82a68f052a0950693e4613c1d035c7d8ec318a35651b72fa
7
+ data.tar.gz: 5931d35f12bb6bd418ad4ac732992e3674c6dfb2dd7eec34e0691440fa4c279d3636dcd3a59564c794e5c35bf120a5839bb6436cd75dfa81a63d36bef927f094
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://github.com/xlgmokha/jive/workflows/ci/badge.svg)](https://github.com/xlgmokha/jive/actions)
4
4
 
5
- Hi!
5
+ 🐕 Woof!
6
6
 
7
7
  ## Installation
8
8
 
data/jive.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  "README.md",
21
21
  "jive.gemspec",
22
22
  "jive.sh"
23
- ]
23
+ ] + Dir["lib/**/templates/*.md"]
24
24
  spec.bindir = "exe"
25
25
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
data/lib/jive.rb CHANGED
@@ -8,6 +8,7 @@ require "jive/docker"
8
8
  require "jive/git"
9
9
  require "jive/popen"
10
10
  require "jive/project"
11
+ require "jive/pull_request"
11
12
  require "jive/runner"
12
13
  require "jive/shell"
13
14
  require "jive/version"
data/lib/jive/cli.rb CHANGED
@@ -74,6 +74,12 @@ module Jive
74
74
  .bootstrap(Jive.shell)
75
75
  end
76
76
 
77
+ desc "pr URL", "pull request"
78
+ def pr(url)
79
+ pr = PullRequest.new(url)
80
+ pr.edit(ENV["EDITOR"])
81
+ end
82
+
77
83
  desc "setup", "provide instructions to integrate into shell"
78
84
  def setup
79
85
  print "source #{::Jive.root.join("jive.sh")}"
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jive
4
+ class PullRequest
5
+ attr_reader :dir, :uri
6
+
7
+ def initialize(url)
8
+ @uri = URI.parse(url)
9
+ @dir = Pathname(Dir.home).join(".jive").join(uri.host).join(uri.path[1..-1])
10
+ Jive.shell.execute([:mkdir, "-p", @dir]) unless @dir.exist?
11
+ end
12
+
13
+ def edit(editor)
14
+ Jive.shell.execute([editor, readme.to_s])
15
+ end
16
+
17
+ private
18
+
19
+ def template
20
+ Jive.root.join("lib/jive/templates/pull_request_template.md")
21
+ end
22
+
23
+ def readme
24
+ @readme ||=
25
+ begin
26
+ dir.join("README.md").tap do |readme|
27
+ readme.write(template.read) unless readme.exist?
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,51 @@
1
+ # Pull Request Template
2
+
3
+ ## Why is this needed?
4
+
5
+ ## What does this do?
6
+
7
+ <!--
8
+ Include a summary of the change and which issue is fixed.
9
+ Include relevant motivation and context.
10
+ List any dependencies that are required for this change.
11
+ -->
12
+
13
+ Fixes # (issue)
14
+
15
+ ### Screenshots
16
+
17
+ Before:
18
+
19
+ ![before]()
20
+
21
+ After:
22
+
23
+ ![after]()
24
+
25
+ ## Type of change
26
+
27
+ Delete options that are not relevant.
28
+
29
+ - [ ] Bug fix (non-breaking change which fixes an issue)
30
+ - [ ] New feature (non-breaking change which adds functionality)
31
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
32
+ - [ ] This change requires a documentation update
33
+
34
+ ## Verification Plan
35
+
36
+ How are we going to verify this change?
37
+
38
+ - [ ] Step 1
39
+ - [ ] Step 2
40
+
41
+ ## Checklist
42
+
43
+ - [ ] Clear description explaining the relevancy of the contribution.
44
+ - [ ] Unit, integration, and system tests.
45
+ - [ ] Regression and bugs are covered with tests.
46
+ - [ ] [Performance guidelines][performance]
47
+ - [ ] [Secure coding guidelines][secure]
48
+ - [ ] Documentation Updated
49
+
50
+ [performance]: https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html
51
+ [secure]: https://docs.gitlab.com/ee/development/secure_coding_guidelines.html
data/lib/jive/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jive
4
- VERSION = "0.3.3"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-17 00:00:00.000000000 Z
11
+ date: 2021-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -114,8 +114,10 @@ files:
114
114
  - lib/jive/git.rb
115
115
  - lib/jive/popen.rb
116
116
  - lib/jive/project.rb
117
+ - lib/jive/pull_request.rb
117
118
  - lib/jive/runner.rb
118
119
  - lib/jive/shell.rb
120
+ - lib/jive/templates/pull_request_template.md
119
121
  - lib/jive/version.rb
120
122
  homepage: https://rubygems.org/gems/jive
121
123
  licenses: