verto 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -3
- data/Gemfile.lock +13 -5
- data/README.md +24 -3
- data/lib/verto/commands/tag_command.rb +2 -2
- data/lib/verto/utils/system_command_executor.rb +11 -1
- data/lib/verto/version.rb +1 -1
- data/verto.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64c9144a82db733e9ba2674535dee22d4615a2a2d4301879b7425295a83820c4
|
4
|
+
data.tar.gz: dd4d498454b23175bb96f514462aab03bed1c9fc3c669ba0cb522204189bf67a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8389934d204774aa1d9effe6db7b00f7b6730fc2ff440985dddecec5a00b2f6f374fed8ffe5d7fef292ff60d090695ae7e264e123d1be4bd950bd181a0e6b70
|
7
|
+
data.tar.gz: 35275e3adc8c853e0064ac4039eb89005f36abe0d63b08a8207aeb9c995507ba103729fa40563d4bcdd20d701af31e36ff93aa24f2f3860eb210f5ac39dfb0f3
|
data/.travis.yml
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
---
|
2
1
|
sudo: false
|
3
2
|
language: ruby
|
4
|
-
cache: bundler
|
5
3
|
rvm:
|
6
|
-
- 2.
|
4
|
+
- 2.5
|
5
|
+
- 2.6
|
6
|
+
- 2.7
|
7
7
|
before_install: gem install bundler -v 2.0.2
|
8
|
+
before_script:
|
9
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
10
|
+
- chmod +x ./cc-test-reporter
|
11
|
+
- ./cc-test-reporter before-build
|
12
|
+
after_script:
|
13
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
verto (0.2.
|
4
|
+
verto (0.2.1)
|
5
5
|
dry-auto_inject (~> 0.6)
|
6
6
|
dry-configurable (~> 0.8)
|
7
7
|
dry-container (~> 0.7)
|
@@ -11,19 +11,22 @@ GEM
|
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
byebug (11.1.1)
|
14
|
-
concurrent-ruby (1.1.
|
14
|
+
concurrent-ruby (1.1.6)
|
15
15
|
diff-lcs (1.3)
|
16
|
+
docile (1.3.2)
|
16
17
|
dry-auto_inject (0.7.0)
|
17
18
|
dry-container (>= 0.3.4)
|
18
|
-
dry-configurable (0.
|
19
|
+
dry-configurable (0.11.3)
|
19
20
|
concurrent-ruby (~> 1.0)
|
20
21
|
dry-core (~> 0.4, >= 0.4.7)
|
22
|
+
dry-equalizer (~> 0.2)
|
21
23
|
dry-container (0.7.2)
|
22
24
|
concurrent-ruby (~> 1.0)
|
23
25
|
dry-configurable (~> 0.1, >= 0.1.3)
|
24
26
|
dry-core (0.4.9)
|
25
27
|
concurrent-ruby (~> 1.0)
|
26
|
-
|
28
|
+
dry-equalizer (0.3.0)
|
29
|
+
rake (13.0.1)
|
27
30
|
rspec (3.9.0)
|
28
31
|
rspec-core (~> 3.9.0)
|
29
32
|
rspec-expectations (~> 3.9.0)
|
@@ -37,6 +40,10 @@ GEM
|
|
37
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
38
41
|
rspec-support (~> 3.9.0)
|
39
42
|
rspec-support (3.9.2)
|
43
|
+
simplecov (0.18.5)
|
44
|
+
docile (~> 1.1)
|
45
|
+
simplecov-html (~> 0.11)
|
46
|
+
simplecov-html (0.12.2)
|
40
47
|
thor (1.0.1)
|
41
48
|
|
42
49
|
PLATFORMS
|
@@ -45,8 +52,9 @@ PLATFORMS
|
|
45
52
|
DEPENDENCIES
|
46
53
|
bundler (~> 2.0)
|
47
54
|
byebug
|
48
|
-
rake (~>
|
55
|
+
rake (~> 13.0)
|
49
56
|
rspec (~> 3.0)
|
57
|
+
simplecov (~> 0.18.0)
|
50
58
|
verto!
|
51
59
|
|
52
60
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Verto
|
2
|
-
|
2
|
+
[![Build Status](https://travis-ci.org/catks/verto.svg?branch=master)](https://travis-ci.org/catks/verto)
|
3
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/b699d13df33e33bbe2d0/maintainability)](https://codeclimate.com/github/catks/verto/maintainability)
|
4
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/39e7c6f1f5f57b8555ed/test_coverage)](https://codeclimate.com/github/catks/verto/test_coverage)\
|
3
5
|
Verto is a CLI to generate git tags (following the [Semantic Versioning](https://semver.org/) system)
|
4
6
|
|
5
7
|
## Installation
|
@@ -12,6 +14,16 @@ Verto is distributed as a ruby gem, to install run:
|
|
12
14
|
$ gem install verto
|
13
15
|
```
|
14
16
|
|
17
|
+
### With Rbenv
|
18
|
+
|
19
|
+
If you use Rbenv you can install verto only once and create a alias in your .basrc, .zshrc, etc:
|
20
|
+
|
21
|
+
#### ZSH
|
22
|
+
$ RBENV_VERSION=$(rbenv global) gem install verto && echo "alias verto='RBENV_VERSION=$(rbenv global) verto'" >> ~/.zshrc
|
23
|
+
|
24
|
+
### Bash
|
25
|
+
$ RBENV_VERSION=$(rbenv global) gem install verto && echo "alias verto='RBENV_VERSION=$(rbenv global) verto'" >> ~/.bashrc
|
26
|
+
|
15
27
|
|
16
28
|
### Docker Image
|
17
29
|
|
@@ -20,16 +32,23 @@ You don't need to install verto in your machine, you can run verto via the docke
|
|
20
32
|
To use verto in the same way that you use any other cli, you can set an alias in your `.bashrc`, `.zshrc`, etc:
|
21
33
|
|
22
34
|
```
|
23
|
-
alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto'
|
35
|
+
alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.2.0'
|
24
36
|
```
|
25
37
|
|
26
38
|
If you want to use your ssh keys with verto container (for git push) you can set the alias sharing the ssh key file:
|
27
39
|
|
28
40
|
```
|
29
|
-
alias verto='docker run -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa -it catks/verto'
|
41
|
+
alias verto='docker run -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa -it catks/verto:0.2.0'
|
30
42
|
|
31
43
|
```
|
32
44
|
|
45
|
+
You can also share the git config file with:
|
46
|
+
|
47
|
+
|
48
|
+
```
|
49
|
+
alias verto='docker run -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa -it catks/verto:0.2.0'
|
50
|
+
|
51
|
+
```
|
33
52
|
Now you can run any verto command! :)
|
34
53
|
|
35
54
|
## Usage
|
@@ -85,6 +104,7 @@ context(branch('qa')) {
|
|
85
104
|
|
86
105
|
context(branch(/feature.+/)) {
|
87
106
|
error "Can't create tags in feature branchs"
|
107
|
+
exit
|
88
108
|
}
|
89
109
|
|
90
110
|
```
|
@@ -99,6 +119,7 @@ context(branch(/feature.+/)) {
|
|
99
119
|
2. Add a configuration to enable, disable or specify the number of tags that a single commit can have(eg: only one release and one pre-release)
|
100
120
|
3. Configure tag prefix (eg: 'v' to generate v0.1.0)
|
101
121
|
4. Improve DSL Syntax Errors Messages(Ruby backtrace is printed currently)
|
122
|
+
5. Adds more specs and test coverage in CI
|
102
123
|
|
103
124
|
## Contributing
|
104
125
|
|
@@ -48,8 +48,8 @@ module Verto
|
|
48
48
|
def validate_latest_tag!(latest_tag)
|
49
49
|
command_error!(
|
50
50
|
<<~TEXT
|
51
|
-
Project doesn't have a previous tag version, create a new tag with git
|
52
|
-
eg: `git tag 0.0
|
51
|
+
Project doesn't have a previous tag version, create a new tag with git.
|
52
|
+
eg: `git tag 0.1.0`
|
53
53
|
TEXT
|
54
54
|
) unless latest_tag
|
55
55
|
end
|
@@ -16,13 +16,15 @@ module Verto
|
|
16
16
|
Error = Class.new(StandardError)
|
17
17
|
|
18
18
|
def run(command)
|
19
|
+
stderr.puts running_log(command, path) if stderr
|
20
|
+
|
19
21
|
Open3.popen3(command, chdir: path.to_s) do |_, stdout, stderr, wait_thread|
|
20
22
|
@output = stdout.read
|
21
23
|
@error = stderr.read
|
22
24
|
@result = wait_thread.value
|
23
25
|
end
|
24
26
|
|
25
|
-
stdout << @output if
|
27
|
+
stdout << @output if stdout
|
26
28
|
stderr << @error if stderr
|
27
29
|
|
28
30
|
Result.new(@output, @error, @result)
|
@@ -35,5 +37,13 @@ module Verto
|
|
35
37
|
|
36
38
|
result
|
37
39
|
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def running_log(command, path)
|
44
|
+
log = "Running: #{command}"
|
45
|
+
log = "#{log} (in #{path})" if path != './'
|
46
|
+
log
|
47
|
+
end
|
38
48
|
end
|
39
49
|
end
|
data/lib/verto/version.rb
CHANGED
data/verto.gemspec
CHANGED
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
|
34
34
|
spec.add_development_dependency "byebug"
|
35
35
|
spec.add_development_dependency "bundler", "~> 2.0"
|
36
|
-
spec.add_development_dependency "rake", "~>
|
36
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
37
37
|
spec.add_development_dependency "rspec", "~> 3.0"
|
38
|
+
spec.add_development_dependency "simplecov", "~> 0.18.0"
|
38
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: verto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Atkinson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
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: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.18.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.18.0
|
125
139
|
description:
|
126
140
|
email:
|
127
141
|
- carlos.atks@gmail.com
|