Sha256: 1841fb80e30c87e4d0c39adcd775a623a160e1630fab371087294715728d5fee

Contents?: true

Size: 805 Bytes

Versions: 1

Compression:

Stored size: 805 Bytes

Contents

require 'rubygems'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'

# Rake tasks from https://github.com/mojombo/rakegem/blob/master/Rakefile

# Helper Functions
def name
  @name ||= Dir['*.gemspec'].first.split('.').first.gsub('-', '/')
end

def version
  line = File.read("lib/#{name}/version.rb")[/^\s*VERSION\s*=\s*.*/]
  line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
end

# Standard tasks
RSpec::Core::RakeTask.new(:spec)
task :test => :spec
task :default => :spec

require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "#{name} #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

desc "Open an pry session preloaded with this library"
task :console do
  sh "pry -Ilib -r #{name}.rb"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
guard-strainer-1.0.0 Rakefile