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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7cbb605e13043c2455046ab956e5ce594d4728bee3f7741ccd8bfbcd79b4237
4
- data.tar.gz: e22d596c37d45f42ebf086254c002cdd28413919759f8c6f08dd96bc6e6b6351
3
+ metadata.gz: 8bd0f665a696d8fd07209b9dc557d3ab8cfd6f2145c0103d6d2f45f894779fe8
4
+ data.tar.gz: 375bad74eae55b8583c4725d2d982a60635cab44c075de6cf8f97283a3634182
5
5
  SHA512:
6
- metadata.gz: c3fcd95ba7d916fb23b98a90441e3f46756031e955894959b6686baf0dcd4e883bec081779c07f6d6c20f90a921c7b4b43314a042780ffe946f916ba86810176
7
- data.tar.gz: 2244a11cd7666fc4be1cbc5318bbb1442e9dd9c00d09094ecd52f6bd8439327ac331ae03480691e01ef103743eeef1c46b95037053a97a2d603bacb2d885dca1
6
+ metadata.gz: 6c4bb0c86e8e38de43bf14ebe889799062adfb06daece70d4c99e25c95070b73fa5cd684d4edd8caa2c8468d2e80c4aa38ff55cfcd3ecb5162a504a691346117
7
+ data.tar.gz: c62af43a110069c5a39301ef50879b8400c5b8e31dec1c67573bda093e91102601ca5e94b0b2dc798019a3415c30b5ac7d54a2bfaba95faa1ff32b8dcd6c5915
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vpr (2.3.1)
4
+ vpr (2.3.2)
5
5
  git (~> 1.7)
6
6
  launchy (~> 2.4)
7
7
  thor (~> 0.20)
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
- A CLI to visit quickly github project sections
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
- $ vpr home # visit the project page in github
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
- $ vpr pulls # visit the project pull requests page in github
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
- $ vpr issues # visit the project issues page in github
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
- $ vpr branches # visit the project branches page in github
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
- $ vpr branch # 'visit the current branch in github'
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
- $ vpr pull # 'visit the pull request for the current branch (if exist) in github'
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
- $ vpr visit <commit> # visit the commit in github
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
- $ vpr search <commit> # search the commit in github
51
- ```
52
- ![vpr search](https://res.cloudinary.com/juancrg90/image/upload/v1562970606/vpr/vpr_search.gif)
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 current branch (if exist) in github"
44
- def pull
45
- Launchy.open(url.pull_url)
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
- "#{GitParser.repo_url}/pull-requests/new?source=#{GitParser.current_branch}"
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)
@@ -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 current_branch.match?(/\d+\/.+/)
30
+ base_url.concat("/new") if branch.match?(/\d+\/.+/)
31
31
 
32
- "#{base_url}/#{current_branch}"
32
+ "#{base_url}/#{branch}"
33
33
  end
34
34
 
35
35
  def self.commit_url(commit)
@@ -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
- "#{GitParser.repo_url}/-/merge_requests/#{GitParser.current_branch}"
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
@@ -27,8 +27,8 @@ module Vpr
27
27
  service.branch_url
28
28
  end
29
29
 
30
- def pull_url
31
- service.pull_url
30
+ def pull_url(branch = nil)
31
+ service.pull_url(branch)
32
32
  end
33
33
 
34
34
  def commit_url(commit)
data/lib/vpr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vpr
2
- VERSION = "2.3.1"
2
+ VERSION = "2.3.2"
3
3
  end
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.1
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: 2020-10-28 00:00:00.000000000 Z
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.2
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: []