Skip to content

Commit f313121

Browse files
committed
fix build
1 parent c946d5d commit f313121

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

Rakefile

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,18 @@ RSpec::Core::RakeTask.new(:spec) do |task|
88
task.pattern = 'spec/closure_tree/*_spec.rb'
99
end
1010

11-
task default: [:spec, :test]
11+
task default: %i[spec test]
1212

1313
namespace :spec do
1414
desc 'Run all spec variants'
1515
task :all do
1616
rake = 'bin/rake'
17-
fail unless system("#{rake} spec:generators")
1817

19-
[['', ''], ['db_prefix_', ''], ['', '_db_suffix'], ['abc_', '_123']].each do |prefix, suffix|
18+
[['', ''], ['db_prefix_', ''], ['', '_db_suffix'], %w[abc_ _123]].each do |prefix, suffix|
2019
env = "DB_PREFIX=#{prefix} DB_SUFFIX=#{suffix}"
21-
fail unless system("#{rake} spec #{env}")
20+
raise unless system("#{rake} spec #{env}")
2221
end
2322
end
24-
25-
desc 'Run generator specs'
26-
RSpec::Core::RakeTask.new(:generators) do |task|
27-
task.pattern = 'spec/generators/*_spec.rb'
28-
end
2923
end
3024

3125
Rake::TestTask.new do |t|
@@ -35,13 +29,14 @@ Rake::TestTask.new do |t|
3529
t.verbose = true
3630
end
3731

38-
require 'github_changelog_generator/task'
39-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
40-
config.user = 'ClosureTree'
41-
config.project = 'closure_tree'
42-
config.issues = false
43-
config.future_release = '5.2.0'
44-
config.since_tag = 'v7.4.0'
32+
if RUBY_ENGINE == 'ruby'
33+
require 'github_changelog_generator/task'
34+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
35+
config.user = 'ClosureTree'
36+
config.project = 'closure_tree'
37+
config.issues = false
38+
config.future_release = '5.2.0'
39+
config.since_tag = 'v7.4.0'
40+
end
4541
end
46-
47-
task :default => "spec:all"
42+
task default: 'spec:all'

0 commit comments

Comments
 (0)