summaryrefslogtreecommitdiffhomepage
path: root/db/seeds.rb
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2024-06-23 00:08:24 -0400
committerrealtradam <[email protected]>2024-06-23 00:08:24 -0400
commitb3b01a78f1530d4481ed50e6054cb612af46fe36 (patch)
tree4d7ab01347c9a898d05bd24945bcdde997f9792e /db/seeds.rb
parentfadf42fc4449d8878e1b9db686c9ed575b5e9274 (diff)
downloadgameHolster-b3b01a78f1530d4481ed50e6054cb612af46fe36.tar.gz
gameHolster-b3b01a78f1530d4481ed50e6054cb612af46fe36.zip
add game descriptions
Diffstat (limited to 'db/seeds.rb')
-rw-r--r--db/seeds.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index 5a197fd..50c901e 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -101,49 +101,42 @@ data_dir = Rails.root.join('db/lfs')
games = [
{
title: 'Almost Pong',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/almost-pong',
img_rendering: 'crisp-edges',
tags: ["web-desktop"]
},
{
title: 'Bubbles, Behind',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/TOJam2023',
img_rendering: 'crisp-edges',
tags: ["web-desktop", "desktop"]
},
{
title: 'Magnet Run',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/Magnet-Run-3D',
img_rendering: 'crisp-edges',
tags: ["web-desktop", "desktop"]
},
{
title: 'Optimal Direction',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/optimal-direction',
img_rendering: 'crisp-edges',
tags: ["web-desktop", "desktop"]
},
{
title: 'Winter One',
- description: markdown_sample,
github_link: '',
img_rendering: 'pixelated',
tags: ["web-desktop", "desktop"]
},
{
title: 'SpaceCube 64',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/tojam2024',
img_rendering: 'crisp-edges',
tags: ["nintendo 64", "web-desktop"]
},
{
title: 'Orc: Arena of Time',
- description: markdown_sample,
github_link: 'https://github.com/realtradam/orc-arena-of-time',
img_rendering: 'pixelated',
tags: ["web-desktop", "desktop"]
@@ -154,6 +147,7 @@ games.each do |game|
next if Game.exists?(title: game[:title], user_id: 1) # first user is always me
tags = game[:tags]
game.delete(:tags)
+ game[:description] = File.read("#{data_dir}/Games/#{game[:title]}/desc.md")
game_obj = user.games.new(game)
game_obj.save_zip("#{data_dir}/Games/#{game[:title]}/index.zip")
game_obj.card_img.attach(io: File.open("#{data_dir}/Games/#{game[:title]}/card.png"), filename: 'card.png')