diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-06-30 18:15:19 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-12 19:17:19 +0200 |
commit | 4269d1493aa28d861f3253563034767018cf8243 (patch) | |
tree | 8abce31eeae0adaecc66951a7da49945dbc7a5dd /db | |
parent | User may view and answer only one randomly chosen question from group (diff) | |
download | recruiting-webapp-4269d1493aa28d861f3253563034767018cf8243.tar.gz recruiting-webapp-4269d1493aa28d861f3253563034767018cf8243.tar.bz2 recruiting-webapp-4269d1493aa28d861f3253563034767018cf8243.zip |
Added a group of alternative questions to seed
Example of alternative questions from Betelgeuse.
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/questions.yml | 35 | ||||
-rw-r--r-- | db/seeds.rb | 7 |
2 files changed, 41 insertions, 1 deletions
diff --git a/db/fixtures/questions.yml b/db/fixtures/questions.yml index fb3e910..1023dec 100644 --- a/db/fixtures/questions.yml +++ b/db/fixtures/questions.yml @@ -20,6 +20,41 @@ ebuild_q3: content: "When is it appropriate to post to the following mailing lists: gentoo-core, gentoo-dev, gentoo-dev-announce, gentoo-project?" +ebuild_q4: + title: src_install + documentation: GLEPs + question_category: ebuild + question_group: ebuild_group1 + content: "src_install () { + dobin uvconvert/${PN} + doman uvconv.1 + dodoc readme.txt AUTHORS CREDITS changes.txt + }" + + +ebuild_q5: + title: src_install + documentation: devmanual + question_category: ebuild + question_group: ebuild_group1 + content: "src_install() { + dobin utrac + doman utrac.1 + dodoc README CHANGES CREDITS + }" + + +ebuild_q6: + title: src_install + documentation: handbook + question_category: ebuild + question_group: ebuild_proup1 + content: "src_install() { + dobin tree + doman man/tree.1 + dodoc CHANGES README* + }" + mentor_q1: title: Scopes in ebuild documentation: handbook diff --git a/db/seeds.rb b/db/seeds.rb index 08b3f1d..2b57ef6 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -35,8 +35,10 @@ end User.destroy_all Answer.destroy_all QuestionCategory.destroy_all +QuestionGroup.destroy_all Question.destroy_all UserCategory.destroy_all +UserQuestionGroup.destroy_all User.destroy_all seeder = SeedHelper.new @@ -46,8 +48,11 @@ seeder.objects['ebuild'] = QuestionCategory.create! :name => 'Ebuild quiz' seeder.objects['mentoring'] = QuestionCategory.create! :name => 'End of mentoring quiz' seeder.objects['non'] = QuestionCategory.create! :name => 'Non-ebuild staff quiz' +# Question groups +seeder.objects['ebuild_group1'] = QuestionGroup.create! :name => 'ebuild_group1', :description => 'src_install implementations to comment on' + # Questions - load from YAML file -seeder.read_yaml 'db/fixtures/questions.yml', Question, 'question_category' +seeder.read_yaml 'db/fixtures/questions.yml', Question, ['question_category', 'question_group'] # Users - load from YAML file seeder.read_yaml 'db/fixtures/users.yml', User, 'mentor' |