Sha256: 33a6621e65ec40bf2bcbb7c246072731e8e9374891db355c3a48ed5c47c5a7df

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rake/clean'

GEM_NAME = 'uninclude'.freeze
DLEXT = RbConfig::CONFIG['DLEXT']

CLEAN.include("ext/**/*.{#{DLEXT},log,o}")
CLEAN.include('ext/**/Makefile')
CLEAN.include("lib/**/*.#{DLEXT}")
CLOBBER.include("lib/**/*.#{DLEXT}")

file "lib/#{GEM_NAME}/#{GEM_NAME}.#{DLEXT}" => Dir.glob("ext/#{GEM_NAME}/*.{rb, c}") do
  Dir.chdir("ext/#{GEM_NAME}") do
    ruby 'extconf.rb'
    sh 'make'
  end
  cp "ext/#{GEM_NAME}/#{GEM_NAME}.#{DLEXT}", "lib/#{GEM_NAME}/#{GEM_NAME}.#{DLEXT}"
end

RSpec::Core::RakeTask.new(:spec)
task :spec => "lib/#{GEM_NAME}/#{GEM_NAME}.#{DLEXT}"

task :default => [:clean, :spec]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
uninclude-1.3.0 Rakefile
uninclude-1.2.0 Rakefile
uninclude-1.1.0 Rakefile