2012-11-13 21:11:56 +01:00
|
|
|
UsersProject.skip_callback(:save, :after, :update_repository)
|
|
|
|
|
2011-12-04 21:19:49 +01:00
|
|
|
UsersProject.seed(:id, [
|
2012-03-09 20:43:46 +01:00
|
|
|
{ :id => 1, :project_id => 1, :user_id => 1, :project_access => UsersProject::MASTER },
|
2012-03-21 23:09:55 +01:00
|
|
|
{ :id => 2, :project_id => 1, :user_id => 2, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 3, :project_id => 1, :user_id => 3, :project_access => UsersProject::REPORTER},
|
2012-03-09 20:43:46 +01:00
|
|
|
{ :id => 4, :project_id => 1, :user_id => 4, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 5, :project_id => 1, :user_id => 5, :project_access => UsersProject::REPORTER},
|
2011-12-04 21:19:49 +01:00
|
|
|
|
2012-03-09 20:43:46 +01:00
|
|
|
{ :id => 6, :project_id => 2, :user_id => 1, :project_access => UsersProject::MASTER },
|
|
|
|
{ :id => 7, :project_id => 2, :user_id => 2, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 8, :project_id => 2, :user_id => 3, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 9, :project_id => 2, :user_id => 4, :project_access => UsersProject::MASTER},
|
|
|
|
{ :id => 11, :project_id => 2, :user_id => 5, :project_access => UsersProject::MASTER},
|
2011-12-04 21:19:49 +01:00
|
|
|
|
2012-03-09 20:43:46 +01:00
|
|
|
{ :id => 12, :project_id => 3, :user_id => 1, :project_access => UsersProject::MASTER },
|
|
|
|
{ :id => 13, :project_id => 3, :user_id => 2, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 14, :project_id => 3, :user_id => 3, :project_access => UsersProject::MASTER},
|
|
|
|
{ :id => 15, :project_id => 3, :user_id => 4, :project_access => UsersProject::REPORTER},
|
|
|
|
{ :id => 16, :project_id => 3, :user_id => 5, :project_access => UsersProject::MASTER}
|
2011-12-04 21:19:49 +01:00
|
|
|
])
|
|
|
|
|
2012-11-13 21:11:56 +01:00
|
|
|
UsersProject.set_callback(:save, :after, :update_repository)
|
2011-12-04 21:19:49 +01:00
|
|
|
|
2012-11-13 21:11:56 +01:00
|
|
|
puts "\nRebuild gitolite\n".yellow
|
|
|
|
Project.all.each(&:update_repository)
|
|
|
|
puts "OK".green
|