Commit 03e51c30583908882204d2bfc8c647a7c5bc35ef
1 parent
a41d5769
Exists in
master
and in
4 other branches
fixtures added
Showing
5 changed files
with
58 additions
and
17 deletions
Show diff stats
app/models/repository.rb
1 | +require File.join(Rails.root, "lib", "gitlabhq", "git_host") | ||
2 | + | ||
1 | class Repository | 3 | class Repository |
2 | attr_accessor :project | 4 | attr_accessor :project |
3 | 5 | ||
@@ -34,13 +36,13 @@ class Repository | @@ -34,13 +36,13 @@ class Repository | ||
34 | end | 36 | end |
35 | 37 | ||
36 | def update_gitosis_project | 38 | def update_gitosis_project |
37 | - GitProxy.system.new.configure do |c| | 39 | + Gitlabhq::GitHost.system.new.configure do |c| |
38 | c.update_project(path, project.gitosis_writers) | 40 | c.update_project(path, project.gitosis_writers) |
39 | end | 41 | end |
40 | end | 42 | end |
41 | 43 | ||
42 | def destroy_gitosis_project | 44 | def destroy_gitosis_project |
43 | - GitProxy.system.new.configure do |c| | 45 | + Gitlabhq::GitHost.system.new.configure do |c| |
44 | c.destroy_project(@project) | 46 | c.destroy_project(@project) |
45 | end | 47 | end |
46 | end | 48 | end |
db/fixtures/development/001_admin.rb
1 | -admin = User.create( | ||
2 | - :email => "admin@local.host", | ||
3 | - :name => "Administrator", | ||
4 | - :password => "5iveL!fe", | ||
5 | - :password_confirmation => "5iveL!fe" | ||
6 | -) | 1 | +unless User.count > 0 |
2 | + admin = User.create( | ||
3 | + :email => "admin@local.host", | ||
4 | + :name => "Administrator", | ||
5 | + :password => "5iveL!fe", | ||
6 | + :password_confirmation => "5iveL!fe" | ||
7 | + ) | ||
7 | 8 | ||
8 | -admin.projects_limit = 10000 | ||
9 | -admin.admin = true | ||
10 | -admin.save! | 9 | + admin.projects_limit = 10000 |
10 | + admin.admin = true | ||
11 | + admin.save! | ||
11 | 12 | ||
12 | -if admin.valid? | ||
13 | -puts %q[ | ||
14 | -Administrator account created: | 13 | + if admin.valid? |
14 | + puts %q[ | ||
15 | + Administrator account created: | ||
15 | 16 | ||
16 | -login.........admin@local.host | ||
17 | -password......5iveL!fe | ||
18 | -] | 17 | + login.........admin@local.host |
18 | + password......5iveL!fe | ||
19 | + ] | ||
20 | + end | ||
19 | end | 21 | end |
@@ -0,0 +1,5 @@ | @@ -0,0 +1,5 @@ | ||
1 | +Project.seed(:id, [ | ||
2 | + { :id => 1, :name => "Gitlab HQ", :path => "gitlabhq", :code => "gitlabhq", :owner_id => 1 }, | ||
3 | + { :id => 2, :name => "Diaspora", :path => "diaspora", :code => "diaspora", :owner_id => 1 }, | ||
4 | + { :id => 3, :name => "Ruby on Rails", :path => "ruby_on_rails", :code => "ruby_on_rails", :owner_id => 1 } | ||
5 | +]) |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +User.seed(:id, [ | ||
2 | + { :id => 2, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
3 | + { :id => 3, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
4 | + { :id => 4, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
5 | + { :id => 5, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
6 | + { :id => 6, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
7 | + { :id => 7, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
8 | + { :id => 8, :name => Faker::Internet.user_name, :email => Faker::Internet.email}, | ||
9 | + { :id => 9, :name => Faker::Internet.user_name, :email => Faker::Internet.email} | ||
10 | +]) | ||
11 | + |
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +UsersProject.seed(:id, [ | ||
2 | + { :id => 1, :project_id => 1, :user_id => 1}, | ||
3 | + { :id => 2, :project_id => 1, :user_id => 2}, | ||
4 | + { :id => 3, :project_id => 1, :user_id => 3}, | ||
5 | + { :id => 4, :project_id => 1, :user_id => 4}, | ||
6 | + { :id => 5, :project_id => 1, :user_id => 5}, | ||
7 | + | ||
8 | + { :id => 6, :project_id => 2, :user_id => 1}, | ||
9 | + { :id => 7, :project_id => 2, :user_id => 2}, | ||
10 | + { :id => 8, :project_id => 2, :user_id => 3}, | ||
11 | + { :id => 9, :project_id => 2, :user_id => 4}, | ||
12 | + { :id => 11, :project_id => 2, :user_id => 5}, | ||
13 | + | ||
14 | + { :id => 12, :project_id => 3, :user_id => 1}, | ||
15 | + { :id => 13, :project_id => 3, :user_id => 2}, | ||
16 | + { :id => 14, :project_id => 3, :user_id => 3}, | ||
17 | + { :id => 15, :project_id => 3, :user_id => 4}, | ||
18 | + { :id => 16, :project_id => 3, :user_id => 5} | ||
19 | +]) | ||
20 | + | ||
21 | + |