Sha256: d3f1d561b142b18c76b239569c753cf11e2f6510640c224d37e1ae0ae40297f6
Contents?: true
Size: 1.65 KB
Versions: 3
Compression:
Stored size: 1.65 KB
Contents
# 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 'Runs all the specs' task :spec do title 'Running Unit Tests' files = FileList['spec/**/*_spec.rb'].shuffle.join(' ') sh "bundle exec bacon #{files}" title 'Checking code style...' Rake::Task['rubocop'].invoke if RUBY_VERSION >= '1.9.3' end #-- Kick -------------------------------------------------------------------# desc 'Automatically run specs for updated files' task :kick do exec 'bundle exec kicker -c' end #-- RuboCop ----------------------------------------------------------------# if RUBY_VERSION >= '1.9.3' require 'rubocop/rake_task' RuboCop::RakeTask.new end rescue LoadError $stderr.puts "\033[0;31m" \ '[!] Some Rake tasks haven been disabled because the environment' \ ' couldn’t be loaded. Be sure to run `rake bootstrap` first.' \ "\e[0m" $stderr.puts e.message $stderr.puts e.backtrace $stderr.puts end #-- Helpers ------------------------------------------------------------------# def title(title) cyan_title = "\033[0;36m#{title}\033[0m" puts puts '-' * 80 puts cyan_title puts '-' * 80 puts end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
cocoapods-trunk-0.3.0 | Rakefile |
cocoapods-trunk-0.2.0 | Rakefile |
cocoapods-docs-0.2.0 | Rakefile |