From 9ea121d12520b6f36522ac15e0c737e9eaf567e1 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Wed, 23 Oct 2024 20:12:47 -0400 Subject: [PATCH] bin/console for testing --- Gemfile | 2 +- bin/console | 13 +++++++++++++ bin/setup | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 bin/console create mode 100644 bin/setup diff --git a/Gemfile b/Gemfile index d68c3d03..bc9c7577 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' gemspec -gem "activerecord", "~> 6.1.7" +gem "activerecord", "~> 7.2" gem "mysql2" gem "pg" gem "sqlite3", "~> 1.6.9" diff --git a/bin/console b/bin/console new file mode 100755 index 00000000..222e04eb --- /dev/null +++ b/bin/console @@ -0,0 +1,13 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "bundler/setup" +require "active_support" +require "active_record" +require "ancestry" + +# models for local testing +# Dir['./spec/support/**/*.rb'].sort.each { |f| require f } + +require "irb" +IRB.start(__FILE__) diff --git a/bin/setup b/bin/setup new file mode 100644 index 00000000..3273a65a --- /dev/null +++ b/bin/setup @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +psql -c 'create database ancestry_test;' || echo 'db exists' +mysql -e 'CREATE SCHEMA IF NOT EXISTS 'ancestry_test';' + +#MAKE="make -j $(nproc)" bundle install --gemfile gemfiles/gemfile_61.gemfile