Archived
1
0
Fork 0

Unify Rakefile style

This commit is contained in:
Braiden Vasco 2017-07-20 21:25:53 +00:00
parent edc9bc26fb
commit 8459f7c2be

View file

@ -1,28 +1,31 @@
# frozen_string_literal: true
require 'rubygems'
gemspec = Gem::Specification.load('lita-tox.gemspec')
github_user, github_project =
gemspec.homepage.scan(%r{^https://github\.com/([^/]+)/([^/]+)/?$})[0]
require 'bundler/gem_tasks'
task default: %i[spec lint]
GEMSPEC = Gem::Specification.load 'lita-tox.gemspec'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
github_user, github_project =
GEMSPEC.homepage.scan(%r{^https://github\.com/([^/]+)/([^/]+)/?$})[0]
task default: %i[spec lint]
task lint: :rubocop
task fix: 'rubocop:auto_correct'
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
rescue LoadError
nil
end
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
require 'yard'
YARD::Rake::YardocTask.new
rescue LoadError
nil
end
desc 'Generate changelog'
task :changelog, [:token] do |_t, args|