forked from edavis10/redmine_data_generator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
executable file
·95 lines (83 loc) · 3.09 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env ruby
require 'redmine_plugin_support'
Dir[File.expand_path(File.dirname(__FILE__)) + "/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
RedminePluginSupport::Base.setup do |plugin|
plugin.project_name = 'redmine_data_generator'
plugin.default_task = [:test]
plugin.tasks = [:doc, :release, :clean] # no spec, cucumber
end
# Testing taked from Rails
require 'rake/testtask'
desc 'Run all unit, functional and integration tests'
task :test do
errors = %w(test:units test:functionals test:integration).collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
task
end
end.compact
abort "Errors running #{errors.to_sentence}!" if errors.any?
end
namespace :test do
Rake::TestTask.new(:units => :environment) do |t|
t.libs << "test"
t.pattern = 'test/unit/**/*_test.rb'
t.verbose = true
end
Rake::Task['test:units'].comment = "Run the unit tests in test/unit"
Rake::TestTask.new(:functionals => :environment) do |t|
t.libs << "test"
t.pattern = 'test/functional/**/*_test.rb'
t.verbose = true
end
Rake::Task['test:functionals'].comment = "Run the functional tests in test/functional"
Rake::TestTask.new(:integration => :environment) do |t|
t.libs << "test"
t.pattern = 'test/integration/**/*_test.rb'
t.verbose = true
end
Rake::Task['test:integration'].comment = "Run the integration tests in test/integration"
Rake::TestTask.new(:benchmark => :environment) do |t|
t.libs << 'test'
t.pattern = 'test/performance/**/*_test.rb'
t.verbose = true
t.options = '-- --benchmark'
end
Rake::Task['test:benchmark'].comment = 'Benchmark the performance tests'
Rake::TestTask.new(:profile => :environment) do |t|
t.libs << 'test'
t.pattern = 'test/performance/**/*_test.rb'
t.verbose = true
end
Rake::Task['test:profile'].comment = 'Profile the performance tests'
end
task :environment do
require(File.join(File.expand_path(File.dirname(__FILE__) + '/../../../config'), 'environment'))
end
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "redmine_data_generator"
s.summary = "The Redmine Data Generator plugin is used to quickly generate a bunch of data for Redmine."
s.email = "edavis@littlestreamsoftware.com"
s.homepage = "https://projects.littlestreamsoftware.com/projects/TODO"
s.description = "The Redmine Data Generator plugin is used to quickly generate a bunch of data for Redmine."
s.authors = ["Eric Davis"]
s.rubyforge_project = "redmine_data_generator" # TODO
s.files = FileList[
"[A-Z]*",
"init.rb",
"rails/init.rb",
"{bin,generators,lib,test,app,assets,config,lang}/**/*",
'lib/jeweler/templates/.gitignore'
]
end
Jeweler::GemcutterTasks.new
Jeweler::RubyforgeTasks.new do |rubyforge|
rubyforge.doc_task = "rdoc"
end
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end