Skip to content

Commit c610683

Browse files
maebealeclaude
andauthored
Load full dev seeds in Conductor workspaces via --seed-dev (#1588)
bin/setup hardcoded `db:seed`, so Conductor workspaces only ever got the minimal base seeds and the UI came up empty of sample data. The dev sample set (workshops, events, analytics, profiles, payments, etc.) lives behind the `db:seed:dev` rake task, which nothing was invoking. Add a `--seed-dev` flag to bin/setup that swaps in `db:seed:dev` (it chains the base `db:seed` first), keeping plain `db:seed` the default for CI and lean setups, and pass it from bin/conductor-setup since Conductor workspaces are always dev. Also drops the redundant `npm ci` from bin/conductor-setup — bin/setup already runs it — and clarifies the surrounding comment. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8149022 commit c610683

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

bin/conductor-setup

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,17 @@ if [ -d "$CONDUCTOR_ROOT_PATH/.bundle" ]; then
9999
ln -sf "$CONDUCTOR_ROOT_PATH/.bundle" .bundle
100100
fi
101101

102-
# Install deps before bin/setup so they're available when Rails env loads
102+
# Install gems before bin/setup so they're available when it loads the Rails
103+
# env (bin/setup requires config/environment before it runs bundle itself).
104+
# npm packages aren't needed to boot Rails, so leave `npm ci` to bin/setup
105+
# instead of running it twice.
103106
echo ""
104107
echo "== Installing dependencies =="
105108
bundle check > /dev/null 2>&1 || bundle install
106-
npm ci
107109

108-
# Run full setup (database drop, create, migrate, seed)
109-
bin/setup --skip-server
110+
# Run full setup (database drop, create, migrate, seed). Conductor workspaces
111+
# are always dev, so load the full dev sample dataset via --seed-dev.
112+
bin/setup --skip-server --seed-dev
110113

111114
PORT=${WORKSPACE_PORT:-${PORT:-3000}}
112115
echo ""

bin/setup

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ FileUtils.chdir APP_ROOT do
6060

6161
puts "\n== Running Rails migrations and seeds =="
6262
system! "bin/rails db:migrate"
63-
system! "bin/rails db:seed"
63+
# --seed-dev loads the full dev sample dataset (db:seed:dev chains the base
64+
# db:seed first); plain db:seed stays the default for CI and lean setups.
65+
if ARGV.include?("--seed-dev")
66+
system! "bin/rails db:seed:dev"
67+
else
68+
system! "bin/rails db:seed"
69+
end
6470

6571
puts "\n== Preparing test database =="
6672
system! "RAILS_ENV=test bin/rails db:drop"

0 commit comments

Comments
 (0)