Sha256: d59f48f60d369a5e5c57e105f46461791f0420617875ba827811e68a258291b7
Contents?: true
Size: 1.2 KB
Versions: 13
Compression:
Stored size: 1.2 KB
Contents
require "bundler/gem_tasks" require 'rspec/core/rake_task' # Add default task. When you type just rake command this would run. Travis CI runs this. Making this run spec desc 'Default: run specs.' task :default => :spec # Defining spec task for running spec desc "Run specs" RSpec::Core::RakeTask.new('spec') do |spec| # Pattern filr for spec files to run. This is default btw. spec.pattern = "./spec/**/*_spec.rb" end # Run the rdoc task to generate rdocs for this gem require 'rdoc/task' RDoc::Task.new do |rdoc| require "logstasher/version" version = LogStasher::VERSION rdoc.rdoc_dir = 'rdoc' rdoc.title = "logstasher #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end # Code coverage tasks. Different for Ruby 1.8 vs 1.9 if RUBY_VERSION =~ /^1\.8/ # Ruby 1.8 uses rcov for code coverage RSpec::Core::RakeTask.new(:coverage) do |spec| spec.pattern = 'spec/**/*_spec.rb' spec.rcov = true spec.rcov_opts = %w{--exclude pkg\/,spec\/,features\/} end else # Ruby 1.9+ using simplecov. Note: Simplecov config defined in spec_helper desc "Code coverage detail" task :coverage do ENV['COVERAGE'] = "true" Rake::Task['spec'].execute end end
Version data entries
13 entries across 13 versions & 1 rubygems