verto 0.10.0 → 0.10.1

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: ec5d303284b7d17001dacb3f3daa72ba1d47601dffb325790e61ec941f2f2b84
4
- data.tar.gz: f078471b8bb4cb5243cfdb5748332a7582a8d26f3da17a19d6b3777757b8a2d0
3
+ metadata.gz: 9185dc3395380b1defa2ec58cc79067e4f94c3fb612067eb7b2f57c422599f85
4
+ data.tar.gz: e2f144854a7acce5c07f32faa407ec11b45f855b0bfa4ceb4fbafb8329a86a4a
5
5
  SHA512:
6
- metadata.gz: 21e6d0f0e89edcb6f0ec6b2892ad0a8c71d81623f602daacc9103b2d51508c570273e05151e0143f2e7915678faa4e598eab10efd369058041bf892112fdc38b
7
- data.tar.gz: 534cc6aecfd85f5e027d0fd6e31dcfe4b41e88c33aedff39b5f66919826005a8bab6ced748fc70471086a9b4eabadf6ebde208b591b2d08b633a482e548730b2
6
+ metadata.gz: 45f95bbbc09c4b64c65071fa24aa1641c0b3180ce06aee785f23a4e02bde95f6c77291e7c00974faba90d861dd107cf95149643af24d99da32c022f5c5050e1c
7
+ data.tar.gz: abe98354760214070d5a3b7422b1f6a1706bae93d4812f1e5913bbfa7901f3d45bf5e8aaed0d21fbe58d6e858d8ec5b4d8e06133d463bfe0cb72c4a9938dbbdc
@@ -0,0 +1,51 @@
1
+ name: Ruby
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-16.04
8
+ strategy:
9
+ matrix:
10
+ ruby: ['2.5', '2.6', '2.7']
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-16.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
+ - run: |
49
+ gem install bundler
50
+ bundle install --jobs 4 --retry 3
51
+ bundle exec rubocop
@@ -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
@@ -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'
@@ -1 +1 @@
1
- 2.6.5
1
+ 2.6.6
@@ -1,3 +1,8 @@
1
+ ## 0.10.1 - 14/01/2021
2
+ * [FIX] UpdateChangelog Versions
3
+ * [TECH] Adds Rubocop
4
+ * [TECH] Github Actions CI
5
+
1
6
  ## 0.10.0 - 14/10/2020
2
7
  * [FEATURE] Adds update_changelog in DSL
3
8
 
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- verto (0.10.0)
4
+ verto (0.10.1)
5
5
  dry-auto_inject (~> 0.7)
6
6
  dry-configurable (~> 0.8)
7
7
  dry-container (~> 0.7)
@@ -12,24 +12,30 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
+ ast (2.4.1)
15
16
  byebug (11.1.1)
16
17
  concurrent-ruby (1.1.7)
17
18
  diff-lcs (1.3)
18
19
  docile (1.3.2)
19
20
  dry-auto_inject (0.7.0)
20
21
  dry-container (>= 0.3.4)
21
- dry-configurable (0.11.6)
22
+ dry-configurable (0.12.0)
22
23
  concurrent-ruby (~> 1.0)
23
- dry-core (~> 0.4, >= 0.4.7)
24
- dry-equalizer (~> 0.2)
24
+ dry-core (~> 0.5, >= 0.5.0)
25
25
  dry-container (0.7.2)
26
26
  concurrent-ruby (~> 1.0)
27
27
  dry-configurable (~> 0.1, >= 0.1.3)
28
- dry-core (0.4.9)
28
+ dry-core (0.5.0)
29
29
  concurrent-ruby (~> 1.0)
30
- dry-equalizer (0.3.0)
30
+ json (2.3.1)
31
31
  mustache (1.1.1)
32
+ parallel (1.19.2)
33
+ parser (2.7.2.0)
34
+ ast (~> 2.4.1)
35
+ rainbow (3.0.0)
32
36
  rake (13.0.1)
37
+ regexp_parser (1.8.2)
38
+ rexml (3.2.4)
33
39
  rspec (3.9.0)
34
40
  rspec-core (~> 3.9.0)
35
41
  rspec-expectations (~> 3.9.0)
@@ -43,11 +49,25 @@ GEM
43
49
  diff-lcs (>= 1.2.0, < 2.0)
