Rakefile in fun_translations-0.0.1.rc1 vs Rakefile in fun_translations-0.0.1

- old
+ new

@@ -1,21 +1,43 @@ # frozen_string_literal: true require 'rake' +require 'rake/clean' +require 'rspec/core/rake_task' +require 'rubocop/rake_task' begin require 'bundler/setup' Bundler::GemHelper.install_tasks rescue LoadError puts 'although not required, bundler is recommened for running the tests' end -task default: :spec - -require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -require 'rubocop/rake_task' RuboCop::RakeTask.new do |task| task.requires << 'rubocop-performance' task.requires << 'rubocop-rspec' end + +namespace :fun_translations do + CLOBBER.include(FileList['./*.gem']) + + desc 'Updates RubyGems, installs dependencies' + task :install do + puts 'Running bundle install' + sh 'gem update --system' + sh 'bundle' + end + + desc 'Builds the gem' + task :build do + puts 'Building' + sh 'gem build fun_translations.gemspec' + end +end + +task rubospec: %w[rubocop spec] + +task full_build: %w[clobber fun_translations:install fun_translations:build] + +task default: :full_build