Skip to content

Commit

Permalink
Updating readme and setup tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Branca committed Apr 9, 2010
1 parent 8a2ad18 commit 4d7c4d3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
36 changes: 21 additions & 15 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,40 @@ N2 is the latest and greatest iteration of the Newscloud framework.
== Getting Started

1. Clone this application to your machine
2. copy config/database.yml.sample to config/database.yml and configure your db.
3. copy config/facebooker.yml.sample to config/facebook.yml and configure your facebook app.
4. copy config/application_settings.yml.sample to config/application_settings.yml.
2. Setup config files
2.a copy config/database.yml.sample to config/database.yml and configure your db.
2.b copy config/facebooker.yml.sample to config/facebook.yml and configure your facebook app.
2.c copy config/application_settings.yml.sample to config/application_settings.yml.
This is your base config file where you set your site specific options related to the framework.
4.b (optional)
***This needs to be setup properly to work
2.d copy config/menu.yml.sample to config/menu.yml and disable and items you do not want showing up.
2.e copy config/compass.yml.sample to config/compass.yml and disable and items you do not want showing up.
***You need to edit your image path to be an absolute url for css images in facebook to work
2.f If you are not using memcached in production edit config/environments/production.rb and set it accordingly
2.g (optional)
If you wish to configure outgoing email, copy config/smtp.yml.sample to config/smtp.yml
and configure your outgoing mail settings. Google hosted email is supported!
4.c (optional) There are also a number of *.yml.sample files in the config directory for advanced use.
5. Next check that the gems are setup properly by running
2.h (optional) There are also a number of *.yml.sample files in the config directory for advanced use.
3. Next check that the gems are setup properly by running
rake gems
If you don't see any error messages then you are good to go. You might have to run:
sudo rake gems:build
or
sudo rake gems:install
or
sudo rake gems:build
to build the native extensions for some of the gems.
6. Build the database
4. Setup the framework
If you have an existing newscloud application you would like to port over, run:
rake n2:db:convert_and_create_database
rake n2:setup:convert_existing
This will prompt you for the old database info and will migrate to the new database.
This will _not_ harm your existing database, it will create a new database for rails
and perform the conversions there, leaving your existing application intact.
If you do not have an existing application you want to convert, simply run:
rake db:setup
and this will build the database for you.
7. Now start the server with:
If you would like to create a fresh install, just run:
rake n2:setup
and this will setup the n2 framework for you.
5. Now start the server with:
ruby script/server
and you should be up and running
8. Next you need to configure the admin interface.
6. Next you need to configure the admin interface.
If you are converting an existing newscloud framework, and you already have
an admin user account, you can login and access the admin interface just fine.
As long as there are no existing admin users, there will be a default login account for you to use, which is configurable in your application_settings.yml file.
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/db.rake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace :n2 do
puts "Finished converting your old database into the new rails format!"
puts "Processing existing records and removing floating data"
Rake::Task['n2:data:bootstrap'].invoke
Rake::Task['n2:util:compass:compile_css'].invoke
puts "All tasks finished, your new database is setup and good to go!"
end

Expand Down
25 changes: 25 additions & 0 deletions lib/tasks/n2.rake
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,29 @@ namespace :n2 do
end

end

namespace :setup do

desc "Default N2 setup task"
task :default do
puts "Setting up your N2 framework"
Rake::Task['db:setup'].invoke
Rake::Task['n2:data:load_locale_data'].invoke
Rake::Task['n2:data:generate_widgets'].invoke
Rake::Task['n2:util:compass:compile_css'].invoke
puts "Finished setting up your application"
end

desc "Convert an existing php based newscloud framework to N2"
task :convert_existing => :environment do
puts "Setting up your N2 framework from an existing newscloud installation"
# Using system here because for some reason invoking it manually won't
# directly print get the input request
system('rake n2:db:convert_and_create_database')
#Rake::Task['n2:db:convert_and_create_database'].invoke
end

end
desc "Alias for n2:setup:default"
task :setup => 'setup:default'
end

0 comments on commit 4d7c4d3

Please sign in to comment.