44
50
  rspec-support (~> 3.9.0)
45
51
  rspec-support (3.9.2)
46
- simplecov (0.18.5)
52
+ rubocop (0.93.1)
53
+ parallel (~> 1.10)
54
+ parser (>= 2.7.1.5)
55
+ rainbow (>= 2.2.2, < 4.0)
56
+ regexp_parser (>= 1.8)
57
+ rexml
58
+ rubocop-ast (>= 0.6.0)
59
+ ruby-progressbar (~> 1.7)
60
+ unicode-display_width (>= 1.4.0, < 2.0)
61
+ rubocop-ast (0.8.0)
62
+ parser (>= 2.7.1.5)
63
+ ruby-progressbar (1.10.1)
64
+ simplecov (0.17.1)
47
65
  docile (~> 1.1)
48
- simplecov-html (~> 0.11)
49
- simplecov-html (0.12.2)
66
+ json (>= 1.8, < 3)
67
+ simplecov-html (~> 0.10.0)
68
+ simplecov-html (0.10.2)
50
69
  thor (1.0.1)
70
+ unicode-display_width (1.7.0)
51
71
  vseries (0.2.0)
52
72
 
53
73
  PLATFORMS
@@ -58,7 +78,8 @@ DEPENDENCIES
58
78
  byebug
59
79
  rake (~> 13.0)
60
80
  rspec (~> 3.0)
61
- simplecov (~> 0.18.0)
81
+ rubocop
82
+ simplecov (~> 0.17.0)
62
83
  verto!
63
84
 
64
85
  BUNDLED WITH
data/README.md CHANGED
@@ -1,5 +1,5 @@
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)
@@ -32,20 +32,20 @@ You don't need to install verto in your machine, you can run verto via the docke
32
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
33
 
34
34
  ```shell
35
- alias verto='docker run -v $(pwd):/usr/src/project -it catks/verto:0.10.0'
35
+ alias verto='docker run --rm -v $(pwd):/usr/src/project -it catks/verto:0.10.1'
36
36
  ```
37
37
 
38
38
  If you want you can share your git configuration and known_hosts with:
39
39
 
40
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.10.0'
41
+ 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.10.1'
42
42
 
43
43
  ```
44
44
 
45
45
  You can also use your ssh keys, know_hosts and git config with verto container (for git push):
46
46
 
47
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.10.0'
48
+ 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.10.1'
49
49
 
50
50
  ```
51
51
 
