Sha256: 94a5595557faa6110ede6bb191da3979f6df4d11bac7fc18b972841b5536b656

Contents?: true

Size: 1.63 KB

Versions: 12

Compression:

Stored size: 1.63 KB

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
    Rake::Task['hubstats:populate:setup_teams'].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

  desc "Updates the teams for past pull requests"
  task :update_teams_in_pulls => :environment do
    puts "Updating teams for past pull requests"
    Rake::Task['hubstats:populate:update_teams_in_pulls'].invoke
  end

  desc "Updates the teams"
  task :update_teams => :environment do
    puts "Updating teams"
    Rake::Task['hubstats:populate:update_teams'].invoke
  end

  desc "Creates webhook from github for organization"
  task :make_org_webhook => :environment do
    puts "Making a webhook for an organization in octokit.yml"
    Rake::Task['hubstats:populate:setup_teams'].invoke
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hubstats-0.5.12 lib/tasks/hubstats_tasks.rake
hubstats-0.5.11 lib/tasks/hubstats_tasks.rake
hubstats-0.5.10 lib/tasks/hubstats_tasks.rake
hubstats-0.5.9 lib/tasks/hubstats_tasks.rake
hubstats-0.5.7 lib/tasks/hubstats_tasks.rake
hubstats-0.5.6 lib/tasks/hubstats_tasks.rake
hubstats-0.5.5 lib/tasks/hubstats_tasks.rake
hubstats-0.5.4 lib/tasks/hubstats_tasks.rake
hubstats-0.5.3 lib/tasks/hubstats_tasks.rake
hubstats-0.5.2 lib/tasks/hubstats_tasks.rake
hubstats-0.5.1 lib/tasks/hubstats_tasks.rake
hubstats-0.5.0 lib/tasks/hubstats_tasks.rake