Sha256: 2f4557599a852120c5c996ca99225ba32ef2e0df2e4a3e85f802a8c3c2368b01

Contents?: true

Size: 1.37 KB

Versions: 17

Compression:

Stored size: 1.37 KB

Contents

# Bootstrap
#-----------------------------------------------------------------------------#

task :bootstrap, :use_bundle_dir? do |t, args|
  if system('which bundle')
    if args[:use_bundle_dir?]
      sh 'bundle install --path ./travis_bundle_dir'
    else
      sh 'bundle install'
    end
  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'

  # Spec
  #-----------------------------------------------------------------------------#

  desc 'Runs all the specs'
  task :spec do
    puts "\033[0;32mUsing #{`ruby --version`}\033[0m"
    start_time = Time.now
    sh "bundle exec bacon #{specs('**')}"
    duration = Time.now - start_time
    puts "Tests completed in #{duration}s"

    Rake::Task['rubocop'].invoke if RUBY_VERSION >= '1.9.3'
  end

  def specs(dir)
    FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
  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"
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/cocoapods-try-1.1.0/Rakefile
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/cocoapods-try-1.1.0/Rakefile
cocoapods-try-1.1.0 Rakefile
cocoapods-try-1.0.0 Rakefile
cocoapods-try-1.0.0.rc.1 Rakefile
cocoapods-try-1.0.0.beta.4 Rakefile
cocoapods-try-1.0.0.beta.3 Rakefile
cocoapods-try-1.0.0.beta.2 Rakefile
cocoapods-try-1.0.0.beta.1 Rakefile
cocoapods-try-0.5.1 Rakefile
cocoapods-try-0.5.0 Rakefile
cocoapods-try-0.4.5 Rakefile
cocoapods-try-0.4.4 Rakefile
cocoapods-try-0.4.3 Rakefile
cocoapods-try-0.4.2 Rakefile
cocoapods-try-0.4.1 Rakefile
cocoapods-try-0.4.0 Rakefile