This repository has been archived by the owner on Jun 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
67 lines (55 loc) · 1.65 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
56
57
58
59
60
61
62
63
64
65
66
67
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "dm-is-friendly"
gemspec.summary = %Q{DataMapper plugin that adds self-referential friendship functionality to your models.}
gemspec.email = "kabari@gmail.com"
gemspec.homepage = "http://github.com/RipTheJacker/dm-is-friendly"
gemspec.authors = ["RipTheJacker"]
gemspec.has_rdoc = 'yard'
gemspec.files = Dir['Rakefile', '{lib,spec}/**/*', 'README*', 'LICENSE*', 'VERSION'] - ['spec/log/dm.log']
end
Jeweler::GemcutterTasks.new
rescue LoadError => e
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
puts "-"*40
puts e.backtrace
end
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rcov = true
t.rcov_opts = %[-Ilib -Ispec --exclude "spec/spec_helper.rb"]
t.rcov_opts << %[--no-html --aggregate coverage.data]
end
rescue LoadError
task :spec do
abort "RSpec gem is not available. In order to test use: bundle install"
end
end
task :default => :spec
begin
require 'reek/adapters/rake_task'
Reek::RakeTask.new do |t|
t.fail_on_error = true
t.verbose = false
t.source_files = 'lib/**/*.rb'
end
rescue LoadError
task :reek do
abort 'Reek is not available. In order to run reek, you must: bundle install'
end
end
begin
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'README.markdown', 'LICENSE']
end
rescue LoadError
task :yard do
abort "YARD is not available. In order to run yardoc, you must: bundle install"
end
end