Sha256: 07d8a9dbdb89e226b9dc62a5afa34a807d03d8277e593dfb54c55cac7c76a5e2

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

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'))

    if File::ALT_SEPARATOR
      spec.add_dependency('windows-pr', '>= 1.0.5')
      spec.platform = Gem::Platform::CURRENT
      spec.platform.cpu = 'universal'
      spec.platform.version = nil
    else
      spec.add_dependency('ffi', '>= 1.0.0')
    end

    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.0.0-x86-mingw32 Rakefile