Permalink
Browse files

Added the db:init thor task.

  • Loading branch information...
1 parent 482f989 commit cf11029f5012102ca6378ec9cd8ae096398e31c7 @gma committed Nov 11, 2008
Showing with 8 additions and 12 deletions.
  1. +8 −0 Thorfile
  2. +0 −12 lib/integral/console.rb
View
@@ -17,6 +17,14 @@ class Db < Thor
ActiveRecord::Migrator.migrate(
"db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
end
+
+ desc "init", "create first successful test run"
+ def init
+ run = TestRun.new
+ run.application_versions << ApplicationVersion.check_current_versions(:live)
+ run.passed = true
+ run.save!
+ end
end
class App < Thor
View
@@ -1,15 +1,3 @@
# Loaded by script/console.
Integral::Database.connect
-
-# You should only use this function when you first install integral, to give
-# yourself a successful test run for your existing applications. You should
-# use the app:add thor task to add all relevant applications before you
-# run it.
-#
-def create_test_run_from_live_versions(success)
- run = TestRun.new
- run.application_versions << ApplicationVersion.check_current_versions(:live)
- run.passed = success
- run.save!
-end

0 comments on commit cf11029

Please sign in to comment.