verto 0.9.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +54 -0
  3. data/.rubocop.yml +23 -0
  4. data/.rubocop_todo.yml +50 -0
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +22 -0
  7. data/Gemfile +3 -1
  8. data/Gemfile.lock +79 -29
  9. data/README.md +75 -65
  10. data/Rakefile +7 -5
  11. data/VERTO_SYNTAX.md +350 -0
  12. data/Vertofile +5 -19
  13. data/bin/console +5 -8
  14. data/djin.yml +50 -0
  15. data/exe/verto +8 -4
  16. data/lib/verto/commands/base_command.rb +7 -2
  17. data/lib/verto/commands/main_command.rb +10 -6
  18. data/lib/verto/commands/tag_command.rb +65 -26
  19. data/lib/verto/dsl/built_in_hooks.rb +7 -1
  20. data/lib/verto/dsl/file.rb +4 -2
  21. data/lib/verto/dsl/hook.rb +2 -0
  22. data/lib/verto/dsl/interpreter.rb +8 -7
  23. data/lib/verto/dsl/syntax.rb +27 -6
  24. data/lib/verto/dsl/update_changelog/filtered_by.rb +45 -0
  25. data/lib/verto/dsl/update_changelog/with_commit_messages.rb +30 -0
  26. data/lib/verto/dsl/update_changelog/with_merged_pull_requests.rb +19 -0
  27. data/lib/verto/dsl/update_changelog.rb +85 -0
  28. data/lib/verto/dsl.rb +2 -0
  29. data/lib/verto/repositories/tag_repository.rb +6 -0
  30. data/lib/verto/utils/cli_helpers.rb +37 -0
  31. data/lib/verto/utils/command_options.rb +4 -2
  32. data/lib/verto/utils/semantic_version.rb +2 -0
  33. data/lib/verto/utils/strict_hash.rb +9 -0
  34. data/lib/verto/utils/system_command_executor.rb +4 -2
  35. data/lib/verto/utils/tag_filter.rb +7 -5
  36. data/lib/verto/utils/template.rb +2 -0
  37. data/lib/verto/utils/templates/Vertofile +26 -28
  38. data/lib/verto/version.rb +3 -1
  39. data/lib/verto.rb +62 -25
  40. data/verto.gemspec +33 -25
  41. metadata +113 -19
  42. data/.travis.yml +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfde45c8eb00cd3302f89417e1302b90e2fd41a2fd49a5c402c6e29ec2e46fdf
4
- data.tar.gz: d6822ed93c979646fc7c0064b39310a1a180ae632a92ea53b2a7b7841503c138
3
+ metadata.gz: 2e47505134ac4ade2dacefc6a709c60248906b0ca224845c2fa7c1942e295644
4
+ data.tar.gz: d3bfb3305978744b7d7be5f33c9b2ee58ddbf3c495518e49e8b8e8923937bd25
5
5
  SHA512:
