Sha256: ff3e87907e66494e886ad09b843c18c250035026d7833591de0f4fdc02b7c1e9

Contents?: true

Size: 815 Bytes

Versions: 23

Compression:

Stored size: 815 Bytes

Contents

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

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

if /darwin/ =~ RUBY_PLATFORM
  task :spec do
    sh "rsdl -S rspec #{ENV['SPEC_OPTS']} #{ENV['SPEC']}"
  end

  task :guard do
    rspec_path = 'spec/rspec'
    File.open(rspec_path, 'w') do |f|
      f.write(<<-EOS)
#!/bin/sh
bundle exec rsdl -S rspec $@
      EOS
    end
    chmod(0755, rspec_path)
    begin
      sh "bundle exec guard"
    ensure
      rm_rf(rspec_path)
    end
  end
else
  RSpec::Core::RakeTask.new(:spec)
  task :guard do
    sh "bundle exec guard"
  end
end

task :rubocop do
  files = `git ls-files | grep -e '.rb$' | grep -v '^samples/'`
  sh "rubocop #{files.split(/\s+/m).join(' ')}"
end

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
smalruby-0.0.13-x86-mingw32 Rakefile
smalruby-0.0.13 Rakefile
smalruby-0.0.12-x86-mingw32 Rakefile
smalruby-0.0.12 Rakefile
smalruby-0.0.11-x86-mingw32 Rakefile
smalruby-0.0.11 Rakefile
smalruby-0.0.10-x86-mingw32 Rakefile
smalruby-0.0.10 Rakefile
smalruby-0.0.9-x86-mingw32 Rakefile
smalruby-0.0.9 Rakefile
smalruby-0.0.8-x86-mingw32 Rakefile
smalruby-0.0.8 Rakefile
smalruby-0.0.7-x86-mingw32 Rakefile
smalruby-0.0.7 Rakefile
smalruby-0.0.6-x86-mingw32 Rakefile
smalruby-0.0.6 Rakefile
smalruby-0.0.5-x86-mingw32 Rakefile
smalruby-0.0.5 Rakefile
smalruby-0.0.4-x86-mingw32 Rakefile
smalruby-0.0.4 Rakefile