Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[INSTALLER] fixed theme address, removed references to /public/themes…

… in install, removed double messaging of finished from install script, removed doubled save of user in default admin creation
  • Loading branch information...
Adam Dill
Adam Dill committed Feb 10, 2009
1 parent 4d093ad commit a8dd4660cd12bc38d9bb8ef6caa1b72c4d0f5fa2
Showing with 2 additions and 7 deletions.
  1. +2 −7 lib/ansuz/installer.rb
@@ -10,7 +10,7 @@ def initialize(environment = ENV['RAILS_ENV'], stdin = $stdin, stdout = $stdout)
@state = :started # this helps with the tests
end

def choose_theme(theme_directory = File.join(RAILS_ROOT, "public", "themes"))
def choose_theme(theme_directory = File.join(RAILS_ROOT, "themes"))
FileUtils.mkdir_p( theme_directory ) unless File.directory?( theme_directory )
@themes = Dir.entries(theme_directory).select{|d| d =~ /^\w|^\d/}.collect{|theme| theme="- #{theme}"}
if( @themes.any? )
@@ -35,7 +35,7 @@ def choose_theme(theme_directory = File.join(RAILS_ROOT, "public", "themes"))
end
else
@state = :no_themes_available
@stdout.puts "[ansuz]No themes available!"
@stdout.puts "[ansuz] No themes available!"
end
end

@@ -107,10 +107,6 @@ def install

choose_theme
@state = :installation_complete



@stdout.puts "[ansuz] Finished! Start Ansuz with `script/server` on Linux or `ruby script/server` on Windows."
end

protected
@@ -140,7 +136,6 @@ def create_config_for_environment( environments, config )

def create_default_admin_user(password)
u = User.new :login => 'admin', :email => 'admin@example.com', :password => password, :password_confirmation => password
u.save
u.has_role 'admin'
u.save
@stdout.puts "[ansuz] Admin user created with login 'admin' and the password you entered."

0 comments on commit a8dd466

Please sign in to comment.
You can’t perform that action at this time.