6
- metadata.gz: f93afd8ec28cfcf7a6183d82570da5e5636f23ffd1387c111de3bbbbddae2db114b7022207a953f47e45020f6069024a1cdeffca419aec6fe0ca0d923583fc78
7
- data.tar.gz: c07c60169151793d64806ae93851aabd649233f2d8364fe1aba2e896a57c89054dfd634d37b69554f934219420964f76ae3b932504b7964a2f3c14b9aeb8fe57
6
+ metadata.gz: 34f25e60110e798d56981f11a15fa49b06b2f1e80ecdcf0203465ac4ca273a53ed2d52af51f99fc717c2feb50af2cfadaa16ca551590d684b451fa526e40d9d0
7
+ data.tar.gz: b82da002e1d630babd7a692fcedb8a9dfa031379850f87cd27657348c41ebc961a8e30780b1f683619d2eebf6a25e961f3856aa075e356b38654c6c1059a53a0
@@ -0,0 +1,54 @@
1
+ name: Ruby
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-18.04
8
+ strategy:
9
+ matrix:
10
+ ruby: ['2.5', '2.6', '2.7', '3.0']
11
+ name: Ruby ${{ matrix.ruby }}
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: actions/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+
18
+ - name: Setup Code Climate test-reporter
19
+ run: |
20
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
21
+ chmod +x ./cc-test-reporter
22
+ ./cc-test-reporter before-build
23
+
24
+ - name: Install Gems
25
+ run: |
26
+ gem install bundler
27
+ bundle install --jobs 4 --retry 3
28
+
29
+ - name: Run tests
30
+ run: |
31
+ git config --global user.email "github_actions@test.com"
32
+ git config --global user.name "Github Actions Test"
33
+ bundle exec rake
34
+
35
+ - name: Publish code coverage
36
+ run: |
37
+ export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
38
+ ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}
39
+
40
+ lint:
41
+ runs-on: ubuntu-18.04
42
+ name: Lint
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ - uses: actions/setup-ruby@v1
46
+ with:
47
+ ruby-version: '2.5'
48
+ - name: Install Gems
49
+ run: |
50
+ gem install bundler
51
+ bundle install --jobs 4 --retry 3
52
+ - name: Running Rubocop
53
+ run: |
54
+ bundle exec rubocop
data/.rubocop.yml ADDED
@@ -0,0 +1,23 @@
1
+ # TODO: Remove and use pronto
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ # The behavior of RuboCop can be controlled via the .rubocop.yml
5
+ # configuration file. It makes it possible to enable/disable
6
+ # certain cops (checks) and to alter their behavior if they accept
7
+ # any parameters. The file can be placed either in your home
8
+ # directory or in some project directory.
9
+ #
10
+ # RuboCop will start looking for the configuration file in the directory
11
+ # where the inspected file is and continue its way up to the root directory.
12
+ #
13
+ # See https://docs.rubocop.org/rubocop/configuration
14
+ AllCops:
15
+ TargetRubyVersion: 2.5
16
+
17
+ Metrics/BlockLength:
18
+ Exclude:
19
+ - 'spec/**/*.rb'
20
+ - verto.gemspec
21
+
22
+ Style/Documentation:
23
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,50 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 2000`
3
+ # on 2020-10-16 18:48:37 UTC using RuboCop version 0.93.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # Configuration parameters: IgnoredMethods, Max.
11
+ Metrics/AbcSize:
12
+ Exclude:
13
+ - 'lib/verto.rb'
14
+ - 'lib/verto/commands/tag_command.rb'
15
+ - 'lib/verto/utils/system_command_executor.rb'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: IgnoredMethods, Max.
19
+ Metrics/CyclomaticComplexity:
20
+ Exclude:
21
+ - 'lib/verto/commands/tag_command.rb'
22
+
23
+ # Offense count: 4
24
+ # Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods.
25
+ Metrics/MethodLength:
26
+ Exclude:
27
+ - 'lib/verto.rb'
28
+ - 'lib/verto/commands/tag_command.rb'
29
+
30
+ # Offense count: 1
31
+ # Configuration parameters: CountComments, Max, CountAsOne.
32
+ Metrics/ModuleLength:
33
+ Exclude:
34
+ - 'lib/verto/dsl/syntax.rb'
35
+
36
+ # Offense count: 1
37
+ # Configuration parameters: IgnoredMethods, Max.
38
+ Metrics/PerceivedComplexity:
39
+ Exclude:
40
+ - 'lib/verto/commands/tag_command.rb'
41
+
42
+ # Offense count: 5
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: AutoCorrect, Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
45
+ # URISchemes: http, https
46
+ Layout/LineLength:
47
+ Exclude:
48
+ - 'lib/verto/dsl/syntax.rb'
49
+ - 'lib/verto/dsl/update_changelog.rb'
50
+ - 'lib/verto/repositories/tag_repository.rb'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
1
+ 2.6.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## 0.12.0 - 28/10/2021
2
+ * [DOC] Add Verto Syntax Documentation
3
+ * [FEATURE] Add option to edit the CHANGELOG
4
+ * [FEATURE] Add update_changelog strategies
5
+ * [TECH] Configure pry and pry-byebug
6
+
7
+ ## 0.11.0 - 16/04/2021
8
+ * [FEATURE] Adds fetch_before_tag_creation built-in hook
9
+ * [FEATURE] Verto Tag Init Command
10
+
11
+ ## 0.10.2 - 23/02/2021
12
+ * [TECH] Adds Ruby 3 in Github Actions
13
+ * [FIX] Update Changelog Typo
14
+
15
+ ## 0.10.1 - 14/01/2021
16
+ * [FIX] UpdateChangelog Versions
17
+ * [TECH] Adds Rubocop
18
+ * [TECH] Github Actions CI
19
+
20
+ ## 0.10.0 - 14/10/2020
21
+ * [FEATURE] Adds update_changelog in DSL
22
+
1
23
  ## 0.9.0 - 08/08/2020
2
24
  * [FEATURE] Custom Default Pre-Release Identifier
3
25
 
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in verto.gemspec
4
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,52 +1,100 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- verto (0.9.0)
5
- dry-auto_inject (~> 0.7)
6
- dry-configurable (~> 0.8)
7
- dry-container (~> 0.7)
4
+ verto (0.12.0)
5
+ dry-auto_inject (~> 0.7.0)
6
+ dry-configurable (~> 0.9.0)
7
+ dry-container (~> 0.7.0)
8
+ dry-core (~> 0.6.0)
9
+ mustache (~> 1.1.1)
8
10
  thor (~> 1.0.1)
11
+ tty-editor (~> 0.7.0)
12
+ tty-prompt (~> 0.23.1)
9
13
  vseries (~> 0.2)
10
14
 
11
15
  GEM
12
16
  remote: https://rubygems.org/
13
17
  specs:
14
- byebug (11.1.1)
15
- concurrent-ruby (1.1.6)
16
- diff-lcs (1.3)
17
- docile (1.3.2)
18
+ ast (2.4.2)
19
+ byebug (11.1.3)
20
+ coderay (1.1.3)
21
+ concurrent-ruby (1.1.9)
22
+ diff-lcs (1.4.4)
23
+ docile (1.4.0)
18
24
  dry-auto_inject (0.7.0)
19
25
  dry-container (>= 0.3.4)
20
- dry-configurable (0.11.6)
26
+ dry-configurable (0.9.0)
21
27
  concurrent-ruby (~> 1.0)
22
28
  dry-core (~> 0.4, >= 0.4.7)
23
- dry-equalizer (~> 0.2)
24
29
  dry-container (0.7.2)
25
30
  concurrent-ruby (~> 1.0)
26
31
  dry-configurable (~> 0.1, >= 0.1.3)
27
- dry-core (0.4.9)
32
+ dry-core (0.6.0)
28
33
  concurrent-ruby (~> 1.0)
29
- dry-equalizer (0.3.0)
30
- rake (13.0.1)
31
- rspec (3.9.0)
32
- rspec-core (~> 3.9.0)
33
- rspec-expectations (~> 3.9.0)
34
- rspec-mocks (~> 3.9.0)
35
- rspec-core (3.9.1)
36
- rspec-support (~> 3.9.1)
37
- rspec-expectations (3.9.0)
34
+ json (2.6.1)
35
+ method_source (1.0.0)
36
+ mustache (1.1.1)
37
+ parallel (1.21.0)
38
+ parser (3.0.2.0)
39
+ ast (~> 2.4.1)
40
+ pastel (0.8.0)
41
+ tty-color (~> 0.5)
42
+ pry (0.13.1)
43
+ coderay (~> 1.1)
44
+ method_source (~> 1.0)
45
+ pry-byebug (3.9.0)
46
+ byebug (~> 11.0)
47
+ pry (~> 0.13.0)
48
+ rainbow (3.0.0)
49
+ rake (13.0.6)
50
+ regexp_parser (2.1.1)
51
+ rexml (3.2.5)
52
+ rspec (3.10.0)
53
+ rspec-core (~> 3.10.0)
54
+ rspec-expectations (~> 3.10.0)
55
+ rspec-mocks (~> 3.10.0)
56
+ rspec-core (3.10.1)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-expectations (3.10.1)
38
59
  diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.9.0)
40
- rspec-mocks (3.9.1)
60
+ rspec-support (~> 3.10.0)
61
+ rspec-mocks (3.10.2)
41
62
  diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.9.0)
43
- rspec-support (3.9.2)
44
- simplecov (0.18.5)
63
+ rspec-support (~> 3.10.0)
64
+ rspec-support (3.10.2)
65
+ rubocop (1.22.2)
66
+ parallel (~> 1.10)
67
+ parser (>= 3.0.0.0)
68
+ rainbow (>= 2.2.2, < 4.0)
69
+ regexp_parser (>= 1.8, < 3.0)
70
+ rexml
71
+ rubocop-ast (>= 1.12.0, < 2.0)
72
+ ruby-progressbar (~> 1.7)
73
+ unicode-display_width (>= 1.4.0, < 3.0)
74
+ rubocop-ast (1.12.0)
75
+ parser (>= 3.0.1.1)
76
+ ruby-progressbar (1.11.0)
77
+ simplecov (0.17.1)
45
78
  docile (~> 1.1)
46
- simplecov-html (~> 0.11)
47
- simplecov-html (0.12.2)
79
+ json (>= 1.8, < 3)
80
+ simplecov-html (~> 0.10.0)
81
+ simplecov-html (0.10.2)
48
82
  thor (1.0.1)
83
+ tty-color (0.6.0)
84
+ tty-cursor (0.7.1)
85
+ tty-editor (0.7.0)
86
+ tty-prompt (~> 0.22)
87
+ tty-prompt (0.23.1)
88
+ pastel (~> 0.8)
89
+ tty-reader (~> 0.8)
90
+ tty-reader (0.9.0)
91
+ tty-cursor (~> 0.7)
92
+ tty-screen (~> 0.8)
93
+ wisper (~> 2.0)
94
+ tty-screen (0.8.1)
95
+ unicode-display_width (2.1.0)
49
96
  vseries (0.2.0)
97
+ wisper (2.0.1)
50
98
 
51
99
  PLATFORMS
52
100
  ruby
@@ -54,10 +102,12 @@ PLATFORMS
54
102
  DEPENDENCIES
55
103
  bundler (~> 2.0)
56
104
  byebug
105
+ pry-byebug (~> 3.9.0)
57
106
  rake (~> 13.0)
58
107
  rspec (~> 3.0)
59
- simplecov (~> 0.18.0)
108
+ rubocop
109
+ simplecov (~> 0.17.0)
60
110
  verto!
61
111
 
62
112
  BUNDLED WITH
63
- 2.1.4
113
+ 2.2.24
data/README.md CHANGED
@@ -1,61 +1,17 @@
1
1
  # Verto
2
- [![Build Status](https://travis-ci.org/catks/verto.svg?branch=master)](https://travis-ci.org/catks/verto)
2
+ ![Build](https://github.com/catks/verto/workflows/Ruby/badge.svg)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/b699d13df33e33bbe2d0/maintainability)](https://codeclimate.com/github/catks/verto/maintainability)
4
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/39e7c6f1f5f57b8555ed/test_coverage)](https://codeclimate.com/github/catks/verto/test_coverage)\
5
5
  Verto is a CLI to generate git tags (following the [Semantic Versioning](https://semver.org/) system)
6
6
 
7
- ## Installation
8
-
9
-
10
- ### Ruby Gem
11
- Verto is distributed as a ruby gem, to install run:
12
-
13
- ```shell
14
- $ gem install verto
15
- ```
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
-
27
-
28
- ### Docker Image
29
-
30
- You don't need to install verto in your machine, you can run verto via the docker image
31
-
32
- To use verto in the same way that you use any other cli, you can set an alias in your `.bashrc`, `.zshrc`, etc:
33
-
34
- ```shell
35
- alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.9.0'
36
- ```
37
-
38
- If you want you can share your git configuration and known_hosts with:
39
-
40
- ```shell
41
- alias verto='docker run -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -it catks/verto:0.9.0'
42
-
43
- ```
44
-
45
- You can also use your ssh keys, know_hosts and git config with verto container (for git push):
46
-
47
- ```shell
48
- 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.9.0'
49
-
50
- ```
51
-
52
- Now you can run any verto command! :)
53
7
 
54
8
  ## Usage
55
9
 
56
10
  You can run verto right out of the box without any configuration:
57
11
 
58
12
  ```shell