@@ -85,7 +85,7 @@ You can create a new Vertofile with `verto init` or following the next example:
85
85
  ```ruby
86
86
  # Vertofile
87
87
 
88
- verto_version '0.10.0'
88
+ verto_version '0.10.1'
89
89
 
90
90
  config {
91
91
  # version.prefix = 'v' # Adds a version_prefix
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.rb'
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
data/Vertofile CHANGED
@@ -1,4 +1,4 @@
1
- verto_version '0.10.0'
1
+ verto_version '0.10.1'
2
2
 
3
3
  config {
4
4
  version.prefix = 'v' # Adds a version_prefix
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "verto"
4
+ require 'bundler/setup'
5
+ require 'verto'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "verto"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
data/djin.yml CHANGED
@@ -1,8 +1,37 @@
1
- djin_version: '0.6.0'
1
+ djin_version: '0.10.0'
2
2
 
3
3
  tasks:
4
+ run:
5
+ local:
6
+ run:
7
+ - {{args}}
8
+
9
+ set_verto_version:
10
+ local:
11
+ run:
12
+ - VERTO_BUILD_VERSION=$(cat lib/verto/version.rb | grep -ohE '\d+\.\d+\.\d+')
13
+
14
+ tag_up:
15
+ docker:
16
+ image: "catks/verto:0.10.0"
17
+ run:
18
+ commands:
19
+ - "verto tag up {{args}}"
20
+ options: |
21
+ -v ~/.gitconfig:/etc/gitconfig -v $(pwd):/usr/src/project \
22
+ -v $HOME/.ssh/known_hosts:/root/.ssh/known_hosts -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa \
23
+ -e SSH_PRIVATE_KEY=/root/.ssh/id_rsa \
24
+ --entrypoint='' \
25
+ depends_on:
26
+ - set_verto_version
27
+
4
28
  release:
5
29
  local:
6
30
  run:
7
- - verto tag up {{args}}
8
31
  - bundle exec rake release
32
+ - docker build . -t verto
33
+ - docker tag verto catks/verto:$VERTO_BUILD_VERSION
34
+ - docker push catks/verto:$VERTO_BUILD_VERSION
35
+ depends_on:
36
+ - set_verto_version
37
+ - tag_up
data/exe/verto CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
- Signal.trap("INT") { exit 2 }
2
+ # frozen_string_literal: true
3
+
4
+ Signal.trap('INT') { exit 2 }
3
5
 
4
6
  require_relative '../lib/verto'
5
7
 
6
8
  vertofile_path = ENV['VERTOFILE_PATH'] || Pathname.new(Dir.pwd).join('Vertofile').to_s
7
9
  begin
8
- Verto::DSL.load_file(vertofile_path) if File.exists?(vertofile_path)
10
+ Verto::DSL.load_file(vertofile_path) if File.exist?(vertofile_path)
9
11
 
10
12
  Verto::MainCommand.start(ARGV)
11
13
 
12
14
  # TODO: Improve error Message Handling
13
- rescue Verto::ExitError => ex
14
- Verto.stderr.puts ex.message
15
+ rescue Verto::ExitError => e
16
+ Verto.stderr.puts e.message
15
17
  Verto.stderr.puts 'Exiting Verto...'
16
18
  exit 1
17
19
  end
@@ -1,13 +1,15 @@
1
- require "thor"
2
- require "dry-container"
3
- require "dry-configurable"
4
- require "dry-auto_inject"
5
- require "vseries"
6
- require "mustache"
7
- require "pathname"
1
+ # frozen_string_literal: true
8
2
 
9
- require "verto/version"
10
- require "verto/utils/command_options"
3
+ require 'thor'
4
+ require 'dry-container'
5
+ require 'dry-configurable'
6
+ require 'dry-auto_inject'
7
+ require 'vseries'
8
+ require 'mustache'
9
+ require 'pathname'
10
+
11
+ require 'verto/version'
12
+ require 'verto/utils/command_options'
11
13
 
12
14
  module Verto
13
15
  extend Dry::Configurable
@@ -42,9 +44,9 @@ module Verto
42
44
  setting :format,
43
45
  <<~CHANGELOG
44
46
  ## {{new_version}} - #{Time.now.strftime('%d/%m/%Y')}
45
- {{#version_changes}}
47
+ {{#version_changes}}
46
48
  * {{.}}
47
- {{/version_changes}}
49
+ {{/version_changes}}
48
50
  CHANGELOG
49
51
  end
50
52
 
@@ -65,7 +67,9 @@ module Verto
65
67
  def self.container
66
68
  @container ||= Dry::Container.new.tap do |container|
67
69
  container.register('system_command_executor') { SystemCommandExecutor.new }
68
- container.register('system_command_executor_without_output') { SystemCommandExecutor.new(stdout: nil, stderr: nil) }
70
+ container.register('system_command_executor_without_output') do
71
+ SystemCommandExecutor.new(stdout: nil, stderr: nil)
72
+ end
69
73
  container.register('cli_helpers') { CliHelpers }
70
74
 
71
75
  container.register('tag_repository') { TagRepository.new }
@@ -112,20 +116,20 @@ module Verto
112
116
  end
113
117
  end
114
118
 
115
- require "verto/utils/semantic_version.rb"
116
- require "verto/utils/system_command_executor"
117
- require "verto/utils/tag_filter"
118
- require "verto/utils/template"
119
- require "verto/utils/cli_helpers"
120
- require "verto/utils/strict_hash"
121
- require "verto/dsl"
122
- require "verto/dsl/syntax"
123
- require "verto/dsl/interpreter"
124
- require "verto/dsl/hook"
125
- require "verto/dsl/file"
126
- require "verto/dsl/update_changelog"
127
- require "verto/dsl/built_in_hooks"
128
- require "verto/commands/base_command"
129
- require "verto/commands/tag_command"
130
- require "verto/commands/main_command"
131
- require "verto/repositories/tag_repository"
119
+ require 'verto/utils/semantic_version.rb'
120
+ require 'verto/utils/system_command_executor'
121
+ require 'verto/utils/tag_filter'
122
+ require 'verto/utils/template'
123
+ require 'verto/utils/cli_helpers'
124
+ require 'verto/utils/strict_hash'
125
+ require 'verto/dsl'
126
+ require 'verto/dsl/syntax'
127
+ require 'verto/dsl/interpreter'
128
+ require 'verto/dsl/hook'
129
+ require 'verto/dsl/file'
130
+ require 'verto/dsl/update_changelog'
131
+ require 'verto/dsl/built_in_hooks'
132
+ require 'verto/commands/base_command'
133
+ require 'verto/commands/tag_command'
134
+ require 'verto/commands/main_command'
135
+ require 'verto/repositories/tag_repository'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class BaseCommand < Thor
3
5
  def self.exit_on_failure?
@@ -23,11 +25,11 @@ module Verto
23
25
 
24
26
  moments_to_call.each do |moment|
25
27
  Verto.config.hooks
26
- .select { |hook| hook.moment == moment.to_sym }
27
- .each do |hook|
28
- Verto.current_moment = hook.moment
29
- hook.call(with_attributes: with_attributes)
30
- end
28
+ .select { |hook| hook.moment == moment.to_sym }
29
+ .each do |hook|
30
+ Verto.current_moment = hook.moment
31
+ hook.call(with_attributes: with_attributes)
32
+ end
31
33
  end
32
34
  end
33
35
  end
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class MainCommand < BaseCommand
3
- desc "tag SUBCOMMAND ...ARGS", "manage the repository tags"
5
+ desc 'tag SUBCOMMAND ...ARGS', 'manage the repository tags'
4
6
  subcommand 'tag', Verto::TagCommand
5
7
 
6
- desc "init", "Initialize a Vertofile in your repository"
8
+ desc 'init', 'Initialize a Vertofile in your repository'
7
9
 
8
10
  option :path, type: :string, default: nil
9
11
  def init
@@ -14,7 +16,7 @@ module Verto
14
16
  Template.render('Vertofile', to: path)
15
17
  end
16
18
 
17
- desc "version", "Shows Verto version"
19
+ desc 'version', 'Shows Verto version'
18
20
 
19
21
  def version
20
22
  Verto.stdout.puts Verto::VERSION
@@ -23,12 +25,14 @@ module Verto
23
25
  private
24
26
 
25
27
  def validate_current_vertofile!(path)
28
+ return unless Pathname.new(path).join('Vertofile').exist?
29
+
26
30
  command_error!(
27
31
  <<~ERROR
28
- Project already have a Vertofile.
29
- If you want to generate a new with verto init, delete the current one with: `rm Vertofile`
32
+ Project already have a Vertofile.
33
+ If you want to generate a new with verto init, delete the current one with: `rm Vertofile`
30
34
  ERROR
31
- ) if Pathname.new(path).join('Vertofile').exist?
35
+ )
32
36
  end
33
37
  end
34
38
  end
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class TagCommand < BaseCommand
3
- desc "up", "Create's a new tag"
5
+ desc 'up', "Create's a new tag"
4
6
 
5
7
  option :major, type: :boolean, default: false
6
8
  option :minor, type: :boolean, default: false
@@ -13,7 +15,7 @@ module Verto
13
15
  def up
14
16
  load_config_hooks!
15
17
 
16
- call_hooks(%i[before before_tag_up], with_attributes: { command_options: options} )
18
+ call_hooks(%i[before before_tag_up], with_attributes: { command_options: options })
17
19
 
18
20
  validate_version_option_presence!
19
21
 
@@ -27,7 +29,7 @@ module Verto
27
29
 
28
30
  validate_new_version!(new_version, latest_version)
29
31
 
30
- call_hooks(:before_tag_creation, with_attributes: { new_version: new_version } )
32
+ call_hooks(:before_tag_creation, with_attributes: { new_version: new_version })
31
33
 
32
34
  stderr.puts "Creating Tag #{version_prefix}#{new_version}..."
33
35
  tag_repository.create!("#{version_prefix}#{new_version}")
@@ -42,7 +44,7 @@ module Verto
42
44
  include Verto.import['tag_repository']
43
45
 
44
46
  def up_version(version, options)
45
- up_options = options.select { |_, value| value == true }.keys.map(&:to_sym) & [:major, :minor, :patch]
47
+ up_options = options.select { |_, value| value == true }.keys.map(&:to_sym) & %i[major minor patch]
46
48
  up_option = up_options.min
47
49
 
48
50
  new_version = version.up(up_option)
@@ -50,12 +52,12 @@ module Verto
50
52
  if options[:pre_release]
51
53
  identifier = pre_release_configured? ? options[:pre_release] : version.pre_release.name || default_identifier
52
54
  new_version = new_version.with_pre_release(identifier)
53
- new_version = new_version.up(:pre_release) if new_version.pre_release.name == version.pre_release.name && new_version == version
55
+ if new_version.pre_release.name == version.pre_release.name && new_version == version
56
+ new_version = new_version.up(:pre_release)
57
+ end
54
58
  end
55
59
 
56
- if options[:release]
57
- new_version = new_version.release_version
58
- end
60
+ new_version = new_version.release_version if options[:release]
59
61
 
60
62
  new_version
61
63
  end
@@ -65,38 +67,44 @@ module Verto
65
67
  end
66
68
 
67
69
  def validate_latest_tag!(latest_tag)
70
+ return if latest_tag
71
+
68
72
  command_error!(
69
73
  <<~TEXT
70
74
  Project doesn't have a previous tag version, create a new tag with git.
71
75
  eg: `git tag #{version_prefix}0.1.0`
