2019-03-26 15:32:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-17 22:18:48 +00:00
|
|
|
designs = YAML.safe_load(File.read('db/seeds/designs.yml'))
|
|
|
|
|
|
|
|
designs.each do |d|
|
|
|
|
design = Design.find_or_create_by(gem: d['gem'])
|
|
|
|
|
2019-09-17 21:27:51 +00:00
|
|
|
design.update d
|
2019-07-17 22:18:48 +00:00
|
|
|
end
|
2019-07-19 22:37:53 +00:00
|
|
|
|
|
|
|
licencias = YAML.safe_load(File.read('db/seeds/licencias.yml'))
|
|
|
|
|
|
|
|
licencias.each do |l|
|
|
|
|
licencia = Licencia.find_or_create_by(icons: l['icons'])
|
|
|
|
|
2019-09-17 21:27:51 +00:00
|
|
|
licencia.update l
|
2019-07-19 22:37:53 +00:00
|
|
|
end
|
2019-09-07 00:58:52 +00:00
|
|
|
|
2023-06-09 15:44:40 +00:00
|
|
|
if CodeOfConduct.count.zero?
|
|
|
|
YAML.safe_load(File.read('db/seeds/codes_of_conduct.yml')).each do |coc|
|
|
|
|
CodeOfConduct.new(**coc).save!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
if PrivacyPolicy.count.zero?
|
|
|
|
YAML.safe_load(File.read('db/seeds/privacy_policies.yml')).each do |pp|
|
|
|
|
PrivacyPolicy.new(**pp).save!
|
|
|
|
end
|
|
|
|
end
|