AI slop for the honcho seed data

This commit is contained in:
David Heinemeier Hansson
2025-04-22 09:55:59 +02:00
parent 5b10b3a16e
commit 58c7eb41bb
+64 -10
View File
@@ -3,19 +3,73 @@ create_tenant "honcho"
david = create_first_run "David Heinemeier Hansson", "david@37signals.com"
login_as david
jz = create_user "Jason Zimdars", "jz@37signals.com"
jason = create_user "Jason Zimdars", "jz@37signals.com"
kevin = create_user "Kevin Mcconnell", "kevin@37signals.com"
sarah = create_user "Sarah Johnson", "sarah@37signals.com"
mike = create_user "Mike Peterson", "mike@37signals.com"
create_collection("Mucho", access_to: [ jz, kevin ]).tap do |fizzy|
create_card("Prepare MUCHO sign-up page", description: "We need to do this before the launch.", collection: fizzy)
# Array of authors for random assignment
authors = [david, jason, kevin, sarah, mike]
create_card("Prepare MUCHO sign-up page", description: "We need to do this before the launch.", collection: fizzy).tap do |card|
card.toggle_assignment(kevin)
card.engage
end
# Card titles for reuse across collections
card_titles = [
"Implement authentication",
"Design landing page",
"Set up database",
"Create API endpoints",
"Write unit tests",
"Optimize performance",
"Add user profiles",
"Implement search",
"Create admin panel",
"Set up CI/CD",
"Design logo",
"Create documentation",
"Add payment system",
"Implement notifications",
"Set up analytics",
"Create mobile layout",
"Add social sharing",
"Implement caching",
"Set up monitoring",
"Create error handling"
]
create_card("Plain MUCHO text mentions", description: "We'll support plain text mentions first.", collection: fizzy).tap do |card|
card.toggle_assignment(david)
card.close
# Create 10 collections
collections = [
"Project Launch",
"Frontend Dev",
"Backend Dev",
"Design System",
"Testing Suite",
"Performance",
"User Experience",
"API Development",
"DevOps",
"Documentation"
]
collections.each_with_index do |collection_name, index|
create_collection(collection_name, access_to: authors.sample(3)).tap do |collection|
# Create 20 unique cards for each collection
card_titles.each do |title|
create_card(title,
description: "#{title} for #{collection_name} phase #{index + 1}.",
collection: collection
).tap do |card|
# Randomly assign to 1-2 authors
card.toggle_assignment(authors.sample)
card.toggle_assignment(authors.sample) if rand > 0.5
# Randomly set card state
case rand(3)
when 0
card.engage
when 1
card.close
# 2 remains open
end
end
end
end
end