Permalink
Browse files

Added a rake install task, which combines migrate and update into one…

…. Updated README install instructions to use this instead.
  • Loading branch information...
1 parent b909b55 commit d83cb7db2c2e2884384c27b067d5de2822e3c45c @nelstrom committed Nov 8, 2008
Showing with 15 additions and 12 deletions.
  1. +7 −11 README
  2. +8 −1 lib/tasks/sns_extension_tasks.rake
View
18 README
@@ -86,25 +86,21 @@ There are a number of interesting benefits gained by this approach:
1. Copy this extension into your existing Radiant project (place it at:
[your project location]/vendor/extensions/sns
-2. Incorporate the database migrations into your existing database using:
- rake db:migrate:extensions
+2. Run the install rake task:
+ rake radiant:extensions:sns:install
+ This is equivalent to running `rake radiant:extensions:sns:migrate`
+ then `rake radiant:extensions:sns:update` consecutively.
- Or, if you prefer to be more specific to this extension:
- rake radiant:extensions:sns:migrate
-
-3. Copy the needed images into Radiant's /public/images directory using:
- rake radiant:extensions:sns:update
-
-4. (Optional) Configure your stylesheet and javascript directories. By default
+3. (Optional) Configure your stylesheet and javascript directories. By default
The Styles 'n Scripts serves your stylesheets and javascripts out of the
/css and /js folders respectively. You can change these locations via the
"config" rake task:
rake radiant:extensions:sns:config
-5. (Optional) Configure your stylesheet and javascript content (MIME) types.
+4. (Optional) Configure your stylesheet and javascript content (MIME) types.
Again, you use the Rake "config" task.
-6. (Optional) Set a different location for the cache directory. This is set in
+5. (Optional) Set a different location for the cache directory. This is set in
The sns_extension.rb file using TEXT_ASSET_CACHE_DIR
View
9 lib/tasks/sns_extension_tasks.rake
@@ -1,7 +1,14 @@
namespace :radiant do
namespace :extensions do
namespace :sns do
-
+
+ desc "Runs migrations for SnS, and copies public assets.
+ Equivalent to running `rake radiant:extensions:sns:migrate`
+ then `rake radiant:extensions:sns:update` consecutively."
+ task :install => [:environment, :migrate, :update] do
+ puts "The SnS extension has been successfully installed."
+ end
+
desc "Runs the migration of the SnS extension"
task :migrate => :environment do
require 'radiant/extension_migrator'

0 comments on commit d83cb7d

Please sign in to comment.