diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2012-06-25 17:44:32 +0200 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2012-06-25 17:44:32 +0200 |
commit | 7dd0da673d76f9b3ddbd86bbb17f1633f009b7e5 (patch) | |
tree | e1b5bc294abce546303bcaf5237dda9fb2a80c6a /db | |
parent | 81805c6da82c61c9665d8ca786f76278972f7f40 (diff) | |
download | ecs2-7dd0da673d76f9b3ddbd86bbb17f1633f009b7e5.tar.gz ecs2-7dd0da673d76f9b3ddbd86bbb17f1633f009b7e5.zip |
Seeds modification.
Diffstat (limited to 'db')
-rw-r--r-- | db/seeds.rb | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index de0baab..4ce84c8 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -16,33 +16,23 @@ # You should have received a copy of the GNU Affero General Public # License along with ECS. If not, see <http://www.gnu.org/licenses/>. -Organization.create \ - :name => "not available", +Organization.create :name => "not available", :description => "For anonymous participants.", - :abrev => "n/a" \ - if Organization.find_by_name("not available").nil? -Organization.create \ - :name => "system", + :abrev => "n/a" if Organization.find_by_name("not available").nil? and ECS_CONFIG["participants"]["allow_anonymous"] == true +Organization.create :name => "system", :description => "Internal ECS community.", - :abrev => "sys" \ - if Organization.find_by_name("system").nil? -Participant.create \ - :name => "ecs", + :abrev => "sys" if Organization.find_by_name("system").nil? +Participant.create :name => "ecs", :description => "ECS system participant", :dns => 'n/a', :community_selfrouting => false, - :organization_id => Organization.find_by_name("system").id \ - if Participant.find_by_name("ecs").nil? -Community.create \ - :name => "public", - :description => "For anonymous participants." \ - if Community.find_by_name("public").nil? + :organization_id => Organization.find_by_name("system").id if Participant.find_by_name("ecs").nil? +Community.create :name => "public", + :description => "For anonymous participants." if Community.find_by_name("public").nil? %w(created destroyed updated notlinked).each do |evt| - EvType.create :name => evt if EvType.find_by_name(evt).nil? + EvType.create :name => evt if EvType.find_by_name(evt).nil? and ECS_CONFIG["participants"]["allow_anonymous"] == true end -Ressource.create \ - :namespace => 'sys', +Ressource.create :namespace => 'sys', :ressource => 'auths', :postroute => true, - :events => false \ - if Ressource.find_by_namespace_and_ressource("sys","auths").nil? + :events => false if Ressource.find_by_namespace_and_ressource("sys","auths").nil? |