vpr 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +37 -35
- data/lib/vpr/cli.rb +9 -3
- data/lib/vpr/services/bitbucket.rb +3 -2
- data/lib/vpr/services/github.rb +4 -4
- data/lib/vpr/services/gitlab.rb +3 -2
- data/lib/vpr/url.rb +2 -2
- data/lib/vpr/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd0f665a696d8fd07209b9dc557d3ab8cfd6f2145c0103d6d2f45f894779fe8
|
4
|
+
data.tar.gz: 375bad74eae55b8583c4725d2d982a60635cab44c075de6cf8f97283a3634182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c4bb0c86e8e38de43bf14ebe889799062adfb06daece70d4c99e25c95070b73fa5cd684d4edd8caa2c8468d2e80c4aa38ff55cfcd3ecb5162a504a691346117
|
7
|
+
data.tar.gz: c62af43a110069c5a39301ef50879b8400c5b8e31dec1c67573bda093e91102601ca5e94b0b2dc798019a3415c30b5ac7d54a2bfaba95faa1ff32b8dcd6c5915
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,55 +1,57 @@
|
|
1
|
+
# vpr
|
2
|
+
|
1
3
|
![StandardRB](https://github.com/JuanCrg90/vpr/workflows/StandardRB/badge.svg)
|
2
4
|
![CI](https://github.com/JuanCrg90/vpr/workflows/CI/badge.svg)
|
3
5
|
|
4
|
-
# vpr
|
5
6
|
|
6
|
-
|
7
|
+
VPR is a CLI that helps you to quickly manage your project in GitHub/GitLab/Bitbucket.
|
8
|
+
You can visit with ease different project sections, like the issues page, a specific commit,
|
9
|
+
create pull requests (merge requests for GitLab),
|
10
|
+
and more, also is configurable for other platforms PRs are open.
|
11
|
+
|
12
|
+
![vpr pull](https://res.cloudinary.com/juancrg90/image/upload/v1562970242/vpr/vpr_pull.gif)
|
7
13
|
|
8
14
|
## Installation
|
9
|
-
|
15
|
+
|
16
|
+
```bash
|
10
17
|
$ gem install vpr
|
11
18
|
```
|
19
|
+
|
12
20
|
## Usage
|
13
21
|
|
14
|
-
|
15
|
-
|
16
|
-
```
|
17
|
-
![vpr home](https://res.cloudinary.com/juancrg90/image/upload/v1562969660/vpr/vpr_home.gif)
|
22
|
+
All the commands use the URL set as `origin` in your git remote to perform the web request,
|
23
|
+
you can use the flag `--remote=REMOTE` to specify which service you want to visit if you have your project stored in more than one platform.
|
18
24
|
|
19
|
-
|
20
|
-
|
21
|
-
```
|
22
|
-
![vpr pulls](https://res.cloudinary.com/juancrg90/image/upload/v1562969866/vpr/vpr_pulls.gif)
|
25
|
+
### `vpr branch`
|
26
|
+
Open in your browser your current branch.
|
23
27
|
|
24
|
-
|
25
|
-
|
26
|
-
```
|
27
|
-
![vpr issues](https://res.cloudinary.com/juancrg90/image/upload/v1562969959/vpr/vpr_issues.gif)
|
28
|
+
### `vpr branches`
|
29
|
+
Open the page that shows the uploaded branch list.
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
```
|
32
|
-
![vpr branches](https://res.cloudinary.com/juancrg90/image/upload/v1562970055/vpr/vpr_branches.gif)
|
31
|
+
### `vpr help`
|
32
|
+
Show the likst of available `vpr` commands, you can pass an specific command to get more details.
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
```
|
37
|
-
![vpr branch](https://res.cloudinary.com/juancrg90/image/upload/v1562970153/vpr/vpr_branch.gif)
|
34
|
+
### `vpr home`
|
35
|
+
Open in your browser the project page.
|
38
36
|
|
39
|
-
|
40
|
-
|
41
|
-
```
|
42
|
-
![vpr pull](https://res.cloudinary.com/juancrg90/image/upload/v1562970242/vpr/vpr_pull.gif)
|
37
|
+
### `vpr issues`
|
38
|
+
Open the in your browser issues list page.
|
43
39
|
|
44
|
-
|
45
|
-
|
46
|
-
```
|
47
|
-
![vpr visit](https://res.cloudinary.com/juancrg90/image/upload/v1562970485/vpr/vpr_visit.gif)
|
40
|
+
### `vpr pull`
|
41
|
+
Create a new pull request or visit an existing one for the current branch.
|
48
42
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
43
|
+
### `vpr pulls`
|
44
|
+
Open the pull requests list page.
|
45
|
+
|
46
|
+
### `vpr search COMMIT`
|
47
|
+
Search a given commit in the project page. the behavior of this command depends of the plaftorm, for example
|
48
|
+
GitHub search in code, issues an PRs.
|
49
|
+
|
50
|
+
### `vpr visit COMMIT`
|
51
|
+
Open in the browser the page with the commit passed as an argument.
|
52
|
+
|
53
|
+
### `vpr version`
|
54
|
+
Show the current `vpr` version
|
53
55
|
|
54
56
|
## Development
|
55
57
|
|
data/lib/vpr/cli.rb
CHANGED
@@ -40,9 +40,15 @@ module Vpr
|
|
40
40
|
Launchy.open(url.branch_url)
|
41
41
|
end
|
42
42
|
|
43
|
-
desc "pull", "visit the pull request for the
|
44
|
-
|
45
|
-
|
43
|
+
desc "pull [BRANCH]", "visit the pull request for the BRANCH in any of the supported hosts"
|
44
|
+
long_desc <<-DESC
|
45
|
+
It visits the pull request for the BRANCH in any of the supported hosts
|
46
|
+
|
47
|
+
Since the branch is an optional arg, it uses the current branch by default
|
48
|
+
DESC
|
49
|
+
|
50
|
+
def pull(branch = nil)
|
51
|
+
Launchy.open(url.pull_url(branch))
|
46
52
|
end
|
47
53
|
|
48
54
|
desc "visit COMMIT", "visit the commit in github"
|
@@ -23,8 +23,9 @@ module Vpr
|
|
23
23
|
"#{GitParser.repo_url}/branch/#{GitParser.current_branch}"
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.pull_url
|
27
|
-
|
26
|
+
def self.pull_url(branch = nil)
|
27
|
+
branch ||= GitParser.current_branch
|
28
|
+
"#{GitParser.repo_url}/pull-requests/new?source=#{branch}"
|
28
29
|
end
|
29
30
|
|
30
31
|
def self.commit_url(commit)
|
data/lib/vpr/services/github.rb
CHANGED
@@ -23,13 +23,13 @@ module Vpr
|
|
23
23
|
"#{GitParser.repo_url}/tree/#{GitParser.current_branch}"
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.pull_url
|
26
|
+
def self.pull_url(branch = nil)
|
27
|
+
branch ||= GitParser.current_branch
|
27
28
|
base_url = "#{GitParser.repo_url}/pull"
|
28
|
-
current_branch = GitParser.current_branch
|
29
29
|
|
30
|
-
base_url.concat("/new") if
|
30
|
+
base_url.concat("/new") if branch.match?(/\d+\/.+/)
|
31
31
|
|
32
|
-
"#{base_url}/#{
|
32
|
+
"#{base_url}/#{branch}"
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.commit_url(commit)
|
data/lib/vpr/services/gitlab.rb
CHANGED
@@ -23,8 +23,9 @@ module Vpr
|
|
23
23
|
"#{GitParser.repo_url}/-/tree/#{GitParser.current_branch}"
|
24
24
|
end
|
25
25
|
|
26
|
-
def self.pull_url
|
27
|
-
|
26
|
+
def self.pull_url(branch = nil)
|
27
|
+
branch ||= GitParser.current_branch
|
28
|
+
"#{GitParser.repo_url}/-/merge_requests/#{branch}"
|
28
29
|
end
|
29
30
|
|
30
31
|
def self.commit_url(commit)
|
data/lib/vpr/url.rb
CHANGED
data/lib/vpr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vpr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Carlos Ruiz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -173,7 +173,7 @@ homepage: https://github.com/JuanCrg90/vpr
|
|
173
173
|
licenses:
|
174
174
|
- MIT
|
175
175
|
metadata: {}
|
176
|
-
post_install_message:
|
176
|
+
post_install_message:
|
177
177
|
rdoc_options: []
|
178
178
|
require_paths:
|
179
179
|
- lib
|
@@ -188,8 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
rubygems_version: 3.1.
|
192
|
-
signing_key:
|
191
|
+
rubygems_version: 3.1.4
|
192
|
+
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: A CLI to visit quickly commits in github
|
195
195
|
test_files: []
|