vpr 2.1.0 → 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/.github/workflows/ci.yml +32 -0
- data/CHANGELOG.md +84 -8
- data/Gemfile.lock +27 -22
- data/README.md +38 -36
- data/Rakefile +2 -2
- data/lib/vpr/cli.rb +9 -3
- data/lib/vpr/git_parser.rb +3 -1
- data/lib/vpr/services.rb +1 -0
- data/lib/vpr/services/bitbucket.rb +3 -2
- data/lib/vpr/services/github.rb +7 -2
- data/lib/vpr/services/gitlab.rb +40 -0
- data/lib/vpr/url.rb +3 -2
- data/lib/vpr/version.rb +1 -1
- data/vpr.gemspec +4 -4
- metadata +16 -15
- data/.circleci/config.yml +0 -54
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
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches: [ master ]
|
5
|
+
push:
|
6
|
+
branches: [ master ]
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby_version: [ '2.5', '2.6', '2.7' ]
|
13
|
+
steps:
|
14
|
+
- name: Checkout
|
15
|
+
uses: actions/checkout@v2
|
16
|
+
- name: Setup ruby ${{ matrix.ruby_version }}
|
17
|
+
uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby_version }}
|
20
|
+
- name: Setup cache key and directory for gems cache
|
21
|
+
uses: actions/cache@v1
|
22
|
+
with:
|
23
|
+
path: vendor/bundle
|
24
|
+
key: ${{ runner.os }}-gem-use-ruby-${{ matrix.ruby_version }}-${{ hashFiles('**/Gemfile.lock') }}
|
25
|
+
- name: Bundle install
|
26
|
+
run: |
|
27
|
+
gem install bundler
|
28
|
+
bundle config path vendor/bundle
|
29
|
+
bundle install --jobs 4 --retry 3
|
30
|
+
- name: Run tests
|
31
|
+
run: |
|
32
|
+
bundle exec rspec --format progress
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,83 @@
|
|
1
|
-
#
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
## [
|
4
|
-
|
3
|
+
## [v2.3.1](https://github.com/JuanCrg90/vpr/tree/v2.3.1) (2020-10-28)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.3.0...v2.3.1)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Add support vpr branch in gitlab [\#41](https://github.com/JuanCrg90/vpr/issues/41)
|
10
|
+
- Add support vpr pulls in gitlab [\#40](https://github.com/JuanCrg90/vpr/issues/40)
|
11
|
+
- Add support vpr pull in gitlab [\#39](https://github.com/JuanCrg90/vpr/issues/39)
|
12
|
+
- vpr pull fails on renamed repos [\#35](https://github.com/JuanCrg90/vpr/issues/35)
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- Error message when there is no repository [\#47](https://github.com/JuanCrg90/vpr/pull/47) ([EduardoGHdez](https://github.com/EduardoGHdez))
|
17
|
+
- Update changelog [\#46](https://github.com/JuanCrg90/vpr/pull/46) ([JuanCrg90](https://github.com/JuanCrg90))
|
18
|
+
|
19
|
+
## [v2.3.0](https://github.com/JuanCrg90/vpr/tree/v2.3.0) (2020-10-03)
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.2.1...v2.3.0)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Support gitlab service [\#45](https://github.com/JuanCrg90/vpr/pull/45) ([Snick555](https://github.com/Snick555))
|
26
|
+
|
27
|
+
## [v2.2.1](https://github.com/JuanCrg90/vpr/tree/v2.2.1) (2020-10-02)
|
28
|
+
|
29
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.2.0...v2.2.1)
|
30
|
+
|
31
|
+
**Merged pull requests:**
|
32
|
+
|
33
|
+
- Upgrade Git Gem to version 1.7 [\#44](https://github.com/JuanCrg90/vpr/pull/44) ([JuanCrg90](https://github.com/JuanCrg90))
|
34
|
+
- Remove Circle CI [\#43](https://github.com/JuanCrg90/vpr/pull/43) ([JuanCrg90](https://github.com/JuanCrg90))
|
35
|
+
- Use Github actions for CI [\#42](https://github.com/JuanCrg90/vpr/pull/42) ([JuanCrg90](https://github.com/JuanCrg90))
|
36
|
+
- Bump activesupport from 5.2.3 to 6.0.3.1 [\#38](https://github.com/JuanCrg90/vpr/pull/38) ([dependabot[bot]](https://github.com/apps/dependabot))
|
37
|
+
|
38
|
+
## [v2.2.0](https://github.com/JuanCrg90/vpr/tree/v2.2.0) (2020-03-16)
|
39
|
+
|
40
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.1.0...v2.2.0)
|
41
|
+
|
42
|
+
**Merged pull requests:**
|
43
|
+
|
44
|
+
- Add support for number slash branches [\#37](https://github.com/JuanCrg90/vpr/pull/37) ([JuanCrg90](https://github.com/JuanCrg90))
|
45
|
+
- Update rake requirement from ~\> 10.0 to ~\> 13.0 [\#36](https://github.com/JuanCrg90/vpr/pull/36) ([dependabot[bot]](https://github.com/apps/dependabot))
|
46
|
+
|
47
|
+
## [v2.1.0](https://github.com/JuanCrg90/vpr/tree/v2.1.0) (2019-12-16)
|
48
|
+
|
49
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.0.1...v2.1.0)
|
50
|
+
|
51
|
+
**Merged pull requests:**
|
52
|
+
|
53
|
+
- Separate each git service in its own class [\#33](https://github.com/JuanCrg90/vpr/pull/33) ([JuanCrg90](https://github.com/JuanCrg90))
|
54
|
+
|
55
|
+
## [v2.0.1](https://github.com/JuanCrg90/vpr/tree/v2.0.1) (2019-12-04)
|
56
|
+
|
57
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v2.0.0...v2.0.1)
|
58
|
+
|
59
|
+
**Merged pull requests:**
|
60
|
+
|
61
|
+
- Fix vpr --version [\#32](https://github.com/JuanCrg90/vpr/pull/32) ([JuanCrg90](https://github.com/JuanCrg90))
|
62
|
+
- Add Version 2.0.0 changelog [\#29](https://github.com/JuanCrg90/vpr/pull/29) ([JuanCrg90](https://github.com/JuanCrg90))
|
63
|
+
|
64
|
+
## [v2.0.0](https://github.com/JuanCrg90/vpr/tree/v2.0.0) (2019-11-09)
|
65
|
+
|
66
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v1.0.0...v2.0.0)
|
67
|
+
|
68
|
+
**Implemented enhancements:**
|
69
|
+
|
70
|
+
- Allow to use vpr even if you are not in the root directory [\#17](https://github.com/JuanCrg90/vpr/issues/17)
|
71
|
+
|
72
|
+
**Closed issues:**
|
73
|
+
|
74
|
+
- Add support vpr search in bitbucket [\#20](https://github.com/JuanCrg90/vpr/issues/20)
|
75
|
+
- Add support vpr pulls in bitbucket [\#19](https://github.com/JuanCrg90/vpr/issues/19)
|
76
|
+
- Add support vpr branch in bitbucket [\#18](https://github.com/JuanCrg90/vpr/issues/18)
|
77
|
+
- Add linter/formatter GitHub action [\#12](https://github.com/JuanCrg90/vpr/issues/12)
|
78
|
+
- Add vpr --version command [\#10](https://github.com/JuanCrg90/vpr/issues/10)
|
79
|
+
- Add support vpr pull in bitbucket [\#9](https://github.com/JuanCrg90/vpr/issues/9)
|
80
|
+
- Add support to select remote branch to visit [\#8](https://github.com/JuanCrg90/vpr/issues/8)
|
5
81
|
|
6
82
|
**Merged pull requests:**
|
7
83
|
|
@@ -22,18 +98,20 @@
|
|
22
98
|
- Add vpr --version command [\#11](https://github.com/JuanCrg90/vpr/pull/11) ([andrewmcodes](https://github.com/andrewmcodes))
|
23
99
|
- Update circle ci config [\#7](https://github.com/JuanCrg90/vpr/pull/7) ([JuanCrg90](https://github.com/JuanCrg90))
|
24
100
|
- Add basic circle ci configuration [\#6](https://github.com/JuanCrg90/vpr/pull/6) ([JuanCrg90](https://github.com/JuanCrg90))
|
25
|
-
- Add support for bitbucket in visit method [\#5](https://github.com/JuanCrg90/vpr/pull/5) ([JuanCrg90](https://github.com/JuanCrg90))
|
26
101
|
|
27
102
|
## [v1.0.0](https://github.com/JuanCrg90/vpr/tree/v1.0.0) (2019-07-12)
|
103
|
+
|
28
104
|
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v0.2.0...v1.0.0)
|
29
105
|
|
30
106
|
**Merged pull requests:**
|
31
107
|
|
108
|
+
- Add support for bitbucket in visit method [\#5](https://github.com/JuanCrg90/vpr/pull/5) ([JuanCrg90](https://github.com/JuanCrg90))
|
32
109
|
- Bump version 1.0.0 [\#4](https://github.com/JuanCrg90/vpr/pull/4) ([JuanCrg90](https://github.com/JuanCrg90))
|
33
110
|
- Add changelog [\#3](https://github.com/JuanCrg90/vpr/pull/3) ([JuanCrg90](https://github.com/JuanCrg90))
|
34
111
|
- Add regular GitHub project actions [\#2](https://github.com/JuanCrg90/vpr/pull/2) ([JuanCrg90](https://github.com/JuanCrg90))
|
35
112
|
|
36
113
|
## [v0.2.0](https://github.com/JuanCrg90/vpr/tree/v0.2.0) (2019-07-10)
|
114
|
+
|
37
115
|
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v0.1.1...v0.2.0)
|
38
116
|
|
39
117
|
**Merged pull requests:**
|
@@ -41,11 +119,9 @@
|
|
41
119
|
- add Launchy dependency [\#1](https://github.com/JuanCrg90/vpr/pull/1) ([JuanCrg90](https://github.com/JuanCrg90))
|
42
120
|
|
43
121
|
## [v0.1.1](https://github.com/JuanCrg90/vpr/tree/v0.1.1) (2019-07-05)
|
44
|
-
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v0.1.0...v0.1.1)
|
45
122
|
|
46
|
-
|
47
|
-
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/0.1.0...v0.1.0)
|
123
|
+
[Full Changelog](https://github.com/JuanCrg90/vpr/compare/v0.1.0...v0.1.1)
|
48
124
|
|
49
125
|
|
50
126
|
|
51
|
-
\* *This
|
127
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/Gemfile.lock
CHANGED
@@ -1,54 +1,58 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vpr (2.
|
5
|
-
git (~> 1.
|
4
|
+
vpr (2.3.2)
|
5
|
+
git (~> 1.7)
|
6
6
|
launchy (~> 2.4)
|
7
7
|
thor (~> 0.20)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
12
|
+
activesupport (6.0.3.4)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 0.7, < 2)
|
15
15
|
minitest (~> 5.1)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
17
18
|
addressable (2.6.0)
|
18
19
|
public_suffix (>= 2.0.2, < 4.0)
|
19
20
|
ast (2.4.0)
|
20
|
-
concurrent-ruby (1.1.
|
21
|
+
concurrent-ruby (1.1.7)
|
21
22
|
diff-lcs (1.3)
|
22
|
-
faraday (0.
|
23
|
+
faraday (1.0.1)
|
23
24
|
multipart-post (>= 1.2, < 3)
|
24
|
-
faraday-http-cache (2.
|
25
|
-
faraday (
|
26
|
-
git (1.
|
27
|
-
|
25
|
+
faraday-http-cache (2.2.0)
|
26
|
+
faraday (>= 0.8)
|
27
|
+
git (1.7.0)
|
28
|
+
rchardet (~> 1.8)
|
29
|
+
github_changelog_generator (1.15.2)
|
28
30
|
activesupport
|
29
31
|
faraday-http-cache
|
30
32
|
multi_json
|
31
33
|
octokit (~> 4.6)
|
32
|
-
rainbow (>= 2.1)
|
34
|
+
rainbow (>= 2.2.1)
|
33
35
|
rake (>= 10.0)
|
34
|
-
retriable (~>
|
35
|
-
i18n (1.
|
36
|
+
retriable (~> 3.0)
|
37
|
+
i18n (1.8.5)
|
36
38
|
concurrent-ruby (~> 1.0)
|
37
39
|
jaro_winkler (1.5.3)
|
38
40
|
launchy (2.4.3)
|
39
41
|
addressable (~> 2.3)
|
40
|
-
minitest (5.
|
41
|
-
multi_json (1.
|
42
|
+
minitest (5.14.2)
|
43
|
+
multi_json (1.15.0)
|
42
44
|
multipart-post (2.1.1)
|
43
|
-
octokit (4.
|
45
|
+
octokit (4.18.0)
|
46
|
+
faraday (>= 0.9)
|
44
47
|
sawyer (~> 0.8.0, >= 0.5.3)
|
45
48
|
parallel (1.17.0)
|
46
49
|
parser (2.6.5.0)
|
47
50
|
ast (~> 2.4.0)
|
48
51
|
public_suffix (3.1.1)
|
49
52
|
rainbow (3.0.0)
|
50
|
-
rake (
|
51
|
-
|
53
|
+
rake (13.0.1)
|
54
|
+
rchardet (1.8.0)
|
55
|
+
retriable (3.1.2)
|
52
56
|
rspec (3.8.0)
|
53
57
|
rspec-core (~> 3.8.0)
|
54
58
|
rspec-expectations (~> 3.8.0)
|
@@ -82,21 +86,22 @@ GEM
|
|
82
86
|
rubocop-performance (~> 1.4.0)
|
83
87
|
thor (0.20.3)
|
84
88
|
thread_safe (0.3.6)
|
85
|
-
tzinfo (1.2.
|
89
|
+
tzinfo (1.2.7)
|
86
90
|
thread_safe (~> 0.1)
|
87
91
|
unicode-display_width (1.6.0)
|
92
|
+
zeitwerk (2.4.0)
|
88
93
|
|
89
94
|
PLATFORMS
|
90
95
|
ruby
|
91
96
|
|
92
97
|
DEPENDENCIES
|
93
|
-
bundler (~> 2.
|
94
|
-
github_changelog_generator (~> 1.
|
95
|
-
rake (~>
|
98
|
+
bundler (~> 2.1)
|
99
|
+
github_changelog_generator (~> 1.15)
|
100
|
+
rake (~> 13.0)
|
96
101
|
rspec (~> 3.0)
|
97
102
|
rspec_junit_formatter (~> 0.4)
|
98
103
|
standard
|
99
104
|
vpr!
|
100
105
|
|
101
106
|
BUNDLED WITH
|
102
|
-
2.
|
107
|
+
2.1.4
|
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/Rakefile
CHANGED
@@ -10,6 +10,6 @@ task default: [:standard, :spec]
|
|
10
10
|
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
11
11
|
config.user = "JuanCrg90"
|
12
12
|
config.project = "vpr"
|
13
|
-
config.since_tag = "
|
14
|
-
config.future_release = "
|
13
|
+
config.since_tag = "v0.1.0"
|
14
|
+
config.future_release = "v2.3.1"
|
15
15
|
end
|
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"
|
data/lib/vpr/git_parser.rb
CHANGED
@@ -47,7 +47,9 @@ module Vpr
|
|
47
47
|
return dir if File.directory?(File.join(dir, ".git"))
|
48
48
|
|
49
49
|
parent = File.dirname(dir)
|
50
|
-
|
50
|
+
|
51
|
+
# NOTE: Raising an error because at this point it is at the root dir
|
52
|
+
raise Thor::Error.new("There is no repository in current directory") if parent == dir
|
51
53
|
|
52
54
|
dir = parent
|
53
55
|
end
|
data/lib/vpr/services.rb
CHANGED
@@ -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,8 +23,13 @@ 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
|
+
base_url = "#{GitParser.repo_url}/pull"
|
29
|
+
|
30
|
+
base_url.concat("/new") if branch.match?(/\d+\/.+/)
|
31
|
+
|
32
|
+
"#{base_url}/#{branch}"
|
28
33
|
end
|
29
34
|
|
30
35
|
def self.commit_url(commit)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require "vpr/git_parser"
|
2
|
+
|
3
|
+
module Vpr
|
4
|
+
module Services
|
5
|
+
class GitLab
|
6
|
+
def self.home_url
|
7
|
+
GitParser.repo_url
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.pulls_url
|
11
|
+
"#{GitParser.repo_url}/-/merge_requests"
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.issues_url
|
15
|
+
"#{GitParser.repo_url}/-/issues"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.branches_url
|
19
|
+
"#{GitParser.repo_url}/-/branches"
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.branch_url
|
23
|
+
"#{GitParser.repo_url}/-/tree/#{GitParser.current_branch}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.pull_url(branch = nil)
|
27
|
+
branch ||= GitParser.current_branch
|
28
|
+
"#{GitParser.repo_url}/-/merge_requests/#{branch}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.commit_url(commit)
|
32
|
+
"#{GitParser.repo_url}/-/commit/#{commit}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.search_url(commit)
|
36
|
+
"#{GitParser.host}/search?search=#{commit}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
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)
|
@@ -45,6 +45,7 @@ module Vpr
|
|
45
45
|
{
|
46
46
|
'github.com': Vpr::Services::GitHub,
|
47
47
|
'bitbucket.org': Vpr::Services::Bitbucket,
|
48
|
+
'gitlab.com': Vpr::Services::GitLab,
|
48
49
|
}
|
49
50
|
end
|
50
51
|
|
data/lib/vpr/version.rb
CHANGED
data/vpr.gemspec
CHANGED
@@ -23,14 +23,14 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 2.
|
27
|
-
spec.add_development_dependency "github_changelog_generator", "~> 1.
|
28
|
-
spec.add_development_dependency "rake", "~>
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
27
|
+
spec.add_development_dependency "github_changelog_generator", "~> 1.15"
|
28
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
30
30
|
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4"
|
31
31
|
spec.add_development_dependency "standard"
|
32
32
|
|
33
|
-
spec.add_runtime_dependency "git", "~> 1.
|
33
|
+
spec.add_runtime_dependency "git", "~> 1.7"
|
34
34
|
spec.add_runtime_dependency "launchy", "~> 2.4"
|
35
35
|
spec.add_runtime_dependency "thor", "~> 0.20"
|
36
36
|
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.
|
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
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.1'
|
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: '2.
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: github_changelog_generator
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.15'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.15'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.7'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.7'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: launchy
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ executables:
|
|
144
144
|
extensions: []
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
|
-
- ".
|
147
|
+
- ".github/workflows/ci.yml"
|
148
148
|
- ".github/workflows/standardrb.yml"
|
149
149
|
- ".gitignore"
|
150
150
|
- ".rspec"
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/vpr/services.rb
|
166
166
|
- lib/vpr/services/bitbucket.rb
|
167
167
|
- lib/vpr/services/github.rb
|
168
|
+
- lib/vpr/services/gitlab.rb
|
168
169
|
- lib/vpr/url.rb
|
169
170
|
- lib/vpr/version.rb
|
170
171
|
- vpr.gemspec
|
@@ -172,7 +173,7 @@ homepage: https://github.com/JuanCrg90/vpr
|
|
172
173
|
licenses:
|
173
174
|
- MIT
|
174
175
|
metadata: {}
|
175
|
-
post_install_message:
|
176
|
+
post_install_message:
|
176
177
|
rdoc_options: []
|
177
178
|
require_paths:
|
178
179
|
- lib
|
@@ -187,8 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
188
|
- !ruby/object:Gem::Version
|
188
189
|
version: '0'
|
189
190
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
191
|
-
signing_key:
|
191
|
+
rubygems_version: 3.1.4
|
192
|
+
signing_key:
|
192
193
|
specification_version: 4
|
193
194
|
summary: A CLI to visit quickly commits in github
|
194
195
|
test_files: []
|
data/.circleci/config.yml
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# Ruby CircleCI 2.0 configuration file
|
2
|
-
#
|
3
|
-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
-
#
|
5
|
-
version: 2
|
6
|
-
jobs:
|
7
|
-
build:
|
8
|
-
docker:
|
9
|
-
# specify the version you desire here
|
10
|
-
- image: circleci/ruby:2.6.4
|
11
|
-
|
12
|
-
working_directory: ~/repo
|
13
|
-
|
14
|
-
steps:
|
15
|
-
- checkout
|
16
|
-
|
17
|
-
# Download and cache dependencies
|
18
|
-
- restore_cache:
|
19
|
-
keys:
|
20
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
21
|
-
# fallback to using the latest cache if no exact match is found
|
22
|
-
- v1-dependencies-
|
23
|
-
|
24
|
-
- run:
|
25
|
-
name: install dependencies
|
26
|
-
command: |
|
27
|
-
gem install bundler
|
28
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
29
|
-
|
30
|
-
- save_cache:
|
31
|
-
paths:
|
32
|
-
- ./vendor/bundle
|
33
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
34
|
-
|
35
|
-
# run tests!
|
36
|
-
- run:
|
37
|
-
name: run tests
|
38
|
-
command: |
|
39
|
-
mkdir /tmp/test-results
|
40
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb")"
|
41
|
-
|
42
|
-
bundle exec rspec \
|
43
|
-
--format progress \
|
44
|
-
--format RspecJunitFormatter \
|
45
|
-
--out /tmp/test-results/rspec.xml \
|
46
|
-
--format progress \
|
47
|
-
$TEST_FILES
|
48
|
-
|
49
|
-
# collect reports
|
50
|
-
- store_test_results:
|
51
|
-
path: /tmp/test-results
|
52
|
-
- store_artifacts:
|
53
|
-
path: /tmp/test-results
|
54
|
-
destination: test-results
|