Sha256: ed705baa784ce5ee2af712404ea81f77b004a8a590d83b9a9e2ca5755cd287a4

Contents?: true

Size: 1.86 KB

Versions: 2

Compression:

Stored size: 1.86 KB

Contents

require 'rubygems'
require 'rake'

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "randomizer"
    gem.summary = %Q{Generates random test data}
    gem.description = %Q{}
    gem.email = "paul@canavese.org"
    gem.homepage = "http://github.com/canavese/randomizer"
    gem.authors = ["Paul Canavese"]
    gem.add_development_dependency "rspec", ">= 1.2.9"
    gem.add_development_dependency "cucumber", ">= 0"
    gem.add_development_dependency "nokogiri", ">= 1.3.3"
    # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
  spec.libs << 'lib' << 'spec'
  spec.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
  spec.libs << 'lib' << 'spec'
  spec.pattern = 'spec/**/*_spec.rb'
  spec.rcov = true
end

task :spec => :check_dependencies

begin
  require 'cucumber/rake/task'
  Cucumber::Rake::Task.new(:features)

  task :features => :check_dependencies
rescue LoadError
  task :features do
    abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
  end
end

task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION') : ""

  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "randomizer #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

#require File.join(File.dirname(__FILE__), 'lib', 'tasks', 'randomizer.rake')

namespace :randomizer do

  desc "Test generating a random avatar URL"
  task :avatar do
    require File.join(File.dirname(__FILE__), 'lib', 'randomizer.rb')
    puts RandomUser.new.avatar_url
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
randomizer-0.0.4 Rakefile
randomizer-0.0.3 Rakefile