Rakefile in git-multi-1.0.6 vs Rakefile in git-multi-1.0.7
- old
+ new
@@ -1,25 +1,21 @@
+# rubocop:disable Style/SymbolArray
# rubocop:disable Style/HashSyntax
require 'bundler/gem_tasks'
-def gemspec
- @gemspec ||= begin
- # rubocop:disable Security/Eval
- eval(File.read('git-multi.gemspec'))
- # rubocop:enable Security/Eval
- end
+task :validate_gemspec do
+ Bundler.load_gemspec('git-multi.gemspec').validate
end
-desc 'Validate the gemspec'
-task :validate do
- gemspec.validate
+task :version => :validate_gemspec do
+ puts Git::Multi::VERSION
end
require 'rubocop/rake_task'
-RuboCop::RakeTask.new
+RuboCop::RakeTask.new(:rubocop)
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
@@ -50,8 +46,9 @@
FileUtils.cp 'git-multi.1', Git::Multi::MAN_PAGE
FileUtils.cp 'git-multi.html', Git::Multi::HTML_PAGE
end
end
-Rake::Task['build'].enhance([:documentation])
+Rake::Task['build'].enhance([:default, :documentation])
# rubocop:enable Style/HashSyntax
+# rubocop:enable Style/SymbolArray