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