Commit 03e51c30 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fixtures added

parent a41d5769
require File.join(Rails.root, "lib", "gitlabhq", "git_host")
class Repository
attr_accessor :project
......@@ -34,13 +36,13 @@ class Repository
end
def update_gitosis_project
GitProxy.system.new.configure do |c|
Gitlabhq::GitHost.system.new.configure do |c|
c.update_project(path, project.gitosis_writers)
end
end
def destroy_gitosis_project
GitProxy.system.new.configure do |c|
Gitlabhq::GitHost.system.new.configure do |c|
c.destroy_project(@project)
end
end
......
admin = User.create(
unless User.count > 0
admin = User.create(
:email => "admin@local.host",
:name => "Administrator",
:password => "5iveL!fe",
:password_confirmation => "5iveL!fe"
)
)
admin.projects_limit = 10000
admin.admin = true
admin.save!
admin.projects_limit = 10000
admin.admin = true
admin.save!
if admin.valid?
puts %q[
Administrator account created:
if admin.valid?
puts %q[
Administrator account created:
login.........admin@local.host
password......5iveL!fe
]
login.........admin@local.host
password......5iveL!fe
]
end
end
Project.seed(:id, [
{ :id => 1, :name => "Gitlab HQ", :path => "gitlabhq", :code => "gitlabhq", :owner_id => 1 },
{ :id => 2, :name => "Diaspora", :path => "diaspora", :code => "diaspora", :owner_id => 1 },
{ :id => 3, :name => "Ruby on Rails", :path => "ruby_on_rails", :code => "ruby_on_rails", :owner_id => 1 }
])
User.seed(:id, [
{ :id => 2, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 3, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 4, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 5, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 6, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 7, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 8, :name => Faker::Internet.user_name, :email => Faker::Internet.email},
{ :id => 9, :name => Faker::Internet.user_name, :email => Faker::Internet.email}
])
UsersProject.seed(:id, [
{ :id => 1, :project_id => 1, :user_id => 1},
{ :id => 2, :project_id => 1, :user_id => 2},
{ :id => 3, :project_id => 1, :user_id => 3},
{ :id => 4, :project_id => 1, :user_id => 4},
{ :id => 5, :project_id => 1, :user_id => 5},
{ :id => 6, :project_id => 2, :user_id => 1},
{ :id => 7, :project_id => 2, :user_id => 2},
{ :id => 8, :project_id => 2, :user_id => 3},
{ :id => 9, :project_id => 2, :user_id => 4},
{ :id => 11, :project_id => 2, :user_id => 5},
{ :id => 12, :project_id => 3, :user_id => 1},
{ :id => 13, :project_id => 3, :user_id => 2},
{ :id => 14, :project_id => 3, :user_id => 3},
{ :id => 15, :project_id => 3, :user_id => 4},
{ :id => 16, :project_id => 3, :user_id => 5}
])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment