Rakefile in git-multi-1.0.5 vs Rakefile in git-multi-1.0.6
- old
+ new
@@ -13,19 +13,23 @@
desc 'Validate the gemspec'
task :validate do
gemspec.validate
end
+require 'rubocop/rake_task'
+
+RuboCop::RakeTask.new
+
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb']
end
-task :default => :test
+task :default => [:rubocop, :test]
require 'git/multi'
git_workarea = File.join(Git::Multi::WORKAREA, 'git', 'git')
documentation = File.join(git_workarea, 'Documentation')
@@ -39,11 +43,11 @@
File.write(task.name, ERB.new(File.read(task.source)).result)
end
task :documentation => git_asciidoc do
Dir.chdir(documentation) do
- # use git's documentation approach and build system
- %x{ make git-multi.1 git-multi.html }
+ # use git's documentation framework
+ `make git-multi.1 git-multi.html`
FileUtils.cp 'git-multi.1', Git::Multi::MAN_PAGE
FileUtils.cp 'git-multi.html', Git::Multi::HTML_PAGE
end
end