diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
commit | a8e93b7f51d968c1380ed210499869b62b07fd15 (patch) | |
tree | c864e80dfd9cf4f83fcede678acc986e3a125bf5 /db/fixtures/development/12_snippets.rb | |
parent | 0625b15a481b3a3edd88110b3c18031ad9068d2f (diff) |
Version 7.10.0.rc5v7.10.0.rc5
Diffstat (limited to 'db/fixtures/development/12_snippets.rb')
-rw-r--r-- | db/fixtures/development/12_snippets.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/db/fixtures/development/12_snippets.rb b/db/fixtures/development/12_snippets.rb deleted file mode 100644 index b3a6f39c7d5..00000000000 --- a/db/fixtures/development/12_snippets.rb +++ /dev/null @@ -1,40 +0,0 @@ -Gitlab::Seeder.quiet do - content =<<eos -class Member < ActiveRecord::Base - include Notifiable - include Gitlab::Access - - belongs_to :user - belongs_to :source, polymorphic: true - - validates :user, presence: true - validates :source, presence: true - validates :user_id, uniqueness: { scope: [:source_type, :source_id], message: "already exists in source" } - validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true - - scope :guests, -> { where(access_level: GUEST) } - scope :reporters, -> { where(access_level: REPORTER) } - scope :developers, -> { where(access_level: DEVELOPER) } - scope :masters, -> { where(access_level: MASTER) } - scope :owners, -> { where(access_level: OWNER) } - - delegate :name, :username, :email, to: :user, prefix: true -end -eos - - (1..50).each do |i| - user = User.all.sample - - PersonalSnippet.seed(:id, [{ - id: i, - author_id: user.id, - title: Faker::Lorem.sentence(3), - file_name: Faker::Internet.domain_word + '.rb', - visibility_level: Gitlab::VisibilityLevel.values.sample, - content: content, - }]) - - print('.') - end -end - |