diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-11 15:44:36 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-12-11 15:44:36 +0400 |
commit | c92726e6c8a995e1555c31411977d6bcce25c1e3 (patch) | |
tree | a5ecb133edb654e693e9d2bdcad631c0326d0011 /db/fixtures | |
parent | 5d219bd5f04ea5a9745f37bc2bac87ddc9460d1f (diff) |
Reordered developers seeds a bit. Now seeds faster and has valid post-receive files
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/002_project.rb | 13 | ||||
-rw-r--r-- | db/fixtures/development/009_source_code.rb | 7 | ||||
-rw-r--r-- | db/fixtures/development/010_groups.rb | 11 |
3 files changed, 15 insertions, 16 deletions
diff --git a/db/fixtures/development/002_project.rb b/db/fixtures/development/002_project.rb index 91d42a14201..4db11a878ec 100644 --- a/db/fixtures/development/002_project.rb +++ b/db/fixtures/development/002_project.rb @@ -1,5 +1,14 @@ +Group.seed(:id, [ + { id: 100, name: "Brightbox", path: 'brightbox', owner_id: 1 }, + { id: 101, name: "KDE", path: 'kde', owner_id: 1 }, +]) + Project.seed(:id, [ - { id: 1, name: "Underscore.js", path: "underscore", owner_id: 1, namespace_id: 1 }, + { id: 1, name: "Underscore.js", path: "underscore", owner_id: 1 }, { id: 2, name: "Diaspora", path: "diaspora", owner_id: 1 }, - { id: 3, name: "Ruby on Rails", path: "rails", owner_id: 1 } + { id: 3, namespace_id: 100, name: "Brightbox CLI", path: "brightbox-cli", owner_id: 1 }, + { id: 4, namespace_id: 100, name: "Puppet", path: "puppet", owner_id: 1 }, + { id: 5, namespace_id: 101, name: "kdebase", path: "kdebase", owner_id: 1}, + { id: 6, namespace_id: 101, name: "kdelibs", path: "kdelibs", owner_id: 1}, + { id: 7, namespace_id: 101, name: "amarok", path: "amarok", owner_id: 1}, ]) diff --git a/db/fixtures/development/009_source_code.rb b/db/fixtures/development/009_source_code.rb index 849d1aab8ae..6b9b6584a58 100644 --- a/db/fixtures/development/009_source_code.rb +++ b/db/fixtures/development/009_source_code.rb @@ -1,9 +1,10 @@ root = Gitlab.config.git_base_path projects = [ - { path: 'root/underscore.git', git: 'https://github.com/documentcloud/underscore.git' }, + { path: 'underscore.git', git: 'https://github.com/documentcloud/underscore.git' }, { path: 'diaspora.git', git: 'https://github.com/diaspora/diaspora.git' }, - { path: 'rails.git', git: 'https://github.com/rails/rails.git' }, + { path: 'brightbox/brightbox-cli.git', git: 'https://github.com/brightbox/brightbox-cli.git' }, + { path: 'brightbox/puppet.git', git: 'https://github.com/brightbox/puppet.git' }, ] projects.each do |project| @@ -14,7 +15,7 @@ projects.each do |project| cmds = [ "cd #{root} && sudo -u git -H git clone --bare #{project[:git]} ./#{project[:path]}", - "sudo cp ./lib/hooks/post-receive #{project_path}/hooks/post-receive", + "sudo ln -s ./lib/hooks/post-receive #{project_path}/hooks/post-receive", "sudo chown git:git -R #{project_path}", "sudo chmod 770 -R #{project_path}", ] diff --git a/db/fixtures/development/010_groups.rb b/db/fixtures/development/010_groups.rb deleted file mode 100644 index 09371b00751..00000000000 --- a/db/fixtures/development/010_groups.rb +++ /dev/null @@ -1,11 +0,0 @@ -Group.seed(:id, [ - { id: 100, name: "Gitlab", path: 'gitlab', owner_id: 1}, - { id: 101, name: "Rails", path: 'rails', owner_id: 1 }, - { id: 102, name: "KDE", path: 'kde', owner_id: 1 } -]) - -Project.seed(:id, [ - { id: 10, name: "kdebase", path: "kdebase", owner_id: 1, namespace_id: 102 }, - { id: 11, name: "kdelibs", path: "kdelibs", owner_id: 1, namespace_id: 102 }, - { id: 12, name: "amarok", path: "amarok", owner_id: 1, namespace_id: 102 } -]) |