[Xfce4-commits] <moka:nick/maintainer-improvements> Disable loading defaults.

Nick Schermer noreply at xfce.org
Sat Oct 15 21:16:02 CEST 2011


Updating branch refs/heads/nick/maintainer-improvements
         to 62532a6f4e365aeb52084ba9667f3e621612c2f1 (commit)
       from 11d800b5691bd85a1d6b4f6a5c9ac908a75d4c1c (commit)

commit 62532a6f4e365aeb52084ba9667f3e621612c2f1
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Oct 15 17:34:42 2011 +0200

    Disable loading defaults.

 examples/xfce/config.ru |  180 +++++++++++++++++++++++-----------------------
 1 files changed, 90 insertions(+), 90 deletions(-)

diff --git a/examples/xfce/config.ru b/examples/xfce/config.ru
index ae22e5f..187e615 100755
--- a/examples/xfce/config.ru
+++ b/examples/xfce/config.ru
@@ -84,97 +84,97 @@ Moka::Models::Configuration.load do |conf|
   conf.set :noreply, 'noreply at xfce.org'
 end
 
-# Uncheck for production environment
-DataMapper.auto_upgrade!
 DataMapper.finalize
 
-admin = Moka::Models::Role.first_or_create(
-  { :name => 'admin' },
-  { :description => "Administrator" }
-)
-admin.save
-
-# create dummy user
-nick = Moka::Models::Maintainer.first_or_create(
-  { :username => 'nick' },
-  { :realname => 'Nick Schermer',
-    :password => Digest::SHA1.hexdigest('test'),
-    :email => 'nick at xfce.org',
-    :active => true }
-)
-nick.roles << admin
-nick.save
-
-jannis = Moka::Models::Maintainer.first_or_create(
-  { :username => 'jannis' },
-  { :realname => 'Jannis Pohlmann',
-    :password => Digest::SHA1.hexdigest('test'),
-    :email => 'jannis at xfce.org',
-    :active => true }
-)
-jannis.save
-
-jeromeg = Moka::Models::Maintainer.first_or_create(
-  { :username => 'jeromeg' },
-  { :realname => 'Jérôme Guelfucci',
-    :password => Digest::SHA1.hexdigest('test'),
-    :email => 'jeromeg at xfce.org',
-    :active => false }
-)
-jeromeg.save
-
-panel = Moka::Models::Project.first_or_create(
-  { :name =>           'xfce4-panel' },
-  { :website =>        'http://www.xfce.org',
-    :description =>    'Xfce\'s Panel' }
-)
-panel.maintainers << nick
-panel.save
-
-thunar = Moka::Models::Project.first_or_create(
-  { :name =>           'thunar' },
-  { :website =>        'http://thunar.xfce.org',
-    :description =>    'Xfce\'s File Manager' }
-)
-thunar.maintainers << nick
-thunar.maintainers << jannis
-thunar.save
-
-terminal = Moka::Models::Project.first_or_create(
-  { :name =>           'terminal' },
-  { :website =>        'http://www.xfce.org',
-    :description =>    'Xfce\'s Terminal Emulator' }
-)
-terminal.maintainers << nick
-terminal.save
-
-tumbler = Moka::Models::Project.first_or_create(
-  { :name =>           'tumbler' },
-  { :website =>        'http://www.xfce.org',
-    :description =>    'Thumbnail generator' }
-)
-tumbler.maintainers << jannis
-tumbler.save
-
-libxfce4ui = Moka::Models::Project.first_or_create(
-  { :name =>           'libxfce4ui' },
-  { :website =>        'http://www.xfce.org',
-    :description =>    'Xfce Widgets Library' }
-)
-libxfce4ui.maintainers << jannis
-libxfce4ui.maintainers << nick
-libxfce4ui.maintainers << jeromeg
-libxfce4ui.save
-
-# create dummy classification
-collection = Moka::Models::Collection.first_or_create(
-  { :name => 'xfce' },
-  { :display_name => 'Xfce',
-    :website => 'http://www.xfce.org' }
-)
-collection.maintainers << nick
-collection.maintainers << jannis
-collection.maintainers << jeromeg
-collection.save
+if false
+  admin = Moka::Models::Role.first_or_create(
+    { :name => 'admin' },
+    { :description => "Administrator" }
+  )
+  admin.save
+  
+  # create dummy user
+  nick = Moka::Models::Maintainer.first_or_create(
+    { :username => 'nick' },
+    { :realname => 'Nick Schermer',
+      :password => Digest::SHA1.hexdigest('test'),
+      :email => 'nick at xfce.org',
+      :active => true }
+  )
+  nick.roles << admin
+  nick.save
+  
+  jannis = Moka::Models::Maintainer.first_or_create(
+    { :username => 'jannis' },
+    { :realname => 'Jannis Pohlmann',
+      :password => Digest::SHA1.hexdigest('test'),
+      :email => 'jannis at xfce.org',
+      :active => true }
+  )
+  jannis.save
+  
+  jeromeg = Moka::Models::Maintainer.first_or_create(
+    { :username => 'jeromeg' },
+    { :realname => 'Jérôme Guelfucci',
+      :password => Digest::SHA1.hexdigest('test'),
+      :email => 'jeromeg at xfce.org',
+      :active => false }
+  )
+  jeromeg.save
+  
+  panel = Moka::Models::Project.first_or_create(
+    { :name =>           'xfce4-panel' },
+    { :website =>        'http://www.xfce.org',
+      :description =>    'Xfce\'s Panel' }
+  )
+  panel.maintainers << nick
+  panel.save
+  
+  thunar = Moka::Models::Project.first_or_create(
+    { :name =>           'thunar' },
+    { :website =>        'http://thunar.xfce.org',
+      :description =>    'Xfce\'s File Manager' }
+  )
+  thunar.maintainers << nick
+  thunar.maintainers << jannis
+  thunar.save
+  
+  terminal = Moka::Models::Project.first_or_create(
+    { :name =>           'terminal' },
+    { :website =>        'http://www.xfce.org',
+      :description =>    'Xfce\'s Terminal Emulator' }
+  )
+  terminal.maintainers << nick
+  terminal.save
+  
+  tumbler = Moka::Models::Project.first_or_create(
+    { :name =>           'tumbler' },
+    { :website =>        'http://www.xfce.org',
+      :description =>    'Thumbnail generator' }
+  )
+  tumbler.maintainers << jannis
+  tumbler.save
+  
+  libxfce4ui = Moka::Models::Project.first_or_create(
+    { :name =>           'libxfce4ui' },
+    { :website =>        'http://www.xfce.org',
+      :description =>    'Xfce Widgets Library' }
+  )
+  libxfce4ui.maintainers << jannis
+  libxfce4ui.maintainers << nick
+  libxfce4ui.maintainers << jeromeg
+  libxfce4ui.save
+  
+  # create dummy classification
+  collection = Moka::Models::Collection.first_or_create(
+    { :name => 'xfce' },
+    { :display_name => 'Xfce',
+      :website => 'http://www.xfce.org' }
+  )
+  collection.maintainers << nick
+  collection.maintainers << jannis
+  collection.maintainers << jeromeg
+  collection.save
+end
 
 run Moka::Application


More information about the Xfce4-commits mailing list