72
76
  TEXT
73
- ) unless latest_tag
77
+ )
74
78
  end
75
79
 
76
80
  def validate_new_version!(new_version, latest_version)
81
+ return unless new_version < latest_version && Verto.config.version.validations.new_version_must_be_bigger
82
+
77
83
  command_error!(
78
84
  <<~TEXT
79
- New version(#{new_version}) can't be equal or lower than latest version(#{latest_version})
80
- run up --pre-release with --patch, --minor or --major (eg: verto tag up --patch --pre-release=rc),
81
- add filters (eg: verto tag up --pre-release --filter=pre_release_only)
82
- or disable tag validation in Vertofile with config.version.validations.new_version_must_be_bigger = false
85
+ New version(#{new_version}) can't be equal or lower than latest version(#{latest_version})
86
+ run up --pre-release with --patch, --minor or --major (eg: verto tag up --patch --pre-release=rc),
87
+ add filters (eg: verto tag up --pre-release --filter=pre_release_only)
88
+ or disable tag validation in Vertofile with config.version.validations.new_version_must_be_bigger = false
83
89
  TEXT
84
- ) if new_version < latest_version && Verto.config.version.validations.new_version_must_be_bigger
90
+ )
85
91
  end
86
92
 
87
93
  def validate_version_option_presence!
94
+ return if options[:major] || options[:minor] || options[:patch] || options[:pre_release] || options[:release]
95
+
88
96
  command_error!(
89
97
  <<~TEXT
90
- You must specify the version number to be increased, use the some of the options(eg: --major, --minor, --patch, --pre_release=rc)
91
- or configure a Vertofile to specify a default option for current context, eg:
98
+ You must specify the version number to be increased, use the some of the options(eg: --major, --minor, --patch, --pre_release=rc)
99
+ or configure a Vertofile to specify a default option for current context, eg:
92
100
 
93
- context('qa') {
94
- before_command('tag_up') {
95
- command_options.add(pre_release: 'rc')
101
+ context('qa') {
102
+ before_command('tag_up') {
103
+ command_options.add(pre_release: 'rc')
104
+ }
96
105
  }
97
- }
98
106
  TEXT
99
- ) unless options[:major] || options[:minor] || options[:patch] || options[:pre_release] || options[:release]
107
+ )
100
108
  end
101
109
 
102
110
  def load_filter
@@ -108,7 +116,9 @@ module Verto
108
116
  end
109
117
 
110
118
  def load_config_hooks!
111
- Verto.config.hooks.prepend Verto::DSL::BuiltInHooks::GitPullCurrentBranch if Verto.config.git.pull_before_tag_creation
119
+ if Verto.config.git.pull_before_tag_creation
120
+ Verto.config.hooks.prepend Verto::DSL::BuiltInHooks::GitPullCurrentBranch
121
+ end
112
122
  Verto.config.hooks << Verto::DSL::BuiltInHooks::GitPushCurrentBranch if Verto.config.git.push_after_tag_creation
113
123
  end
114
124
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  def self.load_file(filepath)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  module BuiltInHooks
@@ -6,7 +8,7 @@ module Verto
6
8
  end
7
9
 
8
10
  GitPushTags = DSL::Hook.new(moment: :after) do
9
- git!("push --tags")
11
+ git!('push --tags')
10
12
  end
11
13
 
12
14
  GitPushCurrentBranchCommits = DSL::Hook.new(moment: :after) do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  class File
@@ -36,8 +38,8 @@ module Verto
36
38
  end
37
39
  end
38
40
 
39
- alias_method :gsub, :replace_all
40
- alias_method :sub, :replace
41
+ alias gsub replace_all
42
+ alias sub replace
41
43
 
42
44
  private
43
45
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  class Hook
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  class Interpreter
@@ -6,15 +8,14 @@ module Verto
6
8
  # TODO: Wrap stacktrace
7
9
  Error = Class.new(Verto::ExitError)
8
10
 
9
- def evaluate(vertofile_content=nil, attributes: {}, &block)
11
+ def evaluate(vertofile_content = nil, attributes: {}, &block)
10
12
  with_attributes(attributes) do
11
- vertofile_content ? instance_eval(vertofile_content) : instance_eval(&block)
13
+ vertofile_content ? instance_eval(vertofile_content) : instance_eval(&block)
12
14
  end
15
+ rescue StandardError => e
16
+ raise e if e.is_a?(Verto::ExitError)
13
17
 
14
- rescue StandardError => error
15
- raise error if error.is_a?(Verto::ExitError)
16
-
17
- raise Error, error.message
18
+ raise Error, e.message
18
19
  end
19
20
 
20
21
  private
@@ -27,7 +28,7 @@ module Verto
27
28
 
28
29
  block.call
29
30
 
30
- attributes.each do |key, value|
31
+ attributes.each do |key, _value|
31
32
  instance_variable_set("@#{key}", nil)
32
33
  singleton_class.remove_method(key)
33
34
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  module Syntax
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  module DSL
3
5
  class UpdateChangelog
@@ -10,8 +12,8 @@ module Verto
10
12
  {
11
13
  merged_pull_requests_with_bracketed_labels: lambda do |executor|
12
14
  executor.run(
13
- %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:]]*\[.*\]"#
14
- ).output.split('\n').map(&:strip)
15
+ %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:]]*\[.*\]")
16
+ ).output.split("\n").map(&:strip)
15
17
  end
