From 9850a6b6107685c6cfc95f0411a5e61e0955bf85 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Wed, 11 Apr 2018 18:03:04 +0200 Subject: introduce rubocop and bump testing ecosystem --- Rakefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index de6ba82..6f792d5 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,18 @@ require 'rake/testtask' gemspec = eval(File.read(Dir['*.gemspec'].first)) file = [gemspec.name, gemspec.version].join('-') + '.gem' +# Integrate Rubocop if available +begin + require 'rubocop/rake_task' + + RuboCop::RakeTask.new + task(:default).prerequisites << task(:rubocop) +rescue LoadError + task :rubocop do + puts 'Install rubocop to run its rake tasks' + end +end + desc 'Validate gemspec' task :gemspec do gemspec.validate -- cgit v1.2.1 From 9b22dfeebd5d5f30a8e15be28a00ff84534e9998 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Wed, 25 Apr 2018 21:14:40 +0300 Subject: only set version when building packege --- Rakefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 6f792d5..25948a2 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ require 'bundler/gem_tasks' require 'rake/testtask' +require_relative 'lib/oxidized/version' gemspec = eval(File.read(Dir['*.gemspec'].first)) file = [gemspec.name, gemspec.version].join('-') + '.gem' @@ -31,6 +32,12 @@ task :test do end end +task :build => :version_set +task :version_set do + Oxidized.version_set + Bundler::GemHelper.instance.gemspec.version = Oxidized::VERSION +end + ## desc 'Install gem' ## task :install => :build do ## system "sudo -Es sh -c \'umask 022; gem install gems/#{file}\'" -- cgit v1.2.1