Sha256: 984f9bfbb699d3c70a33829984148864b78ed57c516dd523aa9fa303622a9711

Contents?: true

Size: 1.36 KB

Versions: 11

Compression:

Stored size: 1.36 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 '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 if RUBY_VERSION >= '1.9.3'
  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' \
    ' couldn’t 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

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
claide-1.0.3 Rakefile
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/claide-1.0.2/Rakefile
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/claide-1.0.2/Rakefile
claide-1.0.2 Rakefile
claide-1.0.1 Rakefile
claide-1.0.0 Rakefile
claide-1.0.0.rc.1 Rakefile
claide-1.0.0.beta.3 Rakefile
claide-1.0.0.beta.2 Rakefile
claide-1.0.0.beta.1 Rakefile
claide-completion-1.0.2 Rakefile