16
18
  },
17
19
  default_proc: ->(hash, _) { raise InvalidChangelogSource, "Invalid CHANGELOG Source, avaliable options: '#{hash.keys.join(',')}'" }
@@ -33,7 +35,9 @@ module Verto
33
35
  private
34
36
 
35
37
  def verify_file_presence!(filename)
36
- raise Verto::ExitError, "changelog file '#{filename}' doesnt exist" unless Verto.project_path.join(filename).exist?
38
+ return if Verto.project_path.join(filename).exist?
39
+
40
+ raise Verto::ExitError, "changelog file '#{filename}' doesnt exist"
37
41
  end
38
42
 
39
43
  def version_changes(with)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class TagRepository
3
5
  include Verto.import[executor: 'system_command_executor_without_output']
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module CliHelpers
2
4
  class << self
3
5
  def confirm(text)
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class CommandOptions < Thor::CoreExt::HashWithIndifferentAccess
3
- alias_method :add, :merge!
5
+ alias add merge!
4
6
 
5
7
  def except(*keys)
6
- self.reject { |key, v| keys.include?(key) }
8
+ reject { |key, _v| keys.include?(key) }
7
9
  end
8
10
  end
9
11
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class SemanticVersion < Vseries::SemanticVersion
3
5
  DEFAULT_PRE_RELEASE_INITIAL_NUMBER = Verto.config.pre_release.initial_number
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class StrictHash < Hash
2
4
  def initialize(hash, default_proc: nil)
