Sha256: a95332a82ebc91e18f7152caa0b07f0503feb46e9fce68a81346189bfc62be03

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

require 'bundler'
begin
  Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
  $stderr.puts e.message
  $stderr.puts "Run `bundle install` to install missing gems"
  exit e.status_code
end

name = 'fspath'
summary = 'Better than Pathname'

require 'jeweler'
Jeweler::Tasks.new do |gem|
  gem.name = name
  gem.homepage = "http://github.com/toy/fspath"
  gem.summary = summary
  gem.authors = ["Boba Fat"]
end
Jeweler::RubygemsDotOrgTasks.new

desc "Replace system gem with symlink to this folder"
task 'ghost' do
  gem_path = Gem.searcher.find(name).full_gem_path
  current_path = File.expand_path('.')
  system('rm', '-r', gem_path)
  system('ln', '-s', current_path, gem_path)
end

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.rspec_opts = ['--colour --format progress']
  spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
  spec.rspec_opts = ['--colour --format progress']
  spec.pattern = 'spec/**/*_spec.rb'
  spec.rcov = true
  spec.rcov_opts = ['--exclude', 'spec']
end

task :spec_with_rcov_and_open => :rcov do
  `open coverage/index.html`
end

desc 'Default: run specs.'
task :default => :spec_with_rcov_and_open

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fspath-0.0.1 Rakefile