Sha256: 7858ad8dcd31ad4aafca98e321fa4db83d4120a4edf4aba3771e6b1453ba1117

Contents?: true

Size: 726 Bytes

Versions: 23

Compression:

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

23 entries across 23 versions & 1 rubygems

Version Path
canvas_sync-0.3.11 Rakefile
canvas_sync-0.3.10 Rakefile
canvas_sync-0.3.9 Rakefile
canvas_sync-0.3.8 Rakefile
canvas_sync-0.3.7 Rakefile
canvas_sync-0.3.6 Rakefile
canvas_sync-0.3.5 Rakefile
canvas_sync-0.3.3 Rakefile
canvas_sync-0.3.2 Rakefile
canvas_sync-0.3.1 Rakefile
canvas_sync-0.3.0 Rakefile
canvas_sync-0.2.4 Rakefile
canvas_sync-0.2.3 Rakefile
canvas_sync-0.2.2 Rakefile
canvas_sync-0.2.1 Rakefile
canvas_sync-0.2.0 Rakefile
canvas_sync-0.1.8 Rakefile
canvas_sync-0.1.7 Rakefile
canvas_sync-0.1.5 Rakefile
canvas_sync-0.1.4 Rakefile