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.22.9 Rakefile
canvas_sync-0.22.8 Rakefile
canvas_sync-0.22.6 Rakefile
canvas_sync-0.22.5 Rakefile
canvas_sync-0.22.4 Rakefile
canvas_sync-0.22.3 Rakefile
canvas_sync-0.22.2 Rakefile
canvas_sync-0.22.1 Rakefile
canvas_sync-0.22.0 Rakefile
canvas_sync-0.22.0.beta8 Rakefile
canvas_sync-0.22.0.beta7 Rakefile
canvas_sync-0.22.0.beta6 Rakefile
canvas_sync-0.22.0.beta5 Rakefile
canvas_sync-0.22.0.beta4 Rakefile
canvas_sync-0.22.0.beta3 Rakefile
canvas_sync-0.22.0.beta2 Rakefile
canvas_sync-0.22.0.beta1 Rakefile
canvas_sync-0.21.1 Rakefile
canvas_sync-0.21.1.beta1 Rakefile
canvas_sync-0.21.0 Rakefile