Skip to content

Commit c956866

Browse files
committed
(CONT-237) Clean Rakefile
This commit cleans up the Rakefile. It also adds a new rspec task for acceptance tests.
1 parent 22321ee commit c956866

File tree

1 file changed

+4
-34
lines changed

1 file changed

+4
-34
lines changed

Rakefile

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,13 @@
33
require 'bundler/gem_tasks'
44
require 'rspec/core/rake_task'
55

6-
def gem_present(name)
7-
!Bundler.rubygems.find_name(name).empty?
6+
RSpec::Core::RakeTask.new(:spec) do |t|
7+
t.exclude_pattern = "spec/acceptance/**/*.rb"
88
end
99

10-
RSpec::Core::RakeTask.new(:spec) do |spec|
11-
spec.pattern = FileList['spec/**/*_spec.rb'].exclude('spec/fixtures/**/*_spec.rb')
10+
RSpec::Core::RakeTask.new(:acceptance) do |t|
11+
t.pattern = "spec/acceptance/**/*.rb"
1212
end
1313

1414
require 'yard'
1515
YARD::Rake::YardocTask.new
16-
17-
default_tasks = [:spec]
18-
19-
if gem_present 'rubocop'
20-
require 'rubocop/rake_task'
21-
RuboCop::RakeTask.new
22-
default_tasks.unshift(:rubocop)
23-
end
24-
25-
task default: default_tasks
26-
27-
#### CHANGELOG ####
28-
begin
29-
require 'github_changelog_generator/task'
30-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
31-
require 'puppetlabs_spec_helper/version'
32-
config.since_tag = 'v2.8.0'
33-
config.future_release = "v#{PuppetlabsSpecHelper::VERSION}"
34-
config.header = "# Changelog\n\n" \
35-
"All significant changes to this repo will be summarized in this file.\n"
36-
# config.include_labels = %w[enhancement bug]
37-
config.user = 'puppetlabs'
38-
config.project = 'puppetlabs_spec_helper'
39-
end
40-
rescue LoadError
41-
desc 'Install github_changelog_generator to get access to automatic changelog generation'
42-
task :changelog do
43-
raise 'Install github_changelog_generator to get access to automatic changelog generation'
44-
end
45-
end

0 commit comments

Comments
 (0)