forked from archan937/rich_cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
132 lines (122 loc) · 3.87 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
require "rake"
require "rake/testtask"
require "rake/rdoctask"
require "test/integrator"
begin
require "jeweler"
Jeweler::Tasks.new do |gemspec|
gemspec.name = "rich_cms"
gemspec.summary = "Enrichments (e9s) module for a pluggable CMS frontend"
gemspec.description = "Rich-CMS is a module of E9s (http://github.com/archan937/e9s) which provides a frontend for your CMS content. You can use this gem to manage CMS content or translations (in an internationalized application). The installation and setup process is very easily done. You will have to register content at the Rich-CMS engine and also you will have to specify the authentication mechanism. Both are one-liners."
gemspec.email = "paul.engel@holder.nl"
gemspec.homepage = "http://codehero.es/rails_gems_plugins/rich_cms"
gemspec.author = "Paul Engel"
gemspec.add_dependency "haml", "~> 3.0.25"
gemspec.add_dependency "jzip", "~> 1.0.11"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
desc "Default: run unit tests."
task :default => :test
task :test do
Rake::Task["test:all"].execute
end
task :restore do
Rake::Task["restore:all"].execute
end
task :stash do
Rake::Task["stash:all"].execute
end
namespace :test do
desc "Test the rich_cms plugin in Rails 2 and 3."
task :all do
system "rake test:rails-2"
system "rake test:rails-3"
end
desc "Test the rich_cms plugin in Rails 2."
Rake::TestTask.new(:"rails-2") do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/rails-2/dummy/test/{,/*/**}/*_test.rb"
t.verbose = true
end
desc "Test the rich_cms plugin in Rails 3."
Rake::TestTask.new(:"rails-3") do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/rails-3/dummy/test/{,/*/**}/*_test.rb"
t.verbose = true
end
desc "Run all unit tests."
Rake::TestTask.new(:"unit") do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = "test/shared/tests/unit/**/*_test.rb"
t.verbose = true
end
desc "Run all integration tests (non-authenticated, with Devise, with Authlogic) in Rails 2 and 3."
task :integration do
Integrator.run do |test|
test.all
end
end
namespace :integration do
desc "Run all integration tests (non-authenticated, with Devise, with Authlogic) in Rails 2."
task :"rails-2" do
Integrator.run do |test|
test.rails 2
end
end
desc "Run all integration tests (non-authenticated, with Devise, with Authlogic) in Rails 3."
task :"rails-3" do
Integrator.run do |test|
test.rails 2
end
end
end
end
namespace :restore do
desc "Restore the Rails 2 and 3 dummy apps."
task :all do
system "rake restore:rails-2"
system "rake restore:rails-3"
end
desc "Restore the Rails 2 dummy app."
task :"rails-2" do
require "test/rails-2/dummy/test/support/dummy_app.rb"
DummyApp.restore_all
end
desc "Restore the Rails 3 dummy app."
task :"rails-3" do
require "test/rails-3/dummy/test/support/dummy_app.rb"
DummyApp.restore_all
end
end
namespace :stash do
desc "Stash the Rails 2 and 3 dummy apps."
task :all do
system "rake stash:rails-2"
system "rake stash:rails-3"
end
desc "Stash the Rails 2 dummy app."
task :"rails-2" do
require "test/rails-2/dummy/test/support/dummy_app.rb"
DummyApp.stash_all
end
desc "Stash the Rails 3 dummy app."
task :"rails-3" do
require "test/rails-3/dummy/test/support/dummy_app.rb"
DummyApp.stash_all
end
end
desc "Generate documentation for the rich_cms plugin."
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.title = "Rich-CMS"
rdoc.options << "--line-numbers" << "--inline-source"
rdoc.rdoc_files.include "README"
rdoc.rdoc_files.include "MIT-LICENSE"
rdoc.rdoc_files.include "lib/**/*.rb"
end