debian-mirror-gitlab/lib/tasks/spinach.rake

36 lines
834 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
Rake::Task["spinach"].clear if Rake::Task.task_defined?('spinach')
2015-09-11 14:41:01 +05:30
namespace :spinach do
desc "GitLab | Spinach | Run project spinach features"
task :project do
cmds = [
%W(rake gitlab:setup),
2015-11-26 14:37:03 +05:30
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets,~@commits),
2015-09-11 14:41:01 +05:30
]
run_commands(cmds)
end
2014-09-02 18:07:02 +05:30
2015-09-11 14:41:01 +05:30
desc "GitLab | Spinach | Run other spinach features"
task :other do
cmds = [
%W(rake gitlab:setup),
2015-11-26 14:37:03 +05:30
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets,@commits),
2015-09-11 14:41:01 +05:30
]
run_commands(cmds)
end
2014-09-02 18:07:02 +05:30
end
2015-09-11 14:41:01 +05:30
desc "GitLab | Run spinach"
task :spinach do
2014-09-02 18:07:02 +05:30
cmds = [
%W(rake gitlab:setup),
2015-09-11 14:41:01 +05:30
%W(spinach),
2014-09-02 18:07:02 +05:30
]
run_commands(cmds)
end
def run_commands(cmds)
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!")
end
2015-11-26 14:37:03 +05:30
end