Sha256: 1a2475df30bced92ee1b9981a89f2a3cc4e7ec808ab9d13aee26055a17380ba2

Contents?: true

Size: 855 Bytes

Versions: 8

Compression:

Stored size: 855 Bytes

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'rake/extensiontask'
require "yard"

def can_compile_extensions
  return false if RUBY_DESCRIPTION =~ /jruby/
  return true
end

desc "GamesDice unit tests"
RSpec::Core::RakeTask.new(:test) do |t|
  t.pattern = "spec/*_spec.rb"
  t.verbose = false
end

YARD::Rake::YardocTask.new do |t|
  t.files   = ['lib/**/*.rb']
end

gemspec = Gem::Specification.load('games_dice.gemspec')
Rake::ExtensionTask.new do |ext|
  ext.name = 'games_dice'
  ext.source_pattern = "*.{c,h}"
  ext.ext_dir = 'ext/games_dice'
  ext.lib_dir = 'lib/games_dice'
  ext.gem_spec = gemspec
end

task :delete_compiled_ext do |t|
  `rm lib/games_dice/games_dice.*`
end

task :pure_test => [:delete_compiled_ext, :test]

if can_compile_extensions
  task :default => [:compile, :test]
else
  task :default => [:test]
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
games_dice-0.3.12 Rakefile
games_dice-0.3.11 Rakefile
games_dice-0.3.10 Rakefile
games_dice-0.3.9 Rakefile
games_dice-0.3.8 Rakefile
games_dice-0.3.7 Rakefile
games_dice-0.3.6 Rakefile
games_dice-0.3.5 Rakefile