Rakefile in colour-0.4 vs Rakefile in colour-0.4.0
- old
+ new
@@ -1,18 +1,40 @@
-# Look in the tasks/setup.rb file for the various options that can be
-# configured in this Rakefile. The .rake files in the tasks directory
-# are where the options are used.
+# encoding: utf-8
-load 'tasks/setup.rb'
+require 'rubygems'
+require 'bundler'
+require 'rspec'
+require 'rspec/core/rake_task'
+require 'rake'
+require 'jeweler'
-ensure_in_path 'lib'
-require 'colour'
+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
-task :default => 'spec:run'
+Jeweler::Tasks.new do |gem|
+ gem.name = "colour"
+ gem.homepage = "http://github.com/wdevauld/colour"
+ gem.license = "MIT"
+ gem.summary = %Q{Colour manipulation library supporting RGB and HSV representations}
+ gem.description = %Q{Support for computation of colour swatches in both the RGB and HSV colour representations}
+ gem.email = "wes@devauld.ca"
+ gem.authors = ["Wes Devauld"]
+end
+Jeweler::RubygemsDotOrgTasks.new
-PROJ.name = 'colour'
-PROJ.authors = 'Wes Devauld'
-PROJ.email = 'wes@devauld.ca'
-PROJ.url = 'http://code.devauld.ca/git/colour/'
-PROJ.rubyforge_name = 'colour'
-PROJ.version = '0.4'
-PROJ.exclude = %w(.git)
+desc "Run all specs"
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.verbose = false
+end
+
+desc "Run all specs with rcov"
+RSpec::Core::RakeTask.new(:coverage) do |t|
+ t.rcov = true
+ t.rcov_opts = %w{--exclude gems\/,spec\/}
+ t.verbose = true
+end
+task :default => :spec