Skip to content

Commit 670f13e

Browse files
rubysclaude
andcommitted
Remove config/tenant/showcases.yml from git tracking
Showcases configuration is now generated from db/index.sqlite3 into db/showcases.yml, with db/deployed-showcases.yml tracking deployed state for change detection. This eliminates the need for git commits when admins create or modify showcases. Also removes obsolete Passenger/nginx deployment files that are no longer used since both Fly.io and Kamal deployments now use Navigator. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6bfdbb1 commit 670f13e

File tree

13 files changed

+29
-2530
lines changed

13 files changed

+29
-2530
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ cd Showcase
5151
bundle install
5252
rm config/credentials.yml.enc
5353
bin/rails credentials:edit
54-
$EDITOR config/tenant/showcases.yml
5554
docker compose build
5655
docker compose up
5756
docker compose exec web bin/bootstrap
5857
```
5958

59+
Note: Showcase configuration is managed via the admin interface at `/admin`, which stores data in `db/index.sqlite3` and generates `db/showcases.yml` automatically.
60+
6061
Visit http://localhost:9999/showcase/ to see the list of events.
6162

6263
# Implementation overview

app/controllers/admin_controller.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def index
3131
return
3232
end
3333

34-
showcases = YAML.load_file('config/tenant/showcases.yml')
34+
showcases = ShowcasesLoader.load
3535

3636
cities = Set.new
3737
@events = 0
@@ -166,11 +166,7 @@ def apply
166166
@move[site] = {from: was[:region], to: info[:region]}
167167
end
168168

169-
# Determine which file to use for previous state
170-
previous_file = File.exist?('db/deployed-showcases.yml') ?
171-
'db/deployed-showcases.yml' : 'config/tenant/showcases.yml'
172-
173-
previous = parse_showcases(previous_file)
169+
previous = parse_showcases('db/deployed-showcases.yml')
174170
showcases = parse_showcases('db/showcases.yml')
175171
@showcases_modified = showcases - previous
176172
@showcases_removed = previous - showcases - @showcases_modified

bin/apply-changes.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
if !File.exist?(deployed_file) || new_showcases != IO.read(deployed_file)
7575
IO.write(deployed_file, new_showcases)
7676
end
77-
# Also update git-tracked file for now (will be removed in Phase 3)
78-
if new_showcases != IO.read('config/tenant/showcases.yml')
79-
IO.write('config/tenant/showcases.yml', new_showcases)
80-
end
8177
end
8278

8379
# deploy changes

bin/deploy

Lines changed: 0 additions & 212 deletions
This file was deleted.

0 commit comments

Comments
 (0)