-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
45 lines (36 loc) · 902 Bytes
/
Rakefile
File metadata and controls
45 lines (36 loc) · 902 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
40
41
42
43
44
45
# frozen_string_literal: true
require 'rake/testtask'
task default: :spec
Rake::TestTask.new(:spec) do |t|
t.pattern = 'spec/*_spec.rb'
t.warning = false
end
namespace :credentials do
require 'yaml'
desc 'Export sample credentials from file to bash'
task :export do
credentials = YAML.load(File.read('config/github_credential.yml'))
puts 'Please run the following in bash:'
puts "export GH_USERNAME=#{credentials[:username]}"
puts "export GH_TOKEN=#{credentials[:token]}"
end
end
desc 'delete cassette fixtures'
task :wipe do
sh 'rm spec/fixtures/cassettes/*.yml' do |ok, _|
puts(ok ? 'Cassettes deleted' : 'No casseettes found')
end
end
namespace :quality do
desc 'run all quality checks'
task all: [:rubocop, :flog, :flay]
task :flog do
sh 'flog lib/'
end
task :flay do
sh 'flay lib/'
end
task :rubocop do
sh 'rubocop'
end
end