-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (32 loc) · 895 Bytes
/
Copy pathRakefile
File metadata and controls
39 lines (32 loc) · 895 Bytes
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
# frozen_string_literal: true
require "rake/testtask"
require "rubocop/rake_task"
require "bundler/gem_tasks"
# Default task: run tests
task default: :test
# Minitest task
Rake::TestTask.new(:test) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/**/*_test.rb"
t.warning = true
t.verbose = true
end
# RuboCop task
RuboCop::RakeTask.new(:rubocop)
# Convenience task to run both linting and tests
desc "Run all checks (RuboCop + Tests)"
task check: %i[rubocop test]
desc "Open an IRB console with the gem loaded"
task :console do
require "irb"
require "active_support/all"
require_relative "lib/rails_outofband_keys"
ARGV.clear
IRB.start
end
desc "Publish a GitHub release for the current version."
task :github_release do
version = RailsOutofbandKeys::VERSION
sh "gh release create v#{version} pkg/rails_outofband_keys-#{version}.gem --generate-notes"
end