Last active
August 29, 2015 14:01
-
-
Save taylor-smith/8d42dbbbfd33dc898fff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sqlite3' | |
namespace :type_of_task do | |
task :name_of_task => [:task_dependency] do | |
puts "I Work!" | |
end | |
end | |
namespace :db do | |
task :load do | |
db = SQLite3::Database.new("test.db") | |
puts 'I work!' | |
end | |
task :create => [:load] do | |
db ||= SQLite3::Database.new "test db" | |
db | |
puts "I Work" | |
end | |
task :drop => [:load] do | |
File.delete("test.db") | |
puts "I work" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment