Sha256: 07f4d1dd14c915e2fc02bab5d753e9fd32d40fc028839b5cd7544a2bd2d9987a

Contents?: true

Size: 754 Bytes

Versions: 12

Compression:

Stored size: 754 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 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

12 entries across 12 versions & 1 rubygems

Version Path
canvas_sync-0.3.23 Rakefile
canvas_sync-0.3.22 Rakefile
canvas_sync-0.3.21 Rakefile
canvas_sync-0.3.20 Rakefile
canvas_sync-0.3.19 Rakefile
canvas_sync-0.3.18 Rakefile
canvas_sync-0.3.17 Rakefile
canvas_sync-0.3.16 Rakefile
canvas_sync-0.3.15 Rakefile
canvas_sync-0.3.14 Rakefile
canvas_sync-0.3.13 Rakefile
canvas_sync-0.3.12 Rakefile