Sha256: 84113ddca81f91c41265159289214b778843e9fb28c68663efc6e48237f2902e

Contents?: true

Size: 1014 Bytes

Versions: 3

Compression:

Stored size: 1014 Bytes

Contents

# A variety of commands that can be used to populate the database information
namespace :hubstats do

  desc "Create the database, load the schema, and pull data from Github (use hubstats:reset to also drop the db first)"
  task :setup => :environment do
    puts "Running rake db:create"
    Rake::Task['db:create'].invoke
    puts "Running rake db:migrate"
    Rake::Task['db:migrate'].invoke
    puts "Pulling data from Github. This may take a while..."
    Rake::Task['hubstats:populate:setup_repos'].invoke
  end

  desc "Drops the database, then runs rake hubstats:setup"
  task :reset => :environment do
    puts "Dropping Database"
    Rake::Task['db:drop'].invoke
    Rake::Task['hubstats:setup'].invoke
  end

  desc "Updates changes to the config file"
  task :update => :environment do
    puts "Updating repos"
    Rake::Task['hubstats:populate:update_repos'].invoke
  end

  desc "Updates the seed"
  task :seed => :environment do
    puts "Updating seed"
    Rake::Task['db:seed'].invoke
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hubstats-0.4.4 lib/tasks/hubstats_tasks.rake
hubstats-0.4.2 lib/tasks/hubstats_tasks.rake
hubstats-0.4.1 lib/tasks/hubstats_tasks.rake