Sha256: d3a1603f7f19cff2f8b74acbfe2cc2fd6592d0cbfd5709a2b827300a5291ce42

Contents?: true

Size: 810 Bytes

Versions: 4

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

require 'bundler/gem_tasks'
load 'lib/rspec/hive/rake_tasks/docker.rake'

begin
  require 'rspec/core/rake_task'

  RSpec::Core::RakeTask.new(:spec)

  RSpec::Core::RakeTask.new(:hive_spec) do |t|
    t.pattern = 'examples/**/*_spec.rb'
  end
rescue LoadError
  puts 'Cannot load rspec Rake tasks'
end

begin
  require 'rubocop/rake_task'
  RuboCop::RakeTask.new(:rubocop)
rescue LoadError
  puts 'Cannot load RuboCop Rake tasks'
end

detect_docker = <<-BASH
  CONTAINER_IDS=`docker ps -q --filter='ancestor=nielsensocial/hive' 2> /dev/null | xargs`
  docker inspect --format='{{ .State.Running }}' $CONTAINER_IDS 2> /dev/null | uniq | grep true 2>&1 > /dev/null
BASH

if system(detect_docker)
  task default: %i[spec hive_spec rubocop]
else
  task default: %i[spec rubocop]
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-hive-0.6.3 Rakefile
rspec-hive-0.6.2 Rakefile
rspec-hive-0.6.1 Rakefile
rspec-hive-0.6.0 Rakefile