13
+ verto tag init # Creates the initial tag (0.1.0) if the repository doesn't have tags
14
+
59
15
  verto tag up --patch # Creates a new tag increasing the patch number
60
16
  verto tag up --minor # Creates a new tag increasing the minor number
61
17
  verto tag up --major # Creates a new tag increasing the major number
@@ -70,8 +26,8 @@ You can run verto right out of the box without any configuration:
70
26
 
71
27
  # You can filter the tags you want to consider for increasing
72
28
 
73
- verto tag up --patch --filter=release_only # For Realease Tags Only
74
- verto tag up --patch --filter=pre_release_only # For Pre Realease Tags Only
29
+ verto tag up --patch --filter=release_only # For Release Tags Only
30
+ verto tag up --patch --filter=pre_release_only # For Pre Release Tags Only
75
31
  verto tag up --patch --filter='\d+\.\d+\.\d+-alpha.*' # Custom Regexp!
76
32
 
77
33
  ```
@@ -85,13 +41,30 @@ You can create a new Vertofile with `verto init` or following the next example:
85
41
  ```ruby
86
42
  # Vertofile
87
43
 
88
- verto_version '0.9.0'
44
+ verto_version '0.12.0'
89
45
 
90
46
  config {
91
47
  # version.prefix = 'v' # Adds a version_prefix
92
- # pre_release.default_identifier = 'alpha' } # Defaults to 'rc'
48
+ # pre_release.default_identifier = 'alpha' # Defaults to 'rc'
93
49
  git.pull_before_tag_creation = true # Pull Changes before tag creation
50
+ git.fetch_before_tag_creation = true # Fetch Branches and Tags before tag creation
94
51
  git.push_after_tag_creation = true # Push changes after tag creation
52
+
53
+ ## CHANGELOG FORMAT
54
+ ## Verto uses Mustache template rendering to render changelog updates, the default value is:
55
+ ##
56
+ ## ## {{new_version}} - #{Time.now.strftime('%d/%m/%Y')}
57
+ ## {{#version_changes}}
58
+ ## * {{.}}
59
+ ## {{/version_changes}}
60
+ ##
61
+ ## A custom format can be specified, eg:
62
+ # changelog.format = <<~CHANGELOG
63
+ # ## {{new_version}}
64
+ # {{#version_changes}}
65
+ # * {{.}}
66
+ # {{/version_changes}}
67
+ # CHANGELOG
95
68
  }
