forked from andrewzielinski/lockdown
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
38 lines (34 loc) · 1.24 KB
/
Rakefile
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
require 'rubygems'
require 'rake'
require 'rcov'
require 'spec/rake/spectask'
require 'lib/lockdown.rb'
task :default => 'rcov'
desc "Flog your code for Justice!"
task :flog do
sh('flog lib/**/*.rb')
end
desc "Run all specs and rcov in a non-sucky way"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.spec_opts = IO.readlines("spec/spec.opts").map {|l| l.chomp.split " "}.flatten
t.spec_files = FileList['spec/**/*_spec.rb']
t.rcov = true
t.rcov_opts = IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "revo-lockdown"
gemspec.version = Lockdown.version
gemspec.rubyforge_project = "lockdown"
gemspec.summary = "Authorization system for Rails 2.x"
gemspec.description = "Restrict access to your controller actions. Supports basic model level restrictions as well"
gemspec.email = "andy@stonean.com"
gemspec.homepage = "http://stonean.com/wiki/lockdown"
gemspec.authors = ["Andrew Stone", "Revo Pty. Ltd."]
gemspec.add_development_dependency('rspec')
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end