Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
[INSTALLER] fixed theme address, removed references to /public/themes…
Browse files Browse the repository at this point in the history
… in install, removed double messaging of finished from install script, removed doubled save of user in default admin creation
  • Loading branch information
Adam Dill committed Feb 10, 2009
1 parent 4d093ad commit a8dd466
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/ansuz/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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? )
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit a8dd466

Please sign in to comment.