Sha256: 3ead605f60bb22484997c6c828a43fbd683f64d3ecf24eb7cfe86ce35d76cda1

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

require "bundler/gem_tasks"

gem 'rspec'
require 'rspec/core/rake_task'

desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |t|
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
  # Put spec opts in a file named .rspec in root
end

desc "Generate code coverage"
RSpec::Core::RakeTask.new(:coverage) do |t|
  t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec']
end

######################################################################

desc "Default => :test"
task :default => :test

desc "Run all tests"
task :test => [ :spec ]

desc "Run examples."
task :example do
  ENV["ASIR_EXAMPLE_SILENT"]="1"
  Dir["example/ex[0-9]*.rb"].each do | rb |
    sh %Q{ruby -I example -I lib #{rb}}
  end
  ENV.delete("ASIR_EXAMPLE_SILENT")
end

######################################################################

desc "Install system prerequites"
task :prereq do
  case RUBY_PLATFORM
  when /darwin/i
    sh "sudo port install zmq22"
  when /linux/i
    sh "sudo apt-get install libzmq-dev"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asir_zmq-1.2.0 Rakefile
asir_zmq-1.1.1 Rakefile