2014-03-14 08:23:28 -04:00
|
|
|
Rake::Task["spinach"].clear if Rake::Task.task_defined?('spinach')
|
2014-03-14 04:44:16 -04:00
|
|
|
|
2015-06-23 10:48:52 -04:00
|
|
|
namespace :spinach do
|
2015-12-09 04:50:38 -05:00
|
|
|
namespace :project do
|
|
|
|
desc "GitLab | Spinach | Run project commits, issues and merge requests spinach features"
|
|
|
|
task :half do
|
|
|
|
cmds = [
|
|
|
|
%W(rake gitlab:setup),
|
|
|
|
%W(spinach --tags @project_commits,@project_issues,@project_merge_requests),
|
|
|
|
]
|
|
|
|
run_commands(cmds)
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "GitLab | Spinach | Run remaining project spinach features"
|
|
|
|
task :rest do
|
|
|
|
cmds = [
|
|
|
|
%W(rake gitlab:setup),
|
|
|
|
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets,~@project_commits,~@project_issues,~@project_merge_requests),
|
|
|
|
]
|
|
|
|
run_commands(cmds)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-06-23 10:48:52 -04:00
|
|
|
desc "GitLab | Spinach | Run project spinach features"
|
|
|
|
task :project do
|
|
|
|
cmds = [
|
|
|
|
%W(rake gitlab:setup),
|
2015-12-09 04:50:38 -05:00
|
|
|
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets),
|
2015-06-23 10:48:52 -04:00
|
|
|
]
|
|
|
|
run_commands(cmds)
|
|
|
|
end
|
2014-06-04 16:55:27 -04:00
|
|
|
|
2015-06-23 10:48:52 -04:00
|
|
|
desc "GitLab | Spinach | Run other spinach features"
|
|
|
|
task :other do
|
|
|
|
cmds = [
|
|
|
|
%W(rake gitlab:setup),
|
2015-12-09 04:50:38 -05:00
|
|
|
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets),
|
2015-06-23 10:48:52 -04:00
|
|
|
]
|
|
|
|
run_commands(cmds)
|
|
|
|
end
|
2014-06-04 16:55:27 -04:00
|
|
|
end
|
|
|
|
|
2015-06-23 10:48:52 -04:00
|
|
|
desc "GitLab | Run spinach"
|
|
|
|
task :spinach do
|
2014-06-04 16:55:27 -04:00
|
|
|
cmds = [
|
|
|
|
%W(rake gitlab:setup),
|
2015-06-23 10:48:52 -04:00
|
|
|
%W(spinach),
|
2014-06-04 16:55:27 -04:00
|
|
|
]
|
|
|
|
run_commands(cmds)
|
|
|
|
end
|
2014-03-14 04:44:16 -04:00
|
|
|
|
2014-06-04 16:55:27 -04:00
|
|
|
def run_commands(cmds)
|
2014-03-14 04:44:16 -04:00
|
|
|
cmds.each do |cmd|
|
2014-05-27 01:12:03 -04:00
|
|
|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!")
|
2014-03-14 04:44:16 -04:00
|
|
|
end
|
2015-12-09 04:50:38 -05:00
|
|
|
end
|