Sha256: 2cd5733e854703e9b8a38c78506204f219c40c36e4012c2e690212c43cc4d320

Contents?: true

Size: 823 Bytes

Versions: 1

Compression:

Stored size: 823 Bytes

Contents

require 'rake'
require 'rake/clean'
require 'rake/testtask'

CLEAN.include('**/*.gem', '**/*.rbc', '**/*.rbx')

desc "Run the test suite"
Rake::TestTask.new("test") do |t|
  if File::ALT_SEPARATOR
    t.libs << 'lib/windows'
  else
    t.libs << 'lib/unix'
  end

  t.warning = true
  t.verbose = true
  t.test_files = FileList['test/test_sys_filesystem.rb']
end

desc "Run the example program"
task :example do |t|
  sh "ruby -Ilib -Ilib/unix -Ilib/windows examples/example_stat.rb"
end

namespace :gem do
  desc "Build the sys-filesystem gem"
  task :create do |t|
    spec = eval(IO.read('sys-filesystem.gemspec'))
    Gem::Builder.new(spec).build
  end

  desc "Install the sys-filesystem gem"
  task :install => [:create] do
    file = Dir['*.gem'].first
    sh "gem install #{file}"
  end
end

task :default => :test

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sys-filesystem-1.1.0 Rakefile