Sha256: c99b021b3ee358c250880c9fd221ac6a75a77bc9862c5d721b3340f9aa6aac44

Contents?: true

Size: 1009 Bytes

Versions: 2

Compression:

Stored size: 1009 Bytes

Contents

require 'rubygems'
GEMSPEC = Gem::Specification.load('postit.gemspec')

desc "Installs all development dependencies"
task :bootstrap do
  GEMSPEC.development_dependencies.each do |dep|
    sh 'gem', 'install', dep.name, '-v', dep.requirement.to_s
  end
end

begin
GEMSPEC.development_dependencies.each do |dep|
  gem dep.name, dep.requirement.to_s
end

require 'bundler/gem_tasks'
require 'tmpdir'

desc 'Run the specs'
task :spec do
  puts 'Running specs...'
  files = FileList['spec/**/*_spec.sh'].shuffle.map { |s| File.expand_path(s) }
  files.each do |spec|
    Dir.mktmpdir do |dir|
      Dir.chdir(dir) do
        rubyopt = "RUBYOPT='-I#{File.expand_path('../lib', __FILE__)}'"
        path = %(PATH="#{File.expand_path('../exe', __FILE__)}:$PATH")
        sh "#{rubyopt} #{path} sh '#{spec}'", verbose: false
      end
    end
  end
  puts "\n\n"
end

require 'rubocop/rake_task'
RuboCop::RakeTask.new

task :ci => [:spec, :rubocop]

rescue LoadError, NameError
  warn "Please run rake bootstrap"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
postit-0.1.1 Rakefile
postit-0.1.0 Rakefile