3
5
  super()
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'open3'
2
4
 
3
5
  module Verto
4
6
  class SystemCommandExecutor
5
7
  include Verto.import['project.path', 'stdout', 'stderr']
6
8
 
7
- class Result < Struct.new(:output, :error, :result)
9
+ Result = Struct.new(:output, :error, :result) do
8
10
  def success?
9
11
  result.success?
10
12
  end
@@ -16,7 +18,7 @@ module Verto
16
18
  Error = Class.new(StandardError)
17
19
 
18
20
  def run(command)
19
- stderr.puts running_log(command, path) if stderr
21
+ stderr&.puts running_log(command, path)
20
22
 
21
23
  Open3.popen3(command, chdir: path.to_s) do |_, stdout, stderr, wait_thread|
22
24
  @output = stdout.read
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module TagFilter
2
- REALEASE_ONLY = /\d+\.\d+\.\d+$/
3
- PRE_REALEASE_ONLY = /\d+\.\d+\.\d+-.*\d+/
4
+ REALEASE_ONLY = /\d+\.\d+\.\d+$/.freeze
5
+ PRE_REALEASE_ONLY = /\d+\.\d+\.\d+-.*\d+/.freeze
4
6
 
5
7
  FILTERS = {
6
8
  release_only: REALEASE_ONLY,
7
9
  pre_release_only: PRE_REALEASE_ONLY,
8
10
  all: nil
9
- }
11
+ }.freeze
10
12
 
