forked from funkwerk/gherkin_lint
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
48 lines (40 loc) · 874 Bytes
/
Rakefile
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
require 'rake/testtask'
task default: :build
desc 'Builds the Gem.'
task build: :format
task build: :self_check
task build: :test do
sh 'gem build gherkin_lint.gemspec'
end
desc 'Publishes the Gem'
task :push do
sh 'gem push gherkin_lint-1.1.0.gem'
end
desc 'Checks ruby style'
task :rubocop do
begin
sh 'rubocop'
rescue
puts 'Rubocop failed'
end
end
task test: :rubocop
task test: :language
task :test do
sh 'cucumber --tags ~@skip'
end
task :format do
options = []
options.push '--replace' if ENV['repair']
# TODO: sh "gherkin_format #{options.join ' '} features/*.feature"
end
task :language do
# TODO: sh 'gherkin_language features/*.feature'
end
task :self_check do
disabled_checks = %w[
UnknownVariable
BadScenarioName
]
sh "RUBYLIB=lib ./bin/gherkin_lint --disable #{disabled_checks.join ','} features/*.feature"
end