summaryrefslogtreecommitdiff
path: root/Rakefile
blob: 8bd8950b8c26fa450a7afe959a9f9d29c0d83a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'rubygems'
require 'rubygems/package_task'
require 'rubygems/specification'
require 'date'
require 'rspec/core/rake_task'

GEM = "mixlib-authentication"
GEM_VERSION = "1.2.1"
AUTHOR = "Opscode, Inc."
EMAIL = "info@opscode.com"
HOMEPAGE = "http://www.opscode.com"
SUMMARY = "Mixes in simple per-request authentication"

task :default => :spec

desc "Run specs"
RSpec::Core::RakeTask.new do |t|
  t.pattern = 'spec/**/*_spec.rb'
  t.rspec_opts = %w(--color)
end

gem_spec = eval(File.read("mixlib-authentication.gemspec"))

Gem::PackageTask.new(gem_spec) do |pkg|
  pkg.gem_spec = gem_spec
end

desc "install the gem locally"
task :install => [:package] do
  sh %{gem install pkg/#{GEM}-#{GEM_VERSION}}
end

desc "create a gemspec file"
task :make_spec do
  File.open("#{GEM}.gemspec", "w") do |file|
    file.puts spec.to_ruby
  end
end

desc "remove build files"
task :clean do
  sh %Q{ rm -f pkg/*.gem }
end

desc "Run the spec and features"
task :test => [ :features, :spec ]