Sha256: 14e0ff9ee3619248583fcc69caa39c5b5e0a796d4d1ce8e272358b8657412cf2

Contents?: true

Size: 895 Bytes

Versions: 169

Compression:

Stored size: 895 Bytes

Contents

require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "open3"

RSpec::Core::RakeTask.new(:spec)

task default: :spec

desc 'This updates the models and migrations used by the testing Rails Dummy app and should be run whenever those are updated.'
task :update_test_schema do
  puts "Updating test models and migration files..."
  stream_command("spec/dummy/bin/rails generate canvas_sync:install --models all --force")
  puts "Updating live event files..."
  stream_command("spec/dummy/bin/rails generate canvas_sync:install_live_events --events all --force")
  puts "Updating the test database and schema..."
  stream_command("cd spec/dummy; bundle exec rake db:drop; bundle exec rake db:create; bundle exec rake db:migrate")
end

def stream_command(cmd)
  Open3.popen2e(cmd) do |stdin, stdout_stderr, wait_thr|
    while line = stdout_stderr.gets
      puts line
    end
  end
end

Version data entries

169 entries across 169 versions & 1 rubygems

Version Path
canvas_sync-0.19.0.beta1 Rakefile
canvas_sync-0.18.12 Rakefile
canvas_sync-0.18.10 Rakefile
canvas_sync-0.18.9 Rakefile
canvas_sync-0.18.8 Rakefile
canvas_sync-0.18.7 Rakefile
canvas_sync-0.18.6 Rakefile
canvas_sync-0.18.5 Rakefile
canvas_sync-0.18.3 Rakefile
canvas_sync-0.18.2 Rakefile
canvas_sync-0.18.1 Rakefile
canvas_sync-0.18.0.beta2 Rakefile
canvas_sync-0.18.0.beta1 Rakefile
canvas_sync-0.17.43 Rakefile
canvas_sync-0.17.42 Rakefile
canvas_sync-0.17.41 Rakefile
canvas_sync-0.17.40 Rakefile
canvas_sync-0.17.39 Rakefile
canvas_sync-0.17.38 Rakefile
canvas_sync-0.17.37 Rakefile