96
69
 
97
70
  context(branch('master')) {
@@ -100,20 +73,11 @@ context(branch('master')) {
100
73
  }
101
74
 
102
75
  before_tag_creation {
103
- version_changes = sh(
104
- %q#git log --oneline --decorate | grep -B 100 -m 1 "tag:" | grep "pull request" | awk '{print $1}' | xargs git show --format='%b' | grep -v Approved | grep -v "^$" | grep -E "^[[:space:]]*\[.*\]" | sed 's/^[[:space:]]*\(.*\)/ * \1/'#, output: false
105
- ).output
106
-
107
- puts "---------------------------"
108
- version_changes = "## #{new_version} - #{Time.now.strftime('%d/%m/%Y')}\n#{version_changes}\n"
109
- exit unless confirm("Create new Realease?\n" \
110
- "---------------------------\n" \
111
- "#{version_changes}" \
112
- "---------------------------\n"
76
+ update_changelog(
77
+ with: :merged_pull_requests_with_bracketed_labels, # Optional, defines the strategy to retrive the changes, default: :merged_pull_requests_with_bracketed_labels
78
+ confirmation: true, # Optional, asks for confirmation before updating the changelog, default: true
79
+ filename: 'CHANGELOG.md' # Optional, defines the filename of the CHANGELOG file, default: 'CHANGELOG.md'
113
80
  )
114
-
115
- # CHANGELOG
116
- file('CHANGELOG.md').prepend(version_changes)
117
81
  git('add CHANGELOG.md')
118
82
 
119
83
  # Uncomment to update the version in other files, like package.json
@@ -153,7 +117,53 @@ context(!branch('master', 'staging')) {
153
117
 
154
118
  #### Verto Syntax
155
119
 
156
- ...TODO...
120
+ [See more details here](VERTO_SYNTAX.md)
121
+
122
+ ## Installation
123
+
124
+ ### Ruby Gem
125
+ Verto is distributed as a ruby gem, to install run:
126
+
127
+ ```shell
128
+ $ gem install verto
129
+ ```
130
+
131
+ ### With Rbenv
132
+
133
+ If you use Rbenv you can install verto only once and create a alias in your .basrc, .zshrc, etc:
134
+
135
+ #### ZSH
136
+ $ RBENV_VERSION=$(rbenv global) gem install verto && echo "alias verto='RBENV_VERSION=$(rbenv global) verto'" >> ~/.zshrc
137
+
138
+ #### Bash
139
+ $ RBENV_VERSION=$(rbenv global) gem install verto && echo "alias verto='RBENV_VERSION=$(rbenv global) verto'" >> ~/.bashrc
140
+
141
+
142
+ ### Docker Image
143
+
144
+ You don't need to install verto in your machine, you can run verto via the docker image
145
+
146
+ To use verto in the same way that you use any other cli, you can set an alias in your `.bashrc`, `.zshrc`, etc:
147
+
148
+ ```shell
149
+ alias verto='docker run --rm -v $(pwd):/usr/src/project -it catks/verto:0.12.0'
150
+ ```
151
+
152
+ If you want you can share your git configuration and known_hosts with:
153
+
154
+ ```shell
155
+ alias verto='docker run --rm -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -it catks/verto:0.12.0'
156
+
157
+ ```
158
+
159
+ You can also use your ssh keys, know_hosts and git config with verto container (for git push):
160
+
161
+ ```shell
162
+ alias verto='docker run --rm -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.12.0'
163
+
164
+ ```
165
+
166
+ Now you can run any verto command! :)
157
167
 
158
168
  ## TODO
159
169
 
data/Rakefile CHANGED
@@ -1,11 +1,13 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require_relative "lib/verto"
4
- require_relative "spec/helpers/test_repo.rb"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require_relative 'lib/verto'
6
+ require_relative 'spec/helpers/test_repo'
5
7
 
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
- task :default => :spec
10
+ task default: :spec
9
11
 
10
12
  desc 'Verto REPL'
11
13
  task :console do