Sha256: 876f6e441de2986e05e99436b5aebc9cabe1f4333f4868e55297b2f75ee40492

Contents?: true

Size: 962 Bytes

Versions: 29

Compression:

Stored size: 962 Bytes

Contents

# Rake tasks for Analytics DB
#
# include in Rakefile via:
#
# require 'vault-tools/analytics_db_tasks'

desc "Pull db/vault-analytics.sql from api HEAD"
task :pull_analytics_schema do
  steps = []
  steps << 'mkdir -p contrib/'
  steps << 'cd contrib/'
  if File.exists?('contrib/vault-analytics')
    steps << 'rm -rf vault-analytics'
  end
  steps << 'git clone -n git@github.com:heroku/vault-analytics --depth 1'
  steps << 'cd vault-analytics'
  steps << 'git checkout HEAD db/vault-analytics.sql'
  # make sure we don't submodule it
  steps << 'rm -rf .git'
  sh steps.join(' && ')
end

desc "Drop and recreate the vault-analytics-test database"
task :create_analytics_db => [:drop_analytics_db] do
  sh 'createdb vault-analytics-test'
  sh 'psql --no-psqlrc vault-analytics-test -f contrib/vault-analytics/db/vault-analytics.sql'
end

desc "Drop the vault-analytics-test database"
task :drop_analytics_db do
  sh 'dropdb vault-analytics-test || true'
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
vault-tools-2.1.1 lib/vault-tools/analytics_db_tasks.rb
vault-tools-2.1.0 lib/vault-tools/analytics_db_tasks.rb
vault-tools-2.0.2 lib/vault-tools/analytics_db_tasks.rb
vault-tools-2.0.1 lib/vault-tools/analytics_db_tasks.rb
vault-tools-2.0.0 lib/vault-tools/analytics_db_tasks.rb
vault-tools-1.0.1 lib/vault-tools/analytics_db_tasks.rb
vault-tools-1.0.0 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.7.1 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.7.0 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.5 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.4 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.3 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.2 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.1 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.6.0 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.5.22 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.5.21 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.5.19 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.5.18 lib/vault-tools/analytics_db_tasks.rb
vault-tools-0.5.17 lib/vault-tools/analytics_db_tasks.rb