Sha256: f7e1319767341fc5406a7cba831657b969c19d831fc5384e06497fdf11e54dd4

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require "rubygems"
require "bundler/setup"
Bundler::GemHelper.install_tasks

# See https://github.com/colszowka/simplecov/issues/171
desc "Set permissions on all files so they are compatible with both user-local and system-wide installs"
task :fix_permissions do
  system 'bash -c "find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;"'
end
# Enforce proper permissions on each build
Rake::Task[:build].prerequisites.unshift :fix_permissions

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = FileList["spec/*_spec.rb"]
end

begin
  require "rubocop/rake_task"
  RuboCop::RakeTask.new
rescue LoadError
  task :rubocop do
    $stderr.puts "Rubocop is disabled"
  end
end

# Cucumber integration test suite is for impls that work with simplecov only - a.k.a. 1.9+
if RUBY_VERSION.start_with? "1.8"
  task :default => [:spec]
else
  require "cucumber/rake/task"
  Cucumber::Rake::Task.new

  if RUBY_VERSION.start_with? "1.9"
    task :default => [:spec, :cucumber]
  else
    task :default => [:rubocop, :spec, :cucumber]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simplecov-0.15.1 Rakefile