Add Rakefile

This commit is contained in:
Sven Weidauer 2022-05-25 20:21:33 +02:00
parent 47a691a8e9
commit 58e1e2402c
4 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
vendor/
.bundle/
pkg/

View file

@ -11,6 +11,7 @@ GEM
parser (3.1.2.0)
ast (~> 2.4.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.4.0)
rexml (3.2.5)
rubocop (1.29.1)
@ -24,6 +25,8 @@ GEM
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0)
parser (>= 3.1.1.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
@ -32,7 +35,9 @@ PLATFORMS
DEPENDENCIES
format-staged!
rake (~> 13.0)
rubocop (~> 1.29)
rubocop-rake (~> 0.6)
BUNDLED WITH
2.1.4

16
Rakefile Normal file
View file

@ -0,0 +1,16 @@
# frozen_string_literal: true
require 'bundler/gem_tasks'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn 'Run `bundle install` to install missing gems'
exit e.status_code
end
require 'rubocop/rake_task'
desc 'Run RuboCop'
RuboCop::RakeTask.new(:lint)

View file

@ -15,9 +15,11 @@ Gem::Specification.new do |s|
s.executables << 'git-format-staged'
s.homepage = 'https://github.com/5sw/format-staged'
s.license = 'MIT'
s.required_ruby_version = '2.7'
s.required_ruby_version = '~> 2.7'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rubocop', '~> 1.29'
s.add_development_dependency 'rubocop-rake', '~> 0.6'
s.metadata = {
'rubygems_mfa_required' => 'true'