Repository navigation
Expand file tree
/
Copy pathRakefile
More file actions
48 lines (37 loc) · 1.29 KB
/
Copy pathRakefile
File metadata and controls
48 lines (37 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# frozen_string_literal: true
require 'rubygems'
require 'bundler'
require 'bundler/gem_tasks'
Bundler.setup :default, :development
if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3') &&
Gem.loaded_specs.key?('ruby-gem-release')
require_relative 'script/release'
SlackRubyClientRelease.workflow.install_tasks
%w[release release:rubygem_push release:source_control_push].each do |name|
Rake::Task[name].clear
desc 'Disabled; releases run through GitHub Actions, see RELEASING.md'
task(name) { abort "#{name} is disabled; releases run through GitHub Actions, see RELEASING.md" }
end
end
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end
desc 'Run RuboCop (Ruby 3.2+).'
task :rubocop do
abort 'RuboCop requires Ruby 3.2 or newer' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.2')
sh 'bundle exec rubocop'
end
desc 'Lint Ruby, Markdown, YAML, and spelling (Ruby 3.2+).'
task lint: :rubocop
task default: :spec
desc 'Run the benchmarks in benchmarks/.'
task :benchmark do
FileList['benchmarks/*.rb'].exclude('benchmarks/support.rb').each do |file|
ruby file
end
end
load 'tasks/git.rake'
load 'tasks/web.rake'
load 'tasks/update.rake'