Sha256: 8431ff926fcb9271c806baf623336f56c558bf919a7426470670f502bbc52594

Contents?: true

Size: 1.08 KB

Versions: 18

Compression:

Stored size: 1.08 KB

Contents

require "bundler/gem_tasks"
require "rake/testtask"
require_relative 'test/support/paths_cockroachdb'
require_relative 'test/support/rake_helpers'
require_relative 'test/support/template_creator'

task test: ["test:cockroachdb"]
task default: [:test]

namespace :db do
  task "create_test_template" do
    ENV['DEBUG_COCKROACHDB_ADAPTER'] = "1"
    ENV['COCKROACH_SKIP_LOAD_SCHEMA'] = "1"
    ENV["ARCONN"] = "cockroachdb"

    TemplateCreator.connect
    require_relative 'test/cases/helper'

    # TODO: look into this more, but for some reason the blob alias
    # is not defined while running this task.
    ActiveRecord::ConnectionAdapters::CockroachDB::TableDefinition.class_eval do
      alias :blob :binary
    end

    TemplateCreator.create_test_template
  end
end

namespace :test do
  Rake::TestTask.new("cockroachdb") do |t|
    t.libs = ARTest::CockroachDB.test_load_paths
    t.test_files = test_files
    t.warning = !!ENV["WARNING"]
    t.verbose = false
  end

  task "cockroachdb:env" do
    ENV["ARCONN"] = "cockroachdb"
  end
end

task 'test:cockroachdb' => 'test:cockroachdb:env'

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
activerecord-cockroachdb-adapter-6.1.11 Rakefile
activerecord-cockroachdb-adapter-7.0.2 Rakefile
activerecord-cockroachdb-adapter-7.0.1 Rakefile
activerecord-cockroachdb-adapter-7.0.0 Rakefile
activerecord-cockroachdb-adapter-6.1.10 Rakefile
activerecord-cockroachdb-adapter-6.1.9 Rakefile
activerecord-cockroachdb-adapter-6.1.8 Rakefile
activerecord-cockroachdb-adapter-6.1.7 Rakefile
activerecord-cockroachdb-adapter-6.1.6 Rakefile
activerecord-cockroachdb-adapter-6.1.5 Rakefile
activerecord-cockroachdb-adapter-6.1.4 Rakefile
activerecord-cockroachdb-adapter-6.1.3 Rakefile
activerecord-cockroachdb-adapter-6.1.2 Rakefile
activerecord-cockroachdb-adapter-6.1.1 Rakefile
activerecord-cockroachdb-adapter-6.1.0 Rakefile
activerecord-cockroachdb-adapter-6.1.0.pre.beta.3 Rakefile
activerecord-cockroachdb-adapter-6.1.0.pre.beta.2 Rakefile
activerecord-cockroachdb-adapter-6.1.0beta1 Rakefile