NuvioStreaming/ios/vendor/bundle/ruby/2.6.0/gems/claide-1.1.0/Rakefile
2025-09-17 23:22:01 +05:30

57 lines
1.3 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# encoding: utf-8
#-- Bootstrap --------------------------------------------------------------#
desc 'Initializes your working copy to run the specs'
task :bootstrap do
if system('which bundle')
title 'Installing gems'
sh 'bundle install'
else
$stderr.puts "\033[0;31m" \
"[!] Please install the bundler gem manually:\n" \
' $ [sudo] gem install bundler' \
"\e[0m"
exit 1
end
end
begin
require 'bundler/gem_tasks'
task :default => :spec
#-- Specs ------------------------------------------------------------------#
desc 'Run specs'
task :spec do
title 'Running Unit Tests'
files = FileList['spec/**/*_spec.rb'].shuffle.join(' ')
sh "bundle exec bacon #{files}"
Rake::Task['rubocop'].invoke
end
#-- Rubocop ----------------------------------------------------------------#
desc 'Check code against RuboCop rules'
task :rubocop do
sh 'bundle exec rubocop'
end
rescue LoadError
$stderr.puts "\033[0;31m" \
'[!] Some Rake tasks haven been disabled because the environment' \
' couldnt be loaded. Be sure to run `rake bootstrap` first.' \
"\e[0m"
end
#-- Helpers ------------------------------------------------------------------#
def title(title)
cyan_title = "\033[0;36m#{title}\033[0m"
puts
puts '-' * 80
puts cyan_title
puts '-' * 80
puts
end