11
13
  def self.for(tag_key)
12
14
  FILTERS[tag_key.to_sym] if tag_key
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
4
  class Template
3
5
  def self.render(template_name, to:)
@@ -1,4 +1,4 @@
1
- verto_version '0.10.0'
1
+ verto_version '0.10.1'
2
2
 
3
3
  config {
4
4
  # version.prefix = 'v' # Adds a version_prefix
@@ -21,7 +21,7 @@ config {
21
21
  # {{#version_changes}}
22
22
  # * {{.}}
23
23
  # {{/version_changes}}
24
- # CHANGELOG}
24
+ # CHANGELOG
25
25
  }
26
26
 
27
27
  context(branch('master')) {
@@ -29,7 +29,7 @@ context(branch('master')) {
29
29
  command_options.add(filter: 'release_only')
30
30
  }
31
31
 
32
- before_tag_creation{
32
+ before_tag_creation {
33
33
  # Uncomment to update CHANGELOG file
34
34
  # update_changelog(with: :merged_pull_requests_with_bracketed_labels,
35
35
  # confirmation: true,
@@ -64,6 +64,6 @@ context(branch('master')) {
64
64
 
65
65
  # Uncomment to block tag creation in other branchs
66
66
  #context(!branch('master', 'staging')) {
67
- # error "Tags only can be created in master or staging branch"
67
+ # error 'Tags only can be created in master or staging branch'
68
68
  # exit
69
69
  #}
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Verto
2
- VERSION = "0.10.0"
4
+ VERSION = '0.10.1'
3
5
  end
@@ -1,41 +1,44 @@
1
- lib = File.expand_path("lib", __dir__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "verto/version"
5
+ require 'verto/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = "verto"
8
+ spec.name = 'verto'
7
9
  spec.version = Verto::VERSION
8
- spec.authors = ["Carlos Atkinson"]
9
- spec.email = ["carlos.atks@gmail.com"]
10
-
11
- spec.summary = %q{Verto helps you to versionate your project}
12
- spec.homepage = "https://github.com/catks/verto"
13
- spec.license = "MIT"
10
+ spec.authors = ['Carlos Atkinson']
11
+ spec.email = ['carlos.atks@gmail.com']
14
12
 
13
+ spec.summary = 'Verto helps you to versionate your project'
14
+ spec.homepage = 'https://github.com/catks/verto'
15
+ spec.license = 'MIT'
15
16
 
16
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/catks/verto"
18
- spec.metadata["changelog_uri"] = "https://github.com/catks/verto/blob/master/CHANGELOG.md"
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/catks/verto'
19
+ spec.metadata['changelog_uri'] = 'https://github.com/catks/verto/blob/master/CHANGELOG.md'
19
20
 
20
21
  # Specify which files should be added to the gem when it is released.
21
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
25
  end
25
- spec.bindir = "exe"
26
+ spec.bindir = 'exe'
26
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
28
+ spec.require_paths = ['lib']
29
+ spec.required_ruby_version = '~> 2.5'
28
30
 
29
- spec.add_dependency "thor", "~> 1.0.1"
30
- spec.add_dependency "dry-configurable", "~> 0.8"
31
- spec.add_dependency "dry-container", "~> 0.7"
32
- spec.add_dependency "dry-auto_inject", "~> 0.7"
33
- spec.add_dependency "vseries", "~> 0.2"
34
- spec.add_dependency "mustache", "~> 1.1.1"
31
+ spec.add_dependency 'dry-auto_inject', '~> 0.7'
32
+ spec.add_dependency 'dry-configurable', '~> 0.8'
33
+ spec.add_dependency 'dry-container', '~> 0.7'
34
+ spec.add_dependency 'mustache', '~> 1.1.1'
35
+ spec.add_dependency 'thor', '~> 1.0.1'
36
+ spec.add_dependency 'vseries', '~> 0.2'
35
37
 
36
- spec.add_development_dependency "byebug"
37
- spec.add_development_dependency "bundler", "~> 2.0"
38
- spec.add_development_dependency "rake", "~> 13.0"
39
- spec.add_development_dependency "rspec", "~> 3.0"
40
- spec.add_development_dependency "simplecov", "~> 0.18.0"
38
+ spec.add_development_dependency 'bundler', '~> 2.0'
39
+ spec.add_development_dependency 'byebug'
40
+ spec.add_development_dependency 'rake', '~> 13.0'
41
+ spec.add_development_dependency 'rspec', '~> 3.0'
42
+ spec.add_development_dependency 'rubocop'
43
+ spec.add_development_dependency 'simplecov', '~> 0.17.0'
41
44
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.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: 2021-01-11 00:00:00.000000000 Z
11
+ date: 2021-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: thor
14
+ name: dry-auto_inject
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.1
19
+ version: '0.7'
20
20
  type: :runtime
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: 1.0.1
26
+ version: '0.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-configurable
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +53,33 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.7'
55
55
  - !ruby/object:Gem::Dependency
56
- name: dry-auto_inject
56
+ name: mustache
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ version: 1.1.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.7'
68
+ version: 1.1.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.1
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: vseries
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -81,19 +95,19 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0.2'
83
97
  - !ruby/object:Gem::Dependency
84
- name: mustache
98
+ name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: 1.1.1
90
- type: :runtime
103
+ version: '2.0'
104
+ type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 1.1.1
110
+ version: '2.0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: byebug
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -109,61 +123,61 @@ dependencies:
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
- name: bundler
126
+ name: rake
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '2.0'
131
+ version: '13.0'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '2.0'
138
+ version: '13.0'
125
139
  - !ruby/object:Gem::Dependency
126
- name: rake
140
+ name: rspec
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: '13.0'
145
+ version: '3.0'
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: '13.0'
152
+ version: '3.0'
139
153
  - !ruby/object:Gem::Dependency
140
- name: rspec
154
+ name: rubocop
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - "~>"
157
+ - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: '3.0'
159
+ version: '0'
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - "~>"
164
+ - - ">="
151
165
  - !ruby/object:Gem::Version
152
- version: '3.0'
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: simplecov
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - "~>"
158
172
  - !ruby/object:Gem::Version
159
- version: 0.18.0
173
+ version: 0.17.0
160
174
  type: :development
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - "~>"
165
179
  - !ruby/object:Gem::Version
166
- version: 0.18.0
180
+ version: 0.17.0
167
181
  description:
168
182
  email:
169
183
  - carlos.atks@gmail.com
@@ -172,10 +186,12 @@ executables:
172
186
  extensions: []
173
187
  extra_rdoc_files: []
174
188
  files:
189
+ - ".github/workflows/ruby.yml"
175
190
  - ".gitignore"
176
191
  - ".rspec"
192
+ - ".rubocop.yml"
193
+ - ".rubocop_todo.yml"
177
194
  - ".ruby-version"
178
- - ".travis.yml"
179
195
  - CHANGELOG.md
180
196
  - Dockerfile
181
197
  - Gemfile
@@ -224,9 +240,9 @@ require_paths:
224
240
  - lib
225
241
  required_ruby_version: !ruby/object:Gem::Requirement
226
242
  requirements:
227
- - - ">="
243
+ - - "~>"
228
244
  - !ruby/object:Gem::Version
229
- version: '0'
245
+ version: '2.5'
230
246
  required_rubygems_version: !ruby/object:Gem::Requirement
231
247
  requirements:
232
248
  - - ">="
@@ -1,13 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5
5
- - 2.6
6
- - 2.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