Permalink
Browse files

sample_app:setup Rake task is only visible from sample_app dir

  • Loading branch information...
1 parent ba0754d commit 78dd8dbce3c4681dd2c270570fc7fe0506a2c0f5 Alex Lebedev committed Apr 3, 2009
Showing with 9 additions and 6 deletions.
  1. +1 −1 Rakefile
  2. +8 −5 sample_app/lib/tasks/sample_app.rake
View
@@ -3,7 +3,7 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
-#require 'rake/contrib/rubyforgepublisher'
+require 'rake/contrib/rubyforgepublisher'
PKG_VERSION = "0.1.0"
PKG_NAME = "service_merchant"
@@ -1,9 +1,12 @@
namespace :sample_app do
- desc "Create subscription management and require plugins' database tables"
- task :setup => %w(dependencies tracker:create_tables subscription:create_tables)
+ # Prevent visibility outside sample_app dir
+ if %r(^#{Dir.getwd}) =~ __FILE__ and %r(/sample_app/$) =~ Dir.getwd
+ desc "Create subscription management and require plugins' database tables"
+ task :setup => %w(dependencies tracker:create_tables subscription:create_tables)
- task :dependencies => :environment do
- require 'tracker/tasks/schema' # TRACKER db
- require 'subscription_management/tasks/schema' # SM db
+ task :dependencies => :environment do
+ require 'tracker/tasks/schema' # TRACKER db
+ require 'subscription_management/tasks/schema' # SM db
+ end
end
end

0 comments on commit 78dd8db

Please sign in to comment.