forked from vigetlabs/simplest_auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
55 lines (44 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
require File.expand_path('../lib/simplest_auth/version', __FILE__)
task :default => :test
spec = Gem::Specification.new do |s|
s.name = 'simplest_auth'
s.version = SimplestAuth::Version.to_s
s.summary = "Simple implementation of authentication for Rails"
s.author = 'Tony Pitale'
s.email = '[email protected]'
s.homepage = 'http://viget.com/extend'
s.files = %w(README.textile Rakefile) + Dir.glob("lib/**/*")
s.test_files = Dir.glob("test/**/*_test.rb")
s.add_dependency('bcrypt-ruby', '~> 2.1.1')
s.add_development_dependency('shoulda')
s.add_development_dependency('mocha')
s.add_development_dependency('activemodel')
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
Rake::TestTask.new do |t|
t.libs << 'test'
t.test_files = FileList["test/**/*_test.rb"]
t.verbose = true
end
desc 'Generate the gemspec to serve this Gem from Github'
task :github do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, 'w') {|f| f << spec.to_ruby }
puts "Created gemspec: #{file}"
end
begin
require 'rcov/rcovtask'
desc "Generate RCov coverage report"
Rcov::RcovTask.new(:rcov) do |t|
t.test_files = FileList['test/**/*_test.rb']
t.rcov_opts << "-x lib/simplest_auth.rb -x lib/simplest_auth/version.rb"
end
rescue LoadError
nil
end
task :default => 'test'