aboutsummaryrefslogtreecommitdiffstats
path: root/db/seeds
diff options
context:
space:
mode:
authorAlban Peignier2017-11-30 10:33:19 +0100
committerAlban Peignier2017-11-30 10:33:19 +0100
commit63e3d451173349c9573ce7ff5afeb71c5aa17d6f (patch)
tree321504b5fbde1a7c7bc56a07b4ba86d706e721e7 /db/seeds
parent84b4bc9313c17baf62783cf9eb33cd9b3e7ac89f (diff)
downloadchouette-core-63e3d451173349c9573ce7ff5afeb71c5aa17d6f.tar.bz2
Remove the legacy stif file (replaced by stif.seeds.rb). Refs #5109
Diffstat (limited to 'db/seeds')
-rw-r--r--db/seeds/stif.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/db/seeds/stif.rb b/db/seeds/stif.rb
deleted file mode 100644
index d31a35cfc..000000000
--- a/db/seeds/stif.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# coding: utf-8
-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-
-stop_area_referential = StopAreaReferential.find_or_create_by!(name: "Reflex")
-line_referential = LineReferential.find_or_create_by!(name: "CodifLigne")
-
-# Organisations
-stif = Organisation.find_or_create_by!(code: "STIF") do |org|
- org.name = 'STIF'
-end
-operator = Organisation.find_or_create_by!(code: 'transporteur-a') do |organisation|
- organisation.name = "Transporteur A"
-end
-
-# Member
-line_referential.add_member stif, owner: true
-line_referential.add_member operator
-
-stop_area_referential.add_member stif, owner: true
-stop_area_referential.add_member operator
-
-# Users
-stif.users.find_or_create_by!(username: "admin") do |user|
- user.email = 'stif-boiv@af83.com'
- user.password = "secret"
- user.name = "STIF Administrateur"
-end
-
-operator.users.find_or_create_by!(username: "transporteur") do |user|
- user.email = 'stif-boiv+transporteur@af83.com'
- user.password = "secret"
- user.name = "Martin Lejeune"
-end
-
-# Include all Lines in organisation functional_scope
-stif.update sso_attributes: { functional_scope: line_referential.lines.pluck(:objectid) }
-operator.update sso_attributes: { functional_scope: line_referential.lines.limit(3).pluck(:objectid) }