From d470625ea77cc5544e7d9861b7f4fe0edda610a0 Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Sat, 5 Sep 2026 08:45:06 +1000 Subject: [PATCH] Prune old rails stuff --- CLAUDE.md | 113 - bin/dump_body_class_info.pl | 62 - bin/dump_building_class_info.pl | 57 - bin/make_rails_test_empire.pl | 31 - lacuna/.annotaterb.yml | 71 - lacuna/.ruby-version | 1 - lacuna/Gemfile | 17 - lacuna/Gemfile.lock | 246 --- lacuna/Rakefile | 6 - lacuna/app/controllers/algae_controller.rb | 5 - .../app/controllers/algaepond_controller.rb | 5 - lacuna/app/controllers/alliance_controller.rb | 9 - .../controllers/amalgusmeadow_controller.rb | 5 - lacuna/app/controllers/apple_controller.rb | 5 - .../app/controllers/application_controller.rb | 58 - .../app/controllers/archaeology_controller.rb | 37 - .../app/controllers/artmuseum_controller.rb | 5 - .../atmosphericevaporator_controller.rb | 5 - lacuna/app/controllers/beach_controller.rb | 5 - lacuna/app/controllers/bean_controller.rb | 5 - .../app/controllers/beeldeban_controller.rb | 5 - .../controllers/beeldebannest_controller.rb | 5 - .../blackholegenerator_controller.rb | 17 - lacuna/app/controllers/body_controller.rb | 68 - lacuna/app/controllers/bread_controller.rb | 5 - lacuna/app/controllers/building_controller.rb | 30 - lacuna/app/controllers/burger_controller.rb | 5 - lacuna/app/controllers/capitol_controller.rb | 9 - lacuna/app/controllers/captcha_controller.rb | 9 - lacuna/app/controllers/cheese_controller.rb | 5 - lacuna/app/controllers/chip_controller.rb | 5 - lacuna/app/controllers/cider_controller.rb | 5 - .../controllers/citadelofknope_controller.rb | 5 - .../app/controllers/cloakinglab_controller.rb | 5 - lacuna/app/controllers/concerns/.keep | 0 lacuna/app/controllers/corn_controller.rb | 5 - lacuna/app/controllers/cornmeal_controller.rb | 5 - .../controllers/crashedshipsite_controller.rb | 5 - lacuna/app/controllers/crater_controller.rb | 5 - .../culinaryinstitute_controller.rb | 5 - lacuna/app/controllers/dairy_controller.rb | 5 - lacuna/app/controllers/denton_controller.rb | 5 - .../controllers/dentonbrambles_controller.rb | 5 - .../controllers/deployedbleeder_controller.rb | 5 - .../app/controllers/development_controller.rb | 17 - .../distributioncenter_controller.rb | 17 - lacuna/app/controllers/embassy_controller.rb | 77 - lacuna/app/controllers/empire_controller.rb | 238 --- .../controllers/energyreserve_controller.rb | 9 - .../controllers/entertainment_controller.rb | 13 - .../app/controllers/espionage_controller.rb | 5 - .../controllers/essentiavein_controller.rb | 9 - lacuna/app/controllers/fission_controller.rb | 5 - lacuna/app/controllers/fissure_controller.rb | 5 - .../app/controllers/foodreserve_controller.rb | 9 - lacuna/app/controllers/fusion_controller.rb | 5 - .../app/controllers/gasgiantlab_controller.rb | 5 - .../gasgiantplatform_controller.rb | 5 - .../app/controllers/geneticslab_controller.rb | 17 - lacuna/app/controllers/geo_controller.rb | 5 - .../controllers/geothermalvent_controller.rb | 5 - .../controllers/gratchsgauntlet_controller.rb | 5 - .../controllers/greatballofjunk_controller.rb | 5 - lacuna/app/controllers/grove_controller.rb | 5 - .../controllers/hallsofvrbansk_controller.rb | 5 - .../app/controllers/hydrocarbon_controller.rb | 5 - lacuna/app/controllers/ibs_controller.rb | 5 - lacuna/app/controllers/inbox_controller.rb | 41 - .../controllers/intelligence_controller.rb | 37 - .../controllers/inteltraining_controller.rb | 5 - .../interdimensionalrift_controller.rb | 5 - .../junkhengesculpture_controller.rb | 5 - .../controllers/kalavianruins_controller.rb | 5 - .../controllers/kasternskeep_controller.rb | 5 - lacuna/app/controllers/lagoon_controller.rb | 5 - lacuna/app/controllers/lake_controller.rb | 5 - lacuna/app/controllers/lapis_controller.rb | 5 - .../app/controllers/lapisforest_controller.rb | 5 - .../controllers/libraryofjith_controller.rb | 9 - .../lostcityoftyleon_controller.rb | 5 - .../controllers/luxuryhousing_controller.rb | 5 - lacuna/app/controllers/malcud_controller.rb | 5 - .../app/controllers/malcudfield_controller.rb | 5 - lacuna/app/controllers/map_controller.rb | 37 - .../controllers/massadshenge_controller.rb | 5 - .../controllers/mayhemtraining_controller.rb | 5 - .../mercenariesguild_controller.rb | 37 - .../controllers/metaljunkarches_controller.rb | 5 - lacuna/app/controllers/mine_controller.rb | 5 - .../controllers/miningministry_controller.rb | 29 - .../controllers/missioncommand_controller.rb | 17 - .../controllers/munitionslab_controller.rb | 5 - .../controllers/naturalspring_controller.rb | 5 - .../app/controllers/network19_controller.rb | 13 - .../app/controllers/observatory_controller.rb | 17 - .../app/controllers/operahouse_controller.rb | 5 - .../controllers/oracleofanid_controller.rb | 13 - .../app/controllers/orerefinery_controller.rb | 5 - .../app/controllers/orestorage_controller.rb | 9 - .../app/controllers/oversight_controller.rb | 5 - lacuna/app/controllers/pancake_controller.rb | 5 - .../pantheonofhagness_controller.rb | 5 - lacuna/app/controllers/park_controller.rb | 13 - .../app/controllers/parliament_controller.rb | 113 - lacuna/app/controllers/pie_controller.rb | 5 - .../controllers/pilottraining_controller.rb | 5 - .../planetarycommand_controller.rb | 17 - .../controllers/policestation_controller.rb | 33 - .../politicstraining_controller.rb | 5 - lacuna/app/controllers/potato_controller.rb | 5 - .../app/controllers/propulsion_controller.rb | 5 - .../pyramidjunksculpture_controller.rb | 5 - lacuna/app/controllers/ravine_controller.rb | 5 - .../controllers/rockyoutcrop_controller.rb | 5 - lacuna/app/controllers/sand_controller.rb | 5 - lacuna/app/controllers/saw_controller.rb | 5 - lacuna/app/controllers/security_controller.rb | 21 - lacuna/app/controllers/shake_controller.rb | 5 - lacuna/app/controllers/shipyard_controller.rb | 29 - .../app/controllers/singularity_controller.rb | 5 - lacuna/app/controllers/soup_controller.rb | 5 - .../controllers/spacejunkpark_controller.rb | 5 - .../app/controllers/spaceport_controller.rb | 81 - .../controllers/spacestationlab_controller.rb | 13 - .../controllers/stationcommand_controller.rb | 13 - lacuna/app/controllers/stats_controller.rb | 33 - .../app/controllers/stockpile_controller.rb | 5 - .../subspacesupplydepot_controller.rb | 25 - .../app/controllers/supplypod_controller.rb | 5 - lacuna/app/controllers/syrup_controller.rb | 5 - .../templeofthedrajilites_controller.rb | 13 - .../controllers/terraforminglab_controller.rb | 5 - .../terraformingplatform_controller.rb | 5 - .../controllers/thedillonforge_controller.rb | 17 - .../controllers/thefttraining_controller.rb | 5 - .../app/controllers/themepark_controller.rb | 9 - lacuna/app/controllers/trade_controller.rb | 105 - .../app/controllers/transporter_controller.rb | 57 - .../app/controllers/university_controller.rb | 5 - lacuna/app/controllers/volcano_controller.rb | 5 - .../app/controllers/warehouse_controller.rb | 5 - .../controllers/wastedigester_controller.rb | 5 - .../app/controllers/wasteenergy_controller.rb | 5 - .../controllers/wasteexchanger_controller.rb | 13 - .../controllers/wasterecycling_controller.rb | 13 - .../wastesequestration_controller.rb | 5 - .../controllers/wastetreatment_controller.rb | 5 - .../controllers/waterproduction_controller.rb | 5 - .../waterpurification_controller.rb | 5 - .../waterreclamation_controller.rb | 5 - .../controllers/waterstorage_controller.rb | 9 - lacuna/app/controllers/wheat_controller.rb | 5 - lacuna/app/jobs/application_job.rb | 7 - lacuna/app/lib/lacuna_date_format.rb | 9 - lacuna/app/lib/lacuna_server_info.rb | 12 - lacuna/app/mailers/application_mailer.rb | 4 - lacuna/app/models/ai_battle_summary.rb | 24 - lacuna/app/models/ai_scratch_pad.rb | 24 - lacuna/app/models/alliance.rb | 31 - lacuna/app/models/alliance_invite.rb | 24 - lacuna/app/models/alliance_log.rb | 43 - lacuna/app/models/api_key.rb | 22 - lacuna/app/models/application_record.rb | 3 - lacuna/app/models/battle_log.rb | 43 - lacuna/app/models/body.rb | 340 --- lacuna/app/models/building.rb | 142 -- lacuna/app/models/captcha.rb | 14 - lacuna/app/models/cargo_log.rb | 17 - lacuna/app/models/colony_log.rb | 50 - lacuna/app/models/concerns/.keep | 0 lacuna/app/models/config.rb | 17 - lacuna/app/models/economy_log.rb | 41 - lacuna/app/models/empire.rb | 270 --- lacuna/app/models/empire_admin_note.rb | 21 - lacuna/app/models/empire_log.rb | 56 - lacuna/app/models/empire_name_change_log.rb | 20 - lacuna/app/models/empire_rpc_log.rb | 21 - lacuna/app/models/essentia_code.rb | 21 - lacuna/app/models/essentia_log.rb | 28 - lacuna/app/models/excavator.rb | 27 - lacuna/app/models/fleet.rb | 43 - lacuna/app/models/glyph.rb | 23 - lacuna/app/models/invite.rb | 28 - lacuna/app/models/law.rb | 30 - lacuna/app/models/login_log.rb | 27 - lacuna/app/models/lottery_log.rb | 25 - lacuna/app/models/market.rb | 43 - lacuna/app/models/medal.rb | 43 - lacuna/app/models/mercenary_market.rb | 25 - lacuna/app/models/message.rb | 41 - lacuna/app/models/mining_platform.rb | 44 - lacuna/app/models/mission.rb | 20 - lacuna/app/models/mission_log.rb | 19 - lacuna/app/models/news.rb | 19 - lacuna/app/models/noexist_with_empire_log.rb | 19 - lacuna/app/models/plan.rb | 24 - lacuna/app/models/probe.rb | 30 - lacuna/app/models/promotion.rb | 18 - lacuna/app/models/proposition.rb | 31 - lacuna/app/models/rpc_log.rb | 23 - lacuna/app/models/schedule.rb | 19 - lacuna/app/models/session.rb | 39 - lacuna/app/models/ship.rb | 51 - lacuna/app/models/sitter_auth.rb | 31 - lacuna/app/models/spy.rb | 51 - lacuna/app/models/spy_log.rb | 52 - lacuna/app/models/star.rb | 30 - lacuna/app/models/stationinfluence.rb | 30 - lacuna/app/models/supply_chain.rb | 30 - lacuna/app/models/survey.rb | 22 - lacuna/app/models/tax.rb | 30 - lacuna/app/models/viral_log.rb | 23 - lacuna/app/models/vote.rb | 24 - lacuna/app/models/waste_chain.rb | 25 - lacuna/app/models/weekly_medal_winner.rb | 23 - lacuna/app/views/layouts/mailer.html.erb | 13 - lacuna/app/views/layouts/mailer.text.erb | 1 - lacuna/bin/dev | 2 - lacuna/bin/rails | 4 - lacuna/bin/rake | 4 - lacuna/bin/setup | 35 - lacuna/config.ru | 6 - lacuna/config/application.rb | 32 - lacuna/config/body_class_info.json | 1874 ----------------- lacuna/config/boot.rb | 4 - lacuna/config/building_class_info.json | 1406 ------------- lacuna/config/credentials.yml.enc | 1 - lacuna/config/database.yml | 21 - lacuna/config/environment.rb | 5 - lacuna/config/environments/development.rb | 73 - lacuna/config/environments/production.rb | 86 - lacuna/config/environments/test.rb | 53 - lacuna/config/initializers/cors.rb | 16 - .../initializers/filter_parameter_logging.rb | 8 - lacuna/config/initializers/inflections.rb | 16 - lacuna/config/initializers/memcached.rb | 4 - lacuna/config/locales/en.yml | 31 - lacuna/config/master.key | 1 - lacuna/config/medals.json | 1113 ---------- lacuna/config/puma.rb | 39 - lacuna/config/routes.rb | 1591 -------------- lacuna/db/schema.rb | 1129 ---------- lacuna/db/seeds.rb | 9 - lacuna/lib/tasks/.keep | 0 lacuna/lib/tasks/annotate_rb.rake | 10 - lacuna/log/.keep | 0 lacuna/public/robots.txt | 1 - lacuna/script/.keep | 0 lacuna/storage/.keep | 0 lacuna/test/controllers/.keep | 0 .../test/controllers/body_controller_test.rb | 144 -- .../controllers/empire_controller_test.rb | 165 -- lacuna/test/fixtures/alliance.yml | 5 - lacuna/test/fixtures/body.yml | 130 -- lacuna/test/fixtures/building.yml | 63 - lacuna/test/fixtures/empire.yml | 68 - lacuna/test/fixtures/files/.keep | 0 .../test/fixtures/files/get_status/README.md | 58 - .../body_status_planet_owner_golden.json | 131 -- .../get_status/empire_status_golden.json | 59 - .../test/fixtures/files/view_boosts/README.md | 21 - .../empire_view_boosts_golden.json | 58 - lacuna/test/fixtures/medals.yml | 8 - lacuna/test/fixtures/message.yml | 20 - lacuna/test/fixtures/star.yml | 11 - lacuna/test/integration/.keep | 0 lacuna/test/mailers/.keep | 0 lacuna/test/models/.keep | 0 lacuna/test/models/body_test.rb | 65 - lacuna/test/models/building_test.rb | 71 - lacuna/test/models/session_test.rb | 33 - .../test/support/golden_status_assertions.rb | 33 - lacuna/test/support/session_test_helper.rb | 25 - lacuna/test/test_helper.rb | 31 - 274 files changed, 13781 deletions(-) delete mode 100644 bin/dump_body_class_info.pl delete mode 100644 bin/dump_building_class_info.pl delete mode 100644 bin/make_rails_test_empire.pl delete mode 100644 lacuna/.annotaterb.yml delete mode 100644 lacuna/.ruby-version delete mode 100644 lacuna/Gemfile delete mode 100644 lacuna/Gemfile.lock delete mode 100644 lacuna/Rakefile delete mode 100644 lacuna/app/controllers/algae_controller.rb delete mode 100644 lacuna/app/controllers/algaepond_controller.rb delete mode 100644 lacuna/app/controllers/alliance_controller.rb delete mode 100644 lacuna/app/controllers/amalgusmeadow_controller.rb delete mode 100644 lacuna/app/controllers/apple_controller.rb delete mode 100644 lacuna/app/controllers/application_controller.rb delete mode 100644 lacuna/app/controllers/archaeology_controller.rb delete mode 100644 lacuna/app/controllers/artmuseum_controller.rb delete mode 100644 lacuna/app/controllers/atmosphericevaporator_controller.rb delete mode 100644 lacuna/app/controllers/beach_controller.rb delete mode 100644 lacuna/app/controllers/bean_controller.rb delete mode 100644 lacuna/app/controllers/beeldeban_controller.rb delete mode 100644 lacuna/app/controllers/beeldebannest_controller.rb delete mode 100644 lacuna/app/controllers/blackholegenerator_controller.rb delete mode 100644 lacuna/app/controllers/body_controller.rb delete mode 100644 lacuna/app/controllers/bread_controller.rb delete mode 100644 lacuna/app/controllers/building_controller.rb delete mode 100644 lacuna/app/controllers/burger_controller.rb delete mode 100644 lacuna/app/controllers/capitol_controller.rb delete mode 100644 lacuna/app/controllers/captcha_controller.rb delete mode 100644 lacuna/app/controllers/cheese_controller.rb delete mode 100644 lacuna/app/controllers/chip_controller.rb delete mode 100644 lacuna/app/controllers/cider_controller.rb delete mode 100644 lacuna/app/controllers/citadelofknope_controller.rb delete mode 100644 lacuna/app/controllers/cloakinglab_controller.rb delete mode 100644 lacuna/app/controllers/concerns/.keep delete mode 100644 lacuna/app/controllers/corn_controller.rb delete mode 100644 lacuna/app/controllers/cornmeal_controller.rb delete mode 100644 lacuna/app/controllers/crashedshipsite_controller.rb delete mode 100644 lacuna/app/controllers/crater_controller.rb delete mode 100644 lacuna/app/controllers/culinaryinstitute_controller.rb delete mode 100644 lacuna/app/controllers/dairy_controller.rb delete mode 100644 lacuna/app/controllers/denton_controller.rb delete mode 100644 lacuna/app/controllers/dentonbrambles_controller.rb delete mode 100644 lacuna/app/controllers/deployedbleeder_controller.rb delete mode 100644 lacuna/app/controllers/development_controller.rb delete mode 100644 lacuna/app/controllers/distributioncenter_controller.rb delete mode 100644 lacuna/app/controllers/embassy_controller.rb delete mode 100644 lacuna/app/controllers/empire_controller.rb delete mode 100644 lacuna/app/controllers/energyreserve_controller.rb delete mode 100644 lacuna/app/controllers/entertainment_controller.rb delete mode 100644 lacuna/app/controllers/espionage_controller.rb delete mode 100644 lacuna/app/controllers/essentiavein_controller.rb delete mode 100644 lacuna/app/controllers/fission_controller.rb delete mode 100644 lacuna/app/controllers/fissure_controller.rb delete mode 100644 lacuna/app/controllers/foodreserve_controller.rb delete mode 100644 lacuna/app/controllers/fusion_controller.rb delete mode 100644 lacuna/app/controllers/gasgiantlab_controller.rb delete mode 100644 lacuna/app/controllers/gasgiantplatform_controller.rb delete mode 100644 lacuna/app/controllers/geneticslab_controller.rb delete mode 100644 lacuna/app/controllers/geo_controller.rb delete mode 100644 lacuna/app/controllers/geothermalvent_controller.rb delete mode 100644 lacuna/app/controllers/gratchsgauntlet_controller.rb delete mode 100644 lacuna/app/controllers/greatballofjunk_controller.rb delete mode 100644 lacuna/app/controllers/grove_controller.rb delete mode 100644 lacuna/app/controllers/hallsofvrbansk_controller.rb delete mode 100644 lacuna/app/controllers/hydrocarbon_controller.rb delete mode 100644 lacuna/app/controllers/ibs_controller.rb delete mode 100644 lacuna/app/controllers/inbox_controller.rb delete mode 100644 lacuna/app/controllers/intelligence_controller.rb delete mode 100644 lacuna/app/controllers/inteltraining_controller.rb delete mode 100644 lacuna/app/controllers/interdimensionalrift_controller.rb delete mode 100644 lacuna/app/controllers/junkhengesculpture_controller.rb delete mode 100644 lacuna/app/controllers/kalavianruins_controller.rb delete mode 100644 lacuna/app/controllers/kasternskeep_controller.rb delete mode 100644 lacuna/app/controllers/lagoon_controller.rb delete mode 100644 lacuna/app/controllers/lake_controller.rb delete mode 100644 lacuna/app/controllers/lapis_controller.rb delete mode 100644 lacuna/app/controllers/lapisforest_controller.rb delete mode 100644 lacuna/app/controllers/libraryofjith_controller.rb delete mode 100644 lacuna/app/controllers/lostcityoftyleon_controller.rb delete mode 100644 lacuna/app/controllers/luxuryhousing_controller.rb delete mode 100644 lacuna/app/controllers/malcud_controller.rb delete mode 100644 lacuna/app/controllers/malcudfield_controller.rb delete mode 100644 lacuna/app/controllers/map_controller.rb delete mode 100644 lacuna/app/controllers/massadshenge_controller.rb delete mode 100644 lacuna/app/controllers/mayhemtraining_controller.rb delete mode 100644 lacuna/app/controllers/mercenariesguild_controller.rb delete mode 100644 lacuna/app/controllers/metaljunkarches_controller.rb delete mode 100644 lacuna/app/controllers/mine_controller.rb delete mode 100644 lacuna/app/controllers/miningministry_controller.rb delete mode 100644 lacuna/app/controllers/missioncommand_controller.rb delete mode 100644 lacuna/app/controllers/munitionslab_controller.rb delete mode 100644 lacuna/app/controllers/naturalspring_controller.rb delete mode 100644 lacuna/app/controllers/network19_controller.rb delete mode 100644 lacuna/app/controllers/observatory_controller.rb delete mode 100644 lacuna/app/controllers/operahouse_controller.rb delete mode 100644 lacuna/app/controllers/oracleofanid_controller.rb delete mode 100644 lacuna/app/controllers/orerefinery_controller.rb delete mode 100644 lacuna/app/controllers/orestorage_controller.rb delete mode 100644 lacuna/app/controllers/oversight_controller.rb delete mode 100644 lacuna/app/controllers/pancake_controller.rb delete mode 100644 lacuna/app/controllers/pantheonofhagness_controller.rb delete mode 100644 lacuna/app/controllers/park_controller.rb delete mode 100644 lacuna/app/controllers/parliament_controller.rb delete mode 100644 lacuna/app/controllers/pie_controller.rb delete mode 100644 lacuna/app/controllers/pilottraining_controller.rb delete mode 100644 lacuna/app/controllers/planetarycommand_controller.rb delete mode 100644 lacuna/app/controllers/policestation_controller.rb delete mode 100644 lacuna/app/controllers/politicstraining_controller.rb delete mode 100644 lacuna/app/controllers/potato_controller.rb delete mode 100644 lacuna/app/controllers/propulsion_controller.rb delete mode 100644 lacuna/app/controllers/pyramidjunksculpture_controller.rb delete mode 100644 lacuna/app/controllers/ravine_controller.rb delete mode 100644 lacuna/app/controllers/rockyoutcrop_controller.rb delete mode 100644 lacuna/app/controllers/sand_controller.rb delete mode 100644 lacuna/app/controllers/saw_controller.rb delete mode 100644 lacuna/app/controllers/security_controller.rb delete mode 100644 lacuna/app/controllers/shake_controller.rb delete mode 100644 lacuna/app/controllers/shipyard_controller.rb delete mode 100644 lacuna/app/controllers/singularity_controller.rb delete mode 100644 lacuna/app/controllers/soup_controller.rb delete mode 100644 lacuna/app/controllers/spacejunkpark_controller.rb delete mode 100644 lacuna/app/controllers/spaceport_controller.rb delete mode 100644 lacuna/app/controllers/spacestationlab_controller.rb delete mode 100644 lacuna/app/controllers/stationcommand_controller.rb delete mode 100644 lacuna/app/controllers/stats_controller.rb delete mode 100644 lacuna/app/controllers/stockpile_controller.rb delete mode 100644 lacuna/app/controllers/subspacesupplydepot_controller.rb delete mode 100644 lacuna/app/controllers/supplypod_controller.rb delete mode 100644 lacuna/app/controllers/syrup_controller.rb delete mode 100644 lacuna/app/controllers/templeofthedrajilites_controller.rb delete mode 100644 lacuna/app/controllers/terraforminglab_controller.rb delete mode 100644 lacuna/app/controllers/terraformingplatform_controller.rb delete mode 100644 lacuna/app/controllers/thedillonforge_controller.rb delete mode 100644 lacuna/app/controllers/thefttraining_controller.rb delete mode 100644 lacuna/app/controllers/themepark_controller.rb delete mode 100644 lacuna/app/controllers/trade_controller.rb delete mode 100644 lacuna/app/controllers/transporter_controller.rb delete mode 100644 lacuna/app/controllers/university_controller.rb delete mode 100644 lacuna/app/controllers/volcano_controller.rb delete mode 100644 lacuna/app/controllers/warehouse_controller.rb delete mode 100644 lacuna/app/controllers/wastedigester_controller.rb delete mode 100644 lacuna/app/controllers/wasteenergy_controller.rb delete mode 100644 lacuna/app/controllers/wasteexchanger_controller.rb delete mode 100644 lacuna/app/controllers/wasterecycling_controller.rb delete mode 100644 lacuna/app/controllers/wastesequestration_controller.rb delete mode 100644 lacuna/app/controllers/wastetreatment_controller.rb delete mode 100644 lacuna/app/controllers/waterproduction_controller.rb delete mode 100644 lacuna/app/controllers/waterpurification_controller.rb delete mode 100644 lacuna/app/controllers/waterreclamation_controller.rb delete mode 100644 lacuna/app/controllers/waterstorage_controller.rb delete mode 100644 lacuna/app/controllers/wheat_controller.rb delete mode 100644 lacuna/app/jobs/application_job.rb delete mode 100644 lacuna/app/lib/lacuna_date_format.rb delete mode 100644 lacuna/app/lib/lacuna_server_info.rb delete mode 100644 lacuna/app/mailers/application_mailer.rb delete mode 100644 lacuna/app/models/ai_battle_summary.rb delete mode 100644 lacuna/app/models/ai_scratch_pad.rb delete mode 100644 lacuna/app/models/alliance.rb delete mode 100644 lacuna/app/models/alliance_invite.rb delete mode 100644 lacuna/app/models/alliance_log.rb delete mode 100644 lacuna/app/models/api_key.rb delete mode 100644 lacuna/app/models/application_record.rb delete mode 100644 lacuna/app/models/battle_log.rb delete mode 100644 lacuna/app/models/body.rb delete mode 100644 lacuna/app/models/building.rb delete mode 100644 lacuna/app/models/captcha.rb delete mode 100644 lacuna/app/models/cargo_log.rb delete mode 100644 lacuna/app/models/colony_log.rb delete mode 100644 lacuna/app/models/concerns/.keep delete mode 100644 lacuna/app/models/config.rb delete mode 100644 lacuna/app/models/economy_log.rb delete mode 100644 lacuna/app/models/empire.rb delete mode 100644 lacuna/app/models/empire_admin_note.rb delete mode 100644 lacuna/app/models/empire_log.rb delete mode 100644 lacuna/app/models/empire_name_change_log.rb delete mode 100644 lacuna/app/models/empire_rpc_log.rb delete mode 100644 lacuna/app/models/essentia_code.rb delete mode 100644 lacuna/app/models/essentia_log.rb delete mode 100644 lacuna/app/models/excavator.rb delete mode 100644 lacuna/app/models/fleet.rb delete mode 100644 lacuna/app/models/glyph.rb delete mode 100644 lacuna/app/models/invite.rb delete mode 100644 lacuna/app/models/law.rb delete mode 100644 lacuna/app/models/login_log.rb delete mode 100644 lacuna/app/models/lottery_log.rb delete mode 100644 lacuna/app/models/market.rb delete mode 100644 lacuna/app/models/medal.rb delete mode 100644 lacuna/app/models/mercenary_market.rb delete mode 100644 lacuna/app/models/message.rb delete mode 100644 lacuna/app/models/mining_platform.rb delete mode 100644 lacuna/app/models/mission.rb delete mode 100644 lacuna/app/models/mission_log.rb delete mode 100644 lacuna/app/models/news.rb delete mode 100644 lacuna/app/models/noexist_with_empire_log.rb delete mode 100644 lacuna/app/models/plan.rb delete mode 100644 lacuna/app/models/probe.rb delete mode 100644 lacuna/app/models/promotion.rb delete mode 100644 lacuna/app/models/proposition.rb delete mode 100644 lacuna/app/models/rpc_log.rb delete mode 100644 lacuna/app/models/schedule.rb delete mode 100644 lacuna/app/models/session.rb delete mode 100644 lacuna/app/models/ship.rb delete mode 100644 lacuna/app/models/sitter_auth.rb delete mode 100644 lacuna/app/models/spy.rb delete mode 100644 lacuna/app/models/spy_log.rb delete mode 100644 lacuna/app/models/star.rb delete mode 100644 lacuna/app/models/stationinfluence.rb delete mode 100644 lacuna/app/models/supply_chain.rb delete mode 100644 lacuna/app/models/survey.rb delete mode 100644 lacuna/app/models/tax.rb delete mode 100644 lacuna/app/models/viral_log.rb delete mode 100644 lacuna/app/models/vote.rb delete mode 100644 lacuna/app/models/waste_chain.rb delete mode 100644 lacuna/app/models/weekly_medal_winner.rb delete mode 100644 lacuna/app/views/layouts/mailer.html.erb delete mode 100644 lacuna/app/views/layouts/mailer.text.erb delete mode 100644 lacuna/bin/dev delete mode 100644 lacuna/bin/rails delete mode 100644 lacuna/bin/rake delete mode 100644 lacuna/bin/setup delete mode 100644 lacuna/config.ru delete mode 100644 lacuna/config/application.rb delete mode 100644 lacuna/config/body_class_info.json delete mode 100644 lacuna/config/boot.rb delete mode 100644 lacuna/config/building_class_info.json delete mode 100644 lacuna/config/credentials.yml.enc delete mode 100644 lacuna/config/database.yml delete mode 100644 lacuna/config/environment.rb delete mode 100644 lacuna/config/environments/development.rb delete mode 100644 lacuna/config/environments/production.rb delete mode 100644 lacuna/config/environments/test.rb delete mode 100644 lacuna/config/initializers/cors.rb delete mode 100644 lacuna/config/initializers/filter_parameter_logging.rb delete mode 100644 lacuna/config/initializers/inflections.rb delete mode 100644 lacuna/config/initializers/memcached.rb delete mode 100644 lacuna/config/locales/en.yml delete mode 100644 lacuna/config/master.key delete mode 100644 lacuna/config/medals.json delete mode 100644 lacuna/config/puma.rb delete mode 100644 lacuna/config/routes.rb delete mode 100644 lacuna/db/schema.rb delete mode 100644 lacuna/db/seeds.rb delete mode 100644 lacuna/lib/tasks/.keep delete mode 100644 lacuna/lib/tasks/annotate_rb.rake delete mode 100644 lacuna/log/.keep delete mode 100644 lacuna/public/robots.txt delete mode 100644 lacuna/script/.keep delete mode 100644 lacuna/storage/.keep delete mode 100644 lacuna/test/controllers/.keep delete mode 100644 lacuna/test/controllers/body_controller_test.rb delete mode 100644 lacuna/test/controllers/empire_controller_test.rb delete mode 100644 lacuna/test/fixtures/alliance.yml delete mode 100644 lacuna/test/fixtures/body.yml delete mode 100644 lacuna/test/fixtures/building.yml delete mode 100644 lacuna/test/fixtures/empire.yml delete mode 100644 lacuna/test/fixtures/files/.keep delete mode 100644 lacuna/test/fixtures/files/get_status/README.md delete mode 100644 lacuna/test/fixtures/files/get_status/body_status_planet_owner_golden.json delete mode 100644 lacuna/test/fixtures/files/get_status/empire_status_golden.json delete mode 100644 lacuna/test/fixtures/files/view_boosts/README.md delete mode 100644 lacuna/test/fixtures/files/view_boosts/empire_view_boosts_golden.json delete mode 100644 lacuna/test/fixtures/medals.yml delete mode 100644 lacuna/test/fixtures/message.yml delete mode 100644 lacuna/test/fixtures/star.yml delete mode 100644 lacuna/test/integration/.keep delete mode 100644 lacuna/test/mailers/.keep delete mode 100644 lacuna/test/models/.keep delete mode 100644 lacuna/test/models/body_test.rb delete mode 100644 lacuna/test/models/building_test.rb delete mode 100644 lacuna/test/models/session_test.rb delete mode 100644 lacuna/test/support/golden_status_assertions.rb delete mode 100644 lacuna/test/support/session_test_helper.rb delete mode 100644 lacuna/test/test_helper.rb diff --git a/CLAUDE.md b/CLAUDE.md index 59a0be16..84ded6e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -129,116 +129,3 @@ building, attacks via `start_attack`/`attack_with_ships`, repairs). Concrete fac naming. Keep in sync when adding/renaming a building. - `bin/puppet/*.js` — plain JSON data files (not Puppeteer) consumed by companion Perl scripts (`ships_insert.pl`, `station_setup.pl`, `setup_colony.pl`) to bulk-seed ships/buildings/stations for testing. - -## Ruby on Rails - -In `lacuna/` is a new Ruby on Rails app which is intended to ultimately replace the Perl code. It interacts with the -same database and schema however only does read-only operations. The perl code is the source of truth for game rules and -functionality. - -**Parity requirement**: for any endpoint the Rails app re-implements, its JSON response must match the equivalent Perl -RPC response field-for-field (same keys, same value types, same absent-vs-empty semantics — see "Perl quirks that must -be mirrored exactly" below). The Perl implementation is the spec; when porting a method, read the actual Perl source -(don't work from paraphrase/memory) and treat any divergence as a bug unless it's an explicitly documented gap (see -"Known, deliberate parity gaps"). - -### App structure - -Rails 8.1, API-only (`config.api_only = true`), Minitest (`minitest-rails`) — **no RSpec, no FactoryBot**; use plain -Rails fixtures (`lacuna/test/fixtures/*.yml`). - -- `lacuna/app/models/` — one `ApplicationRecord` per DB table, `self.table_name` pointed at the existing - Perl/DBIx::Class table name (often not the Rails-conventional pluralized name, e.g. `Body.table_name = 'body'`, - `Empire.table_name = 'empire'`). Associations and business-logic methods (e.g. `Body#get_status`, `Empire#get_status`) - are added incrementally as endpoints get ported — most models still have no associations beyond a bare `table_name` - and an `annotaterb`-generated schema comment. -- `lacuna/app/controllers/` — thin controllers; one per RPC namespace (`EmpireController`, `BodyController`), mirroring - `lib/Lacuna/RPC/*.pm`. Heavy logic lives on the models (matching where Perl puts it: `Lacuna::DB::Result::*`), not in - controllers. -- `lacuna/app/lib/` — small cross-cutting helpers with no natural model home (`LacunaDateFormat`, `LacunaServerInfo`). -- `lacuna/config/routes.rb` — POST-only routes namespaced per RPC controller - (`namespace :empire do post :get_status end`), mirroring the JSON-RPC method names Perl registers via - `register_rpc_method_names`. There is no `GET`-based REST convention here — this mirrors Perl's JSON-RPC dispatch, not - typical Rails resource routing. -- `lacuna/app/models/session.rb` — a plain Ruby object (**not** ActiveRecord), reading the session hash Perl's - `Lacuna::Session` writes to the shared memcached instance (`"session:"` key). Rails never writes sessions, only - reads them. - -### Shared infrastructure with the Perl app - -Both apps run in the same `docker compose` stack and talk to the **same** MySQL DB and **same** memcached instance (see -`docker-compose.yml`'s `mysql`/`memcached` services, and `lacuna/config/database.yml` / -`lacuna/config/initializers/memcached.rb`). `etc/` (the Perl app's `Config::JSON` config) is **not** mounted into the -`rails` container — any server-level constant Perl reads from that file (version, map_size, rpc_limit) has to be -hand-synced into a Rails constant instead (see `LacunaServerInfo`) with a comment pointing at the Perl source of truth. - -### Perl quirks that must be mirrored exactly - -- **Empty vs. absent keys**: Perl builds output hashes by `push @{$out->{some_key}}, ...` inside a loop — if the loop - never executes, `some_key` is **absent** from the JSON entirely, not present with an empty array/hash. Naively - pre-seeding Rails output hashes with `key => []` breaks parity; build them lazily (`(out[:key] ||= []) << ...`) - instead. -- **`session.current_empire` already is Perl's "real empire"**: `Lacuna::RPC::format_status`'s `$real_empire` is always - `session->empire` (built from the cached `empire_id`, the actual logged-in identity) — Perl's `current_empire` gets - reassigned per-request to a sat body's owner, but that reassignment is a Perl-only, per-request-mutation concept Rails - doesn't have. Don't build a separate "real empire" accessor — `Session#current_empire` in Rails already plays that - role everywhere Perl uses `$real_empire`. -- **A DB column literally named `class` crashes ActiveRecord** — not just a `.class` call, but _any_ attribute access on - that model (`.id`, `.name`, ...), with `ActiveRecord::DangerousAttributeError`, because Rails 8 generates all of a - model's attribute methods together on first access and `class` is hardcoded into - `ActiveRecord::AttributeMethods.dangerous_attribute_methods`. Fix: `self.ignored_columns = ['class']` plus a small - raw-SQL reader (see `Body#perl_class` / `Building#perl_class`) — and any `.where(class: ...)` must become a raw SQL - condition (`.where('class = ?', val)`, qualifying the table name if the query joins another table that also has a - `class` column, e.g. `building.class` vs `body.class`). `Body`/`Building`/`Ship` all have this shape - (`class`/`class`/`type` columns); `self.inheritance_column = nil` is also needed to stop Rails treating them as - Rails-STI discriminators. -- **No real Rails STI**: the `class` column holds one of ~70+ fully-qualified Perl leaf class names (`Planet::P1..P40`, - `Planet::GasGiant::G1..G5`, `Planet::Station`, `Asteroid::A1..A26`). This doesn't map onto Rails STI conventions — - subclass detection is done by string-matching on `perl_class` (mirroring Perl's `isa` checks), not real Ruby - subclasses. -- **Per-leaf-class constants aren't hand-transcribed** — where Perl encodes data as `use constant` on ~70 leaf classes - (body image name, ore/water concentrations) or a resultset's static config hash (`Lacuna::DB::Result::Medals`' - `MEDALS`), Rails reads a JSON file generated by a one-off Perl dump script instead: `config/medals.json` and - `config/body_class_info.json`, produced by `bin/dump_body_class_info.pl` (run inside the `server` container: - `perl -Ilib bin/dump_body_class_info.pl`). Regenerate via the script if the Perl source changes — don't hand-edit the - JSON. -- **Aggregate resource fields aren't columns**: `food_stored`/`food_hour`/`ore_stored`/`ore_hour` are Perl methods that - sum many per-type columns (`bread_stored`, `rutile_hour`, ...) minus a consumption column — there's no single - `food_stored`/`ore_stored` DB column. Water/energy/waste, by contrast, are single-resource-type and _are_ plain - columns. Check the Perl source before assuming a `get_status` field maps to a column. - -### Known, deliberate parity gaps (documented in code where relevant) - -- Perl's `tick` (resource recalculation, triggered on most RPC calls) is **not** replicated — Rails reads whatever is - currently stored. Output can drift from a freshly-ticked Perl response if nothing has re-ticked the Perl-side row - recently. -- `format_status`'s `server.announcement`/`server.promotions` (cache-flag- and `Promotion`-table-driven) are omitted. -- Two rare planet leaf classes (P33, P35) compose Perl roles (`Lacuna::Role::Planet::{Weather,GeoChaos}`) that wrap - their base water/ore constants in a time-varying sine cycle keyed off body id/orbit — not ported; Rails reports their - static base constant instead. - -### Testing approach: golden fixtures captured from the live Perl server - -There's no live cross-service comparison at test time (Rails' test DB and Perl's dev DB aren't the same database). -Instead, parity is established once, manually, then frozen: - -1. Create a throwaway test empire directly against the shared dev DB — - `perl -Ilib bin/make_rails_test_empire.pl ""` (run inside the `server` container; mirrors `t/TestHelper.pm`'s - `generate_test_empire`, working around a pre-existing `probes` table / MySQL 5.7 reserved-word incompatibility in - `Empire#found` by inserting the empire directly and letting the caller seed a home planet/session). -2. Hit the real Perl JSON-RPC endpoint with that session - (`curl -X POST http://localhost:3050/ -d '{"jsonrpc":"2.0","id":1,"method":"get_status","params":[...]}'`) - and save the `result` payload as `lacuna/test/fixtures/files//*_golden.json`. -3. Transcribe the _exact_ underlying DB row values (raw `SELECT *` from MySQL, not values you intended to set — Perl's - own background ticking/scheduling can silently mutate rows between when you seed and when you capture) into matching - Rails AR fixtures (`lacuna/test/fixtures/*.yml`, one file per literal table name, e.g. `body.yml` not `bodies.yml`). -4. Assert Rails' controller JSON response equals the golden JSON exactly, ignoring only genuinely non-deterministic - fields (`server.time`, `empire.rpc_count`, `body.surface_version`/`needs_surface_refresh`) — see - `test/support/golden_status_assertions.rb`'s `DEFAULT_IGNORE_PATHS`. Prefer exact equality over subset matching; the - point is to catch missing/extra keys, not just spot-check values. -5. Document the golden/fixture pairing in a README next to the golden JSON (see - `lacuna/test/fixtures/files/get_status/README.md`) — they must be updated together. - -Gotcha: `ActionDispatch::IntegrationTest` already defines a `body` method of its own, which shadows the `body(:label)` -fixture accessor Rails would otherwise generate for `test/fixtures/body.yml` — reference known fixture IDs directly in -controller/integration tests instead of relying on the accessor for that specific table. diff --git a/bin/dump_body_class_info.pl b/bin/dump_body_class_info.pl deleted file mode 100644 index 0280e855..00000000 --- a/bin/dump_body_class_info.pl +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env perl -# One-off dump of per-leaf-body-class image/water/ore-concentration constants, consumed by -# lacuna/config/body_class_info.json (Rails' Body#get_status port). Analogous to how -# lacuna/config/medals.json was generated from Lacuna::DB::Result::Medals' MEDALS constant. -# Run inside the server container: perl -Ilib bin/dump_body_class_info.pl -use strict; -use warnings; -use lib 'lib'; -use JSON::PP; -use Lacuna::Constants qw(ORE_TYPES); - -my @classes; -push @classes, "Lacuna::DB::Result::Map::Body::Planet::P$_" for (1..40); -push @classes, "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G$_" for (1..5); -push @classes, "Lacuna::DB::Result::Map::Body::Asteroid::A$_" for (1..26); -push @classes, "Lacuna::DB::Result::Map::Body::Planet::Station"; - -# P33 and P35 compose Lacuna::Role::Planet::Weather (water) and/or -# Lacuna::Role::Planet::GeoChaos (all ore types) — these wrap the base constant in a -# per-instance, time-varying sine cycle keyed off the body's id/orbit (see -# lib/Lacuna/Role/Planet/{Weather,GeoChaos}.pm). That cycle is NOT ported to Rails (documented -# gap); the values below are their static *base* constants (read directly from source), which -# is what a bare `$class->water`/`$class->$ore()` class-method call cannot produce for these two -# (the role's `around` dereferences $self->id/orbit, which don't exist without a row instance). -my %static_override = ( - 'Lacuna::DB::Result::Map::Body::Planet::P33' => { - water => 6000, - ore => { map { $_ => 1000 } qw(anthracite bauxite beryl chalcopyrite chromite fluorite - galena goethite gold gypsum halite kerogen magnetite - methane monazite rutile sulfur trona uraninite zircon) }, - }, - 'Lacuna::DB::Result::Map::Body::Planet::P35' => { - water => 11500, - ore => { map { $_ => 500 } qw(rutile chromite chalcopyrite galena gold uraninite bauxite - goethite halite gypsum trona sulfur methane kerogen - anthracite magnetite fluorite beryl zircon monazite) }, - }, -); - -my %out; -for my $class (@classes) { - (my $file = "$class.pm") =~ s{::}{/}g; - require $file; - - my %info = (image => $class->image); - if (my $override = $static_override{$class}) { - $info{water} = $override->{water}; - $info{ore} = $override->{ore}; - } - else { - $info{water} = $class->water if $class->can('water'); - my %ore; - foreach my $type (ORE_TYPES) { - $ore{$type} = $class->$type() if $class->can($type); - } - $info{ore} = \%ore if %ore; - } - - $out{$class} = \%info; -} - -print JSON::PP->new->canonical->pretty->encode(\%out); diff --git a/bin/dump_building_class_info.pl b/bin/dump_building_class_info.pl deleted file mode 100644 index ac4e1dcd..00000000 --- a/bin/dump_building_class_info.pl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env perl -# One-off dump of per-leaf-building-class image/name/url/build-cost constants, consumed by -# lacuna/config/building_class_info.json (Rails' Building#get_buildings port). Analogous to -# bin/dump_body_class_info.pl for Body#get_status. -# Run inside the server container: perl -Ilib bin/dump_building_class_info.pl -use strict; -use warnings; -use lib 'lib'; -use JSON::PP; -use File::Find; - -my @classes; -find({ - wanted => sub { - return unless /\.pm$/; - my $rel = $File::Find::name; - $rel =~ s{^lib/}{}; - (my $class = $rel) =~ s{/}{::}g; - $class =~ s{\.pm$}{}; - push @classes, $class; - }, - no_chdir => 1, -}, 'lib/Lacuna/DB/Result/Building'); - -my %out; -for my $class (sort @classes) { - (my $file = "$class.pm") =~ s{::}{/}g; - require $file; - - # Abstract/category-base classes (Building.pm itself, and the per-resource-type bases like - # Building/Energy.pm, Building/Food.pm, Building/Ore.pm, Building/Module.pm, - # Building/Permanent.pm) never override `image`/`controller_class` — the base class `confess`es - # on both (see Lacuna::DB::Result::Building) — so eval-guarding both calls is how we tell a - # true leaf class apart from an abstract base, without hardcoding the list of leaves. - my $image = eval { $class->image }; - next if $@ || !defined $image; - - my $controller_class = eval { $class->controller_class }; - next if $@ || !defined $controller_class; - - (my $controller_file = "$controller_class.pm") =~ s{::}{/}g; - require $controller_file; - my $url = eval { $controller_class->app_url }; - next if $@ || !defined $url; - - $out{$class} = { - image => $image, - name => $class->name, - url => $url, - ore_to_build => $class->ore_to_build, - water_to_build => $class->water_to_build, - food_to_build => $class->food_to_build, - energy_to_build => $class->energy_to_build, - }; -} - -print JSON::PP->new->canonical->pretty->encode(\%out); diff --git a/bin/make_rails_test_empire.pl b/bin/make_rails_test_empire.pl deleted file mode 100644 index ce0a80b8..00000000 --- a/bin/make_rails_test_empire.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env perl -# One-off helper (not part of the app) to create/reuse a test empire + session for manually -# exercising and capturing golden get_status output while porting it to Rails. Mirrors -# t/TestHelper.pm's generate_test_empire/start_session pattern. -use strict; -use warnings; -use lib 'lib'; -use Lacuna; -use JSON::PP; - -my $name = shift @ARGV or die "usage: $0 \n"; - -my $empires = Lacuna->db->resultset('Lacuna::DB::Result::Empire')->search({ name => $name }); -while (my $e = $empires->next) { $e->delete; } - -my $empire = Lacuna->db->resultset('Lacuna::DB::Result::Empire')->new({ - name => $name, - date_created => DateTime->now, - status_message => 'Rails parity test empire.', - password => Lacuna::DB::Result::Empire->encrypt_password('testpass'), - sitter_password => 'testsitter', -})->insert; -$empire->found; - -my $session = $empire->start_session({api_key => 'tester'}); - -print JSON::PP->new->canonical->pretty->encode({ - empire_id => $empire->id, - home_planet_id => $empire->home_planet_id, - session_id => $session->id, -}); diff --git a/lacuna/.annotaterb.yml b/lacuna/.annotaterb.yml deleted file mode 100644 index c0712ffd..00000000 --- a/lacuna/.annotaterb.yml +++ /dev/null @@ -1,71 +0,0 @@ ---- -:position: before -:position_in_additional_file_patterns: before -:position_in_class: before -:position_in_factory: before -:position_in_fixture: before -:position_in_routes: before -:position_in_serializer: before -:position_in_test: before -:classified_sort: true -:exclude_controllers: true -:exclude_factories: false -:exclude_fixtures: false -:exclude_helpers: true -:exclude_scaffolds: true -:exclude_serializers: false -:exclude_sti_subclasses: false -:exclude_tests: false -:force: false -:format_markdown: false -:format_rdoc: false -:format_yard: false -:frozen: false -:grouped_polymorphic: false -:ignore_database_name: false -:ignore_model_sub_dir: false -:ignore_unknown_models: false -:include_version: false -:show_check_constraints: false -:show_unique_constraints: false -:show_exclusion_constraints: false -:show_enums: false -:show_complete_foreign_keys: false -:show_foreign_keys: true -:show_indexes: true -:show_indexes_comments: false -:show_indexes_include: false -:simple_indexes: false -:sort: true -:timestamp: false -:trace: false -:with_comment: true -:with_column_comments: true -:with_table_comments: true -:position_of_column_comment: :with_name -:active_admin: false -:command: -:debug: false -:hide_default_column_types: '' -:hide_limit_column_types: '' -:timestamp_columns: -- created_at -- updated_at -:ignore_columns: -:ignore_routes: -:ignore_multi_database_name: false -:models: true -:routes: false -:skip_on_db_migrate: false -:auto_annotate_routes_after_migrate: false -:target_action: :do_annotations -:wrapper: -:wrapper_close: -:wrapper_open: -:classes_default_to_s: [] -:additional_file_patterns: [] -:model_dir: -- app/models -:require: [] -:root_dir: -- '' diff --git a/lacuna/.ruby-version b/lacuna/.ruby-version deleted file mode 100644 index e41c6bfa..00000000 --- a/lacuna/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -ruby-3.3.11 diff --git a/lacuna/Gemfile b/lacuna/Gemfile deleted file mode 100644 index aba48b50..00000000 --- a/lacuna/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source 'https://rubygems.org' - -gem 'bootsnap', require: false -gem 'dalli' -gem 'mysql2' -gem 'puma', '>= 5.0' -gem 'rails', '~> 8.1.3', '>= 8.1.3.1' - -group :development do - gem 'annotaterb' -end - -group :test do - gem 'minitest' - gem 'minitest-rails' - gem 'simplecov', '~> 1.0', require: false -end diff --git a/lacuna/Gemfile.lock b/lacuna/Gemfile.lock deleted file mode 100644 index cd80edc7..00000000 --- a/lacuna/Gemfile.lock +++ /dev/null @@ -1,246 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - action_text-trix (2.1.19) - railties - actioncable (8.1.3.1) - actionpack (= 8.1.3.1) - activesupport (= 8.1.3.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (8.1.3.1) - actionpack (= 8.1.3.1) - activejob (= 8.1.3.1) - activerecord (= 8.1.3.1) - activestorage (= 8.1.3.1) - activesupport (= 8.1.3.1) - mail (>= 2.8.0) - actionmailer (8.1.3.1) - actionpack (= 8.1.3.1) - actionview (= 8.1.3.1) - activejob (= 8.1.3.1) - activesupport (= 8.1.3.1) - mail (>= 2.8.0) - rails-dom-testing (~> 2.2) - actionpack (8.1.3.1) - actionview (= 8.1.3.1) - activesupport (= 8.1.3.1) - nokogiri (>= 1.8.5) - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - useragent (~> 0.16) - actiontext (8.1.3.1) - action_text-trix (~> 2.1.15) - actionpack (= 8.1.3.1) - activerecord (= 8.1.3.1) - activestorage (= 8.1.3.1) - activesupport (= 8.1.3.1) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) - actionview (8.1.3.1) - activesupport (= 8.1.3.1) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activejob (8.1.3.1) - activesupport (= 8.1.3.1) - globalid (>= 0.3.6) - activemodel (8.1.3.1) - activesupport (= 8.1.3.1) - activerecord (8.1.3.1) - activemodel (= 8.1.3.1) - activesupport (= 8.1.3.1) - timeout (>= 0.4.0) - activestorage (8.1.3.1) - actionpack (= 8.1.3.1) - activejob (= 8.1.3.1) - activerecord (= 8.1.3.1) - activesupport (= 8.1.3.1) - marcel (~> 1.0) - activesupport (8.1.3.1) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - json - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) - annotaterb (4.24.0) - activerecord (>= 6.0.0) - activesupport (>= 6.0.0) - base64 (0.3.0) - bigdecimal (4.1.2) - bootsnap (1.25.0) - msgpack (~> 1.5) - builder (3.3.0) - concurrent-ruby (1.3.8) - connection_pool (3.0.2) - crass (1.0.7) - dalli (5.0.6) - logger - date (3.5.1) - drb (2.2.3) - erb (6.0.7) - erubi (1.13.1) - globalid (1.4.0) - activesupport (>= 6.1) - i18n (1.15.2) - concurrent-ruby (~> 1.0) - io-console (0.9.2) - irb (1.18.0) - pp (>= 0.6.0) - prism (>= 1.3.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - json (2.21.2) - logger (1.7.0) - loofah (2.25.2) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - mail (2.9.1) - logger - mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - marcel (1.2.1) - mini_mime (1.1.5) - minitest (5.27.0) - minitest-rails (8.1.0) - minitest (~> 5.20) - railties (>= 8.1.0, < 8.2.0) - msgpack (1.8.4) - mysql2 (0.5.7) - bigdecimal - net-imap (0.6.6) - date - net-protocol - net-pop (0.1.2) - net-protocol - net-protocol (0.2.2) - timeout - net-smtp (0.5.1) - net-protocol - nio4r (2.7.5) - nokogiri (1.19.4-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.4-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.19.4-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.4-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.19.4-arm64-darwin) - racc (~> 1.4) - nokogiri (1.19.4-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.19.4-x86_64-linux-gnu) - racc (~> 1.4) - nokogiri (1.19.4-x86_64-linux-musl) - racc (~> 1.4) - pp (0.6.4) - prettyprint - prettyprint (0.2.0) - prism (1.9.0) - puma (8.0.2) - nio4r (~> 2.0) - racc (1.8.1) - rack (3.2.7) - rack-session (2.1.2) - base64 (>= 0.1.0) - rack (>= 3.0.0) - rack-test (2.2.0) - rack (>= 1.3) - rackup (2.3.1) - rack (>= 3) - rails (8.1.3.1) - actioncable (= 8.1.3.1) - actionmailbox (= 8.1.3.1) - actionmailer (= 8.1.3.1) - actionpack (= 8.1.3.1) - actiontext (= 8.1.3.1) - actionview (= 8.1.3.1) - activejob (= 8.1.3.1) - activemodel (= 8.1.3.1) - activerecord (= 8.1.3.1) - activestorage (= 8.1.3.1) - activesupport (= 8.1.3.1) - bundler (>= 1.15.0) - railties (= 8.1.3.1) - rails-dom-testing (2.3.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.7.1) - loofah (~> 2.25, >= 2.25.2) - nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.3.1) - actionpack (= 8.1.3.1) - activesupport (= 8.1.3.1) - irb (~> 1.13) - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) - zeitwerk (~> 2.6) - rake (13.4.2) - rbs (4.1.3) - logger - prism (>= 1.6.0) - tsort - rdoc (8.0.0) - erb - prism (>= 1.6.0) - rbs (>= 4.0.0) - tsort - reline (0.7.0) - io-console (~> 0.5) - securerandom (0.4.1) - simplecov (1.1.1) - thor (1.5.0) - timeout (0.6.1) - tsort (0.2.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - uri (1.1.1) - useragent (0.16.11) - websocket-driver (0.8.2) - base64 - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.8.3) - -PLATFORMS - aarch64-linux - aarch64-linux-gnu - aarch64-linux-musl - arm-linux-gnu - arm-linux-musl - arm64-darwin - x86_64-darwin - x86_64-linux-gnu - x86_64-linux-musl - -DEPENDENCIES - annotaterb - bootsnap - dalli - minitest - minitest-rails - mysql2 - puma (>= 5.0) - rails (~> 8.1.3, >= 8.1.3.1) - simplecov (~> 1.0) - -BUNDLED WITH - 2.5.22 diff --git a/lacuna/Rakefile b/lacuna/Rakefile deleted file mode 100644 index e85f9139..00000000 --- a/lacuna/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require_relative 'config/application' - -Rails.application.load_tasks diff --git a/lacuna/app/controllers/algae_controller.rb b/lacuna/app/controllers/algae_controller.rb deleted file mode 100644 index f2ff8d89..00000000 --- a/lacuna/app/controllers/algae_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AlgaeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/algaepond_controller.rb b/lacuna/app/controllers/algaepond_controller.rb deleted file mode 100644 index 32806bb8..00000000 --- a/lacuna/app/controllers/algaepond_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AlgaepondController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/alliance_controller.rb b/lacuna/app/controllers/alliance_controller.rb deleted file mode 100644 index 2a6f7c13..00000000 --- a/lacuna/app/controllers/alliance_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AllianceController < ApplicationController - def find - head :not_implemented - end - - def view_profile - head :not_implemented - end -end diff --git a/lacuna/app/controllers/amalgusmeadow_controller.rb b/lacuna/app/controllers/amalgusmeadow_controller.rb deleted file mode 100644 index 0bf69a02..00000000 --- a/lacuna/app/controllers/amalgusmeadow_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AmalgusmeadowController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/apple_controller.rb b/lacuna/app/controllers/apple_controller.rb deleted file mode 100644 index 54a96de3..00000000 --- a/lacuna/app/controllers/apple_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AppleController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/application_controller.rb b/lacuna/app/controllers/application_controller.rb deleted file mode 100644 index 1c7f5563..00000000 --- a/lacuna/app/controllers/application_controller.rb +++ /dev/null @@ -1,58 +0,0 @@ -class ApplicationController < ActionController::API - class SessionRequired < StandardError; end - - rescue_from SessionRequired, with: :render_session_required - - before_action :set_session - - private - - def set_session - token = session_token - raise SessionRequired, 'Missing or malformed Authorization header' if token.blank? - - @current_session = Session.find(token) - raise SessionRequired, 'Session not found or expired' if @current_session.nil? - end - - def session_token - header = request.headers['Authorization'] - return nil unless header.is_a?(String) && header.start_with?('Token ') - - header.delete_prefix('Token ').strip.presence - end - - def current_empire - @current_session&.current_empire - end - - # Mirrors Lacuna::RPC#format_status (lib/Lacuna/RPC.pm:236-277). Perl's `$real_empire` in - # that method is always `session->empire` (the real logged-in identity, built from the - # cached `empire_id` — never a sitted baby's empire, see lib/Lacuna/Session.pm), which is - # exactly what `current_empire` already is here: Rails has no per-request session-mutation - # concept, so no separate "real empire" accessor is needed. - # - # `server.announcement`/`server.promotions` (cache-announcement-flag and Promotion-table - # driven) are a deliberate scope cut — not ported. - def format_status(body = nil) - out = { server: server_status } - if current_empire - out[:empire] = current_empire.get_status(viewer_is_sitter: @current_session.is_sitter.to_i != 0) - end - out[:body] = body.get_status(current_empire) if body - out - end - - def server_status - { - time: LacunaDateFormat.format(Time.now.utc), - version: LacunaServerInfo::VERSION, - star_map_size: LacunaServerInfo::MAP_SIZE, - rpc_limit: LacunaServerInfo::RPC_LIMIT, - } - end - - def render_session_required(exception) - render json: { error: exception.message }, status: :unauthorized - end -end diff --git a/lacuna/app/controllers/archaeology_controller.rb b/lacuna/app/controllers/archaeology_controller.rb deleted file mode 100644 index 086f88bf..00000000 --- a/lacuna/app/controllers/archaeology_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -class ArchaeologyController < BuildingController - def abandon_excavator - head :not_implemented - end - - def assemble_glyphs - head :not_implemented - end - - def get_glyph_summary - head :not_implemented - end - - def get_ores_available_for_processing - head :not_implemented - end - - def mass_abandon_excavator - head :not_implemented - end - - def search_for_glyph - head :not_implemented - end - - def subsidize_search - head :not_implemented - end - - def view - head :not_implemented - end - - def view_excavators - head :not_implemented - end -end diff --git a/lacuna/app/controllers/artmuseum_controller.rb b/lacuna/app/controllers/artmuseum_controller.rb deleted file mode 100644 index 58ddcead..00000000 --- a/lacuna/app/controllers/artmuseum_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ArtmuseumController < ApplicationController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/atmosphericevaporator_controller.rb b/lacuna/app/controllers/atmosphericevaporator_controller.rb deleted file mode 100644 index cbd2c477..00000000 --- a/lacuna/app/controllers/atmosphericevaporator_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AtmosphericevaporatorController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/beach_controller.rb b/lacuna/app/controllers/beach_controller.rb deleted file mode 100644 index 4aae6dd8..00000000 --- a/lacuna/app/controllers/beach_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BeachController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/bean_controller.rb b/lacuna/app/controllers/bean_controller.rb deleted file mode 100644 index 242b4613..00000000 --- a/lacuna/app/controllers/bean_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BeanController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/beeldeban_controller.rb b/lacuna/app/controllers/beeldeban_controller.rb deleted file mode 100644 index f37ee482..00000000 --- a/lacuna/app/controllers/beeldeban_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BeeldebanController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/beeldebannest_controller.rb b/lacuna/app/controllers/beeldebannest_controller.rb deleted file mode 100644 index 86469f17..00000000 --- a/lacuna/app/controllers/beeldebannest_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BeeldebannestController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/blackholegenerator_controller.rb b/lacuna/app/controllers/blackholegenerator_controller.rb deleted file mode 100644 index 37de136f..00000000 --- a/lacuna/app/controllers/blackholegenerator_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class BlackholegeneratorController < BuildingController - def generate_singularity - head :not_implemented - end - - def get_actions_for - head :not_implemented - end - - def subsidize_cooldown - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/body_controller.rb b/lacuna/app/controllers/body_controller.rb deleted file mode 100644 index ff8b939b..00000000 --- a/lacuna/app/controllers/body_controller.rb +++ /dev/null @@ -1,68 +0,0 @@ -class BodyController < ApplicationController - # Mirrors Lacuna::RPC::Body#get_status (lib/Lacuna/RPC/Body.pm:19-25), including the - # ownership/alliance-station/sitter accessibility check from Lacuna::RPC::get_body - # (lib/Lacuna/RPC.pm:148-185) — see Body#accessible_to?. - def get_status - body = Body.find_by(id: params[:body_id]) - if body.nil? || !body.accessible_to?(@current_session) - render json: { error: 'Body does not exist or is not owned by you or any empire you sit.' }, - status: :not_found - return - end - - render json: format_status(body) - end - - def abandon - head :not_implemented - end - - def get_buildable - head :not_implemented - end - - def get_buildable_locations - head :not_implemented - end - - # Mirrors Lacuna::RPC::Body#get_buildings (lib/Lacuna/RPC/Body.pm:105-122) and - # Lacuna::RPC::Role::Building#out_buildings (lib/Lacuna/RPC/Role/Building.pm:7-38). - def get_buildings - body = Body.find_by(id: params[:body_id]) - if body.nil? || !body.accessible_to?(@current_session) - render json: { error: 'Body does not exist or is not owned by you or any empire you sit.' }, - status: :not_found - return - end - - body.update!(needs_surface_refresh: false) if body.needs_surface_refresh.to_i != 0 - - buildings = body.buildings.each_with_object({}) { |b, out| out[b.id] = b.summary } - - render json: { - buildings: buildings, - body: { surface_image: body.surface }, - status: format_status(body), - } - end - - def rearrange_buildings - head :not_implemented - end - - def rename - head :not_implemented - end - - def repair_list - head :not_implemented - end - - def set_colony_notes - head :not_implemented - end - - def view_laws - head :not_implemented - end -end diff --git a/lacuna/app/controllers/bread_controller.rb b/lacuna/app/controllers/bread_controller.rb deleted file mode 100644 index a5e2fd1d..00000000 --- a/lacuna/app/controllers/bread_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BreadController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/building_controller.rb b/lacuna/app/controllers/building_controller.rb deleted file mode 100644 index 66a1de0f..00000000 --- a/lacuna/app/controllers/building_controller.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Shared base for every building-type controller, mirroring Perl's Lacuna::RPC::Building base -# class (lib/Lacuna/RPC/Building.pm) — the actions every regular building type exposes -# identically. `view` is intentionally NOT here: nearly every building type adds its own extra -# fields to `view`, so it's defined per-building instead (compare buildingCommonMethods vs. -# buildingView in api-spec's src/spec/chunks.ts). -class BuildingController < ApplicationController - def build - head :not_implemented - end - - def upgrade - head :not_implemented - end - - def downgrade - head :not_implemented - end - - def demolish - head :not_implemented - end - - def repair - head :not_implemented - end - - def get_stats_for_level - head :not_implemented - end -end diff --git a/lacuna/app/controllers/burger_controller.rb b/lacuna/app/controllers/burger_controller.rb deleted file mode 100644 index 2f681b0e..00000000 --- a/lacuna/app/controllers/burger_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class BurgerController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/capitol_controller.rb b/lacuna/app/controllers/capitol_controller.rb deleted file mode 100644 index 95dd324f..00000000 --- a/lacuna/app/controllers/capitol_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CapitolController < BuildingController - def rename_empire - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/captcha_controller.rb b/lacuna/app/controllers/captcha_controller.rb deleted file mode 100644 index 24babf37..00000000 --- a/lacuna/app/controllers/captcha_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CaptchaController < ApplicationController - def fetch - head :not_implemented - end - - def solve - head :not_implemented - end -end diff --git a/lacuna/app/controllers/cheese_controller.rb b/lacuna/app/controllers/cheese_controller.rb deleted file mode 100644 index 4e00bb61..00000000 --- a/lacuna/app/controllers/cheese_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CheeseController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/chip_controller.rb b/lacuna/app/controllers/chip_controller.rb deleted file mode 100644 index 2b2b255a..00000000 --- a/lacuna/app/controllers/chip_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ChipController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/cider_controller.rb b/lacuna/app/controllers/cider_controller.rb deleted file mode 100644 index 490cb81f..00000000 --- a/lacuna/app/controllers/cider_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CiderController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/citadelofknope_controller.rb b/lacuna/app/controllers/citadelofknope_controller.rb deleted file mode 100644 index 1918bbf7..00000000 --- a/lacuna/app/controllers/citadelofknope_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CitadelofknopeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/cloakinglab_controller.rb b/lacuna/app/controllers/cloakinglab_controller.rb deleted file mode 100644 index 89c68e72..00000000 --- a/lacuna/app/controllers/cloakinglab_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CloakinglabController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/concerns/.keep b/lacuna/app/controllers/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/app/controllers/corn_controller.rb b/lacuna/app/controllers/corn_controller.rb deleted file mode 100644 index ee10df4c..00000000 --- a/lacuna/app/controllers/corn_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CornController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/cornmeal_controller.rb b/lacuna/app/controllers/cornmeal_controller.rb deleted file mode 100644 index 8d5bb1bf..00000000 --- a/lacuna/app/controllers/cornmeal_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CornmealController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/crashedshipsite_controller.rb b/lacuna/app/controllers/crashedshipsite_controller.rb deleted file mode 100644 index 0b27ccad..00000000 --- a/lacuna/app/controllers/crashedshipsite_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CrashedshipsiteController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/crater_controller.rb b/lacuna/app/controllers/crater_controller.rb deleted file mode 100644 index 9d47ff99..00000000 --- a/lacuna/app/controllers/crater_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CraterController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/culinaryinstitute_controller.rb b/lacuna/app/controllers/culinaryinstitute_controller.rb deleted file mode 100644 index 8c218e7d..00000000 --- a/lacuna/app/controllers/culinaryinstitute_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class CulinaryinstituteController < ApplicationController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/dairy_controller.rb b/lacuna/app/controllers/dairy_controller.rb deleted file mode 100644 index 52bfb55d..00000000 --- a/lacuna/app/controllers/dairy_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class DairyController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/denton_controller.rb b/lacuna/app/controllers/denton_controller.rb deleted file mode 100644 index d8557d04..00000000 --- a/lacuna/app/controllers/denton_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class DentonController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/dentonbrambles_controller.rb b/lacuna/app/controllers/dentonbrambles_controller.rb deleted file mode 100644 index a2d05a29..00000000 --- a/lacuna/app/controllers/dentonbrambles_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class DentonbramblesController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/deployedbleeder_controller.rb b/lacuna/app/controllers/deployedbleeder_controller.rb deleted file mode 100644 index 78882f31..00000000 --- a/lacuna/app/controllers/deployedbleeder_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class DeployedbleederController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/development_controller.rb b/lacuna/app/controllers/development_controller.rb deleted file mode 100644 index 7957a4bf..00000000 --- a/lacuna/app/controllers/development_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class DevelopmentController < BuildingController - def cancel_build - head :not_implemented - end - - def subsidize_build_queue - head :not_implemented - end - - def subsidize_one_build - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/distributioncenter_controller.rb b/lacuna/app/controllers/distributioncenter_controller.rb deleted file mode 100644 index 92667306..00000000 --- a/lacuna/app/controllers/distributioncenter_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class DistributioncenterController < BuildingController - def get_stored_resources - head :not_implemented - end - - def release_reserve - head :not_implemented - end - - def reserve - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/embassy_controller.rb b/lacuna/app/controllers/embassy_controller.rb deleted file mode 100644 index a625e725..00000000 --- a/lacuna/app/controllers/embassy_controller.rb +++ /dev/null @@ -1,77 +0,0 @@ -class EmbassyController < BuildingController - def accept_invite - head :not_implemented - end - - def assign_alliance_leader - head :not_implemented - end - - def cast_vote - head :not_implemented - end - - def create_alliance - head :not_implemented - end - - def dissolve_alliance - head :not_implemented - end - - def donate_to_stash - head :not_implemented - end - - def exchange_with_stash - head :not_implemented - end - - def expel_member - head :not_implemented - end - - def get_alliance_status - head :not_implemented - end - - def get_my_invites - head :not_implemented - end - - def get_pending_invites - head :not_implemented - end - - def leave_alliance - head :not_implemented - end - - def reject_invite - head :not_implemented - end - - def send_invite - head :not_implemented - end - - def update_alliance - head :not_implemented - end - - def view - head :not_implemented - end - - def view_propositions - head :not_implemented - end - - def view_stash - head :not_implemented - end - - def withdraw_invite - head :not_implemented - end -end diff --git a/lacuna/app/controllers/empire_controller.rb b/lacuna/app/controllers/empire_controller.rb deleted file mode 100644 index cc33a6e8..00000000 --- a/lacuna/app/controllers/empire_controller.rb +++ /dev/null @@ -1,238 +0,0 @@ -class EmpireController < ApplicationController - skip_before_action :set_session, only: %i[create fetch_captcha found get_species_templates is_name_available login redefine_species_limits reset_password send_password_reset_message] - - # Mirrors Lacuna::RPC::Empire#view_profile (lib/Lacuna/RPC/Empire.pm) — the private - # self-profile view (not view_public_profile, which targets a different empire_id). - def view_profile - if @current_session.is_sitter.to_i != 0 - render json: { error: 'Sitters cannot modify preferences.' }, status: :forbidden - return - end - - medals = current_empire.medals.each_with_object({}) do |medal, out| - out[medal.id] = { - name: medal.name, - image: medal.image, - date: medal.formatted_datestamp, - public: medal.public, - times_earned: medal.times_earned, - } - end - - profile = { - description: current_empire.description, - notes: current_empire.notes, - status_message: current_empire.status_message, - sitter_password: current_empire.sitter_password, - email: current_empire.email, - city: current_empire.city, - country: current_empire.country, - skype: current_empire.skype, - player_name: current_empire.player_name, - skip_medal_messages: current_empire.skip_medal_messages, - skip_pollution_warnings: current_empire.skip_pollution_warnings, - skip_resource_warnings: current_empire.skip_resource_warnings, - skip_happiness_warnings: current_empire.skip_happiness_warnings, - medals: medals, - skip_found_nothing: current_empire.skip_found_nothing, - skip_excavator_resources: current_empire.skip_excavator_resources, - skip_excavator_glyph: current_empire.skip_excavator_glyph, - skip_excavator_plan: current_empire.skip_excavator_plan, - skip_excavator_artifact: current_empire.skip_excavator_artifact, - skip_excavator_destroyed: current_empire.skip_excavator_destroyed, - skip_excavator_replace_msg: current_empire.skip_excavator_replace_msg, - dont_replace_excavator: current_empire.dont_replace_excavator, - skip_spy_recovery: current_empire.skip_spy_recovery, - skip_probe_detected: current_empire.skip_probe_detected, - skip_attack_messages: current_empire.skip_attack_messages, - skip_incoming_ships: current_empire.skip_incoming_ships, - } - - render json: { profile: profile, status: format_status } - end - - # Mirrors Lacuna::RPC::Empire#get_status (lib/Lacuna/RPC/Empire.pm:444-448) — no body_id is - # involved, so the response never has a `body` key (see ApplicationController#format_status). - def get_status - render json: format_status - end - - def authorize_sitters - head :not_implemented - end - - def boost_building - boost(:building) - end - - def boost_energy - boost(:energy) - end - - def boost_food - boost(:food) - end - - def boost_happiness - boost(:happiness) - end - - def boost_ore - boost(:ore) - end - - def boost_spy_training - boost(:spy_training) - end - - def boost_storage - boost(:storage) - end - - def boost_water - boost(:water) - end - - def change_password - head :not_implemented - end - - def create - head :not_implemented - end - - def deauthorize_sitters - head :not_implemented - end - - def disable_self_destruct - head :not_implemented - end - - def edit_profile - head :not_implemented - end - - def enable_self_destruct - head :not_implemented - end - - def fetch_captcha - head :not_implemented - end - - def find - head :not_implemented - end - - def found - head :not_implemented - end - - def get_invite_friend_url - head :not_implemented - end - - def get_species_templates - head :not_implemented - end - - def invite_friend - head :not_implemented - end - - def is_name_available - head :not_implemented - end - - def login - head :not_implemented - end - - def logout - head :not_implemented - end - - def redeem_essentia_code - head :not_implemented - end - - def redefine_species - head :not_implemented - end - - def redefine_species_limits - head :not_implemented - end - - def reset_password - head :not_implemented - end - - def send_password_reset_message - head :not_implemented - end - - def set_status_message - head :not_implemented - end - - def update_species - head :not_implemented - end - - def view_authorized_sitters - head :not_implemented - end - - # Mirrors Lacuna::RPC::Empire#view_boosts (lib/Lacuna/RPC/Empire.pm:890-907). - def view_boosts - render json: view_boosts_payload - end - - def view_public_profile - head :not_implemented - end - - def view_species_stats - head :not_implemented - end - - private - - # Mirrors Lacuna::RPC::Empire#boost's validation + dispatch (lib/Lacuna/RPC/Empire.pm:865-888). - # Perl's error codes (1001 "Weeks must be a positive integer", 1011 "Not enough essentia.") - # don't map cleanly onto HTTP/REST — 422 and 402 are this port's judgment-call mapping. - def boost(type) - column = Empire::BOOST_COLUMNS.fetch(type) - raw_weeks = params[:weeks] - raw_weeks = 1 if raw_weeks.nil? # Perl's `$weeks //= 1` — only defaults when omitted, not when 0. - - # Float() accepts Integer/Float (JSON-typed params) and numeric Strings (form-encoded params) - # alike, mirroring Perl's own untyped `int($weeks) == $weeks` check. - weeks = begin - Float(raw_weeks) - rescue ArgumentError, TypeError - nil - end - - unless weeks && weeks >= 0 && weeks == weeks.to_i - render json: { error: 'Weeks must be a positive integer' }, status: :unprocessable_entity - return - end - weeks = weeks.to_i - - cost = Empire::BOOST_COST_PER_WEEK * weeks - unless current_empire.essentia >= cost - render json: { error: 'Not enough essentia.' }, status: :payment_required - return - end - - current_empire.apply_boost!(column, weeks, reason: "#{column} boost", api_key: @current_session.api_key) - render json: view_boosts_payload - end - - def view_boosts_payload - { status: format_status, boosts: current_empire.view_boosts } - end -end diff --git a/lacuna/app/controllers/energyreserve_controller.rb b/lacuna/app/controllers/energyreserve_controller.rb deleted file mode 100644 index 90e71339..00000000 --- a/lacuna/app/controllers/energyreserve_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class EnergyreserveController < BuildingController - def dump - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/entertainment_controller.rb b/lacuna/app/controllers/entertainment_controller.rb deleted file mode 100644 index 29474a89..00000000 --- a/lacuna/app/controllers/entertainment_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class EntertainmentController < BuildingController - def duck_quack - head :not_implemented - end - - def get_lottery_voting_options - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/espionage_controller.rb b/lacuna/app/controllers/espionage_controller.rb deleted file mode 100644 index 197035fc..00000000 --- a/lacuna/app/controllers/espionage_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class EspionageController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/essentiavein_controller.rb b/lacuna/app/controllers/essentiavein_controller.rb deleted file mode 100644 index 93b3d3fa..00000000 --- a/lacuna/app/controllers/essentiavein_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class EssentiaveinController < BuildingController - def drain - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/fission_controller.rb b/lacuna/app/controllers/fission_controller.rb deleted file mode 100644 index d3403d7c..00000000 --- a/lacuna/app/controllers/fission_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class FissionController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/fissure_controller.rb b/lacuna/app/controllers/fissure_controller.rb deleted file mode 100644 index c3d1154d..00000000 --- a/lacuna/app/controllers/fissure_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class FissureController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/foodreserve_controller.rb b/lacuna/app/controllers/foodreserve_controller.rb deleted file mode 100644 index b86e1ae2..00000000 --- a/lacuna/app/controllers/foodreserve_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class FoodreserveController < BuildingController - def dump - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/fusion_controller.rb b/lacuna/app/controllers/fusion_controller.rb deleted file mode 100644 index 49b1e2a8..00000000 --- a/lacuna/app/controllers/fusion_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class FusionController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/gasgiantlab_controller.rb b/lacuna/app/controllers/gasgiantlab_controller.rb deleted file mode 100644 index db31853c..00000000 --- a/lacuna/app/controllers/gasgiantlab_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GasgiantlabController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/gasgiantplatform_controller.rb b/lacuna/app/controllers/gasgiantplatform_controller.rb deleted file mode 100644 index 778258ba..00000000 --- a/lacuna/app/controllers/gasgiantplatform_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GasgiantplatformController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/geneticslab_controller.rb b/lacuna/app/controllers/geneticslab_controller.rb deleted file mode 100644 index 0afb4d8e..00000000 --- a/lacuna/app/controllers/geneticslab_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class GeneticslabController < BuildingController - def prepare_experiment - head :not_implemented - end - - def rename_species - head :not_implemented - end - - def run_experiment - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/geo_controller.rb b/lacuna/app/controllers/geo_controller.rb deleted file mode 100644 index bba56f1f..00000000 --- a/lacuna/app/controllers/geo_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GeoController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/geothermalvent_controller.rb b/lacuna/app/controllers/geothermalvent_controller.rb deleted file mode 100644 index 5684a9ff..00000000 --- a/lacuna/app/controllers/geothermalvent_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GeothermalventController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/gratchsgauntlet_controller.rb b/lacuna/app/controllers/gratchsgauntlet_controller.rb deleted file mode 100644 index f743c31a..00000000 --- a/lacuna/app/controllers/gratchsgauntlet_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GratchsgauntletController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/greatballofjunk_controller.rb b/lacuna/app/controllers/greatballofjunk_controller.rb deleted file mode 100644 index e4657f5d..00000000 --- a/lacuna/app/controllers/greatballofjunk_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GreatballofjunkController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/grove_controller.rb b/lacuna/app/controllers/grove_controller.rb deleted file mode 100644 index b9a16f3f..00000000 --- a/lacuna/app/controllers/grove_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class GroveController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/hallsofvrbansk_controller.rb b/lacuna/app/controllers/hallsofvrbansk_controller.rb deleted file mode 100644 index 66edbc8d..00000000 --- a/lacuna/app/controllers/hallsofvrbansk_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class HallsofvrbanskController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/hydrocarbon_controller.rb b/lacuna/app/controllers/hydrocarbon_controller.rb deleted file mode 100644 index a9eb2f0e..00000000 --- a/lacuna/app/controllers/hydrocarbon_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class HydrocarbonController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/ibs_controller.rb b/lacuna/app/controllers/ibs_controller.rb deleted file mode 100644 index 3f8a5819..00000000 --- a/lacuna/app/controllers/ibs_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class IbsController < ApplicationController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/inbox_controller.rb b/lacuna/app/controllers/inbox_controller.rb deleted file mode 100644 index 84f7edfa..00000000 --- a/lacuna/app/controllers/inbox_controller.rb +++ /dev/null @@ -1,41 +0,0 @@ -class InboxController < ApplicationController - def archive_messages - head :not_implemented - end - - def read_message - head :not_implemented - end - - def send_message - head :not_implemented - end - - def trash_messages - head :not_implemented - end - - def trash_messages_where - head :not_implemented - end - - def view_archived - head :not_implemented - end - - def view_inbox - head :not_implemented - end - - def view_sent - head :not_implemented - end - - def view_trashed - head :not_implemented - end - - def view_unread - head :not_implemented - end -end diff --git a/lacuna/app/controllers/intelligence_controller.rb b/lacuna/app/controllers/intelligence_controller.rb deleted file mode 100644 index 5a2dd652..00000000 --- a/lacuna/app/controllers/intelligence_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -class IntelligenceController < BuildingController - def assign_spy - head :not_implemented - end - - def burn_spy - head :not_implemented - end - - def name_spies - head :not_implemented - end - - def name_spy - head :not_implemented - end - - def subsidize_training - head :not_implemented - end - - def train_spy - head :not_implemented - end - - def view - head :not_implemented - end - - def view_all_spies - head :not_implemented - end - - def view_spies - head :not_implemented - end -end diff --git a/lacuna/app/controllers/inteltraining_controller.rb b/lacuna/app/controllers/inteltraining_controller.rb deleted file mode 100644 index dd60cfce..00000000 --- a/lacuna/app/controllers/inteltraining_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class InteltrainingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/interdimensionalrift_controller.rb b/lacuna/app/controllers/interdimensionalrift_controller.rb deleted file mode 100644 index f31c95fd..00000000 --- a/lacuna/app/controllers/interdimensionalrift_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class InterdimensionalriftController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/junkhengesculpture_controller.rb b/lacuna/app/controllers/junkhengesculpture_controller.rb deleted file mode 100644 index c91fc510..00000000 --- a/lacuna/app/controllers/junkhengesculpture_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class JunkhengesculptureController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/kalavianruins_controller.rb b/lacuna/app/controllers/kalavianruins_controller.rb deleted file mode 100644 index 0d8d3427..00000000 --- a/lacuna/app/controllers/kalavianruins_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class KalavianruinsController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/kasternskeep_controller.rb b/lacuna/app/controllers/kasternskeep_controller.rb deleted file mode 100644 index 89fefe9e..00000000 --- a/lacuna/app/controllers/kasternskeep_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class KasternskeepController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/lagoon_controller.rb b/lacuna/app/controllers/lagoon_controller.rb deleted file mode 100644 index 1f60a07b..00000000 --- a/lacuna/app/controllers/lagoon_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LagoonController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/lake_controller.rb b/lacuna/app/controllers/lake_controller.rb deleted file mode 100644 index 72f468b5..00000000 --- a/lacuna/app/controllers/lake_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LakeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/lapis_controller.rb b/lacuna/app/controllers/lapis_controller.rb deleted file mode 100644 index aca59a2e..00000000 --- a/lacuna/app/controllers/lapis_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LapisController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/lapisforest_controller.rb b/lacuna/app/controllers/lapisforest_controller.rb deleted file mode 100644 index b8de4a5a..00000000 --- a/lacuna/app/controllers/lapisforest_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LapisforestController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/libraryofjith_controller.rb b/lacuna/app/controllers/libraryofjith_controller.rb deleted file mode 100644 index 42c227e4..00000000 --- a/lacuna/app/controllers/libraryofjith_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class LibraryofjithController < BuildingController - def research_species - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/lostcityoftyleon_controller.rb b/lacuna/app/controllers/lostcityoftyleon_controller.rb deleted file mode 100644 index 9feb0f96..00000000 --- a/lacuna/app/controllers/lostcityoftyleon_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LostcityoftyleonController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/luxuryhousing_controller.rb b/lacuna/app/controllers/luxuryhousing_controller.rb deleted file mode 100644 index 0ea55d6b..00000000 --- a/lacuna/app/controllers/luxuryhousing_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class LuxuryhousingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/malcud_controller.rb b/lacuna/app/controllers/malcud_controller.rb deleted file mode 100644 index 6e8c3729..00000000 --- a/lacuna/app/controllers/malcud_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MalcudController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/malcudfield_controller.rb b/lacuna/app/controllers/malcudfield_controller.rb deleted file mode 100644 index 846bdff6..00000000 --- a/lacuna/app/controllers/malcudfield_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MalcudfieldController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/map_controller.rb b/lacuna/app/controllers/map_controller.rb deleted file mode 100644 index af3134d5..00000000 --- a/lacuna/app/controllers/map_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -class MapController < ApplicationController - def check_star_for_incoming_probe - head :not_implemented - end - - def get_star - head :not_implemented - end - - def get_star_by_name - head :not_implemented - end - - def get_star_by_xy - head :not_implemented - end - - def get_star_map - head :not_implemented - end - - def get_stars - head :not_implemented - end - - def probe_summary_fissures - head :not_implemented - end - - def search_stars - head :not_implemented - end - - def view_laws - head :not_implemented - end -end diff --git a/lacuna/app/controllers/massadshenge_controller.rb b/lacuna/app/controllers/massadshenge_controller.rb deleted file mode 100644 index 2c52d695..00000000 --- a/lacuna/app/controllers/massadshenge_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MassadshengeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/mayhemtraining_controller.rb b/lacuna/app/controllers/mayhemtraining_controller.rb deleted file mode 100644 index 9d678b19..00000000 --- a/lacuna/app/controllers/mayhemtraining_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MayhemtrainingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/mercenariesguild_controller.rb b/lacuna/app/controllers/mercenariesguild_controller.rb deleted file mode 100644 index 90f6b568..00000000 --- a/lacuna/app/controllers/mercenariesguild_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -class MercenariesguildController < BuildingController - def accept_from_market - head :not_implemented - end - - def add_to_market - head :not_implemented - end - - def get_spies - head :not_implemented - end - - def get_trade_ships - head :not_implemented - end - - def report_abuse - head :not_implemented - end - - def view - head :not_implemented - end - - def view_market - head :not_implemented - end - - def view_my_market - head :not_implemented - end - - def withdraw_from_market - head :not_implemented - end -end diff --git a/lacuna/app/controllers/metaljunkarches_controller.rb b/lacuna/app/controllers/metaljunkarches_controller.rb deleted file mode 100644 index 00284c0a..00000000 --- a/lacuna/app/controllers/metaljunkarches_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MetaljunkarchesController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/mine_controller.rb b/lacuna/app/controllers/mine_controller.rb deleted file mode 100644 index a16b1b96..00000000 --- a/lacuna/app/controllers/mine_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MineController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/miningministry_controller.rb b/lacuna/app/controllers/miningministry_controller.rb deleted file mode 100644 index 88886de7..00000000 --- a/lacuna/app/controllers/miningministry_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -class MiningministryController < BuildingController - def abandon_platform - head :not_implemented - end - - def add_cargo_ship_to_fleet - head :not_implemented - end - - def mass_abandon_platform - head :not_implemented - end - - def remove_cargo_ship_from_fleet - head :not_implemented - end - - def view - head :not_implemented - end - - def view_platforms - head :not_implemented - end - - def view_ships - head :not_implemented - end -end diff --git a/lacuna/app/controllers/missioncommand_controller.rb b/lacuna/app/controllers/missioncommand_controller.rb deleted file mode 100644 index d8ea886e..00000000 --- a/lacuna/app/controllers/missioncommand_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class MissioncommandController < BuildingController - def complete_mission - head :not_implemented - end - - def get_missions - head :not_implemented - end - - def skip_mission - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/munitionslab_controller.rb b/lacuna/app/controllers/munitionslab_controller.rb deleted file mode 100644 index 1e39b622..00000000 --- a/lacuna/app/controllers/munitionslab_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class MunitionslabController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/naturalspring_controller.rb b/lacuna/app/controllers/naturalspring_controller.rb deleted file mode 100644 index 2d4942da..00000000 --- a/lacuna/app/controllers/naturalspring_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class NaturalspringController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/network19_controller.rb b/lacuna/app/controllers/network19_controller.rb deleted file mode 100644 index e69124a9..00000000 --- a/lacuna/app/controllers/network19_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Network19Controller < BuildingController - def restrict_coverage - head :not_implemented - end - - def view - head :not_implemented - end - - def view_news - head :not_implemented - end -end diff --git a/lacuna/app/controllers/observatory_controller.rb b/lacuna/app/controllers/observatory_controller.rb deleted file mode 100644 index b7009e0f..00000000 --- a/lacuna/app/controllers/observatory_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class ObservatoryController < BuildingController - def abandon_all_probes - head :not_implemented - end - - def abandon_probe - head :not_implemented - end - - def get_probed_stars - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/operahouse_controller.rb b/lacuna/app/controllers/operahouse_controller.rb deleted file mode 100644 index 5a0c67a2..00000000 --- a/lacuna/app/controllers/operahouse_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class OperahouseController < ApplicationController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/oracleofanid_controller.rb b/lacuna/app/controllers/oracleofanid_controller.rb deleted file mode 100644 index 8705479d..00000000 --- a/lacuna/app/controllers/oracleofanid_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class OracleofanidController < BuildingController - def get_probed_stars - head :not_implemented - end - - def get_star - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/orerefinery_controller.rb b/lacuna/app/controllers/orerefinery_controller.rb deleted file mode 100644 index ddad9ecd..00000000 --- a/lacuna/app/controllers/orerefinery_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class OrerefineryController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/orestorage_controller.rb b/lacuna/app/controllers/orestorage_controller.rb deleted file mode 100644 index 0756ca73..00000000 --- a/lacuna/app/controllers/orestorage_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class OrestorageController < BuildingController - def dump - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/oversight_controller.rb b/lacuna/app/controllers/oversight_controller.rb deleted file mode 100644 index 2a97d950..00000000 --- a/lacuna/app/controllers/oversight_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class OversightController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/pancake_controller.rb b/lacuna/app/controllers/pancake_controller.rb deleted file mode 100644 index 0bbc5dea..00000000 --- a/lacuna/app/controllers/pancake_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PancakeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/pantheonofhagness_controller.rb b/lacuna/app/controllers/pantheonofhagness_controller.rb deleted file mode 100644 index 5aa1c668..00000000 --- a/lacuna/app/controllers/pantheonofhagness_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PantheonofhagnessController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/park_controller.rb b/lacuna/app/controllers/park_controller.rb deleted file mode 100644 index ea54d8c8..00000000 --- a/lacuna/app/controllers/park_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class ParkController < BuildingController - def subsidize_party - head :not_implemented - end - - def throw_a_party - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/parliament_controller.rb b/lacuna/app/controllers/parliament_controller.rb deleted file mode 100644 index ae1547b4..00000000 --- a/lacuna/app/controllers/parliament_controller.rb +++ /dev/null @@ -1,113 +0,0 @@ -class ParliamentController < ApplicationController - def allow_bhg_by_alliance - head :not_implemented - end - - def cast_vote - head :not_implemented - end - - def get_bodies_for_star_in_jurisdiction - head :not_implemented - end - - def get_mining_platforms_for_asteroid_in_jurisdiction - head :not_implemented - end - - def get_stars_in_jurisdiction - head :not_implemented - end - - def propose_broadcast_on_network19 - head :not_implemented - end - - def propose_elect_new_leader - head :not_implemented - end - - def propose_evict_mining_platform - head :not_implemented - end - - def propose_expel_member - head :not_implemented - end - - def propose_fire_bfg - head :not_implemented - end - - def propose_foreign_aid - head :not_implemented - end - - def propose_induct_member - head :not_implemented - end - - def propose_members_only_colonization - head :not_implemented - end - - def propose_members_only_excavation - head :not_implemented - end - - def propose_members_only_mining_rights - head :not_implemented - end - - def propose_members_only_stations - head :not_implemented - end - - def propose_neutralize_bhg - head :not_implemented - end - - def propose_rename_asteroid - head :not_implemented - end - - def propose_rename_star - head :not_implemented - end - - def propose_rename_uninhabited - head :not_implemented - end - - def propose_repeal_law - head :not_implemented - end - - def propose_taxation - head :not_implemented - end - - def propose_transfer_station_ownership - head :not_implemented - end - - def propose_writ - head :not_implemented - end - - def view - head :not_implemented - end - - def view_laws - head :not_implemented - end - - def view_propositions - head :not_implemented - end - - def view_taxes_collected - head :not_implemented - end -end diff --git a/lacuna/app/controllers/pie_controller.rb b/lacuna/app/controllers/pie_controller.rb deleted file mode 100644 index 5d5d227e..00000000 --- a/lacuna/app/controllers/pie_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PieController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/pilottraining_controller.rb b/lacuna/app/controllers/pilottraining_controller.rb deleted file mode 100644 index be16fbda..00000000 --- a/lacuna/app/controllers/pilottraining_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PilottrainingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/planetarycommand_controller.rb b/lacuna/app/controllers/planetarycommand_controller.rb deleted file mode 100644 index 8126246f..00000000 --- a/lacuna/app/controllers/planetarycommand_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class PlanetarycommandController < BuildingController - def subsidize_pod_cooldown - head :not_implemented - end - - def view - head :not_implemented - end - - def view_incoming_supply_chains - head :not_implemented - end - - def view_plans - head :not_implemented - end -end diff --git a/lacuna/app/controllers/policestation_controller.rb b/lacuna/app/controllers/policestation_controller.rb deleted file mode 100644 index 89894e16..00000000 --- a/lacuna/app/controllers/policestation_controller.rb +++ /dev/null @@ -1,33 +0,0 @@ -class PolicestationController < ApplicationController - def execute_prisoner - head :not_implemented - end - - def release_prisoner - head :not_implemented - end - - def view - head :not_implemented - end - - def view_foreign_ships - head :not_implemented - end - - def view_foreign_spies - head :not_implemented - end - - def view_prisoners - head :not_implemented - end - - def view_ships_orbiting - head :not_implemented - end - - def view_ships_travelling - head :not_implemented - end -end diff --git a/lacuna/app/controllers/politicstraining_controller.rb b/lacuna/app/controllers/politicstraining_controller.rb deleted file mode 100644 index 7b9d7f8c..00000000 --- a/lacuna/app/controllers/politicstraining_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PoliticstrainingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/potato_controller.rb b/lacuna/app/controllers/potato_controller.rb deleted file mode 100644 index 6ce7d8a6..00000000 --- a/lacuna/app/controllers/potato_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PotatoController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/propulsion_controller.rb b/lacuna/app/controllers/propulsion_controller.rb deleted file mode 100644 index d719fa74..00000000 --- a/lacuna/app/controllers/propulsion_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PropulsionController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/pyramidjunksculpture_controller.rb b/lacuna/app/controllers/pyramidjunksculpture_controller.rb deleted file mode 100644 index 595a6a25..00000000 --- a/lacuna/app/controllers/pyramidjunksculpture_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class PyramidjunksculptureController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/ravine_controller.rb b/lacuna/app/controllers/ravine_controller.rb deleted file mode 100644 index 2cc3f269..00000000 --- a/lacuna/app/controllers/ravine_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RavineController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/rockyoutcrop_controller.rb b/lacuna/app/controllers/rockyoutcrop_controller.rb deleted file mode 100644 index bd061591..00000000 --- a/lacuna/app/controllers/rockyoutcrop_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RockyoutcropController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/sand_controller.rb b/lacuna/app/controllers/sand_controller.rb deleted file mode 100644 index 7f991e69..00000000 --- a/lacuna/app/controllers/sand_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SandController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/saw_controller.rb b/lacuna/app/controllers/saw_controller.rb deleted file mode 100644 index a84cd2dc..00000000 --- a/lacuna/app/controllers/saw_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SawController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/security_controller.rb b/lacuna/app/controllers/security_controller.rb deleted file mode 100644 index 148ea768..00000000 --- a/lacuna/app/controllers/security_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -class SecurityController < BuildingController - def execute_prisoner - head :not_implemented - end - - def release_prisoner - head :not_implemented - end - - def view - head :not_implemented - end - - def view_foreign_spies - head :not_implemented - end - - def view_prisoners - head :not_implemented - end -end diff --git a/lacuna/app/controllers/shake_controller.rb b/lacuna/app/controllers/shake_controller.rb deleted file mode 100644 index 9d3a542c..00000000 --- a/lacuna/app/controllers/shake_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ShakeController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/shipyard_controller.rb b/lacuna/app/controllers/shipyard_controller.rb deleted file mode 100644 index bd9f46b6..00000000 --- a/lacuna/app/controllers/shipyard_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ShipyardController < BuildingController - def build_ship - head :not_implemented - end - - def build_ships - head :not_implemented - end - - def get_buildable - head :not_implemented - end - - def subsidize_build_queue - head :not_implemented - end - - def subsidize_ship - head :not_implemented - end - - def view - head :not_implemented - end - - def view_build_queue - head :not_implemented - end -end diff --git a/lacuna/app/controllers/singularity_controller.rb b/lacuna/app/controllers/singularity_controller.rb deleted file mode 100644 index caaffd17..00000000 --- a/lacuna/app/controllers/singularity_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SingularityController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/soup_controller.rb b/lacuna/app/controllers/soup_controller.rb deleted file mode 100644 index a90c8c8d..00000000 --- a/lacuna/app/controllers/soup_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SoupController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/spacejunkpark_controller.rb b/lacuna/app/controllers/spacejunkpark_controller.rb deleted file mode 100644 index c4d78e52..00000000 --- a/lacuna/app/controllers/spacejunkpark_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SpacejunkparkController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/spaceport_controller.rb b/lacuna/app/controllers/spaceport_controller.rb deleted file mode 100644 index 99a60d82..00000000 --- a/lacuna/app/controllers/spaceport_controller.rb +++ /dev/null @@ -1,81 +0,0 @@ -class SpaceportController < BuildingController - def fetch_spies - head :not_implemented - end - - def get_fleet_for - head :not_implemented - end - - def get_ships_for - head :not_implemented - end - - def mass_scuttle_ship - head :not_implemented - end - - def name_ship - head :not_implemented - end - - def prepare_fetch_spies - head :not_implemented - end - - def prepare_send_spies - head :not_implemented - end - - def recall_all - head :not_implemented - end - - def recall_ship - head :not_implemented - end - - def scuttle_ship - head :not_implemented - end - - def send_fleet - head :not_implemented - end - - def send_ship - head :not_implemented - end - - def send_ship_types - head :not_implemented - end - - def send_spies - head :not_implemented - end - - def view - head :not_implemented - end - - def view_all_ships - head :not_implemented - end - - def view_battle_logs - head :not_implemented - end - - def view_foreign_ships - head :not_implemented - end - - def view_ships_orbiting - head :not_implemented - end - - def view_ships_travelling - head :not_implemented - end -end diff --git a/lacuna/app/controllers/spacestationlab_controller.rb b/lacuna/app/controllers/spacestationlab_controller.rb deleted file mode 100644 index 3447c06b..00000000 --- a/lacuna/app/controllers/spacestationlab_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class SpacestationlabController < BuildingController - def make_plan - head :not_implemented - end - - def subsidize_plan - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/stationcommand_controller.rb b/lacuna/app/controllers/stationcommand_controller.rb deleted file mode 100644 index b7dd4d27..00000000 --- a/lacuna/app/controllers/stationcommand_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class StationcommandController < ApplicationController - def view - head :not_implemented - end - - def view_incoming_supply_chains - head :not_implemented - end - - def view_plans - head :not_implemented - end -end diff --git a/lacuna/app/controllers/stats_controller.rb b/lacuna/app/controllers/stats_controller.rb deleted file mode 100644 index d813cee6..00000000 --- a/lacuna/app/controllers/stats_controller.rb +++ /dev/null @@ -1,33 +0,0 @@ -class StatsController < ApplicationController - def alliance_rank - head :not_implemented - end - - def colony_rank - head :not_implemented - end - - def credits - head :not_implemented - end - - def empire_rank - head :not_implemented - end - - def find_alliance_rank - head :not_implemented - end - - def find_empire_rank - head :not_implemented - end - - def spy_rank - head :not_implemented - end - - def weekly_medal_winners - head :not_implemented - end -end diff --git a/lacuna/app/controllers/stockpile_controller.rb b/lacuna/app/controllers/stockpile_controller.rb deleted file mode 100644 index 627e539e..00000000 --- a/lacuna/app/controllers/stockpile_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class StockpileController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/subspacesupplydepot_controller.rb b/lacuna/app/controllers/subspacesupplydepot_controller.rb deleted file mode 100644 index 165dcaca..00000000 --- a/lacuna/app/controllers/subspacesupplydepot_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -class SubspacesupplydepotController < BuildingController - def complete_build_queue - head :not_implemented - end - - def transmit_energy - head :not_implemented - end - - def transmit_food - head :not_implemented - end - - def transmit_ore - head :not_implemented - end - - def transmit_water - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/supplypod_controller.rb b/lacuna/app/controllers/supplypod_controller.rb deleted file mode 100644 index 1fa23acf..00000000 --- a/lacuna/app/controllers/supplypod_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SupplypodController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/syrup_controller.rb b/lacuna/app/controllers/syrup_controller.rb deleted file mode 100644 index e2b70f4e..00000000 --- a/lacuna/app/controllers/syrup_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SyrupController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/templeofthedrajilites_controller.rb b/lacuna/app/controllers/templeofthedrajilites_controller.rb deleted file mode 100644 index 8fae2fd2..00000000 --- a/lacuna/app/controllers/templeofthedrajilites_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class TempleofthedrajilitesController < BuildingController - def list_planets - head :not_implemented - end - - def view - head :not_implemented - end - - def view_planet - head :not_implemented - end -end diff --git a/lacuna/app/controllers/terraforminglab_controller.rb b/lacuna/app/controllers/terraforminglab_controller.rb deleted file mode 100644 index 6aa8fe9d..00000000 --- a/lacuna/app/controllers/terraforminglab_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class TerraforminglabController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/terraformingplatform_controller.rb b/lacuna/app/controllers/terraformingplatform_controller.rb deleted file mode 100644 index 79229c37..00000000 --- a/lacuna/app/controllers/terraformingplatform_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class TerraformingplatformController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/thedillonforge_controller.rb b/lacuna/app/controllers/thedillonforge_controller.rb deleted file mode 100644 index 52723646..00000000 --- a/lacuna/app/controllers/thedillonforge_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class ThedillonforgeController < BuildingController - def make_plan - head :not_implemented - end - - def split_plan - head :not_implemented - end - - def subsidize - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/thefttraining_controller.rb b/lacuna/app/controllers/thefttraining_controller.rb deleted file mode 100644 index 9d0e8b81..00000000 --- a/lacuna/app/controllers/thefttraining_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ThefttrainingController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/themepark_controller.rb b/lacuna/app/controllers/themepark_controller.rb deleted file mode 100644 index 3a068138..00000000 --- a/lacuna/app/controllers/themepark_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class ThemeparkController < BuildingController - def operate - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/trade_controller.rb b/lacuna/app/controllers/trade_controller.rb deleted file mode 100644 index 6fa6a2b4..00000000 --- a/lacuna/app/controllers/trade_controller.rb +++ /dev/null @@ -1,105 +0,0 @@ -class TradeController < BuildingController - def accept_from_market - head :not_implemented - end - - def add_supply_ship_to_fleet - head :not_implemented - end - - def add_to_market - head :not_implemented - end - - def add_waste_ship_to_fleet - head :not_implemented - end - - def create_supply_chain - head :not_implemented - end - - def delete_supply_chain - head :not_implemented - end - - def get_glyph_summary - head :not_implemented - end - - def get_plan_summary - head :not_implemented - end - - def get_prisoners - head :not_implemented - end - - def get_ships - head :not_implemented - end - - def get_stored_resources - head :not_implemented - end - - def get_supply_ships - head :not_implemented - end - - def get_trade_ships - head :not_implemented - end - - def get_waste_ships - head :not_implemented - end - - def push_items - head :not_implemented - end - - def remove_supply_ship_from_fleet - head :not_implemented - end - - def remove_waste_ship_from_fleet - head :not_implemented - end - - def report_abuse - head :not_implemented - end - - def update_supply_chain - head :not_implemented - end - - def update_waste_chain - head :not_implemented - end - - def view - head :not_implemented - end - - def view_market - head :not_implemented - end - - def view_my_market - head :not_implemented - end - - def view_supply_chains - head :not_implemented - end - - def view_waste_chains - head :not_implemented - end - - def withdraw_from_market - head :not_implemented - end -end diff --git a/lacuna/app/controllers/transporter_controller.rb b/lacuna/app/controllers/transporter_controller.rb deleted file mode 100644 index c60aa0f5..00000000 --- a/lacuna/app/controllers/transporter_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -class TransporterController < BuildingController - def accept_from_market - head :not_implemented - end - - def add_to_market - head :not_implemented - end - - def get_glyph_summary - head :not_implemented - end - - def get_plan_summary - head :not_implemented - end - - def get_prisoners - head :not_implemented - end - - def get_ships - head :not_implemented - end - - def get_stored_resources - head :not_implemented - end - - def push_items - head :not_implemented - end - - def report_abuse - head :not_implemented - end - - def trade_one_for_one - head :not_implemented - end - - def view - head :not_implemented - end - - def view_market - head :not_implemented - end - - def view_my_market - head :not_implemented - end - - def withdraw_from_market - head :not_implemented - end -end diff --git a/lacuna/app/controllers/university_controller.rb b/lacuna/app/controllers/university_controller.rb deleted file mode 100644 index 3752ec18..00000000 --- a/lacuna/app/controllers/university_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class UniversityController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/volcano_controller.rb b/lacuna/app/controllers/volcano_controller.rb deleted file mode 100644 index c383ee78..00000000 --- a/lacuna/app/controllers/volcano_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class VolcanoController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/warehouse_controller.rb b/lacuna/app/controllers/warehouse_controller.rb deleted file mode 100644 index a9337af7..00000000 --- a/lacuna/app/controllers/warehouse_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WarehouseController < ApplicationController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wastedigester_controller.rb b/lacuna/app/controllers/wastedigester_controller.rb deleted file mode 100644 index 8650c0ac..00000000 --- a/lacuna/app/controllers/wastedigester_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WastedigesterController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wasteenergy_controller.rb b/lacuna/app/controllers/wasteenergy_controller.rb deleted file mode 100644 index e6c1bf8e..00000000 --- a/lacuna/app/controllers/wasteenergy_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WasteenergyController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wasteexchanger_controller.rb b/lacuna/app/controllers/wasteexchanger_controller.rb deleted file mode 100644 index 59f43790..00000000 --- a/lacuna/app/controllers/wasteexchanger_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class WasteexchangerController < BuildingController - def recycle - head :not_implemented - end - - def subsidize_recycling - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wasterecycling_controller.rb b/lacuna/app/controllers/wasterecycling_controller.rb deleted file mode 100644 index 94c3f2e7..00000000 --- a/lacuna/app/controllers/wasterecycling_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -class WasterecyclingController < BuildingController - def recycle - head :not_implemented - end - - def subsidize_recycling - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wastesequestration_controller.rb b/lacuna/app/controllers/wastesequestration_controller.rb deleted file mode 100644 index e2643e3f..00000000 --- a/lacuna/app/controllers/wastesequestration_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WastesequestrationController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wastetreatment_controller.rb b/lacuna/app/controllers/wastetreatment_controller.rb deleted file mode 100644 index beafe0cb..00000000 --- a/lacuna/app/controllers/wastetreatment_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WastetreatmentController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/waterproduction_controller.rb b/lacuna/app/controllers/waterproduction_controller.rb deleted file mode 100644 index 9e41082b..00000000 --- a/lacuna/app/controllers/waterproduction_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WaterproductionController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/waterpurification_controller.rb b/lacuna/app/controllers/waterpurification_controller.rb deleted file mode 100644 index 4edb09f5..00000000 --- a/lacuna/app/controllers/waterpurification_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WaterpurificationController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/waterreclamation_controller.rb b/lacuna/app/controllers/waterreclamation_controller.rb deleted file mode 100644 index e16a296e..00000000 --- a/lacuna/app/controllers/waterreclamation_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WaterreclamationController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/waterstorage_controller.rb b/lacuna/app/controllers/waterstorage_controller.rb deleted file mode 100644 index 65619cf7..00000000 --- a/lacuna/app/controllers/waterstorage_controller.rb +++ /dev/null @@ -1,9 +0,0 @@ -class WaterstorageController < BuildingController - def dump - head :not_implemented - end - - def view - head :not_implemented - end -end diff --git a/lacuna/app/controllers/wheat_controller.rb b/lacuna/app/controllers/wheat_controller.rb deleted file mode 100644 index f03ecb19..00000000 --- a/lacuna/app/controllers/wheat_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -class WheatController < BuildingController - def view - head :not_implemented - end -end diff --git a/lacuna/app/jobs/application_job.rb b/lacuna/app/jobs/application_job.rb deleted file mode 100644 index d394c3d1..00000000 --- a/lacuna/app/jobs/application_job.rb +++ /dev/null @@ -1,7 +0,0 @@ -class ApplicationJob < ActiveJob::Base - # Automatically retry jobs that encountered a deadlock - # retry_on ActiveRecord::Deadlocked - - # Most jobs are safe to ignore if the underlying records are no longer available - # discard_on ActiveJob::DeserializationError -end diff --git a/lacuna/app/lib/lacuna_date_format.rb b/lacuna/app/lib/lacuna_date_format.rb deleted file mode 100644 index c79fe9f4..00000000 --- a/lacuna/app/lib/lacuna_date_format.rb +++ /dev/null @@ -1,9 +0,0 @@ -# Mirrors Lacuna::Util::format_date (lib/Lacuna/Util.pm) — every RPC response formats -# dates the same way, e.g. "16 08 2026 14:03:22 +0000". -module LacunaDateFormat - FORMAT = '%d %m %Y %H:%M:%S %z'.freeze - - def self.format(time) - time.strftime(FORMAT) - end -end diff --git a/lacuna/app/lib/lacuna_server_info.rb b/lacuna/app/lib/lacuna_server_info.rb deleted file mode 100644 index e00e06aa..00000000 --- a/lacuna/app/lib/lacuna_server_info.rb +++ /dev/null @@ -1,12 +0,0 @@ -# Server-level fields for the `status.server` block (Lacuna::RPC#format_status, -# lib/Lacuna/RPC.pm). The Perl app's Config::JSON source is not mounted into -# the rails container, so these are hand-synced constants rather than read at runtime. -# If get_status output ever mismatches Perl on these fields, check both sources are current. -module LacunaServerInfo - VERSION = 4.0001 # mirrors lib/Lacuna.pm's `our $VERSION = 4.0001;` — a number, not a string, - # to match Perl's JSON encoding of it (Perl doesn't distinguish "4.0001" from 4.0001). - - MAP_SIZE = { x: [-1500, 1500], y: [-1500, 1500] }.freeze # mirrors etc-docker/lacuna.conf "map_size" - - RPC_LIMIT = 10_000 # mirrors etc-docker/lacuna.conf "rpc_limit" -end diff --git a/lacuna/app/mailers/application_mailer.rb b/lacuna/app/mailers/application_mailer.rb deleted file mode 100644 index 286b2239..00000000 --- a/lacuna/app/mailers/application_mailer.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ApplicationMailer < ActionMailer::Base - default from: 'from@example.com' - layout 'mailer' -end diff --git a/lacuna/app/models/ai_battle_summary.rb b/lacuna/app/models/ai_battle_summary.rb deleted file mode 100644 index 8e3a65fc..00000000 --- a/lacuna/app/models/ai_battle_summary.rb +++ /dev/null @@ -1,24 +0,0 @@ - -# == Schema Information -# -# Table name: ai_battle_summary -# -# id :integer not null, primary key -# attack_spy_hours :integer not null -# attack_victories :integer not null -# defense_victories :integer not null -# attacking_empire_id :integer not null -# defending_empire_id :integer not null -# -# Indexes -# -# ai_battle_summary_idx_defending_empire_id (defending_empire_id) -# -# Foreign Keys -# -# ai_battle_summary_fk_defending_empire_id (defending_empire_id => empire.id) -# - -class AiBattleSummary < ApplicationRecord - self.table_name = 'ai_battle_summary' -end diff --git a/lacuna/app/models/ai_scratch_pad.rb b/lacuna/app/models/ai_scratch_pad.rb deleted file mode 100644 index decc920b..00000000 --- a/lacuna/app/models/ai_scratch_pad.rb +++ /dev/null @@ -1,24 +0,0 @@ - -# == Schema Information -# -# Table name: ai_scratch_pad -# -# id :integer not null, primary key -# pad :binary(16777215) -# ai_empire_id :integer not null -# body_id :integer -# -# Indexes -# -# ai_scratch_pad_idx_ai_empire_id (ai_empire_id) -# ai_scratch_pad_idx_body_id (body_id) -# -# Foreign Keys -# -# ai_scratch_pad_fk_ai_empire_id (ai_empire_id => empire.id) -# ai_scratch_pad_fk_body_id (body_id => body.id) -# - -class AiScratchPad < ApplicationRecord - self.table_name = 'ai_scratch_pad' -end diff --git a/lacuna/app/models/alliance.rb b/lacuna/app/models/alliance.rb deleted file mode 100644 index fabfbec5..00000000 --- a/lacuna/app/models/alliance.rb +++ /dev/null @@ -1,31 +0,0 @@ - -# == Schema Information -# -# Table name: alliance -# -# id :integer not null, primary key -# announcements :text(65535) -# date_created :datetime not null -# description :text(65535) -# forum_uri :string(255) not null -# image :string(255) default("default"), not null -# name :string(30) not null -# stash :binary(16777215) -# leader_id :integer -# -# Indexes -# -# alliance_idx_leader_id (leader_id) -# -# Foreign Keys -# -# alliance_fk_leader_id (leader_id => empire.id) ON DELETE => nullify -# - -class Alliance < ApplicationRecord - self.table_name = 'alliance' - - belongs_to :leader, class_name: 'Empire', optional: true - has_many :members, class_name: 'Empire', foreign_key: :alliance_id, inverse_of: :alliance - has_many :stations, class_name: 'Body', foreign_key: :alliance_id, inverse_of: :alliance -end diff --git a/lacuna/app/models/alliance_invite.rb b/lacuna/app/models/alliance_invite.rb deleted file mode 100644 index 06880807..00000000 --- a/lacuna/app/models/alliance_invite.rb +++ /dev/null @@ -1,24 +0,0 @@ - -# == Schema Information -# -# Table name: alliance_invite -# -# id :integer not null, primary key -# date_created :datetime not null -# alliance_id :integer not null -# empire_id :integer not null -# -# Indexes -# -# alliance_invite_idx_alliance_id (alliance_id) -# alliance_invite_idx_empire_id (empire_id) -# -# Foreign Keys -# -# alliance_invite_fk_alliance_id (alliance_id => alliance.id) ON DELETE => cascade ON UPDATE => cascade -# alliance_invite_fk_empire_id (empire_id => empire.id) -# - -class AllianceInvite < ApplicationRecord - self.table_name = 'alliance_invite' -end diff --git a/lacuna/app/models/alliance_log.rb b/lacuna/app/models/alliance_log.rb deleted file mode 100644 index 334baf0f..00000000 --- a/lacuna/app/models/alliance_log.rb +++ /dev/null @@ -1,43 +0,0 @@ - -# == Schema Information -# -# Table name: alliance_log -# -# id :integer not null, primary key -# alliance_name :string(30) not null -# average_building_level :float(24) not null -# average_empire_size :bigint not null -# average_empire_size_rank :integer not null -# average_university_level :float(24) not null -# building_count :integer not null -# colony_count :integer not null -# date_stamp :datetime not null -# defense_success_rate :float(24) not null -# defense_success_rate_rank :integer not null -# dirtiest :integer default(0), not null -# dirtiest_rank :integer default(0), not null -# influence :integer not null -# influence_rank :integer not null -# member_count :integer not null -# offense_success_rate :float(24) not null -# offense_success_rate_rank :integer not null -# population :bigint not null -# population_rank :integer not null -# space_station_count :integer not null -# space_station_count_rank :integer not null -# spy_count :integer not null -# alliance_id :integer not null -# -# Indexes -# -# idx_average_empire_size_rank (average_empire_size_rank) -# idx_defense_success_rate_rank (defense_success_rate_rank) -# idx_dirtiest_rank (dirtiest_rank) -# idx_influence_rank (influence_rank) -# idx_offense_success_rate_rank (offense_success_rate_rank) -# idx_population_rank (population_rank) -# - -class AllianceLog < ApplicationRecord - self.table_name = 'alliance_log' -end diff --git a/lacuna/app/models/api_key.rb b/lacuna/app/models/api_key.rb deleted file mode 100644 index 1ce99532..00000000 --- a/lacuna/app/models/api_key.rb +++ /dev/null @@ -1,22 +0,0 @@ - -# == Schema Information -# -# Table name: api_key -# -# id :integer not null, primary key -# date_stamp :datetime not null -# email :string(255) -# ip_address :string(15) -# name :string(30) -# private_key :string(36) not null -# public_key :string(36) not null -# -# Indexes -# -# idx_private_key (private_key) -# idx_public_key (public_key) -# - -class ApiKey < ApplicationRecord - self.table_name = 'api_key' -end diff --git a/lacuna/app/models/application_record.rb b/lacuna/app/models/application_record.rb deleted file mode 100644 index b63caeb8..00000000 --- a/lacuna/app/models/application_record.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationRecord < ActiveRecord::Base - primary_abstract_class -end diff --git a/lacuna/app/models/battle_log.rb b/lacuna/app/models/battle_log.rb deleted file mode 100644 index b2a793f6..00000000 --- a/lacuna/app/models/battle_log.rb +++ /dev/null @@ -1,43 +0,0 @@ - -# == Schema Information -# -# Table name: battle_log -# -# id :integer not null, primary key -# attacked_body_name :string(30) not null -# attacked_empire_name :string(30) -# attacking_body_name :string(30) not null -# attacking_empire_name :string(30) not null -# attacking_number :integer not null -# attacking_type :string(60) not null -# attacking_unit_name :string(60) not null -# date_stamp :datetime not null -# defending_body_name :string(30) not null -# defending_empire_name :string(30) -# defending_number :integer not null -# defending_type :string(60) not null -# defending_unit_name :string(60) not null -# victory_to :string(8) not null -# attacked_body_id :integer not null -# attacked_empire_id :integer -# attacking_body_id :integer not null -# attacking_empire_id :integer not null -# defending_body_id :integer not null -# defending_empire_id :integer -# -# Indexes -# -# idx_attacking_body_id (attacking_body_id) -# idx_attacking_body_name (attacking_body_name) -# idx_attacking_empire_id (attacking_empire_id) -# idx_attacking_empire_name (attacking_empire_name) -# idx_datestamp (date_stamp) -# idx_defending_body_id (defending_body_id) -# idx_defending_body_name (defending_body_name) -# idx_defending_empire_id (defending_empire_id) -# idx_defending_empire_name (defending_empire_name) -# - -class BattleLog < ApplicationRecord - self.table_name = 'battle_log' -end diff --git a/lacuna/app/models/body.rb b/lacuna/app/models/body.rb deleted file mode 100644 index fedeba2c..00000000 --- a/lacuna/app/models/body.rb +++ /dev/null @@ -1,340 +0,0 @@ - -# == Schema Information -# -# Table name: body -# -# id :integer not null, primary key -# ... (see annotaterb-generated block normally kept here; omitted while hand-editing) ... -# - -class Body < ApplicationRecord - self.table_name = 'body' - self.inheritance_column = nil - - # A column literally named `class` isn't just unreadable via a generated `.class` method — - # Rails 8's ActiveRecord::AttributeMethods.dangerous_attribute_methods hardcodes `class` as - # forbidden, and attempting to generate ATTRIBUTE METHODS FOR ANY COLUMN raises - # ActiveRecord::DangerousAttributeError as soon as `class` is anywhere in `attribute_names` - # (Rails generates all attribute methods for a model together, on first access to any of - # them) — so simply calling `.id`/`.name` on a Body would crash without this. Excluding it - # via `ignored_columns` avoids the crash; #perl_class below reads the raw value back out via - # a small raw query instead, since `self[:class]`/`read_attribute` no longer see it. - self.ignored_columns = ['class'] - - belongs_to :star - belongs_to :empire, optional: true - belongs_to :alliance, optional: true - has_many :buildings - has_many :ships # outgoing ships (ships.body_id) - - STATION_CLASS = 'Lacuna::DB::Result::Map::Body::Planet::Station'.freeze - - # Mirrors Lacuna::Constants::ORE_TYPES (lib/Lacuna/Constants.pm:11). - ORE_TYPES = %w[ - rutile chromite chalcopyrite galena gold uraninite bauxite goethite halite gypsum - trona kerogen methane anthracite sulfur zircon monazite fluorite beryl magnetite - ].freeze - - # Mirrors Lacuna::Constants::FOOD_TYPES (lib/Lacuna/Constants.pm:10). - FOOD_TYPES = %w[ - cheese bean lapis potato apple root corn cider wheat bread soup chip pie pancake - milk meal algae syrup fungus burger shake beetle - ].freeze - - # Per-leaf-class `image`/`water`/ore-concentration constants, generated by - # bin/dump_body_class_info.pl from the Perl source (see that script's header comment) — - # analogous to how config/medals.json was generated for Medal. Two leaf classes (P33, P35) - # compose Lacuna::Role::Planet::{Weather,GeoChaos}, which wrap their base water/ore constants - # in a per-instance, time-varying sine cycle keyed off body id/orbit - # (lib/Lacuna/Role/Planet/{Weather,GeoChaos}.pm) — NOT ported here. Rails reports their - # static base constant instead of the live cyclical value for those two classes only. - CLASS_INFO = JSON.parse(Rails.root.join('config', 'body_class_info.json').read).freeze - - # Actual rows always hold a leaf class name (Planet::P1..P40, Planet::GasGiant::G1..G5, - # Planet::Station, Asteroid::A1..A26) — the ~70-class hierarchy doesn't map onto Rails STI - # conventions, so subclass detection is string-matched rather than modeled as real STI. - def perl_class - @perl_class ||= self.class.connection.select_value( - "SELECT class FROM body WHERE id = #{self.class.connection.quote(id)}" - ) - end - - # Mirrors Lacuna::DB::Result::Map::Body#get_type (lib/Lacuna/DB/Result/Map/Body.pm:295-308). - def get_type - if perl_class.include?('::Planet::GasGiant') - 'gas giant' - elsif perl_class.include?('::Asteroid') - 'asteroid' - elsif perl_class == STATION_CLASS - 'space station' - else - 'habitable planet' - end - end - - def station? - perl_class == STATION_CLASS - end - - def asteroid? - perl_class.include?('::Asteroid') - end - - # Mirrors Lacuna::DB::Result::Map::Body#image_name (lib/Lacuna/DB/Result/Map/Body.pm:290-293). - def image - CLASS_INFO.dig(perl_class, 'image') - end - - def image_name - "#{image}-#{orbit}" - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet#surface (lib/Lacuna/DB/Result/Map/Body/Planet.pm:120-123). - def surface - "surface-#{image}" - end - - def water - CLASS_INFO.dig(perl_class, 'water') - end - - def ore_concentration(type) - CLASS_INFO.dig(perl_class, 'ore', type.to_s) - end - - # `ore_stored`/`ore_hour`/`food_stored`/`food_hour` are aggregates over many per-resource-type - # columns (rutile_stored, bread_stored, ...) — unlike water/energy/waste, there's no single - # "ore"/"food" column. Mirrors Lacuna::DB::Result::Map::Body::Planet#{ore,food}_{stored,hour} - # (lib/Lacuna/DB/Result/Map/Body/Planet.pm:1988-1995,2255-2284). - def ore_stored - ORE_TYPES.sum { |type| self["#{type}_stored"] } - end - - def ore_hour - ORE_TYPES.sum { |type| self["#{type}_hour"] } - ore_consumption_hour - end - - def food_stored - FOOD_TYPES.sum { |type| self["#{type}_stored"] } - end - - def food_hour - FOOD_TYPES.sum { |type| self["#{type}_production_hour"] } - food_consumption_hour - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet#population (lib/Lacuna/DB/Result/Map/Body/Planet.pm:622-633). - def population - buildings.sum(&:population) - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet#building_count (lib/Lacuna/DB/Result/Map/Body/Planet.pm:635-647). - def building_count - buildings.reject { |b| b.perl_class.include?('Permanent') || b.perl_class.include?('SupplyPod') }.count - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet#build_queue_size (lib/Lacuna/DB/Result/Map/Body/Planet.pm:943-953). - def build_queue_size - development = buildings.detect { |b| b.perl_class == 'Lacuna::DB::Result::Building::Development' } - 1 + (development ? development.effective_level : 0) - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet#build_queue_length (lib/Lacuna/DB/Result/Map/Body/Planet.pm:955-958). - def build_queue_length - buildings.count { |b| b.is_upgrading == 1 } - end - - # Mirrors Lacuna::RPC::get_body's accessibility check (lib/Lacuna/RPC.pm:148-185): a body is - # accessible to the session's real empire if it's owned by them, it's an alliance station - # they belong to, or (when the session itself isn't a sitter session) they sit for the body's - # owning empire. - def accessible_to?(session) - viewer = session&.current_empire - return false unless viewer - return true if empire_id == viewer.id - - if station? - viewer.alliance_id.present? && alliance_id == viewer.alliance_id - else - # `is_sitter` is the raw 0/1 cached by Perl (see Session#is_sitter) — 0 is truthy in - # Ruby, so this must be coerced, matching the existing convention in - # EmpireController#view_profile (`@current_session.is_sitter.to_i != 0`). - session.is_sitter.to_i.zero? && empire_id.present? && - SitterAuth.active.exists?(baby_id: empire_id, sitter_id: viewer.id) - end - end - - # Mirrors the base Lacuna::DB::Result::Map::Body#get_status (lib/Lacuna/DB/Result/Map/Body.pm:340-366) - # plus the Asteroid/Planet/Station `around` overrides - # (lib/Lacuna/DB/Result/Map/Body/{Asteroid,Planet,Planet/Station}.pm). - def get_status(viewer_empire = nil) - out = base_status - if asteroid? - out[:ore] = ore_status - elsif perl_class.include?('::Planet') - out.merge!(planet_status(viewer_empire)) - out.merge!(station_status) if station? - end - out - end - - private - - def base_status - out = { - name: name, image: image_name, x: x, y: y, orbit: orbit, size: size, - type: get_type, star_id: star_id, star_name: star.name, zone: zone, id: id, notes: notes, - } - if star.station_id - station = star.station - out[:station] = { id: station.id, x: station.x, y: station.y, name: station.name } - end - out - end - - def ore_status - ORE_TYPES.index_with { |type| ore_concentration(type) } - end - - def planet_status(viewer_empire) - out = { ore: ore_status, water: water } - return out unless empire_id - - owner = empire - out[:empire] = { - name: owner.name, - id: empire_id, - alignment: owner.is_isolationist == 1 ? 'hostile-isolationist' : 'hostile', - is_isolationist: owner.is_isolationist, - } - return out unless viewer_empire - - if owner_view?(viewer_empire, owner) - out[:empire][:alignment] = 'self' - out.merge!(full_detail_status(viewer_empire)) - elsif viewer_empire.alliance_id && owner.alliance_id == viewer_empire.alliance_id - out[:empire][:alignment] = owner.is_isolationist == 1 ? 'ally-isolationist' : 'ally' - end - out - end - - def owner_view?(viewer_empire, owner) - return true if viewer_empire.id == empire_id - return true if station? && viewer_empire.alliance_id && owner.alliance_id == viewer_empire.alliance_id - - viewer_empire.babies.exists?(id: empire_id) - end - - # Mirrors the owner/sitter/allied-station-mate branch of Planet#get_status - # (lib/Lacuna/DB/Result/Map/Body/Planet.pm:416-566). Does not replicate Perl's `tick` - # (resource recalculation) or the self-mutating `surface_version` increment on refresh — - # documented parity caveats; Rails reads current stored columns as-is. - def full_detail_status(viewer_empire) - incoming = incoming_ships_status(viewer_empire) - out = incoming.merge( - needs_surface_refresh: needs_surface_refresh, - surface_version: surface_version, - plots_available: plots_available, - building_count: building_count, - build_queue_size: build_queue_size, - build_queue_len: build_queue_length, - population: population, - water_capacity: water_capacity, water_stored: water_stored, water_hour: water_hour, - energy_capacity: energy_capacity, energy_stored: energy_stored, energy_hour: energy_hour, - food_capacity: food_capacity, food_stored: food_stored, food_hour: food_hour, - ore_capacity: ore_capacity, ore_stored: ore_stored, ore_hour: ore_hour, - waste_capacity: waste_capacity, waste_stored: waste_stored, waste_hour: waste_hour, - happiness: happiness, happiness_hour: happiness_hour, - ) - - if unhappy == 1 - out[:unhappy_date] = LacunaDateFormat.format(unhappy_date) - out[:propaganda_boost] = propaganda_boost - else - boost = propaganda_boost - if Time.now.utc < empire.happiness_boost - boost = 75 if boost > 75 - else - boost = 50 if boost > 50 - end - out[:propaganda_boost] = boost - end - out[:neutral_entry] = LacunaDateFormat.format(neutral_entry) - out - end - - def incoming_ships_status(viewer_empire) - # Body's table name is 'body' (singular) and Empire's is 'empire' — the hash-condition - # keys below must match those literal table names, not the association names. - base_scope = Ship.where(foreign_body_id: id, direction: 'out', task: 'Travelling') - - num_incoming_ally = 0 - incoming_ally = [] - if empire.alliance_id - ally_scope = base_scope.joins(body: :empire) - .where.not(body: { empire_id: viewer_empire.id }) - .where(empire: { alliance_id: empire.alliance_id }) - .order(:date_available) - num_incoming_ally = ally_scope.count - incoming_ally = ally_scope.limit(10) - end - - own_scope = base_scope.joins(:body).where(body: { empire_id: viewer_empire.id }).order(:date_available) - num_incoming_own = own_scope.count - incoming_own = own_scope.limit(10) - - enemy_scope = base_scope.joins(body: :empire) - .where.not(body: { empire_id: viewer_empire.id }) - .order(:date_available) - if empire.alliance_id - enemy_scope = enemy_scope.where( - 'empire.alliance_id != :aid OR empire.alliance_id IS NULL', aid: empire.alliance_id - ) - end - num_incoming_enemy = enemy_scope.count - incoming_enemy = enemy_scope.limit(20) - - # Perl only assigns `incoming_*_ships` via `push @{$out->{incoming_*_ships}}, ...` inside - # each loop — with zero matching ships the key is never assigned at all, not present with - # an empty array (same lazy-key pattern as Empire#get_status's body buckets). - out = { num_incoming_enemy: num_incoming_enemy, num_incoming_ally: num_incoming_ally, - num_incoming_own: num_incoming_own } - out[:incoming_enemy_ships] = incoming_enemy.map { |s| ship_arrival(s, own: false, ally: false) } if incoming_enemy.any? - out[:incoming_ally_ships] = incoming_ally.map { |s| ship_arrival(s, own: false, ally: true) } if incoming_ally.any? - out[:incoming_own_ships] = incoming_own.map { |s| ship_arrival(s, own: true, ally: false) } if incoming_own.any? - out - end - - def ship_arrival(ship, own:, ally:) - { date_arrives: ship.date_available_formatted, is_own: own, is_ally: ally, id: ship.id } - end - - # Mirrors Lacuna::DB::Result::Map::Body::Planet::Station's `around get_status` - # (lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm:29-43). - def station_status - return {} unless alliance - - { - alliance: { id: alliance.id, name: alliance.name }, - influence: { spent: influence_spent, total: total_influence }, - } - end - - # Mirrors Station#influence_spent (star count under this station's jurisdiction) and - # #total_influence (sum of effective_level across specific influence-module buildings) — - # lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm:127-157. - def influence_spent - Star.where(station_id: id).count - end - - INFLUENCE_BUILDING_CLASSES = %w[ - Lacuna::DB::Result::Building::Module::IBS - Lacuna::DB::Result::Building::Module::OperaHouse - Lacuna::DB::Result::Building::Module::CulinaryInstitute - Lacuna::DB::Result::Building::Module::ArtMuseum - ].freeze - - def total_influence - buildings.select { |b| INFLUENCE_BUILDING_CLASSES.include?(b.perl_class) } - .sum(&:effective_level) - end -end diff --git a/lacuna/app/models/building.rb b/lacuna/app/models/building.rb deleted file mode 100644 index 0fec7818..00000000 --- a/lacuna/app/models/building.rb +++ /dev/null @@ -1,142 +0,0 @@ - -# == Schema Information -# -# Table name: building -# -# id :integer not null, primary key -# class :string(255) not null -# date_created :datetime not null -# efficiency :integer default(100), not null -# is_upgrading :integer default(0), not null -# is_working :integer default(0), not null -# last_check :datetime not null -# level :integer default(0), not null -# upgrade_ends :datetime not null -# upgrade_started :datetime not null -# work :binary(16777215) -# work_ends :datetime not null -# work_started :datetime not null -# x :integer default(0), not null -# y :integer default(0), not null -# body_id :integer not null -# -# Indexes -# -# building_idx_body_id (body_id) -# idx_class (class) -# idx_is_upgrading (is_upgrading) -# idx_is_working (is_working) -# idx_x_y (x,y) -# -# Foreign Keys -# -# building_fk_body_id (body_id => body.id) -# - -class Building < ApplicationRecord - self.table_name = 'building' - self.inheritance_column = nil - - # See the equivalent comment on Body — a column literally named `class` crashes ActiveRecord's - # attribute-method generation (ActiveRecord::DangerousAttributeError) as soon as ANY attribute - # is accessed, not just `class` itself; `ignored_columns` avoids that, and #perl_class reads - # the raw value back out via a small raw query since `self[:class]` no longer sees it. - self.ignored_columns = ['class'] - - belongs_to :body - - # Per-leaf-building-class image/name/url/build-cost constants, generated by - # bin/dump_building_class_info.pl from the Perl source (see that script's header comment) — - # analogous to Body::CLASS_INFO / config/body_class_info.json. - CLASS_INFO = JSON.parse(Rails.root.join('config', 'building_class_info.json').read).freeze - - def perl_class - @perl_class ||= self.class.connection.select_value( - "SELECT class FROM building WHERE id = #{self.class.connection.quote(id)}" - ) - end - - def class_info - CLASS_INFO.fetch(perl_class, {}) - end - - # Mirrors Lacuna::DB::Result::Building's `effective_level` builder - # (lib/Lacuna/DB/Result/Building.pm:140-158). - def effective_level - uni_level = body&.empire ? body.empire.university_level : 1 - [uni_level + 1, level].min - end - - # Mirrors Lacuna::DB::Result::Building#population (lib/Lacuna/DB/Result/Building.pm:1264-1274) - # and its three overrides — Permanent, SupplyPod, DeployedBleeder all return 0 - # (lib/Lacuna/DB/Result/Building/{Permanent,SupplyPod,DeployedBleeder}.pm) — everything - # else is `effective_level * 10_000`. - ZERO_POPULATION_CLASSES = ['Permanent', 'SupplyPod', 'DeployedBleeder'].freeze - - def population - return 0 if ZERO_POPULATION_CLASSES.any? { |name| perl_class.include?(name) } - - effective_level * 10_000 - end - - # Mirrors Lacuna::DB::Result::Building#image_level (lib/Lacuna/DB/Result/Building.pm:75-80). - def image_level - "#{class_info['image']}#{[level, 9].min}" - end - - # Mirrors Lacuna::DB::Result::Building#current_level_cost (lib/Lacuna/DB/Result/Building.pm:181-183). - def current_level_cost - Empire::INFLATION**(level - 1) - end - - # Mirrors Lacuna::DB::Result::Building#upgrade_status (lib/Lacuna/DB/Result/Building.pm:720-733). - def upgrade_status - return nil if is_upgrading.to_i.zero? - - { - seconds_remaining: upgrade_ends.to_i - Time.now.utc.to_i, - start: LacunaDateFormat.format(upgrade_started), - end: LacunaDateFormat.format(upgrade_ends), - } - end - - # Mirrors Lacuna::DB::Result::Building#work_seconds_remaining (lib/Lacuna/DB/Result/Building.pm:1076-1080). - def work_seconds_remaining - return 0 if is_working.to_i.zero? - - [work_ends.to_i - Time.now.utc.to_i, 0].max - end - - # Mirrors Lacuna::DB::Result::Building#get_repair_costs (lib/Lacuna/DB/Result/Building.pm:1163-1173). - # NOTE: Perl uses sprintf('%.0f', ...) for the four amounts; Ruby's Float#round may round .5 - # cases differently from glibc's printf rounding — a documented minor rounding-mode gap. - def repair_costs - damage = 100 - efficiency - damage_cost = current_level_cost * damage / 100.0 - { - ore: (class_info['ore_to_build'].to_f * damage_cost).round, - water: (class_info['water_to_build'].to_f * damage_cost).round, - food: (class_info['food_to_build'].to_f * damage_cost).round, - energy: (class_info['energy_to_build'].to_f * damage_cost).round, - } - end - - # Mirrors the per-building hash built inside Lacuna::RPC::Role::Building#out_buildings - # (lib/Lacuna/RPC/Role/Building.pm:7-38). - def summary - out = { - url: class_info['url'], image: image_level, name: class_info['name'], - x: x, y: y, level: level, efficiency: efficiency, - } - out[:pending_build] = upgrade_status if is_upgrading.to_i != 0 - if is_working.to_i != 0 - out[:work] = { - seconds_remaining: work_seconds_remaining, - start: LacunaDateFormat.format(work_started), - end: LacunaDateFormat.format(work_ends), - } - end - out[:repair_costs] = repair_costs if efficiency < 100 - out - end -end diff --git a/lacuna/app/models/captcha.rb b/lacuna/app/models/captcha.rb deleted file mode 100644 index a5765557..00000000 --- a/lacuna/app/models/captcha.rb +++ /dev/null @@ -1,14 +0,0 @@ - -# == Schema Information -# -# Table name: captcha -# -# id :integer not null, primary key -# guid :string(36) not null -# riddle :string(12) not null -# solution :string(5) not null -# - -class Captcha < ApplicationRecord - self.table_name = 'captcha' -end diff --git a/lacuna/app/models/cargo_log.rb b/lacuna/app/models/cargo_log.rb deleted file mode 100644 index 96963239..00000000 --- a/lacuna/app/models/cargo_log.rb +++ /dev/null @@ -1,17 +0,0 @@ - -# == Schema Information -# -# Table name: cargo_log -# -# id :integer not null, primary key -# data :binary(16777215) -# date_stamp :datetime not null -# message :string(255) not null -# object_type :string(255) not null -# body_id :integer not null -# object_id :integer not null -# - -class CargoLog < ApplicationRecord - self.table_name = 'cargo_log' -end diff --git a/lacuna/app/models/colony_log.rb b/lacuna/app/models/colony_log.rb deleted file mode 100644 index b4a037b7..00000000 --- a/lacuna/app/models/colony_log.rb +++ /dev/null @@ -1,50 +0,0 @@ - -# == Schema Information -# -# Table name: colony_log -# -# id :integer not null, primary key -# average_building_level :float(24) not null -# average_spy_success_rate :float(24) default(0.0), not null -# building_count :integer not null -# date_stamp :datetime not null -# defense_success_rate :float(24) default(0.0), not null -# defense_success_rate_delta :float(24) default(0.0), not null -# dirtiest :integer default(0), not null -# dirtiest_delta :integer default(0), not null -# empire_name :string(30) not null -# energy_hour :integer not null -# food_hour :integer not null -# happiness_hour :integer not null -# highest_building_level :integer not null -# influence :integer default(0), not null -# is_space_station :integer default(0), not null -# offense_success_rate :float(24) default(0.0), not null -# offense_success_rate_delta :float(24) default(0.0), not null -# ore_hour :integer not null -# planet_name :string(30) not null -# population :integer not null -# population_delta :integer not null -# population_rank :integer not null -# spy_count :integer not null -# waste_hour :integer not null -# water_hour :integer not null -# x :integer default(0), not null -# y :integer default(0), not null -# zone :string(16) default("0"), not null -# body_id :integer default(0), not null -# empire_id :integer not null -# planet_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_planet_id (planet_id) -# idx_planet_name (planet_name) -# idx_population_rank (population_rank) -# - -class ColonyLog < ApplicationRecord - self.table_name = 'colony_log' -end diff --git a/lacuna/app/models/concerns/.keep b/lacuna/app/models/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/app/models/config.rb b/lacuna/app/models/config.rb deleted file mode 100644 index 4d671ebb..00000000 --- a/lacuna/app/models/config.rb +++ /dev/null @@ -1,17 +0,0 @@ - -# == Schema Information -# -# Table name: config -# -# id :integer not null, primary key -# name :string(30) not null -# value :string(256) not null -# -# Indexes -# -# c_idx_key (name) -# - -class Config < ApplicationRecord - self.table_name = 'config' -end diff --git a/lacuna/app/models/economy_log.rb b/lacuna/app/models/economy_log.rb deleted file mode 100644 index 1c24eb59..00000000 --- a/lacuna/app/models/economy_log.rb +++ /dev/null @@ -1,41 +0,0 @@ - -# == Schema Information -# -# Table name: economy_log -# -# id :integer not null, primary key -# date_stamp :date not null -# in_mission :integer default(0), not null -# in_other :integer default(0), not null -# in_purchase :integer default(0), not null -# in_redemption :integer default(0), not null -# in_trade :integer default(0), not null -# in_tutorial :integer default(0), not null -# in_vein :integer default(0), not null -# in_vote :integer default(0), not null -# out_boost :integer default(0), not null -# out_building :integer default(0), not null -# out_delete :integer default(0), not null -# out_glyph :integer default(0), not null -# out_mission :integer default(0), not null -# out_other :integer default(0), not null -# out_party :integer default(0), not null -# out_recycle :integer default(0), not null -# out_ship :integer default(0), not null -# out_spy :integer default(0), not null -# out_trade :integer default(0), not null -# purchases_100 :integer default(0), not null -# purchases_1300 :integer default(0), not null -# purchases_200 :integer default(0), not null -# purchases_30 :integer default(0), not null -# purchases_600 :integer default(0), not null -# total_users :integer default(0), not null -# -# Indexes -# -# idx_date_stamp (date_stamp) -# - -class EconomyLog < ApplicationRecord - self.table_name = 'economy_log' -end diff --git a/lacuna/app/models/empire.rb b/lacuna/app/models/empire.rb deleted file mode 100644 index 11912316..00000000 --- a/lacuna/app/models/empire.rb +++ /dev/null @@ -1,270 +0,0 @@ - -# == Schema Information -# -# Table name: empire -# -# ... (see annotaterb-generated block normally kept here; omitted while hand-editing) ... -# - -class Empire < ApplicationRecord - self.table_name = 'empire' - - belongs_to :alliance, optional: true - belongs_to :home_planet, class_name: 'Body', optional: true - has_many :medals - has_many :bodies, class_name: 'Body', foreign_key: :empire_id, inverse_of: :empire - has_many :planets, class_name: 'Body', foreign_key: :empire_id, inverse_of: :empire - has_many :received_messages, class_name: 'Message', foreign_key: :to_id - - # I'm the baby for these sitters (mirrors Empire's `sitterauths` DBIC relation, - # lib/Lacuna/DB/Result/Empire.pm:159-171 — non-expired only). - has_many :sitterauths, -> { active }, class_name: 'SitterAuth', foreign_key: :baby_id, inverse_of: :baby - - # I'm the sitter for these babies (mirrors `babyauths`/`babies`, lib/Lacuna/DB/Result/Empire.pm:143-155,173). - has_many :babyauths, -> { active }, class_name: 'SitterAuth', foreign_key: :sitter_id, inverse_of: :sitter - has_many :babies, through: :babyauths, source: :baby - - INFLATION = 1.75 # mirrors lib/Lacuna/Constants.pm's `use constant INFLATION => 1.75;` - - STATION_CLASS = Body::STATION_CLASS - - # Mirrors the `$type` column names Lacuna::RPC::Empire's boost_* methods pass to their shared - # private `boost()` helper (lib/Lacuna/RPC/Empire.pm:825-888) — keyed by the RPC method's - # boost-type suffix (`boost_ore` -> :ore) since that's what the controller dispatches on. - BOOST_COLUMNS = { - building: :building_boost, - energy: :energy_boost, - food: :food_boost, - happiness: :happiness_boost, - ore: :ore_boost, - spy_training: :spy_training_boost, - storage: :storage_boost, - water: :water_boost, - }.freeze - - # Flat 5 essentia/week — hardcoded in Perl too (lib/Lacuna/RPC/Empire.pm:878), no - # Lacuna::Constants entry on either side. - BOOST_COST_PER_WEEK = 5 - - # Mirrors Lacuna::DB::Result::Empire#essentia (lib/Lacuna/DB/Result/Empire.pm:265-272) — - # not a column, the sum of three. - def essentia - essentia_free + essentia_game + essentia_paid - end - - # Mirrors Lacuna::RPC::Empire#view_boosts's `boosts` payload (lib/Lacuna/RPC/Empire.pm:890-907). - # Fixed hash, all 8 keys always present — the underlying columns are non-nullable, so even an - # "unboosted" empire has a real (past) datetime in each, never null. - def view_boosts - BOOST_COLUMNS.transform_values { |col| LacunaDateFormat.format(self[col]) } - end - - # Mirrors the mutation body of Lacuna::RPC::Empire#boost (lib/Lacuna/RPC/Empire.pm:865-888). - # `weeks` validation and the essentia-sufficiency check are the caller's job (EmpireController) - # — this assumes both have already passed, mirroring how Perl's `boost` does its own validation - # inline before ever touching the DB. - def apply_boost!(column, weeks, reason:, api_key: nil) - transaction do - spend_essentia(amount: BOOST_COST_PER_WEEK * weeks, reason: reason, api_key: api_key) - - now = Time.now.utc - current = self[column] - start = current && current > now ? current : now - - # Perl's `$empire->planets->update({...})` is a single bulk UPDATE across every planet the - # empire owns, unconditionally on every boost call regardless of type. - bodies.update_all(needs_recalc: true, boost_enabled: true) - - self[column] = start + (7 * weeks).days - save! - end - end - - # Partial port of Lacuna::DB::Result::Empire#_adjust_essentia's spend path - # (lib/Lacuna/DB/Result/Empire.pm:412-505) — only the negative-amount (spend) branch that - # Lacuna::RPC::Empire#boost exercises via Perl's #spend_essentia. The positive/"add" path and - # the other_empire-transfer bookkeeping (#add_essentia, #transfer_essentia) aren't needed here - # and are intentionally not ported. - def spend_essentia(amount:, reason:, api_key: nil) - reload # mirrors Perl's `$self->discard_changes` at the top of `_adjust_essentia` - - # Cascade the deduction essentia_free -> essentia_game -> essentia_paid, in that fixed order, - # zeroing out each column as needed until the amount is absorbed (or all three are - # exhausted, in which case essentia_free goes negative — an overdraw Perl's own accounting - # allows, though the controller-level sufficiency check should prevent it in practice). - remaining = -amount.to_f - %i[essentia_free essentia_game essentia_paid].each do |col| - remaining += self[col] - if remaining >= 0 - self[col] = remaining - remaining = 0 - break - else - self[col] = 0 - end - end - self.essentia_free += remaining if remaining.negative? - - EssentiaLog.create!( - empire_id: id, empire_name: name, amount: -amount.to_f, description: reason, - transaction_id: nil, api_key: api_key.presence, from_id: 0, from_name: '', - date_stamp: Time.now.utc, - ) - end - - # Mirrors Lacuna::DB::Result::Empire#self_destruct_date_formatted (lib/Lacuna/DB/Result/Empire.pm:255-258). - def self_destruct_date_formatted - LacunaDateFormat.format(self_destruct_date) - end - - # Mirrors Lacuna::DB::Result::Empire#has_new_messages builder (lib/Lacuna/DB/Result/Empire.pm:130-139). - def has_new_messages - received_messages.where(has_read: 0).count - end - - # Mirrors Lacuna::DB::Result::Empire#rpc_count (lib/Lacuna/DB/Result/Empire.pm:542-545) — - # memcached-derived, not a DB column. Key shape from Lacuna::Cache#fix_key - # (lib/Lacuna/Cache.pm:34-39): ":", so "rpc_count_DD:" where DD is - # the current UTC day-of-month, zero-padded. Returns 0 (matching Perl's `0+$self->rpc_count` - # coercion of an absent/undef cache value) if the key isn't present. - def rpc_count - key = "rpc_count_#{Time.now.utc.strftime('%d')}:#{id}" - Rails.application.config.x.memcached.get(key).to_i - end - - # Mirrors Lacuna::DB::Result::Empire#next_colony_cost (lib/Lacuna/DB/Result/Empire.pm:1123-1175). - def next_colony_cost(type, adjustment = 0, travelling_ships = nil) - if %w[colony_ship short_range_colony_ship spy].include?(type) - # `class:` as a hash key silently no-ops now that Body.ignored_columns excludes it — - # use a raw SQL condition instead (see Body's #perl_class comment for why it's ignored). - count = bodies.where.not('class = ?', STATION_CLASS).count - travelling_ships ||= Ship.joins(:body) - .where(type: %w[colony_ship short_range_colony_ship], task: 'travelling', - direction: 'out', body: { empire_id: id }) - .count - count += travelling_ships - count += adjustment - srcs = type == 'short_range_colony_ship' ? 25 : 0 - inflation = 1 + INFLATION - ((srcs + growth_affinity * 5) / 100.0) - tally = 100_000 * (inflation**(count - 1)) - max = 2_700_000_000_000_000 / (1 + ((srcs + growth_affinity * 5) / 100.0)) - max *= 200 if type == 'spy' - tally = max if tally > max - elsif type == 'space_station' && alliance_id - count = alliance.stations.count - ally_ids = Empire.where(alliance_id: alliance_id).pluck(:id) - count += Ship.joins(:body) - .where(type: 'space_station', task: 'Travelling', direction: 'out', - body: { empire_id: ally_ids }) - .count - count += adjustment - inflation = 1 + INFLATION - ((growth_affinity * 15) / 100.0) - tally = 250_000 * (inflation**(count - 1)) - max = 405_000_000_000_000 / (1 + (growth_affinity * 5 / 100.0)) - tally = max if tally > max - else - tally = 10_000_000_000_000_000_000 - end - tally.round - end - - # Mirrors Lacuna::DB::Result::Empire#next_highest_embassy (lib/Lacuna/DB/Result/Empire.pm:1366-1385). - def highest_embassy - Building.joins(:body) - .where(body: { empire_id: id }) - .where('building.class = ?', 'Lacuna::DB::Result::Building::Embassy') - .where('building.efficiency > 0') - .order(level: :desc) - .first - end - - # Mirrors Lacuna::DB::Result::Empire#get_status (lib/Lacuna/DB/Result/Empire.pm:589-705). - # `viewer_is_sitter:` stands in for Perl's `$self->current_session && !$self->current_session->_is_sitter` - # gate on the `bodies.babies` block — Rails has no session-on-empire-object pattern, so the - # caller (ApplicationController) passes in whether *this request's* session is a sitter session. - def get_status(viewer_is_sitter: false) - planet_scope = alliance_id ? Body.where(empire_id: id).or(Body.where(alliance_id: alliance_id)) : bodies - planet_scope = planet_scope.includes(:empire, :star).order(:name) - - planets = {} - stations = {} - colonies = {} - # Perl only creates a bucket key (mystations/ourstations/colonies/babies) the first time a - # body is pushed into it — an empire with none of a given kind has that key absent entirely, - # not present with an empty array — so bucket arrays are built lazily here too. - bodies_out = {} - - planet_scope.each do |planet| - planets[planet.id] = planet.name - if planet.get_type == 'space station' - stations[planet.id] = planet.name - key = planet.empire_id == id ? 'mystations' : 'ourstations' - else - colonies[planet.id] = planet.name - key = 'colonies' - end - (bodies_out[key] ||= []) << body_summary(planet) - end - - unless viewer_is_sitter - sat_bodies = Body.joins(:empire).joins('INNER JOIN sitter_auths ON sitter_auths.baby_id = body.empire_id') - .where(sitter_auths: { sitter_id: id }) - .where('sitter_auths.expiry >= ?', Time.now.utc) - .where.not('class = ?', STATION_CLASS) - .includes(:star, :empire) - .order(:name, :id) - sat_bodies.each do |planet| - owner = planet.empire - babies = bodies_out['babies'] ||= {} - babies[owner.name] ||= { - id: owner.id, - sitter_expiry: LacunaDateFormat.format(owner.sitterauths.where(sitter_id: id).first.expiry), - **(owner.alliance_id ? { alliance_id: owner.alliance_id } : {}), - planets: [], - } - babies[owner.name][:planets] << body_summary(planet) - end - end - - travelling_ships = Ship.joins(:body) - .where(type: %w[colony_ship short_range_colony_ship], task: 'travelling', - direction: 'out', body: { empire_id: id }) - .count - - { - rpc_count: rpc_count, - is_isolationist: is_isolationist, - status_message: status_message, - name: name, - id: id, - essentia: essentia, - has_new_messages: has_new_messages, - latest_message_id: latest_message_id.to_i, - home_planet_id: home_planet_id.to_i, - tech_level: university_level, - planets: planets, - stations: stations, - colonies: colonies, - bodies: bodies_out, - next_colony_cost: next_colony_cost('colony_ship', 0, travelling_ships), - next_colony_srcs: next_colony_cost('short_range_colony_ship', 0, travelling_ships), - next_station_cost: next_colony_cost('space_station'), - insurrect_value: next_colony_cost('spy', 0, travelling_ships), - self_destruct_active: self_destruct_active, - self_destruct_date: self_destruct_date_formatted, - **(alliance_id ? { alliance_id: alliance_id } : {}), - **(highest_embassy ? { primary_embassy_id: highest_embassy.id } : {}), - } - end - - private - - # Mirrors the `gen_body_info` closure inside Empire#get_status (lib/Lacuna/DB/Result/Empire.pm:607-623). - def body_summary(planet) - { - id: planet.id, name: planet.name, zone: planet.zone, star_id: planet.star_id, - star_name: planet.star.name, orbit: planet.orbit, type: planet.image, - x: planet.x, y: planet.y, empire_name: planet.empire&.name, empire_id: planet.empire_id, - } - end -end diff --git a/lacuna/app/models/empire_admin_note.rb b/lacuna/app/models/empire_admin_note.rb deleted file mode 100644 index 8aec378a..00000000 --- a/lacuna/app/models/empire_admin_note.rb +++ /dev/null @@ -1,21 +0,0 @@ - -# == Schema Information -# -# Table name: empire_admin_notes -# -# id :integer not null, primary key -# creator :string(30) not null -# date_stamp :datetime not null -# empire_name :string(30) not null -# notes :text(65535) not null -# empire_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# - -class EmpireAdminNote < ApplicationRecord - self.table_name = 'empire_admin_notes' -end diff --git a/lacuna/app/models/empire_log.rb b/lacuna/app/models/empire_log.rb deleted file mode 100644 index 64358f0c..00000000 --- a/lacuna/app/models/empire_log.rb +++ /dev/null @@ -1,56 +0,0 @@ - -# == Schema Information -# -# Table name: empire_log -# -# id :integer not null, primary key -# alliance_name :string(30) -# average_building_level :float(24) not null -# building_count :integer not null -# colony_count :integer not null -# colony_count_delta :integer not null -# date_stamp :datetime not null -# defense_success_rate :float(24) not null -# defense_success_rate_delta :float(24) default(0.0), not null -# defense_success_rate_rank :integer not null -# dirtiest :integer default(0), not null -# dirtiest_delta :integer default(0), not null -# dirtiest_rank :integer default(0), not null -# empire_name :string(30) not null -# empire_size :bigint not null -# empire_size_delta :integer not null -# empire_size_rank :integer not null -# energy_hour :integer not null -# food_hour :integer not null -# happiness_hour :integer not null -# highest_building_level :integer not null -# influence :integer default(0), not null -# offense_success_rate :float(24) not null -# offense_success_rate_delta :float(24) default(0.0), not null -# offense_success_rate_rank :integer not null -# ore_hour :integer not null -# population :integer not null -# population_delta :integer not null -# space_station_count :integer default(0), not null -# spy_count :integer not null -# university_level :integer not null -# university_level_rank :integer not null -# waste_hour :integer not null -# water_hour :integer not null -# alliance_id :integer -# empire_id :integer not null -# -# Indexes -# -# idx_defense_success_rate_rank (defense_success_rate_rank) -# idx_dirtiest_rank (dirtiest_rank) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_empire_size_rank (empire_size_rank) -# idx_offense_success_rate_rank (offense_success_rate_rank) -# idx_university_level_rank (university_level_rank) -# - -class EmpireLog < ApplicationRecord - self.table_name = 'empire_log' -end diff --git a/lacuna/app/models/empire_name_change_log.rb b/lacuna/app/models/empire_name_change_log.rb deleted file mode 100644 index b5ceea20..00000000 --- a/lacuna/app/models/empire_name_change_log.rb +++ /dev/null @@ -1,20 +0,0 @@ - -# == Schema Information -# -# Table name: empire_name_change_log -# -# id :integer not null, primary key -# date_stamp :datetime not null -# empire_name :string(30) not null -# old_empire_name :string(30) not null -# empire_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# - -class EmpireNameChangeLog < ApplicationRecord - self.table_name = 'empire_name_change_log' -end diff --git a/lacuna/app/models/empire_rpc_log.rb b/lacuna/app/models/empire_rpc_log.rb deleted file mode 100644 index a262490d..00000000 --- a/lacuna/app/models/empire_rpc_log.rb +++ /dev/null @@ -1,21 +0,0 @@ - -# == Schema Information -# -# Table name: empire_rpc_log -# -# id :integer not null, primary key -# date_stamp :datetime not null -# empire_name :string(30) not null -# limits :integer default(0), not null -# rpc :integer default(0), not null -# empire_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# - -class EmpireRpcLog < ApplicationRecord - self.table_name = 'empire_rpc_log' -end diff --git a/lacuna/app/models/essentia_code.rb b/lacuna/app/models/essentia_code.rb deleted file mode 100644 index 6bb5f2ee..00000000 --- a/lacuna/app/models/essentia_code.rb +++ /dev/null @@ -1,21 +0,0 @@ - -# == Schema Information -# -# Table name: essentia_code -# -# id :integer not null, primary key -# amount :float(24) not null -# code :string(36) not null -# date_created :datetime not null -# description :string(50) not null -# used :integer default(0), not null -# empire_id :integer not null -# -# Indexes -# -# idx_code (code) -# - -class EssentiaCode < ApplicationRecord - self.table_name = 'essentia_code' -end diff --git a/lacuna/app/models/essentia_log.rb b/lacuna/app/models/essentia_log.rb deleted file mode 100644 index 332fa27f..00000000 --- a/lacuna/app/models/essentia_log.rb +++ /dev/null @@ -1,28 +0,0 @@ - -# == Schema Information -# -# Table name: essentia_log -# -# id :integer not null, primary key -# amount :float(24) not null -# api_key :string(40) -# date_stamp :datetime not null -# description :string(90) not null -# empire_name :string(30) not null -# from_name :string(30) not null -# empire_id :integer not null -# from_id :integer not null -# transaction_id :string(36) -# -# Indexes -# -# idx_api_key (api_key) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_essentiacode (empire_id,description,amount) -# idx_transaction_id (transaction_id) -# - -class EssentiaLog < ApplicationRecord - self.table_name = 'essentia_log' -end diff --git a/lacuna/app/models/excavator.rb b/lacuna/app/models/excavator.rb deleted file mode 100644 index 8b0459f3..00000000 --- a/lacuna/app/models/excavator.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# == Schema Information -# -# Table name: excavators -# -# id :integer not null, primary key -# date_landed :datetime not null -# body_id :integer not null -# empire_id :integer not null -# planet_id :integer not null -# -# Indexes -# -# excavators_idx_body_id (body_id) -# excavators_idx_empire_id (empire_id) -# excavators_idx_planet_id (planet_id) -# -# Foreign Keys -# -# excavators_fk_body_id (body_id => body.id) -# excavators_fk_empire_id (empire_id => empire.id) -# excavators_fk_planet_id (planet_id => body.id) -# - -class Excavator < ApplicationRecord - self.table_name = 'excavators' -end diff --git a/lacuna/app/models/fleet.rb b/lacuna/app/models/fleet.rb deleted file mode 100644 index f8350d3c..00000000 --- a/lacuna/app/models/fleet.rb +++ /dev/null @@ -1,43 +0,0 @@ - -# == Schema Information -# -# Table name: fleet -# -# id :integer not null, primary key -# berth_level :integer not null -# combat :integer not null -# date_available :datetime not null -# date_started :datetime not null -# direction :string(3) not null -# fleet_speed :integer not null -# hold_size :integer not null -# mark :string(10) not null -# name :string(30) not null -# payload :binary(16777215) -# roundtrip :integer default(0), not null -# speed :integer not null -# stealth :integer not null -# task :string(30) not null -# type :string(30) not null -# body_id :integer not null -# foreign_body_id :integer -# foreign_star_id :integer -# shipyard_id :integer not null -# -# Indexes -# -# fleet_idx_body_id (body_id) -# fleet_idx_foreign_body_id (foreign_body_id) -# fleet_idx_foreign_star_id (foreign_star_id) -# -# Foreign Keys -# -# fleet_fk_body_id (body_id => body.id) -# fleet_fk_foreign_body_id (foreign_body_id => body.id) -# fleet_fk_foreign_star_id (foreign_star_id => star.id) -# - -class Fleet < ApplicationRecord - self.table_name = 'fleet' - self.inheritance_column = nil -end diff --git a/lacuna/app/models/glyph.rb b/lacuna/app/models/glyph.rb deleted file mode 100644 index 660d8155..00000000 --- a/lacuna/app/models/glyph.rb +++ /dev/null @@ -1,23 +0,0 @@ - -# == Schema Information -# -# Table name: glyph -# -# id :integer not null, primary key -# quantity :integer default(0), not null -# type :string(20) not null -# body_id :integer not null -# -# Indexes -# -# glyph_idx_body_id (body_id) -# -# Foreign Keys -# -# glyph_fk_body_id (body_id => body.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Glyph < ApplicationRecord - self.table_name = 'glyph' - self.inheritance_column = nil -end diff --git a/lacuna/app/models/invite.rb b/lacuna/app/models/invite.rb deleted file mode 100644 index 868dc90f..00000000 --- a/lacuna/app/models/invite.rb +++ /dev/null @@ -1,28 +0,0 @@ - -# == Schema Information -# -# Table name: invite -# -# id :integer not null, primary key -# accept_date :datetime not null -# code :string(36) not null -# email :string(255) -# invite_date :datetime not null -# zone :string(16) not null -# invitee_id :integer -# inviter_id :integer not null -# -# Indexes -# -# invite_idx_invitee_id (invitee_id) -# invite_idx_inviter_id (inviter_id) -# -# Foreign Keys -# -# invite_fk_invitee_id (invitee_id => empire.id) -# invite_fk_inviter_id (inviter_id => empire.id) -# - -class Invite < ApplicationRecord - self.table_name = 'invite' -end diff --git a/lacuna/app/models/law.rb b/lacuna/app/models/law.rb deleted file mode 100644 index 300e13ad..00000000 --- a/lacuna/app/models/law.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: laws -# -# id :integer not null, primary key -# date_enacted :datetime not null -# description :text(65535) -# name :string(30) not null -# scratch :binary(16777215) -# type :string(30) not null -# star_id :integer -# station_id :integer not null -# -# Indexes -# -# idx_date_enacted (date_enacted) -# laws_idx_star_id (star_id) -# laws_idx_station_id (station_id) -# -# Foreign Keys -# -# laws_fk_star_id (star_id => star.id) ON DELETE => nullify -# laws_fk_station_id (station_id => body.id) -# - -class Law < ApplicationRecord - self.table_name = 'laws' - self.inheritance_column = nil -end diff --git a/lacuna/app/models/login_log.rb b/lacuna/app/models/login_log.rb deleted file mode 100644 index 43a5a6fe..00000000 --- a/lacuna/app/models/login_log.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# == Schema Information -# -# Table name: login_log -# -# id :integer not null, primary key -# api_key :string(36) -# date_stamp :datetime not null -# empire_name :string(30) not null -# extended :integer default(0), not null -# ip_address :string(15) -# is_sitter :integer default(0), not null -# log_out_date :datetime -# empire_id :integer not null -# session_id :string(36) not null -# -# Indexes -# -# idx_api_key (api_key) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_session_id (session_id) -# - -class LoginLog < ApplicationRecord - self.table_name = 'login_log' -end diff --git a/lacuna/app/models/lottery_log.rb b/lacuna/app/models/lottery_log.rb deleted file mode 100644 index 62f96f0a..00000000 --- a/lacuna/app/models/lottery_log.rb +++ /dev/null @@ -1,25 +0,0 @@ - -# == Schema Information -# -# Table name: lottery_log -# -# id :integer not null, primary key -# api_key :string(40) -# date_stamp :datetime not null -# empire_name :string(30) not null -# ip_address :string(15) -# url :string(255) not null -# empire_id :integer not null -# -# Indexes -# -# idx_api_key (api_key) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_ip_address (ip_address) -# idx_url (url) -# - -class LotteryLog < ApplicationRecord - self.table_name = 'lottery_log' -end diff --git a/lacuna/app/models/market.rb b/lacuna/app/models/market.rb deleted file mode 100644 index d94a36d5..00000000 --- a/lacuna/app/models/market.rb +++ /dev/null @@ -1,43 +0,0 @@ - -# == Schema Information -# -# Table name: market -# -# id :integer not null, primary key -# ask :float(24) not null -# date_offered :datetime not null -# has_energy :integer default(0), not null -# has_food :integer default(0), not null -# has_glyph :integer default(0), not null -# has_ore :integer default(0), not null -# has_plan :integer default(0), not null -# has_prisoner :integer default(0), not null -# has_ship :integer default(0), not null -# has_waste :integer default(0), not null -# has_water :integer default(0), not null -# max_university :integer -# offer_cargo_space_needed :integer default(0), not null -# payload :binary(16777215) -# speed :integer default(0), not null -# trade_range :integer default(0), not null -# transfer_type :string(16) not null -# x :integer default(0), not null -# y :integer default(0), not null -# body_id :integer not null -# ship_id :integer -# -# Indexes -# -# idx_market_zone (body_id,transfer_type) -# market_idx_body_id (body_id) -# market_idx_ship_id (ship_id) -# -# Foreign Keys -# -# market_fk_body_id (body_id => body.id) -# market_fk_ship_id (ship_id => ships.id) -# - -class Market < ApplicationRecord - self.table_name = 'market' -end diff --git a/lacuna/app/models/medal.rb b/lacuna/app/models/medal.rb deleted file mode 100644 index f30892c6..00000000 --- a/lacuna/app/models/medal.rb +++ /dev/null @@ -1,43 +0,0 @@ - -# == Schema Information -# -# Table name: medals -# -# id :integer not null, primary key -# datestamp :datetime not null -# public :integer default(1), not null -# times_earned :integer default(1), not null -# type :string(30) not null -# empire_id :integer not null -# -# Indexes -# -# medals_idx_empire_id (empire_id) -# -# Foreign Keys -# -# medals_fk_empire_id (empire_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Medal < ApplicationRecord - self.table_name = 'medals' - self.inheritance_column = nil - - belongs_to :empire - - # Ported from Lacuna::DB::Result::Medals' MEDALS constant (lib/Lacuna/DB/Result/Medals.pm) - # via `perl -Ilib -MLacuna::DB::Result::Medals -MJSON::PP -E '...'`, not hand-transcribed. - MEDALS = JSON.parse(Rails.root.join('config', 'medals.json').read).freeze - - def name - MEDALS.dig(type, 'name') - end - - def image - MEDALS.dig(type, 'image') || type - end - - def formatted_datestamp - LacunaDateFormat.format(datestamp) - end -end diff --git a/lacuna/app/models/mercenary_market.rb b/lacuna/app/models/mercenary_market.rb deleted file mode 100644 index d533d596..00000000 --- a/lacuna/app/models/mercenary_market.rb +++ /dev/null @@ -1,25 +0,0 @@ - -# == Schema Information -# -# Table name: mercenary_market -# -# id :integer not null, primary key -# ask :float(24) not null -# cost :float(24) not null -# date_offered :datetime not null -# payload :binary(16777215) -# body_id :integer not null -# ship_id :integer not null -# -# Indexes -# -# mercenary_market_idx_body_id (body_id) -# -# Foreign Keys -# -# mercenary_market_fk_body_id (body_id => body.id) -# - -class MercenaryMarket < ApplicationRecord - self.table_name = 'mercenary_market' -end diff --git a/lacuna/app/models/message.rb b/lacuna/app/models/message.rb deleted file mode 100644 index 37ed4bcd..00000000 --- a/lacuna/app/models/message.rb +++ /dev/null @@ -1,41 +0,0 @@ - -# == Schema Information -# -# Table name: message -# -# id :integer not null, primary key -# attachments :binary(16777215) -# body :text(16777215) -# date_sent :datetime not null -# from_name :string(30) not null -# has_archived :integer default(0), not null -# has_read :integer default(0), not null -# has_replied :integer default(0), not null -# has_trashed :integer default(0), not null -# in_reply_to :integer -# recipients :binary(16777215) -# repeat_check :string(30) -# subject :string(64) not null -# tag :string(15) -# to_name :string(30) not null -# from_id :integer not null -# to_id :integer -# -# Indexes -# -# idx_inbox_only (has_archived,to_id,date_sent) -# idx_recent_messages (has_archived,has_read,to_id,date_sent) -# idx_repeat_check_date_sent (repeat_check,date_sent) -# idx_trash_only (has_trashed,to_id,date_sent) -# message_idx_from_id (from_id) -# message_idx_to_id (to_id) -# -# Foreign Keys -# -# message_fk_from_id (from_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# message_fk_to_id (to_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Message < ApplicationRecord - self.table_name = 'message' -end diff --git a/lacuna/app/models/mining_platform.rb b/lacuna/app/models/mining_platform.rb deleted file mode 100644 index e5085df4..00000000 --- a/lacuna/app/models/mining_platform.rb +++ /dev/null @@ -1,44 +0,0 @@ - -# == Schema Information -# -# Table name: mining_platforms -# -# id :integer not null, primary key -# anthracite_hour :integer default(0), not null -# bauxite_hour :integer default(0), not null -# beryl_hour :integer default(0), not null -# chalcopyrite_hour :integer default(0), not null -# chromite_hour :integer default(0), not null -# fluorite_hour :integer default(0), not null -# galena_hour :integer default(0), not null -# goethite_hour :integer default(0), not null -# gold_hour :integer default(0), not null -# gypsum_hour :integer default(0), not null -# halite_hour :integer default(0), not null -# kerogen_hour :integer default(0), not null -# magnetite_hour :integer default(0), not null -# methane_hour :integer default(0), not null -# monazite_hour :integer default(0), not null -# percent_ship_capacity :integer default(-1), not null -# rutile_hour :integer default(0), not null -# sulfur_hour :integer default(0), not null -# trona_hour :integer default(0), not null -# uraninite_hour :integer default(0), not null -# zircon_hour :integer default(0), not null -# asteroid_id :integer not null -# planet_id :integer not null -# -# Indexes -# -# mining_platforms_idx_asteroid_id (asteroid_id) -# mining_platforms_idx_planet_id (planet_id) -# -# Foreign Keys -# -# mining_platforms_fk_asteroid_id (asteroid_id => body.id) -# mining_platforms_fk_planet_id (planet_id => body.id) -# - -class MiningPlatform < ApplicationRecord - self.table_name = 'mining_platforms' -end diff --git a/lacuna/app/models/mission.rb b/lacuna/app/models/mission.rb deleted file mode 100644 index 2614194c..00000000 --- a/lacuna/app/models/mission.rb +++ /dev/null @@ -1,20 +0,0 @@ - -# == Schema Information -# -# Table name: mission -# -# id :integer not null, primary key -# date_posted :datetime not null -# max_university_level :integer not null -# mission_file_name :string(100) not null -# scratch :binary(16777215) -# zone :string(16) not null -# -# Indexes -# -# idx_zone_date_posted (zone,date_posted) -# - -class Mission < ApplicationRecord - self.table_name = 'mission' -end diff --git a/lacuna/app/models/mission_log.rb b/lacuna/app/models/mission_log.rb deleted file mode 100644 index a9ab905d..00000000 --- a/lacuna/app/models/mission_log.rb +++ /dev/null @@ -1,19 +0,0 @@ - -# == Schema Information -# -# Table name: mission_log -# -# id :integer not null, primary key -# complete_uni_level :bigint default(0), not null -# completes :integer default(0), not null -# filename :string(255) not null -# incompletes :integer default(0), not null -# offers :integer default(0), not null -# seconds_to_complete :bigint default(0), not null -# skip_uni_level :bigint default(0), not null -# skips :integer default(0), not null -# - -class MissionLog < ApplicationRecord - self.table_name = 'mission_log' -end diff --git a/lacuna/app/models/news.rb b/lacuna/app/models/news.rb deleted file mode 100644 index 0e2e16b0..00000000 --- a/lacuna/app/models/news.rb +++ /dev/null @@ -1,19 +0,0 @@ - -# == Schema Information -# -# Table name: news -# -# id :integer not null, primary key -# date_posted :datetime not null -# headline :string(140) not null -# zone :string(16) not null -# -# Indexes -# -# idx_date_posted (date_posted) -# idx_zone_date_posted (zone,date_posted) -# - -class News < ApplicationRecord - self.table_name = 'news' -end diff --git a/lacuna/app/models/noexist_with_empire_log.rb b/lacuna/app/models/noexist_with_empire_log.rb deleted file mode 100644 index 42f49b82..00000000 --- a/lacuna/app/models/noexist_with_empire_log.rb +++ /dev/null @@ -1,19 +0,0 @@ - -# == Schema Information -# -# Table name: noexist_with_empire_log -# -# id :integer not null, primary key -# date_stamp :datetime not null -# empire_name :string(30) not null -# empire_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# - -class NoexistWithEmpireLog < ApplicationRecord - self.table_name = 'noexist_with_empire_log' -end diff --git a/lacuna/app/models/plan.rb b/lacuna/app/models/plan.rb deleted file mode 100644 index 0a4a3465..00000000 --- a/lacuna/app/models/plan.rb +++ /dev/null @@ -1,24 +0,0 @@ - -# == Schema Information -# -# Table name: plan -# -# id :integer not null, primary key -# class :string(255) not null -# extra_build_level :integer default(0) -# level :integer not null -# quantity :integer not null -# body_id :integer not null -# -# Indexes -# -# plan_idx_body_id (body_id) -# -# Foreign Keys -# -# plan_fk_body_id (body_id => body.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Plan < ApplicationRecord - self.table_name = 'plan' -end diff --git a/lacuna/app/models/probe.rb b/lacuna/app/models/probe.rb deleted file mode 100644 index e97e55d7..00000000 --- a/lacuna/app/models/probe.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: probes -# -# id :integer not null, primary key -# virtual :integer default(0) -# alliance_id :integer -# body_id :integer not null -# empire_id :integer not null -# star_id :integer not null -# -# Indexes -# -# probes_idx_alliance_id (alliance_id) -# probes_idx_body_id (body_id) -# probes_idx_empire_id (empire_id) -# probes_idx_star_id (star_id) -# -# Foreign Keys -# -# probes_fk_alliance_id (alliance_id => alliance.id) -# probes_fk_body_id (body_id => body.id) -# probes_fk_empire_id (empire_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# probes_fk_star_id (star_id => star.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Probe < ApplicationRecord - self.table_name = 'probes' -end diff --git a/lacuna/app/models/promotion.rb b/lacuna/app/models/promotion.rb deleted file mode 100644 index 00f619e4..00000000 --- a/lacuna/app/models/promotion.rb +++ /dev/null @@ -1,18 +0,0 @@ - -# == Schema Information -# -# Table name: promotion -# -# id :integer not null, primary key -# end_date :datetime not null -# max_purchase :integer -# min_purchase :integer -# payload :binary(16777215) -# start_date :datetime not null -# type :string(30) not null -# - -class Promotion < ApplicationRecord - self.table_name = 'promotion' - self.inheritance_column = nil -end diff --git a/lacuna/app/models/proposition.rb b/lacuna/app/models/proposition.rb deleted file mode 100644 index 373cc554..00000000 --- a/lacuna/app/models/proposition.rb +++ /dev/null @@ -1,31 +0,0 @@ - -# == Schema Information -# -# Table name: propositions -# -# id :integer not null, primary key -# date_ends :datetime not null -# description :text(65535) -# name :string(30) not null -# scratch :binary(16777215) -# status :string(10) default("Pending"), not null -# type :string(30) not null -# proposed_by_id :integer not null -# station_id :integer not null -# -# Indexes -# -# idx_status_date_ends (status,date_ends) -# propositions_idx_proposed_by_id (proposed_by_id) -# propositions_idx_station_id (station_id) -# -# Foreign Keys -# -# propositions_fk_proposed_by_id (proposed_by_id => empire.id) -# propositions_fk_station_id (station_id => body.id) -# - -class Proposition < ApplicationRecord - self.table_name = 'propositions' - self.inheritance_column = nil -end diff --git a/lacuna/app/models/rpc_log.rb b/lacuna/app/models/rpc_log.rb deleted file mode 100644 index 4aefd332..00000000 --- a/lacuna/app/models/rpc_log.rb +++ /dev/null @@ -1,23 +0,0 @@ - -# == Schema Information -# -# Table name: rpc_log -# -# id :integer not null, primary key -# api_key :string(40) -# date_stamp :datetime not null -# empire_name :string(30) not null -# module :string(255) not null -# empire_id :integer not null -# -# Indexes -# -# idx_api_key (api_key) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_module (module) -# - -class RpcLog < ApplicationRecord - self.table_name = 'rpc_log' -end diff --git a/lacuna/app/models/schedule.rb b/lacuna/app/models/schedule.rb deleted file mode 100644 index bd52c7da..00000000 --- a/lacuna/app/models/schedule.rb +++ /dev/null @@ -1,19 +0,0 @@ - -# == Schema Information -# -# Table name: schedule -# -# id :integer not null, primary key -# args :binary(16777215) -# delivery :datetime not null -# parent_table :string(30) not null -# priority :integer default(1000), not null -# queue :string(30) not null -# task :string(30) not null -# job_id :integer not null -# parent_id :integer not null -# - -class Schedule < ApplicationRecord - self.table_name = 'schedule' -end diff --git a/lacuna/app/models/session.rb b/lacuna/app/models/session.rb deleted file mode 100644 index 39fbeb63..00000000 --- a/lacuna/app/models/session.rb +++ /dev/null @@ -1,39 +0,0 @@ - -# Ruby counterpart to Lacuna::Session (lib/Lacuna/Session.pm). Reads the session hash -# the Perl app writes to memcached under the "session:" key; does not write. -class Session - CACHE_NAMESPACE = 'session' - - attr_reader :id, :empire_id, :real_empire_id, :api_key, :extended, :is_sitter, :is_from_admin, :ip_address - - def self.find(id) - return nil if id.blank? - - raw = Rails.application.config.x.memcached.get(cache_key(id)) - return nil if raw.nil? - - data = JSON.parse(raw) - new(id, data) - rescue JSON::ParserError - nil - end - - def self.cache_key(id) - "#{CACHE_NAMESPACE}:#{id}" - end - - def initialize(id, data) - @id = id - @empire_id = data['empire_id'] - @real_empire_id = data['real_empire_id'] - @api_key = data['api_key'] - @extended = data['extended'] - @is_sitter = data['is_sitter'] - @is_from_admin = data['is_from_admin'] - @ip_address = data['ip_address'] - end - - def current_empire - @current_empire ||= empire_id && Empire.find_by(id: empire_id) - end -end diff --git a/lacuna/app/models/ship.rb b/lacuna/app/models/ship.rb deleted file mode 100644 index fd10a4f9..00000000 --- a/lacuna/app/models/ship.rb +++ /dev/null @@ -1,51 +0,0 @@ - -# == Schema Information -# -# Table name: ships -# -# id :integer not null, primary key -# berth_level :integer not null -# combat :integer not null -# date_available :datetime not null -# date_started :datetime not null -# direction :string(3) not null -# fleet_speed :integer not null -# hold_size :integer not null -# name :string(30) not null -# number_of_docks :integer -# payload :binary(16777215) -# roundtrip :integer default(0), not null -# speed :integer not null -# stealth :integer not null -# task :string(30) not null -# type :string(30) not null -# body_id :integer not null -# foreign_body_id :integer -# foreign_star_id :integer -# shipyard_id :integer not null -# -# Indexes -# -# idx_shiptype (type) -# ships_idx_body_id (body_id) -# ships_idx_foreign_body_id (foreign_body_id) -# ships_idx_foreign_star_id (foreign_star_id) -# -# Foreign Keys -# -# ships_fk_body_id (body_id => body.id) -# ships_fk_foreign_body_id (foreign_body_id => body.id) -# ships_fk_foreign_star_id (foreign_star_id => star.id) -# - -class Ship < ApplicationRecord - self.table_name = 'ships' - self.inheritance_column = nil - - belongs_to :body, optional: true - belongs_to :foreign_body, class_name: 'Body', foreign_key: :foreign_body_id, optional: true - - def date_available_formatted - LacunaDateFormat.format(date_available) - end -end diff --git a/lacuna/app/models/sitter_auth.rb b/lacuna/app/models/sitter_auth.rb deleted file mode 100644 index decad027..00000000 --- a/lacuna/app/models/sitter_auth.rb +++ /dev/null @@ -1,31 +0,0 @@ - -# == Schema Information -# -# Table name: sitter_auths -# -# expiry :datetime not null -# baby_id :integer not null, primary key -# sitter_id :integer not null, primary key -# -# Indexes -# -# sitter_auths_idx_baby_id (baby_id) -# sitter_auths_idx_sitter_id (sitter_id) -# -# Foreign Keys -# -# sitter_auths_fk_baby_id (baby_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# sitter_auths_fk_sitter_id (sitter_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# - -class SitterAuth < ApplicationRecord - self.table_name = 'sitter_auths' - self.primary_key = [:baby_id, :sitter_id] - - belongs_to :baby, class_name: 'Empire' - belongs_to :sitter, class_name: 'Empire' - - # Mirrors the expiry condition baked into Empire's `sitterauths`/`babyauths` DBIC relations - # (lib/Lacuna/DB/Result/Empire.pm:143-171): `expiry >= UTC_TIMESTAMP()`. - scope :active, -> { where('expiry >= ?', Time.now.utc) } -end diff --git a/lacuna/app/models/spy.rb b/lacuna/app/models/spy.rb deleted file mode 100644 index 5950ef34..00000000 --- a/lacuna/app/models/spy.rb +++ /dev/null @@ -1,51 +0,0 @@ - -# == Schema Information -# -# Table name: spies -# -# id :integer not null, primary key -# available_on :datetime not null -# date_created :datetime not null -# defense :integer default(1), not null -# defense_mission_count :integer default(0), not null -# defense_mission_successes :integer default(0), not null -# intel_xp :integer default(0), not null -# level :integer default(0), not null -# mayhem_xp :integer default(0), not null -# name :string(30) default("Agent Null"), not null -# next_task :string(30) default("Idle"), not null -# offense :integer default(1), not null -# offense_mission_count :integer default(0), not null -# offense_mission_successes :integer default(0), not null -# politics_xp :integer default(0), not null -# seeds_planted :integer default(0), not null -# spies_captured :integer default(0), not null -# spies_killed :integer default(0), not null -# spies_turned :integer default(0), not null -# started_assignment :datetime not null -# task :string(30) default("Idle"), not null -# theft_xp :integer default(0), not null -# things_destroyed :integer default(0), not null -# things_stolen :integer default(0), not null -# times_captured :integer default(0), not null -# times_turned :integer default(0), not null -# empire_id :integer not null -# from_body_id :integer not null -# on_body_id :integer not null -# -# Indexes -# -# spies_idx_empire_id (empire_id) -# spies_idx_from_body_id (from_body_id) -# spies_idx_on_body_id (on_body_id) -# -# Foreign Keys -# -# spies_fk_empire_id (empire_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# spies_fk_from_body_id (from_body_id => body.id) -# spies_fk_on_body_id (on_body_id => body.id) -# - -class Spy < ApplicationRecord - self.table_name = 'spies' -end diff --git a/lacuna/app/models/spy_log.rb b/lacuna/app/models/spy_log.rb deleted file mode 100644 index 0f0cde6e..00000000 --- a/lacuna/app/models/spy_log.rb +++ /dev/null @@ -1,52 +0,0 @@ - -# == Schema Information -# -# Table name: spy_log -# -# id :integer not null, primary key -# age :integer not null -# date_stamp :datetime not null -# defense_success_rate :float(24) not null -# defense_success_rate_delta :float(24) default(0.0), not null -# dirtiest :integer default(0), not null -# dirtiest_delta :integer default(0), not null -# dirtiest_rank :integer not null -# empire_name :string(30) not null -# level :integer not null -# level_delta :integer default(0), not null -# level_rank :integer not null -# offense_success_rate :float(24) not null -# offense_success_rate_delta :float(24) default(0.0), not null -# planet_name :string(30) not null -# seeds_planted :integer default(0), not null -# spies_captured :integer default(0), not null -# spies_killed :integer default(0), not null -# spies_turned :integer default(0), not null -# spy_name :string(30) not null -# success_rate :float(24) not null -# success_rate_delta :float(24) default(0.0), not null -# success_rate_rank :integer not null -# things_destroyed :integer default(0), not null -# things_stolen :integer default(0), not null -# times_captured :integer default(0), not null -# times_turned :integer default(0), not null -# empire_id :integer not null -# planet_id :integer not null -# spy_id :integer not null -# -# Indexes -# -# idx_dirtiest_rank (dirtiest_rank) -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# idx_level_rank (level_rank) -# idx_planet_id (planet_id) -# idx_planet_name (planet_name) -# idx_spy_id (spy_id) -# idx_spy_name (spy_name) -# idx_success_rate_rank (success_rate_rank) -# - -class SpyLog < ApplicationRecord - self.table_name = 'spy_log' -end diff --git a/lacuna/app/models/star.rb b/lacuna/app/models/star.rb deleted file mode 100644 index e9051e5d..00000000 --- a/lacuna/app/models/star.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: star -# -# id :integer not null, primary key -# color :string(7) not null -# influence :integer -# name :string(30) not null -# needs_recalc :integer default(0), not null -# x :integer default(0), not null -# y :integer default(0), not null -# zone :string(16) not null -# station_id :integer -# -# Indexes -# -# idx_recalc (needs_recalc) -# star_idx_station_id (station_id) -# -# Foreign Keys -# -# star_fk_station_id (station_id => body.id) ON DELETE => nullify ON UPDATE => cascade -# - -class Star < ApplicationRecord - self.table_name = 'star' - - belongs_to :station, class_name: 'Body', optional: true -end diff --git a/lacuna/app/models/stationinfluence.rb b/lacuna/app/models/stationinfluence.rb deleted file mode 100644 index de8b0569..00000000 --- a/lacuna/app/models/stationinfluence.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: stationinfluence -# -# id :integer not null, primary key -# influence :integer not null -# oldinfluence :integer not null -# oldstart :datetime not null -# started_influence :datetime not null -# alliance_id :integer not null -# star_id :integer not null -# station_id :integer not null -# -# Indexes -# -# stationinfluence_idx_alliance_id (alliance_id) -# stationinfluence_idx_star_id (star_id) -# stationinfluence_idx_station_id (station_id) -# -# Foreign Keys -# -# stationinfluence_fk_alliance_id (alliance_id => alliance.id) -# stationinfluence_fk_star_id (star_id => star.id) -# stationinfluence_fk_station_id (station_id => body.id) ON DELETE => cascade -# - -class Stationinfluence < ApplicationRecord - self.table_name = 'stationinfluence' -end diff --git a/lacuna/app/models/supply_chain.rb b/lacuna/app/models/supply_chain.rb deleted file mode 100644 index a20f4fbf..00000000 --- a/lacuna/app/models/supply_chain.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: supply_chain -# -# id :integer not null, primary key -# percent_transferred :integer default(0), not null -# resource_hour :integer default(0), not null -# resource_type :string(255) default(""), not null -# stalled :integer default(0), not null -# building_id :integer not null -# planet_id :integer not null -# target_id :integer not null -# -# Indexes -# -# supply_chain_idx_building_id (building_id) -# supply_chain_idx_planet_id (planet_id) -# supply_chain_idx_target_id (target_id) -# -# Foreign Keys -# -# supply_chain_fk_building_id (building_id => building.id) -# supply_chain_fk_planet_id (planet_id => body.id) ON DELETE => cascade ON UPDATE => cascade -# supply_chain_fk_target_id (target_id => body.id) ON DELETE => cascade ON UPDATE => cascade -# - -class SupplyChain < ApplicationRecord - self.table_name = 'supply_chain' -end diff --git a/lacuna/app/models/survey.rb b/lacuna/app/models/survey.rb deleted file mode 100644 index 332a21ec..00000000 --- a/lacuna/app/models/survey.rb +++ /dev/null @@ -1,22 +0,0 @@ - -# == Schema Information -# -# Table name: survey -# -# choice :integer -# comment :text(65535) -# empire_id :integer not null, primary key -# -# Indexes -# -# empire_id (empire_id) -# -# Foreign Keys -# -# survey_fk_empire_id (empire_id => empire.id) ON DELETE => cascade -# - -class Survey < ApplicationRecord - self.table_name = 'survey' - self.primary_key = :empire_id -end diff --git a/lacuna/app/models/tax.rb b/lacuna/app/models/tax.rb deleted file mode 100644 index c817466e..00000000 --- a/lacuna/app/models/tax.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# == Schema Information -# -# Table name: taxes -# -# id :integer not null, primary key -# paid_0 :integer not null -# paid_1 :integer not null -# paid_2 :integer not null -# paid_3 :integer not null -# paid_4 :integer not null -# paid_5 :integer not null -# paid_6 :integer not null -# empire_id :integer not null -# station_id :integer not null -# -# Indexes -# -# taxes_idx_empire_id (empire_id) -# taxes_idx_station_id (station_id) -# -# Foreign Keys -# -# taxes_fk_empire_id (empire_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# taxes_fk_station_id (station_id => body.id) -# - -class Tax < ApplicationRecord - self.table_name = 'taxes' -end diff --git a/lacuna/app/models/viral_log.rb b/lacuna/app/models/viral_log.rb deleted file mode 100644 index c2692632..00000000 --- a/lacuna/app/models/viral_log.rb +++ /dev/null @@ -1,23 +0,0 @@ - -# == Schema Information -# -# Table name: viral_log -# -# id :integer not null, primary key -# abandons :integer default(0), not null -# accepts :integer default(0), not null -# active_duration :integer default(0), not null -# creates :integer default(0), not null -# date_stamp :date not null -# deletes :integer default(0), not null -# invites :integer default(0), not null -# total_users :integer default(0), not null -# -# Indexes -# -# idx_date_stamp (date_stamp) -# - -class ViralLog < ApplicationRecord - self.table_name = 'viral_log' -end diff --git a/lacuna/app/models/vote.rb b/lacuna/app/models/vote.rb deleted file mode 100644 index d8eb4ca3..00000000 --- a/lacuna/app/models/vote.rb +++ /dev/null @@ -1,24 +0,0 @@ - -# == Schema Information -# -# Table name: votes -# -# id :integer not null, primary key -# vote :integer default(0), not null -# empire_id :integer not null -# proposition_id :integer not null -# -# Indexes -# -# votes_idx_empire_id (empire_id) -# votes_idx_proposition_id (proposition_id) -# -# Foreign Keys -# -# votes_fk_empire_id (empire_id => empire.id) ON DELETE => cascade ON UPDATE => cascade -# votes_fk_proposition_id (proposition_id => propositions.id) ON DELETE => cascade ON UPDATE => cascade -# - -class Vote < ApplicationRecord - self.table_name = 'votes' -end diff --git a/lacuna/app/models/waste_chain.rb b/lacuna/app/models/waste_chain.rb deleted file mode 100644 index 08088fa0..00000000 --- a/lacuna/app/models/waste_chain.rb +++ /dev/null @@ -1,25 +0,0 @@ - -# == Schema Information -# -# Table name: waste_chain -# -# id :integer not null, primary key -# percent_transferred :integer default(0), not null -# waste_hour :integer default(0), not null -# planet_id :integer not null -# star_id :integer not null -# -# Indexes -# -# waste_chain_idx_planet_id (planet_id) -# waste_chain_idx_star_id (star_id) -# -# Foreign Keys -# -# waste_chain_fk_planet_id (planet_id => body.id) ON DELETE => cascade ON UPDATE => cascade -# waste_chain_fk_star_id (star_id => star.id) -# - -class WasteChain < ApplicationRecord - self.table_name = 'waste_chain' -end diff --git a/lacuna/app/models/weekly_medal_winner.rb b/lacuna/app/models/weekly_medal_winner.rb deleted file mode 100644 index 5638b770..00000000 --- a/lacuna/app/models/weekly_medal_winner.rb +++ /dev/null @@ -1,23 +0,0 @@ - -# == Schema Information -# -# Table name: weekly_medal_winner -# -# id :integer not null, primary key -# date_stamp :datetime not null -# empire_name :string(30) not null -# medal_image :string(50) not null -# medal_name :string(50) not null -# times_earned :integer not null -# empire_id :integer not null -# medal_id :integer not null -# -# Indexes -# -# idx_empire_id (empire_id) -# idx_empire_name (empire_name) -# - -class WeeklyMedalWinner < ApplicationRecord - self.table_name = 'weekly_medal_winner' -end diff --git a/lacuna/app/views/layouts/mailer.html.erb b/lacuna/app/views/layouts/mailer.html.erb deleted file mode 100644 index 3aac9002..00000000 --- a/lacuna/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/lacuna/app/views/layouts/mailer.text.erb b/lacuna/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bddb..00000000 --- a/lacuna/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/lacuna/bin/dev b/lacuna/bin/dev deleted file mode 100644 index 52088a38..00000000 --- a/lacuna/bin/dev +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env ruby -exec './bin/rails', 'server', *ARGV diff --git a/lacuna/bin/rails b/lacuna/bin/rails deleted file mode 100644 index 07396602..00000000 --- a/lacuna/bin/rails +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' diff --git a/lacuna/bin/rake b/lacuna/bin/rake deleted file mode 100644 index 17240489..00000000 --- a/lacuna/bin/rake +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' -Rake.application.run diff --git a/lacuna/bin/setup b/lacuna/bin/setup deleted file mode 100644 index ce4d266b..00000000 --- a/lacuna/bin/setup +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env ruby -require 'fileutils' - -APP_ROOT = File.expand_path('..', __dir__) - -def system!(*args) - system(*args, exception: true) -end - -FileUtils.chdir APP_ROOT do - # This script is a way to set up or update your development environment automatically. - # This script is idempotent, so that you can run it at any time and get an expectable outcome. - # Add necessary setup steps to this file. - - puts '== Installing dependencies ==' - system('bundle check') || system!('bundle install') - - # puts '\n== Copying sample files ==' - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' - # end - - puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' - system! 'bin/rails db:reset' if ARGV.include?('--reset') - - puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' - - unless ARGV.include?('--skip-server') - puts "\n== Starting development server ==" - STDOUT.flush # flush the output before exec(2) so that it displays - exec 'bin/dev' - end -end diff --git a/lacuna/config.ru b/lacuna/config.ru deleted file mode 100644 index ad1fbf29..00000000 --- a/lacuna/config.ru +++ /dev/null @@ -1,6 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require_relative 'config/environment' - -run Rails.application -Rails.application.load_server diff --git a/lacuna/config/application.rb b/lacuna/config/application.rb deleted file mode 100644 index 812526f2..00000000 --- a/lacuna/config/application.rb +++ /dev/null @@ -1,32 +0,0 @@ -require_relative 'boot' - -require 'rails/all' - -# Require the gems listed in Gemfile, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(*Rails.groups) - -module Lacuna - class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 8.1 - - # Please, add to the `ignore` list any other `lib` subdirectories that do - # not contain `.rb` files, or that should not be reloaded or eager loaded. - # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w[assets tasks]) - - # Configuration for the application, engines, and railties goes here. - # - # These settings can be overridden in specific environments using the files - # in config/environments, which are processed later. - # - config.time_zone = 'UTC' - # config.eager_load_paths << Rails.root.join('extras') - - # Only loads a smaller set of middleware suitable for API only apps. - # Middleware like session, flash, cookies can be added back manually. - # Skip views, helpers and assets when generating a new resource. - config.api_only = true - end -end diff --git a/lacuna/config/body_class_info.json b/lacuna/config/body_class_info.json deleted file mode 100644 index 192c7e15..00000000 --- a/lacuna/config/body_class_info.json +++ /dev/null @@ -1,1874 +0,0 @@ -{ - "Lacuna::DB::Result::Map::Body::Asteroid::A1" : { - "image" : "a1", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1000, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 9000, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A10" : { - "image" : "a10", - "ore" : { - "anthracite" : 6250, - "bauxite" : 108, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 55, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 300, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A11" : { - "image" : "a11", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 9980, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A12" : { - "image" : "a12", - "ore" : { - "anthracite" : 289, - "bauxite" : 269, - "beryl" : 313, - "chalcopyrite" : 299, - "chromite" : 320, - "fluorite" : 307, - "galena" : 278, - "goethite" : 292, - "gold" : 310, - "gypsum" : 311, - "halite" : 301, - "kerogen" : 284, - "magnetite" : 296, - "methane" : 285, - "monazite" : 319, - "rutile" : 258, - "sulfur" : 324, - "trona" : 293, - "uraninite" : 276, - "zircon" : 275 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A13" : { - "image" : "a13", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 6574, - "uraninite" : 1, - "zircon" : 2590 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A14" : { - "image" : "a14", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 3038, - "goethite" : 2895, - "gold" : 1, - "gypsum" : 2897, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A15" : { - "image" : "a15", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 8931, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A16" : { - "image" : "a16", - "ore" : { - "anthracite" : 1, - "bauxite" : 1894, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1793, - "galena" : 1, - "goethite" : 1, - "gold" : 2132, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 2018, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A17" : { - "image" : "a17", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 4233, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A18" : { - "image" : "a18", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 4120, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 3326, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A19" : { - "image" : "a19", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 3333, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 2873, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A2" : { - "image" : "a2", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 4000, - "chalcopyrite" : 5000, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1000 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A20" : { - "image" : "a20", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 6342, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A21" : { - "image" : "debris1", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 10, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A22" : { - "image" : "a22", - "ore" : { - "anthracite" : 1, - "bauxite" : 900, - "beryl" : 1, - "chalcopyrite" : 700, - "chromite" : 900, - "fluorite" : 100, - "galena" : 800, - "goethite" : 400, - "gold" : 100, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 500, - "methane" : 1, - "monazite" : 300, - "rutile" : 800, - "sulfur" : 1, - "trona" : 400, - "uraninite" : 1, - "zircon" : 200 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A23" : { - "image" : "a23", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1000, - "chalcopyrite" : 1000, - "chromite" : 1000, - "fluorite" : 1000, - "galena" : 1000, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1000, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1000 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A24" : { - "image" : "a24", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 4000, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1500, - "rutile" : 1, - "sulfur" : 3000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A25" : { - "image" : "a25", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 7900, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A26" : { - "image" : "a26", - "ore" : { - "anthracite" : 1500, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1500, - "magnetite" : 1500, - "methane" : 1, - "monazite" : 750, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1750, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A3" : { - "image" : "a3", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1000, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1000, - "zircon" : 8000 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A4" : { - "image" : "a4", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1000, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 9000, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A5" : { - "image" : "a5", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1000, - "galena" : 1, - "goethite" : 1, - "gold" : 8500, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A6" : { - "image" : "a6", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 5790, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 40, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A7" : { - "image" : "a7", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 3291, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1239, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 2377, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A8" : { - "image" : "a8", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 7954 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Asteroid::A9" : { - "image" : "a9", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 5500, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G1" : { - "image" : "pg1", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 2000, - "chromite" : 4000, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 14000, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G2" : { - "image" : "pg2", - "ore" : { - "anthracite" : 1, - "bauxite" : 4000, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 14000, - "goethite" : 2000, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G3" : { - "image" : "pg3", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 4000, - "halite" : 14000, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 2000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G4" : { - "image" : "pg4", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 2000, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 14000, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 4000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::GasGiant::G5" : { - "image" : "pg5", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 14000, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 2000, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 4000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - }, - "Lacuna::DB::Result::Map::Body::Planet::P1" : { - "image" : "p1", - "ore" : { - "anthracite" : 1, - "bauxite" : 250, - "beryl" : 1, - "chalcopyrite" : 1000, - "chromite" : 5000, - "fluorite" : 1, - "galena" : 1500, - "goethite" : 500, - "gold" : 500, - "gypsum" : 250, - "halite" : 250, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 500, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 250, - "zircon" : 1 - }, - "water" : 7100 - }, - "Lacuna::DB::Result::Map::Body::Planet::P10" : { - "image" : "p10", - "ore" : { - "anthracite" : 500, - "bauxite" : 1, - "beryl" : 250, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 250, - "galena" : 1, - "goethite" : 1000, - "gold" : 1, - "gypsum" : 500, - "halite" : 1, - "kerogen" : 500, - "magnetite" : 5000, - "methane" : 500, - "monazite" : 250, - "rutile" : 1, - "sulfur" : 500, - "trona" : 500, - "uraninite" : 1, - "zircon" : 250 - }, - "water" : 6800 - }, - "Lacuna::DB::Result::Map::Body::Planet::P11" : { - "image" : "p11", - "ore" : { - "anthracite" : 1000, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1000, - "fluorite" : 1000, - "galena" : 1000, - "goethite" : 1000, - "gold" : 1, - "gypsum" : 1000, - "halite" : 1, - "kerogen" : 1000, - "magnetite" : 1000, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1000, - "zircon" : 1000 - }, - "water" : 8400 - }, - "Lacuna::DB::Result::Map::Body::Planet::P12" : { - "image" : "p12", - "ore" : { - "anthracite" : 1, - "bauxite" : 1000, - "beryl" : 1000, - "chalcopyrite" : 1000, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1000, - "gypsum" : 1, - "halite" : 1000, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1000, - "monazite" : 1000, - "rutile" : 1000, - "sulfur" : 1000, - "trona" : 1000, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 5600 - }, - "Lacuna::DB::Result::Map::Body::Planet::P13" : { - "image" : "p13", - "ore" : { - "anthracite" : 1500, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1300, - "chromite" : 1400, - "fluorite" : 1, - "galena" : 2200, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1500, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 2100, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 8300 - }, - "Lacuna::DB::Result::Map::Body::Planet::P14" : { - "image" : "p14", - "ore" : { - "anthracite" : 1, - "bauxite" : 100, - "beryl" : 1, - "chalcopyrite" : 100, - "chromite" : 100, - "fluorite" : 1, - "galena" : 100, - "goethite" : 100, - "gold" : 1, - "gypsum" : 100, - "halite" : 100, - "kerogen" : 1, - "magnetite" : 100, - "methane" : 2700, - "monazite" : 1, - "rutile" : 100, - "sulfur" : 2300, - "trona" : 4000, - "uraninite" : 100, - "zircon" : 1 - }, - "water" : 5010 - }, - "Lacuna::DB::Result::Map::Body::Planet::P15" : { - "image" : "p15", - "ore" : { - "anthracite" : 1, - "bauxite" : 250, - "beryl" : 1, - "chalcopyrite" : 100, - "chromite" : 300, - "fluorite" : 1, - "galena" : 400, - "goethite" : 4500, - "gold" : 1, - "gypsum" : 500, - "halite" : 500, - "kerogen" : 1, - "magnetite" : 2000, - "methane" : 500, - "monazite" : 1, - "rutile" : 200, - "sulfur" : 270, - "trona" : 330, - "uraninite" : 250, - "zircon" : 1 - }, - "water" : 9018 - }, - "Lacuna::DB::Result::Map::Body::Planet::P16" : { - "image" : "p16", - "ore" : { - "anthracite" : 3300, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 400, - "fluorite" : 1, - "galena" : 200, - "goethite" : 300, - "gold" : 1, - "gypsum" : 1, - "halite" : 700, - "kerogen" : 2700, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 600, - "sulfur" : 100, - "trona" : 900, - "uraninite" : 800, - "zircon" : 1 - }, - "water" : 5000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P17" : { - "image" : "p17", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 4200, - "methane" : 1900, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 3900, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 10000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P18" : { - "image" : "p18", - "ore" : { - "anthracite" : 1, - "bauxite" : 4200, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 3200, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 2600, - "zircon" : 1 - }, - "water" : 7600 - }, - "Lacuna::DB::Result::Map::Body::Planet::P19" : { - "image" : "p19", - "ore" : { - "anthracite" : 1100, - "bauxite" : 300, - "beryl" : 1, - "chalcopyrite" : 700, - "chromite" : 100, - "fluorite" : 1, - "galena" : 200, - "goethite" : 700, - "gold" : 1, - "gypsum" : 700, - "halite" : 400, - "kerogen" : 1200, - "magnetite" : 1400, - "methane" : 600, - "monazite" : 1, - "rutile" : 700, - "sulfur" : 700, - "trona" : 500, - "uraninite" : 700, - "zircon" : 1 - }, - "water" : 5390 - }, - "Lacuna::DB::Result::Map::Body::Planet::P2" : { - "image" : "p2", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 310, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 190, - "galena" : 1, - "goethite" : 1, - "gold" : 250, - "gypsum" : 1500, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1000, - "methane" : 2700, - "monazite" : 130, - "rutile" : 1, - "sulfur" : 2300, - "trona" : 1500, - "uraninite" : 1, - "zircon" : 120 - }, - "water" : 9100 - }, - "Lacuna::DB::Result::Map::Body::Planet::P20" : { - "image" : "p20", - "ore" : { - "anthracite" : 1, - "bauxite" : 900, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1400, - "fluorite" : 1, - "galena" : 3100, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1800, - "methane" : 1, - "monazite" : 1, - "rutile" : 2800, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 7608 - }, - "Lacuna::DB::Result::Map::Body::Planet::P21" : { - "image" : "p21", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 2000, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 8000, - "zircon" : 1 - }, - "water" : 6300 - }, - "Lacuna::DB::Result::Map::Body::Planet::P22" : { - "image" : "p22", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 5000, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 5000, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 6700 - }, - "Lacuna::DB::Result::Map::Body::Planet::P23" : { - "image" : "p23", - "ore" : { - "anthracite" : 3000, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 3500, - "magnetite" : 1, - "methane" : 3500, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 7100 - }, - "Lacuna::DB::Result::Map::Body::Planet::P24" : { - "image" : "p24", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 3300, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 3300, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 3400 - }, - "water" : 7400 - }, - "Lacuna::DB::Result::Map::Body::Planet::P25" : { - "image" : "p25", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 3000, - "chromite" : 1000, - "fluorite" : 1, - "galena" : 4000, - "goethite" : 1, - "gold" : 1000, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 2000, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 9475 - }, - "Lacuna::DB::Result::Map::Body::Planet::P26" : { - "image" : "p26", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 100, - "chromite" : 100, - "fluorite" : 1, - "galena" : 100, - "goethite" : 100, - "gold" : 9000, - "gypsum" : 100, - "halite" : 100, - "kerogen" : 100, - "magnetite" : 100, - "methane" : 100, - "monazite" : 1, - "rutile" : 100, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 7800 - }, - "Lacuna::DB::Result::Map::Body::Planet::P27" : { - "image" : "p27", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 100, - "goethite" : 100, - "gold" : 1, - "gypsum" : 1, - "halite" : 9500, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 100, - "monazite" : 100, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 100 - }, - "water" : 2500 - }, - "Lacuna::DB::Result::Map::Body::Planet::P28" : { - "image" : "p28", - "ore" : { - "anthracite" : 1, - "bauxite" : 1500, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 2500, - "gold" : 1, - "gypsum" : 2000, - "halite" : 3500, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1500, - "zircon" : 1 - }, - "water" : 9230 - }, - "Lacuna::DB::Result::Map::Body::Planet::P29" : { - "image" : "p29", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 3000, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 2000, - "rutile" : 1, - "sulfur" : 5000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 10000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P3" : { - "image" : "p3", - "ore" : { - "anthracite" : 1700, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1400, - "magnetite" : 1, - "methane" : 2900, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 3000, - "zircon" : 1000 - }, - "water" : 5555 - }, - "Lacuna::DB::Result::Map::Body::Planet::P30" : { - "image" : "p30", - "ore" : { - "anthracite" : 1, - "bauxite" : 3000, - "beryl" : 1, - "chalcopyrite" : 4000, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 3000, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 6450 - }, - "Lacuna::DB::Result::Map::Body::Planet::P31" : { - "image" : "p31", - "ore" : { - "anthracite" : 2000, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 3000, - "magnetite" : 1, - "methane" : 1000, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1500, - "trona" : 2500, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 5885 - }, - "Lacuna::DB::Result::Map::Body::Planet::P32" : { - "image" : "p32", - "ore" : { - "anthracite" : 1, - "bauxite" : 2000, - "beryl" : 2000, - "chalcopyrite" : 1, - "chromite" : 2000, - "fluorite" : 1, - "galena" : 1, - "goethite" : 2000, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 2000, - "methane" : 1, - "monazite" : 1, - "rutile" : 2000, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 8600 - }, - "Lacuna::DB::Result::Map::Body::Planet::P33" : { - "image" : "p33", - "ore" : { - "anthracite" : 1000, - "bauxite" : 1000, - "beryl" : 1000, - "chalcopyrite" : 1000, - "chromite" : 1000, - "fluorite" : 1000, - "galena" : 1000, - "goethite" : 1000, - "gold" : 1000, - "gypsum" : 1000, - "halite" : 1000, - "kerogen" : 1000, - "magnetite" : 1000, - "methane" : 1000, - "monazite" : 1000, - "rutile" : 1000, - "sulfur" : 1000, - "trona" : 1000, - "uraninite" : 1000, - "zircon" : 1000 - }, - "water" : 6000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P34" : { - "image" : "p34", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 2000, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 2000, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 2000, - "methane" : 1, - "monazite" : 2000, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 2000 - }, - "water" : 7575 - }, - "Lacuna::DB::Result::Map::Body::Planet::P35" : { - "image" : "p35", - "ore" : { - "anthracite" : 500, - "bauxite" : 500, - "beryl" : 500, - "chalcopyrite" : 500, - "chromite" : 500, - "fluorite" : 500, - "galena" : 500, - "goethite" : 500, - "gold" : 500, - "gypsum" : 500, - "halite" : 500, - "kerogen" : 500, - "magnetite" : 500, - "methane" : 500, - "monazite" : 500, - "rutile" : 500, - "sulfur" : 500, - "trona" : 500, - "uraninite" : 500, - "zircon" : 500 - }, - "water" : 11500 - }, - "Lacuna::DB::Result::Map::Body::Planet::P36" : { - "image" : "p36", - "ore" : { - "anthracite" : 1, - "bauxite" : 100, - "beryl" : 1, - "chalcopyrite" : 100, - "chromite" : 100, - "fluorite" : 1, - "galena" : 1, - "goethite" : 100, - "gold" : 1, - "gypsum" : 100, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 100, - "rutile" : 100, - "sulfur" : 100, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 30000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P37" : { - "image" : "p37", - "ore" : { - "anthracite" : 2000, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 2000, - "magnetite" : 2000, - "methane" : 1, - "monazite" : 2000, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 2000, - "zircon" : 1 - }, - "water" : 6225 - }, - "Lacuna::DB::Result::Map::Body::Planet::P38" : { - "image" : "p38", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 3000, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 7000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 8000 - }, - "Lacuna::DB::Result::Map::Body::Planet::P39" : { - "image" : "p39", - "ore" : { - "anthracite" : 500, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 500, - "halite" : 1, - "kerogen" : 1500, - "magnetite" : 1, - "methane" : 4000, - "monazite" : 1500, - "rutile" : 1, - "sulfur" : 2000, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 7135 - }, - "Lacuna::DB::Result::Map::Body::Planet::P4" : { - "image" : "p4", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1000, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1500, - "gold" : 1, - "gypsum" : 1500, - "halite" : 1, - "kerogen" : 1500, - "magnetite" : 1500, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1500, - "trona" : 1, - "uraninite" : 1500, - "zircon" : 1 - }, - "water" : 8888 - }, - "Lacuna::DB::Result::Map::Body::Planet::P40" : { - "image" : "p40", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 4000, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 4000, - "trona" : 2000, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 8350 - }, - "Lacuna::DB::Result::Map::Body::Planet::P5" : { - "image" : "p5", - "ore" : { - "anthracite" : 1, - "bauxite" : 2250, - "beryl" : 1, - "chalcopyrite" : 250, - "chromite" : 1, - "fluorite" : 1, - "galena" : 2250, - "goethite" : 1250, - "gold" : 1, - "gypsum" : 1250, - "halite" : 250, - "kerogen" : 1, - "magnetite" : 250, - "methane" : 250, - "monazite" : 1, - "rutile" : 1250, - "sulfur" : 250, - "trona" : 250, - "uraninite" : 250, - "zircon" : 1 - }, - "water" : 6200 - }, - "Lacuna::DB::Result::Map::Body::Planet::P6" : { - "image" : "p6", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1400, - "gold" : 1, - "gypsum" : 1500, - "halite" : 1000, - "kerogen" : 1, - "magnetite" : 1900, - "methane" : 1200, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1700, - "trona" : 1300, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 6905 - }, - "Lacuna::DB::Result::Map::Body::Planet::P7" : { - "image" : "p7", - "ore" : { - "anthracite" : 1, - "bauxite" : 1700, - "beryl" : 1000, - "chalcopyrite" : 2800, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 2400, - "gold" : 1, - "gypsum" : 2100, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 5700 - }, - "Lacuna::DB::Result::Map::Body::Planet::P8" : { - "image" : "p8", - "ore" : { - "anthracite" : 3100, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1250, - "halite" : 1300, - "kerogen" : 3100, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1250, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 5100 - }, - "Lacuna::DB::Result::Map::Body::Planet::P9" : { - "image" : "p9", - "ore" : { - "anthracite" : 100, - "bauxite" : 300, - "beryl" : 1, - "chalcopyrite" : 100, - "chromite" : 900, - "fluorite" : 1, - "galena" : 200, - "goethite" : 200, - "gold" : 1, - "gypsum" : 600, - "halite" : 500, - "kerogen" : 1800, - "magnetite" : 100, - "methane" : 1700, - "monazite" : 1, - "rutile" : 800, - "sulfur" : 1600, - "trona" : 700, - "uraninite" : 400, - "zircon" : 1 - }, - "water" : 5304 - }, - "Lacuna::DB::Result::Map::Body::Planet::Station" : { - "image" : "station", - "ore" : { - "anthracite" : 1, - "bauxite" : 1, - "beryl" : 1, - "chalcopyrite" : 1, - "chromite" : 1, - "fluorite" : 1, - "galena" : 1, - "goethite" : 1, - "gold" : 1, - "gypsum" : 1, - "halite" : 1, - "kerogen" : 1, - "magnetite" : 1, - "methane" : 1, - "monazite" : 1, - "rutile" : 1, - "sulfur" : 1, - "trona" : 1, - "uraninite" : 1, - "zircon" : 1 - }, - "water" : 0 - } -} diff --git a/lacuna/config/boot.rb b/lacuna/config/boot.rb deleted file mode 100644 index b9e460ce..00000000 --- a/lacuna/config/boot.rb +++ /dev/null @@ -1,4 +0,0 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) - -require 'bundler/setup' # Set up gems listed in the Gemfile. -require 'bootsnap/setup' # Speed up boot time by caching expensive operations. diff --git a/lacuna/config/building_class_info.json b/lacuna/config/building_class_info.json deleted file mode 100644 index 32180dd7..00000000 --- a/lacuna/config/building_class_info.json +++ /dev/null @@ -1,1406 +0,0 @@ -{ - "Lacuna::DB::Result::Building::Archaeology" : { - "energy_to_build" : 240, - "food_to_build" : 210, - "image" : "archaeology", - "name" : "Archaeology Ministry", - "ore_to_build" : 210, - "url" : "/archaeology", - "water_to_build" : 190 - }, - "Lacuna::DB::Result::Building::Capitol" : { - "energy_to_build" : 350, - "food_to_build" : 350, - "image" : "capitol", - "name" : "Capitol", - "ore_to_build" : 350, - "url" : "/capitol", - "water_to_build" : 350 - }, - "Lacuna::DB::Result::Building::CloakingLab" : { - "energy_to_build" : 240, - "food_to_build" : 220, - "image" : "cloakinglab", - "name" : "Cloaking Lab", - "ore_to_build" : 240, - "url" : "/cloakinglab", - "water_to_build" : 220 - }, - "Lacuna::DB::Result::Building::DeployedBleeder" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "deployedbleeder", - "name" : "Deployed Bleeder", - "ore_to_build" : 0, - "url" : "/deployedbleeder", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Development" : { - "energy_to_build" : 77, - "food_to_build" : 78, - "image" : "devel", - "name" : "Development Ministry", - "ore_to_build" : 77, - "url" : "/development", - "water_to_build" : 78 - }, - "Lacuna::DB::Result::Building::DistributionCenter" : { - "energy_to_build" : 250, - "food_to_build" : 250, - "image" : "distributioncenter", - "name" : "Distribution Center", - "ore_to_build" : 250, - "url" : "/distributioncenter", - "water_to_build" : 250 - }, - "Lacuna::DB::Result::Building::Embassy" : { - "energy_to_build" : 65, - "food_to_build" : 65, - "image" : "embassy", - "name" : "Embassy", - "ore_to_build" : 65, - "url" : "/embassy", - "water_to_build" : 65 - }, - "Lacuna::DB::Result::Building::Energy::Fission" : { - "energy_to_build" : 365, - "food_to_build" : 250, - "image" : "fission", - "name" : "Fission Reactor", - "ore_to_build" : 365, - "url" : "/fission", - "water_to_build" : 330 - }, - "Lacuna::DB::Result::Building::Energy::Fusion" : { - "energy_to_build" : 340, - "food_to_build" : 270, - "image" : "fusion", - "name" : "Fusion Reactor", - "ore_to_build" : 320, - "url" : "/fusion", - "water_to_build" : 240 - }, - "Lacuna::DB::Result::Building::Energy::Geo" : { - "energy_to_build" : 18, - "food_to_build" : 140, - "image" : "geo", - "name" : "Geo Energy Plant", - "ore_to_build" : 140, - "url" : "/geo", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Energy::Hydrocarbon" : { - "energy_to_build" : 260, - "food_to_build" : 300, - "image" : "hydrocarbon", - "name" : "Hydrocarbon Energy Plant", - "ore_to_build" : 330, - "url" : "/hydrocarbon", - "water_to_build" : 300 - }, - "Lacuna::DB::Result::Building::Energy::Reserve" : { - "energy_to_build" : 100, - "food_to_build" : 100, - "image" : "energy-reserve", - "name" : "Energy Reserve", - "ore_to_build" : 100, - "url" : "/energyreserve", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Energy::Singularity" : { - "energy_to_build" : 1105, - "food_to_build" : 1000, - "image" : "singularity", - "name" : "Singularity Energy Plant", - "ore_to_build" : 1400, - "url" : "/singularity", - "water_to_build" : 1100 - }, - "Lacuna::DB::Result::Building::Energy::Waste" : { - "energy_to_build" : 170, - "food_to_build" : 180, - "image" : "wasteenergy", - "name" : "Waste Energy Plant", - "ore_to_build" : 150, - "url" : "/wasteenergy", - "water_to_build" : 190 - }, - "Lacuna::DB::Result::Building::EntertainmentDistrict" : { - "energy_to_build" : 160, - "food_to_build" : 160, - "image" : "entertainment", - "name" : "Entertainment District", - "ore_to_build" : 190, - "url" : "/entertainment", - "water_to_build" : 160 - }, - "Lacuna::DB::Result::Building::Espionage" : { - "energy_to_build" : 77, - "food_to_build" : 78, - "image" : "espionage", - "name" : "Espionage Ministry", - "ore_to_build" : 77, - "url" : "/espionage", - "water_to_build" : 78 - }, - "Lacuna::DB::Result::Building::Food::Algae" : { - "energy_to_build" : 115, - "food_to_build" : 10, - "image" : "algae", - "name" : "Algae Cropper", - "ore_to_build" : 105, - "url" : "/algae", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Food::Apple" : { - "energy_to_build" : 50, - "food_to_build" : 25, - "image" : "apples", - "name" : "Apple Orchard", - "ore_to_build" : 55, - "url" : "/apple", - "water_to_build" : 175 - }, - "Lacuna::DB::Result::Building::Food::Bean" : { - "energy_to_build" : 61, - "food_to_build" : 10, - "image" : "beans", - "name" : "Amalgus Bean Plantation", - "ore_to_build" : 55, - "url" : "/bean", - "water_to_build" : 40 - }, - "Lacuna::DB::Result::Building::Food::Beeldeban" : { - "energy_to_build" : 100, - "food_to_build" : 100, - "image" : "beeldeban", - "name" : "Beeldeban Herder", - "ore_to_build" : 125, - "url" : "/beeldeban", - "water_to_build" : 76 - }, - "Lacuna::DB::Result::Building::Food::Bread" : { - "energy_to_build" : 150, - "food_to_build" : 150, - "image" : "bread", - "name" : "Bread Bakery", - "ore_to_build" : 150, - "url" : "/bread", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Food::Burger" : { - "energy_to_build" : 135, - "food_to_build" : 135, - "image" : "burger", - "name" : "Malcud Burger Packer", - "ore_to_build" : 135, - "url" : "/burger", - "water_to_build" : 135 - }, - "Lacuna::DB::Result::Building::Food::Cheese" : { - "energy_to_build" : 175, - "food_to_build" : 175, - "image" : "cheese", - "name" : "Cheese Maker", - "ore_to_build" : 175, - "url" : "/cheese", - "water_to_build" : 175 - }, - "Lacuna::DB::Result::Building::Food::Chip" : { - "energy_to_build" : 160, - "food_to_build" : 160, - "image" : "chips", - "name" : "Denton Root Chip Frier", - "ore_to_build" : 160, - "url" : "/chip", - "water_to_build" : 160 - }, - "Lacuna::DB::Result::Building::Food::Cider" : { - "energy_to_build" : 170, - "food_to_build" : 160, - "image" : "cider", - "name" : "Apple Cider Bottler", - "ore_to_build" : 150, - "url" : "/cider", - "water_to_build" : 170 - }, - "Lacuna::DB::Result::Building::Food::Corn" : { - "energy_to_build" : 70, - "food_to_build" : 10, - "image" : "corn", - "name" : "Corn Plantation", - "ore_to_build" : 55, - "url" : "/corn", - "water_to_build" : 83 - }, - "Lacuna::DB::Result::Building::Food::CornMeal" : { - "energy_to_build" : 140, - "food_to_build" : 140, - "image" : "meal", - "name" : "Corn Meal Grinder", - "ore_to_build" : 140, - "url" : "/cornmeal", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Food::Dairy" : { - "energy_to_build" : 100, - "food_to_build" : 200, - "image" : "dairy", - "name" : "Dairy Farm", - "ore_to_build" : 150, - "url" : "/dairy", - "water_to_build" : 200 - }, - "Lacuna::DB::Result::Building::Food::Lapis" : { - "energy_to_build" : 71, - "food_to_build" : 15, - "image" : "lapis", - "name" : "Lapis Orchard", - "ore_to_build" : 75, - "url" : "/lapis", - "water_to_build" : 140 - }, - "Lacuna::DB::Result::Building::Food::Malcud" : { - "energy_to_build" : 60, - "food_to_build" : 10, - "image" : "malcud", - "name" : "Malcud Fungus Farm", - "ore_to_build" : 46, - "url" : "/malcud", - "water_to_build" : 30 - }, - "Lacuna::DB::Result::Building::Food::Pancake" : { - "energy_to_build" : 125, - "food_to_build" : 125, - "image" : "pancake", - "name" : "Potato Pancake Factory", - "ore_to_build" : 125, - "url" : "/pancake", - "water_to_build" : 125 - }, - "Lacuna::DB::Result::Building::Food::Pie" : { - "energy_to_build" : 135, - "food_to_build" : 135, - "image" : "pie", - "name" : "Lapis Pie Bakery", - "ore_to_build" : 135, - "url" : "/pie", - "water_to_build" : 135 - }, - "Lacuna::DB::Result::Building::Food::Potato" : { - "energy_to_build" : 90, - "food_to_build" : 10, - "image" : "potato", - "name" : "Potato Patch", - "ore_to_build" : 56, - "url" : "/potato", - "water_to_build" : 10 - }, - "Lacuna::DB::Result::Building::Food::Reserve" : { - "energy_to_build" : 45, - "food_to_build" : 45, - "image" : "food-reserve", - "name" : "Food Reserve", - "ore_to_build" : 45, - "url" : "/foodreserve", - "water_to_build" : 45 - }, - "Lacuna::DB::Result::Building::Food::Root" : { - "energy_to_build" : 100, - "food_to_build" : 10, - "image" : "roots", - "name" : "Denton Root Patch", - "ore_to_build" : 52, - "url" : "/denton", - "water_to_build" : 10 - }, - "Lacuna::DB::Result::Building::Food::Shake" : { - "energy_to_build" : 135, - "food_to_build" : 125, - "image" : "shake", - "name" : "Beeldeban Protein Shake Factory", - "ore_to_build" : 135, - "url" : "/shake", - "water_to_build" : 125 - }, - "Lacuna::DB::Result::Building::Food::Soup" : { - "energy_to_build" : 125, - "food_to_build" : 125, - "image" : "cannery", - "name" : "Amalgus Bean Soup Cannery", - "ore_to_build" : 168, - "url" : "/soup", - "water_to_build" : 125 - }, - "Lacuna::DB::Result::Building::Food::Syrup" : { - "energy_to_build" : 150, - "food_to_build" : 150, - "image" : "syrup", - "name" : "Algae Syrup Bottler", - "ore_to_build" : 150, - "url" : "/syrup", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Food::Wheat" : { - "energy_to_build" : 100, - "food_to_build" : 15, - "image" : "wheat", - "name" : "Wheat Farm", - "ore_to_build" : 75, - "url" : "/wheat", - "water_to_build" : 20 - }, - "Lacuna::DB::Result::Building::GasGiantLab" : { - "energy_to_build" : 300, - "food_to_build" : 300, - "image" : "gas-giant-lab", - "name" : "Gas Giant Lab", - "ore_to_build" : 340, - "url" : "/gasgiantlab", - "water_to_build" : 300 - }, - "Lacuna::DB::Result::Building::GeneticsLab" : { - "energy_to_build" : 330, - "food_to_build" : 315, - "image" : "geneticslab", - "name" : "Genetics Lab", - "ore_to_build" : 300, - "url" : "/geneticslab", - "water_to_build" : 280 - }, - "Lacuna::DB::Result::Building::IntelTraining" : { - "energy_to_build" : 99, - "food_to_build" : 100, - "image" : "inteltraining", - "name" : "Intel Training", - "ore_to_build" : 99, - "url" : "/inteltraining", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Intelligence" : { - "energy_to_build" : 82, - "food_to_build" : 83, - "image" : "intelligence", - "name" : "Intelligence Ministry", - "ore_to_build" : 82, - "url" : "/intelligence", - "water_to_build" : 83 - }, - "Lacuna::DB::Result::Building::LCOTa" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcota", - "name" : "Lost City of Tyleon (A)", - "ore_to_build" : 4250, - "url" : "/lcota", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTb" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcotb", - "name" : "Lost City of Tyleon (B)", - "ore_to_build" : 4250, - "url" : "/lcotb", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTc" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcoti", - "name" : "Lost City of Tyleon (C)", - "ore_to_build" : 4250, - "url" : "/lcotc", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTd" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcoth", - "name" : "Lost City of Tyleon (D)", - "ore_to_build" : 4250, - "url" : "/lcotd", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTe" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcotg", - "name" : "Lost City of Tyleon (E)", - "ore_to_build" : 4250, - "url" : "/lcote", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTf" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcotf", - "name" : "Lost City of Tyleon (F)", - "ore_to_build" : 4250, - "url" : "/lcotf", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTg" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcotc", - "name" : "Lost City of Tyleon (G)", - "ore_to_build" : 4250, - "url" : "/lcotg", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTh" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcotd", - "name" : "Lost City of Tyleon (H)", - "ore_to_build" : 4250, - "url" : "/lcoth", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LCOTi" : { - "energy_to_build" : 4250, - "food_to_build" : 4250, - "image" : "lcote", - "name" : "Lost City of Tyleon (I)", - "ore_to_build" : 4250, - "url" : "/lcoti", - "water_to_build" : 4250 - }, - "Lacuna::DB::Result::Building::LuxuryHousing" : { - "energy_to_build" : 640, - "food_to_build" : 640, - "image" : "luxuryhousing", - "name" : "Luxury Housing", - "ore_to_build" : 760, - "url" : "/luxuryhousing", - "water_to_build" : 760 - }, - "Lacuna::DB::Result::Building::MayhemTraining" : { - "energy_to_build" : 99, - "food_to_build" : 100, - "image" : "mayhemtraining", - "name" : "Mayhem Training", - "ore_to_build" : 99, - "url" : "/mayhemtraining", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::MercenariesGuild" : { - "energy_to_build" : 800, - "food_to_build" : 700, - "image" : "mercenariesguild", - "name" : "Mercenaries Guild", - "ore_to_build" : 900, - "url" : "/mercenariesguild", - "water_to_build" : 700 - }, - "Lacuna::DB::Result::Building::MissionCommand" : { - "energy_to_build" : 90, - "food_to_build" : 85, - "image" : "missioncommand", - "name" : "Mission Command", - "ore_to_build" : 110, - "url" : "/missioncommand", - "water_to_build" : 90 - }, - "Lacuna::DB::Result::Building::Module::ArtMuseum" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "artmuseum", - "name" : "Art Museum", - "ore_to_build" : 500, - "url" : "/artmuseum", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::CulinaryInstitute" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "culinaryinstitute", - "name" : "Culinary Institute", - "ore_to_build" : 500, - "url" : "/culinaryinstitute", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::IBS" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "ibs", - "name" : "Interstellar Broadcast System", - "ore_to_build" : 500, - "url" : "/ibs", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::OperaHouse" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "operahouse", - "name" : "Opera House", - "ore_to_build" : 500, - "url" : "/operahouse", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::Parliament" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "parliament", - "name" : "Parliament", - "ore_to_build" : 500, - "url" : "/parliament", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::PoliceStation" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "policestation", - "name" : "Police Station", - "ore_to_build" : 500, - "url" : "/policestation", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::StationCommand" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "stationcommand", - "name" : "Station Command Center", - "ore_to_build" : 500, - "url" : "/stationcommand", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::Module::Warehouse" : { - "energy_to_build" : 500, - "food_to_build" : 100, - "image" : "warehouse", - "name" : "Warehouse", - "ore_to_build" : 500, - "url" : "/warehouse", - "water_to_build" : 150 - }, - "Lacuna::DB::Result::Building::MunitionsLab" : { - "energy_to_build" : 250, - "food_to_build" : 220, - "image" : "munitionslab", - "name" : "Munitions Lab", - "ore_to_build" : 250, - "url" : "/munitionslab", - "water_to_build" : 220 - }, - "Lacuna::DB::Result::Building::Network19" : { - "energy_to_build" : 98, - "food_to_build" : 98, - "image" : "network19", - "name" : "Network 19 Affiliate", - "ore_to_build" : 100, - "url" : "/network19", - "water_to_build" : 98 - }, - "Lacuna::DB::Result::Building::Observatory" : { - "energy_to_build" : 63, - "food_to_build" : 63, - "image" : "observatory", - "name" : "Observatory", - "ore_to_build" : 63, - "url" : "/observatory", - "water_to_build" : 63 - }, - "Lacuna::DB::Result::Building::Ore::Mine" : { - "energy_to_build" : 100, - "food_to_build" : 85, - "image" : "mine", - "name" : "Mine", - "ore_to_build" : 10, - "url" : "/mine", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Ore::Ministry" : { - "energy_to_build" : 139, - "food_to_build" : 137, - "image" : "miningministry", - "name" : "Mining Ministry", - "ore_to_build" : 137, - "url" : "/miningministry", - "water_to_build" : 137 - }, - "Lacuna::DB::Result::Building::Ore::Refinery" : { - "energy_to_build" : 148, - "food_to_build" : 147, - "image" : "orerefinery", - "name" : "Ore Refinery", - "ore_to_build" : 147, - "url" : "/orerefinery", - "water_to_build" : 148 - }, - "Lacuna::DB::Result::Building::Ore::Storage" : { - "energy_to_build" : 10, - "food_to_build" : 10, - "image" : "orestorage", - "name" : "Ore Storage Tanks", - "ore_to_build" : 10, - "url" : "/orestorage", - "water_to_build" : 10 - }, - "Lacuna::DB::Result::Building::Oversight" : { - "energy_to_build" : 50, - "food_to_build" : 50, - "image" : "oversight", - "name" : "Oversight Ministry", - "ore_to_build" : 50, - "url" : "/oversight", - "water_to_build" : 50 - }, - "Lacuna::DB::Result::Building::Park" : { - "energy_to_build" : 20, - "food_to_build" : 20, - "image" : "park", - "name" : "Park", - "ore_to_build" : 20, - "url" : "/park", - "water_to_build" : 20 - }, - "Lacuna::DB::Result::Building::Permanent::AlgaePond" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "algaepond", - "name" : "Algae Pond", - "ore_to_build" : 0, - "url" : "/algaepond", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::AmalgusMeadow" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "amalgusmeadow", - "name" : "Amalgus Meadow", - "ore_to_build" : 0, - "url" : "/amalgusmeadow", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach1" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach1", - "name" : "Beach [1]", - "ore_to_build" : 0, - "url" : "/beach1", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach10" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach10", - "name" : "Beach [10]", - "ore_to_build" : 0, - "url" : "/beach10", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach11" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach11", - "name" : "Beach [11]", - "ore_to_build" : 0, - "url" : "/beach11", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach12" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach12", - "name" : "Beach [12]", - "ore_to_build" : 0, - "url" : "/beach12", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach13" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach13", - "name" : "Beach [13]", - "ore_to_build" : 0, - "url" : "/beach13", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach2" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach2", - "name" : "Beach [2]", - "ore_to_build" : 0, - "url" : "/beach2", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach3" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach3", - "name" : "Beach [3]", - "ore_to_build" : 0, - "url" : "/beach3", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach4" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach4", - "name" : "Beach [4]", - "ore_to_build" : 0, - "url" : "/beach4", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach5" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach5", - "name" : "Beach [5]", - "ore_to_build" : 0, - "url" : "/beach5", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach6" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach6", - "name" : "Beach [6]", - "ore_to_build" : 0, - "url" : "/beach6", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach7" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach7", - "name" : "Beach [7]", - "ore_to_build" : 0, - "url" : "/beach7", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach8" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach8", - "name" : "Beach [8]", - "ore_to_build" : 0, - "url" : "/beach8", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Beach9" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beach9", - "name" : "Beach [9]", - "ore_to_build" : 0, - "url" : "/beach9", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::BeeldebanNest" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "beeldebannest", - "name" : "Beeldeban Nest", - "ore_to_build" : 0, - "url" : "/beeldebannest", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::BlackHoleGenerator" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "blackholegenerator", - "name" : "Black Hole Generator", - "ore_to_build" : 0, - "url" : "/blackholegenerator", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::CitadelOfKnope" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "citadelofknope", - "name" : "Citadel of Knope", - "ore_to_build" : 0, - "url" : "/citadelofknope", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::CrashedShipSite" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "crashedshipsite", - "name" : "Crashed Ship Site", - "ore_to_build" : 0, - "url" : "/crashedshipsite", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Crater" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "crater", - "name" : "Crater", - "ore_to_build" : 0, - "url" : "/crater", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::DentonBrambles" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "dentonbrambles", - "name" : "Denton Brambles", - "ore_to_build" : 0, - "url" : "/dentonbrambles", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::EssentiaVein" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "essentiavein", - "name" : "Essentia Vein", - "ore_to_build" : 0, - "url" : "/essentiavein", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Fissure" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "fissure", - "name" : "Fissure", - "ore_to_build" : 0, - "url" : "/fissure", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::GasGiantPlatform" : { - "energy_to_build" : 1500, - "food_to_build" : 0, - "image" : "gas-giant-platform", - "name" : "Gas Giant Settlement Platform", - "ore_to_build" : 1500, - "url" : "/gasgiantplatform", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::GeoThermalVent" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "geothermalvent", - "name" : "Geo Thermal Vent", - "ore_to_build" : 0, - "url" : "/geothermalvent", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::GratchsGauntlet" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "gratchsgauntlet", - "name" : "Gratch's Gauntlet", - "ore_to_build" : 0, - "url" : "/gratchsgauntlet", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::GreatBallOfJunk" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "greatballofjunk", - "name" : "Great Ball of Junk", - "ore_to_build" : 0, - "url" : "/greatballofjunk", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Grove" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "grove", - "name" : "Grove of Trees", - "ore_to_build" : 0, - "url" : "/grove", - "water_to_build" : 1 - }, - "Lacuna::DB::Result::Building::Permanent::HallsOfVrbansk" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "hallsofvrbansk", - "name" : "Halls of Vrbansk", - "ore_to_build" : 0, - "url" : "/hallsofvrbansk", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::InterDimensionalRift" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "interdimensionalrift", - "name" : "Interdimensional Rift", - "ore_to_build" : 0, - "url" : "/interdimensionalrift", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::JunkHengeSculpture" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "junkhengesculpture", - "name" : "Junk Henge Sculpture", - "ore_to_build" : 0, - "url" : "/junkhengesculpture", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::KalavianRuins" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "kalavianruins", - "name" : "Kalavian Ruins", - "ore_to_build" : 0, - "url" : "/kalavianruins", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::KasternsKeep" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "kasternskeep", - "name" : "Kastern's Keep", - "ore_to_build" : 0, - "url" : "/kasternskeep", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Lagoon" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "lagoon", - "name" : "Lagoon", - "ore_to_build" : 1, - "url" : "/lagoon", - "water_to_build" : 1 - }, - "Lacuna::DB::Result::Building::Permanent::Lake" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "lake", - "name" : "Lake", - "ore_to_build" : 0, - "url" : "/lake", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::LapisForest" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "lapisforest", - "name" : "Lapis Forest", - "ore_to_build" : 0, - "url" : "/lapisforest", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::LibraryOfJith" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "libraryjith", - "name" : "Library of Jith", - "ore_to_build" : 0, - "url" : "/libraryofjith", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::MalcudField" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "malcudfield", - "name" : "Malcud Field", - "ore_to_build" : 0, - "url" : "/malcudfield", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::MassadsHenge" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "massadshenge", - "name" : "Massad's Henge", - "ore_to_build" : 0, - "url" : "/massadshenge", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::MetalJunkArches" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "metaljunkarches", - "name" : "Metal Junk Arches", - "ore_to_build" : 0, - "url" : "/metaljunkarches", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::NaturalSpring" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "naturalspring", - "name" : "Natural Spring", - "ore_to_build" : 0, - "url" : "/naturalspring", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::OracleOfAnid" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "oracleanid", - "name" : "Oracle of Anid", - "ore_to_build" : 0, - "url" : "/oracleofanid", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::PantheonOfHagness" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "pantheonofhagness", - "name" : "Pantheon of Hagness", - "ore_to_build" : 0, - "url" : "/pantheonofhagness", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::PyramidJunkSculpture" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "pyramidjunksculpture", - "name" : "Pyramid Junk Sculpture", - "ore_to_build" : 0, - "url" : "/pyramidjunksculpture", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Ravine" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "ravine", - "name" : "Ravine", - "ore_to_build" : 0, - "url" : "/ravine", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::RockyOutcrop" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "rockyoutcrop", - "name" : "Rocky Outcropping", - "ore_to_build" : 0, - "url" : "/rockyoutcrop", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Sand" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "sand", - "name" : "Patch of Sand", - "ore_to_build" : 1, - "url" : "/sand", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::SpaceJunkPark" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "spacejunkpark", - "name" : "Space Junk Park", - "ore_to_build" : 0, - "url" : "/spacejunkpark", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::TempleOfTheDrajilites" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "templedrajilites", - "name" : "Temple of the Drajilites", - "ore_to_build" : 0, - "url" : "/templeofthedrajilites", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::TerraformingPlatform" : { - "energy_to_build" : 800, - "food_to_build" : 0, - "image" : "terraformingplatform", - "name" : "Terraforming Platform", - "ore_to_build" : 800, - "url" : "/terraformingplatform", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::TheDillonForge" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "thedillonforge", - "name" : "The Dillon Forge", - "ore_to_build" : 0, - "url" : "/thedillonforge", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::Permanent::Volcano" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "volcano", - "name" : "Volcano", - "ore_to_build" : 0, - "url" : "/volcano", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::PilotTraining" : { - "energy_to_build" : 230, - "food_to_build" : 220, - "image" : "pilottraining", - "name" : "Pilot Training Facility", - "ore_to_build" : 220, - "url" : "/pilottraining", - "water_to_build" : 230 - }, - "Lacuna::DB::Result::Building::PlanetaryCommand" : { - "energy_to_build" : 320, - "food_to_build" : 320, - "image" : "command", - "name" : "Planetary Command Center", - "ore_to_build" : 320, - "url" : "/planetarycommand", - "water_to_build" : 320 - }, - "Lacuna::DB::Result::Building::PoliticsTraining" : { - "energy_to_build" : 99, - "food_to_build" : 100, - "image" : "politicstraining", - "name" : "Politics Training", - "ore_to_build" : 99, - "url" : "/politicstraining", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Propulsion" : { - "energy_to_build" : 220, - "food_to_build" : 220, - "image" : "propulsion", - "name" : "Propulsion System Factory", - "ore_to_build" : 220, - "url" : "/propulsion", - "water_to_build" : 220 - }, - "Lacuna::DB::Result::Building::SAW" : { - "energy_to_build" : 250, - "food_to_build" : 180, - "image" : "saw", - "name" : "Shield Against Weapons", - "ore_to_build" : 250, - "url" : "/saw", - "water_to_build" : 200 - }, - "Lacuna::DB::Result::Building::SSLa" : { - "energy_to_build" : 350, - "food_to_build" : 230, - "image" : "ssla", - "name" : "Space Station Lab (A)", - "ore_to_build" : 370, - "url" : "/ssla", - "water_to_build" : 260 - }, - "Lacuna::DB::Result::Building::SSLb" : { - "energy_to_build" : 350, - "food_to_build" : 230, - "image" : "sslb", - "name" : "Space Station Lab (B)", - "ore_to_build" : 370, - "url" : "/sslb", - "water_to_build" : 260 - }, - "Lacuna::DB::Result::Building::SSLc" : { - "energy_to_build" : 350, - "food_to_build" : 230, - "image" : "sslc", - "name" : "Space Station Lab (C)", - "ore_to_build" : 370, - "url" : "/sslc", - "water_to_build" : 260 - }, - "Lacuna::DB::Result::Building::SSLd" : { - "energy_to_build" : 350, - "food_to_build" : 230, - "image" : "ssld", - "name" : "Space Station Lab (D)", - "ore_to_build" : 370, - "url" : "/ssld", - "water_to_build" : 260 - }, - "Lacuna::DB::Result::Building::Security" : { - "energy_to_build" : 100, - "food_to_build" : 90, - "image" : "security", - "name" : "Security Ministry", - "ore_to_build" : 120, - "url" : "/security", - "water_to_build" : 90 - }, - "Lacuna::DB::Result::Building::Shipyard" : { - "energy_to_build" : 75, - "food_to_build" : 75, - "image" : "shipyard", - "name" : "Shipyard", - "ore_to_build" : 75, - "url" : "/shipyard", - "water_to_build" : 75 - }, - "Lacuna::DB::Result::Building::SpacePort" : { - "energy_to_build" : 180, - "food_to_build" : 160, - "image" : "spaceport", - "name" : "Space Port", - "ore_to_build" : 220, - "url" : "/spaceport", - "water_to_build" : 160 - }, - "Lacuna::DB::Result::Building::Stockpile" : { - "energy_to_build" : 330, - "food_to_build" : 330, - "image" : "stockpile", - "name" : "Stockpile", - "ore_to_build" : 330, - "url" : "/stockpile", - "water_to_build" : 330 - }, - "Lacuna::DB::Result::Building::SubspaceSupplyDepot" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "subspacesupplydepot", - "name" : "Subspace Supply Depot", - "ore_to_build" : 0, - "url" : "/subspacesupplydepot", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::SupplyPod" : { - "energy_to_build" : 0, - "food_to_build" : 0, - "image" : "supply_pod", - "name" : "Supply Pod", - "ore_to_build" : 0, - "url" : "/supplypod", - "water_to_build" : 0 - }, - "Lacuna::DB::Result::Building::TerraformingLab" : { - "energy_to_build" : 340, - "food_to_build" : 310, - "image" : "terraforminglab", - "name" : "Terraforming Lab", - "ore_to_build" : 310, - "url" : "/terraforminglab", - "water_to_build" : 290 - }, - "Lacuna::DB::Result::Building::TheftTraining" : { - "energy_to_build" : 99, - "food_to_build" : 100, - "image" : "thefttraining", - "name" : "Theft Training", - "ore_to_build" : 99, - "url" : "/thefttraining", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::ThemePark" : { - "energy_to_build" : 1005, - "food_to_build" : 500, - "image" : "themepark", - "name" : "Theme Park", - "ore_to_build" : 900, - "url" : "/themepark", - "water_to_build" : 715 - }, - "Lacuna::DB::Result::Building::Trade" : { - "energy_to_build" : 75, - "food_to_build" : 75, - "image" : "trade", - "name" : "Trade Ministry", - "ore_to_build" : 75, - "url" : "/trade", - "water_to_build" : 75 - }, - "Lacuna::DB::Result::Building::Transporter" : { - "energy_to_build" : 800, - "food_to_build" : 700, - "image" : "transporter", - "name" : "Subspace Transporter", - "ore_to_build" : 900, - "url" : "/transporter", - "water_to_build" : 700 - }, - "Lacuna::DB::Result::Building::University" : { - "energy_to_build" : 190, - "food_to_build" : 190, - "image" : "university", - "name" : "University", - "ore_to_build" : 190, - "url" : "/university", - "water_to_build" : 190 - }, - "Lacuna::DB::Result::Building::Waste::Digester" : { - "energy_to_build" : 95, - "food_to_build" : 75, - "image" : "wastedigester", - "name" : "Waste Digester", - "ore_to_build" : 83, - "url" : "/wastedigester", - "water_to_build" : 95 - }, - "Lacuna::DB::Result::Building::Waste::Exchanger" : { - "energy_to_build" : 360, - "food_to_build" : 320, - "image" : "wasteexchanger", - "name" : "Waste Exchanger", - "ore_to_build" : 326, - "url" : "/wasteexchanger", - "water_to_build" : 410 - }, - "Lacuna::DB::Result::Building::Waste::Recycling" : { - "energy_to_build" : 75, - "food_to_build" : 75, - "image" : "wasterecycling", - "name" : "Waste Recycling Center", - "ore_to_build" : 70, - "url" : "/wasterecycling", - "water_to_build" : 100 - }, - "Lacuna::DB::Result::Building::Waste::Sequestration" : { - "energy_to_build" : 10, - "food_to_build" : 10, - "image" : "wastesequestration", - "name" : "Waste Sequestration Well", - "ore_to_build" : 10, - "url" : "/wastesequestration", - "water_to_build" : 10 - }, - "Lacuna::DB::Result::Building::Waste::Treatment" : { - "energy_to_build" : 95, - "food_to_build" : 75, - "image" : "wastetreatment", - "name" : "Waste Treatment Center", - "ore_to_build" : 83, - "url" : "/wastetreatment", - "water_to_build" : 95 - }, - "Lacuna::DB::Result::Building::Water::AtmosphericEvaporator" : { - "energy_to_build" : 560, - "food_to_build" : 630, - "image" : "atmosphericevaporator", - "name" : "Atmospheric Evaporator", - "ore_to_build" : 770, - "url" : "/atmosphericevaporator", - "water_to_build" : 70 - }, - "Lacuna::DB::Result::Building::Water::Production" : { - "energy_to_build" : 300, - "food_to_build" : 120, - "image" : "waterproduction", - "name" : "Water Production Plant", - "ore_to_build" : 350, - "url" : "/waterproduction", - "water_to_build" : 130 - }, - "Lacuna::DB::Result::Building::Water::Purification" : { - "energy_to_build" : 80, - "food_to_build" : 90, - "image" : "waterpurification", - "name" : "Water Purification Plant", - "ore_to_build" : 110, - "url" : "/waterpurification", - "water_to_build" : 10 - }, - "Lacuna::DB::Result::Building::Water::Reclamation" : { - "energy_to_build" : 191, - "food_to_build" : 175, - "image" : "waterreclamation", - "name" : "Water Reclamation Facility", - "ore_to_build" : 175, - "url" : "/waterreclamation", - "water_to_build" : 175 - }, - "Lacuna::DB::Result::Building::Water::Storage" : { - "energy_to_build" : 35, - "food_to_build" : 35, - "image" : "waterstorage", - "name" : "Water Storage Tank", - "ore_to_build" : 35, - "url" : "/waterstorage", - "water_to_build" : 35 - } -} diff --git a/lacuna/config/credentials.yml.enc b/lacuna/config/credentials.yml.enc deleted file mode 100644 index 2312cdd4..00000000 --- a/lacuna/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -ZrvX1+SyEE3bB8/16GZK2ypktZIRNZV7MfVo4zCzviK9oBk6u8y08svhFOQmNC9lFLtx+D6i+YvJoPRbdpy6QIbPtK65eskRYcEuj34VIqQwbNbHZ2F0jeFkEgTkaRtzOXkW2Ay1ODK5C8h6ibNcYJb4XJj6aiIjIbDfqGBvzXoWLRtrirPpcSbCz7UJor+f112IdsECS9T8CD6HzCds7Y1RcrxkzeC0k975uGMMsw6lk5N676T7hm95i4CSGw9fQsM3XZ/n6onTFD1jJ5iSuriHJjLo7Rq2vYgWNMD7HS6Lgoye+50FCPH367gpTC8NlqK6NqDMj2lLKwvfS68BUFQKVXnN5e8ktSHfQIWetAqLtFHahsIA1adcLt2adrZyovm893YYl2rZaoSjkcuemq2ECtrk6r9n+V3zV1jPGSF/cX96B6jjMfqbeWiddCjMnszjCtAKZaIA/xBX3Q+mONEH55MwUf3C4B4yzIcl/14HkYPaNT0VQBcm--+8x2LlJE/BYK1Ghg--Rs+g2MmDhEMCsLyghZ5b4w== \ No newline at end of file diff --git a/lacuna/config/database.yml b/lacuna/config/database.yml deleted file mode 100644 index 8d343294..00000000 --- a/lacuna/config/database.yml +++ /dev/null @@ -1,21 +0,0 @@ -default: &default - adapter: mysql2 - encoding: utf8 - pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %> - timeout: 5000 - reconnect: true - username: root - password: lacuna - port: 3306 - host: mysql - -development: - <<: *default - database: lacuna - -# Warning: The database defined as 'test' will be erased and -# re-generated from your development database when you run 'rake'. -# Do not set this db to the same as development or production. -test: - <<: *default - database: lacuna-test diff --git a/lacuna/config/environment.rb b/lacuna/config/environment.rb deleted file mode 100644 index 426333bb..00000000 --- a/lacuna/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the Rails application. -require_relative 'application' - -# Initialize the Rails application. -Rails.application.initialize! diff --git a/lacuna/config/environments/development.rb b/lacuna/config/environments/development.rb deleted file mode 100644 index df9b8933..00000000 --- a/lacuna/config/environments/development.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'active_support/core_ext/integer/time' - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Make code changes take effect immediately without server restart. - config.enable_reloading = true - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable server timing. - config.server_timing = true - - # Enable/disable Action Controller caching. By default Action Controller caching is disabled. - # Run rails dev:cache to toggle Action Controller caching. - if Rails.root.join('tmp/caching-dev.txt').exist? - config.public_file_server.headers = { 'cache-control' => "public, max-age=#{2.days.to_i}" } - else - config.action_controller.perform_caching = false - end - - # Change to :null_store to avoid any caching. - config.cache_store = :memory_store - - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - # Make template changes take effect immediately. - config.action_mailer.perform_caching = false - - # Set localhost to be used by links generated in mailer templates. - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Highlight code that triggered database queries in logs. - config.active_record.verbose_query_logs = true - - # Append comments with runtime information tags to SQL queries in logs. - config.active_record.query_log_tags_enabled = true - - # Highlight code that enqueued background job in logs. - config.active_job.verbose_enqueue_logs = true - - # Highlight code that triggered redirect in logs. - config.action_dispatch.verbose_redirect_logs = true - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - config.action_view.annotate_rendered_view_with_filenames = true - - # Uncomment if you wish to allow Action Cable access from any origin. - # config.action_cable.disable_request_forgery_protection = true - - # Raise error when a before_action's only/except options reference missing actions. - config.action_controller.raise_on_missing_callback_actions = true - - # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. - # config.generators.apply_rubocop_autocorrect_after_generate! -end diff --git a/lacuna/config/environments/production.rb b/lacuna/config/environments/production.rb deleted file mode 100644 index 2041cbaa..00000000 --- a/lacuna/config/environments/production.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'active_support/core_ext/integer/time' - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # Code is not reloaded between requests. - config.enable_reloading = false - - # Eager load code on boot for better performance and memory savings (ignored by Rake tasks). - config.eager_load = true - - # Full error reports are disabled. - config.consider_all_requests_local = false - - # Cache assets for far-future expiry since they are all digest stamped. - config.public_file_server.headers = { 'cache-control' => "public, max-age=#{1.year.to_i}" } - - # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = 'http://assets.example.com' - - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Assume all access to the app is happening through a SSL-terminating reverse proxy. - config.assume_ssl = true - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true - - # Skip http-to-https redirect for the default health check endpoint. - # config.ssl_options = { redirect: { exclude: ->(request) { request.path == '/up' } } } - - # Log to STDOUT with the current request id as a default log tag. - config.log_tags = [ :request_id ] - config.logger = ActiveSupport::TaggedLogging.logger(STDOUT) - - # Change to 'debug' to log everything (including potentially personally-identifiable information!). - config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') - - # Prevent health checks from clogging up the logs. - config.silence_healthcheck_path = '/up' - - # Don't log any deprecations. - config.active_support.report_deprecations = false - - # Replace the default in-process memory cache store with a durable alternative. - # config.cache_store = :mem_cache_store - - # Replace the default in-process and non-durable queuing backend for Active Job. - # config.active_job.queue_adapter = :resque - - # Ignore bad email addresses and do not raise email delivery errors. - # Set this to true and configure the email server for immediate delivery to raise delivery errors. - # config.action_mailer.raise_delivery_errors = false - - # Set host to be used by links generated in mailer templates. - config.action_mailer.default_url_options = { host: 'example.com' } - - # Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit. - # config.action_mailer.smtp_settings = { - # user_name: Rails.application.credentials.dig(:smtp, :user_name), - # password: Rails.application.credentials.dig(:smtp, :password), - # address: 'smtp.example.com', - # port: 587, - # authentication: :plain - # } - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = true - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false - - # Only use :id for inspections in production. - config.active_record.attributes_for_inspect = [ :id ] - - # Enable DNS rebinding protection and other `Host` header attacks. - # config.hosts = [ - # 'example.com', # Allow requests from example.com - # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` - # ] - # - # Skip DNS rebinding protection for the default health check endpoint. - # config.host_authorization = { exclude: ->(request) { request.path == '/up' } } -end diff --git a/lacuna/config/environments/test.rb b/lacuna/config/environments/test.rb deleted file mode 100644 index 0ac40ca7..00000000 --- a/lacuna/config/environments/test.rb +++ /dev/null @@ -1,53 +0,0 @@ -# The test environment is used exclusively to run your application's -# test suite. You never need to work with it otherwise. Remember that -# your test database is 'scratch space' for the test suite and is wiped -# and recreated between test runs. Don't rely on the data there! - -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # While tests run files are not watched, reloading is not necessary. - config.enable_reloading = false - - # Eager loading loads your entire application. When running a single test locally, - # this is usually not necessary, and can slow down your test suite. However, it's - # recommended that you enable it in continuous integration systems to ensure eager - # loading is working properly before deploying your code. - config.eager_load = ENV['CI'].present? - - # Configure public file server for tests with cache-control for performance. - config.public_file_server.headers = { 'cache-control' => 'public, max-age=3600' } - - # Show full error reports. - config.consider_all_requests_local = true - config.cache_store = :null_store - - # Render exception templates for rescuable exceptions and raise for other exceptions. - config.action_dispatch.show_exceptions = :rescuable - - # Disable request forgery protection in test environment. - config.action_controller.allow_forgery_protection = false - - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Set host to be used by links generated in mailer templates. - config.action_mailer.default_url_options = { host: 'example.com' } - - # Print deprecation notices to the stderr. - config.active_support.deprecation = :stderr - - # Raises error for missing translations. - # config.i18n.raise_on_missing_translations = true - - # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true - - # Raise error when a before_action's only/except options reference missing actions. - config.action_controller.raise_on_missing_callback_actions = true -end diff --git a/lacuna/config/initializers/cors.rb b/lacuna/config/initializers/cors.rb deleted file mode 100644 index fabad140..00000000 --- a/lacuna/config/initializers/cors.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Avoid CORS issues when API is called from the frontend app. -# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests. - -# Read more: https://github.com/cyu/rack-cors - -# Rails.application.config.middleware.insert_before 0, Rack::Cors do -# allow do -# origins 'example.com' -# -# resource '*', -# headers: :any, -# methods: [:get, :post, :put, :patch, :delete, :options, :head] -# end -# end diff --git a/lacuna/config/initializers/filter_parameter_logging.rb b/lacuna/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index c0b717f7..00000000 --- a/lacuna/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. -# Use this to limit dissemination of sensitive information. -# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc -] diff --git a/lacuna/config/initializers/inflections.rb b/lacuna/config/initializers/inflections.rb deleted file mode 100644 index e7b35c22..00000000 --- a/lacuna/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\\1en' -# inflect.singular /^(ox)en/i, '\\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/lacuna/config/initializers/memcached.rb b/lacuna/config/initializers/memcached.rb deleted file mode 100644 index 34f45768..00000000 --- a/lacuna/config/initializers/memcached.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'dalli' - -# Same memcached instance the Perl app writes sessions to -Rails.application.config.x.memcached = Dalli::Client.new('memcached:11211') diff --git a/lacuna/config/locales/en.yml b/lacuna/config/locales/en.yml deleted file mode 100644 index 65c926ff..00000000 --- a/lacuna/config/locales/en.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Files in the config/locales directory are used for internationalization and -# are automatically loaded by Rails. If you want to use locales other than -# English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t 'hello' -# -# In views, this is aliased to just `t`: -# -# <%= t('hello') %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more about the API, please read the Rails Internationalization guide -# at https://guides.rubyonrails.org/i18n.html. -# -# Be aware that YAML interprets the following case-insensitive strings as -# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings -# must be quoted to be interpreted as strings. For example: -# -# en: -# 'yes': yup -# enabled: 'ON' - -en: - hello: 'Hello world' diff --git a/lacuna/config/master.key b/lacuna/config/master.key deleted file mode 100644 index 9c22eb34..00000000 --- a/lacuna/config/master.key +++ /dev/null @@ -1 +0,0 @@ -b05b94b3b7911bd48ed0a181db474310 \ No newline at end of file diff --git a/lacuna/config/medals.json b/lacuna/config/medals.json deleted file mode 100644 index 1679fdd4..00000000 --- a/lacuna/config/medals.json +++ /dev/null @@ -1,1113 +0,0 @@ -{ - "20Stars" : { - "name" : "Won the Twenty Stars tournament" - }, - "A1" : { - "name" : "Mined A1 Type Asteroid" - }, - "A10" : { - "name" : "Mined A10 Type Asteroid" - }, - "A11" : { - "name" : "Mined A11 Type Asteroid" - }, - "A12" : { - "name" : "Mined A12 Type Asteroid" - }, - "A13" : { - "name" : "Mined A13 Type Asteroid" - }, - "A14" : { - "name" : "Mined A14 Type Asteroid" - }, - "A15" : { - "name" : "Mined A15 Type Asteroid" - }, - "A16" : { - "name" : "Mined A16 Type Asteroid" - }, - "A17" : { - "name" : "Mined A17 Type Asteroid" - }, - "A18" : { - "name" : "Mined A18 Type Asteroid" - }, - "A19" : { - "name" : "Mined A19 Type Asteroid" - }, - "A2" : { - "name" : "Mined A2 Type Asteroid" - }, - "A20" : { - "name" : "Mined A20 Type Asteroid" - }, - "A21" : { - "name" : "Mined Debris Field" - }, - "A22" : { - "name" : "Mined A22 Type Asteroid" - }, - "A23" : { - "name" : "Mined A23 Type Asteroid" - }, - "A24" : { - "name" : "Mined A24 Type Asteroid" - }, - "A25" : { - "name" : "Mined A25 Type Asteroid" - }, - "A26" : { - "name" : "Mined A26 Type Asteroid" - }, - "A3" : { - "name" : "Mined A3 Type Asteroid" - }, - "A4" : { - "name" : "Mined A4 Type Asteroid" - }, - "A5" : { - "name" : "Mined A5 Type Asteroid" - }, - "A6" : { - "name" : "Mined A6 Type Asteroid" - }, - "A7" : { - "name" : "Mined A7 Type Asteroid" - }, - "A8" : { - "name" : "Mined A8 Type Asteroid" - }, - "A9" : { - "name" : "Mined A9 Type Asteroid" - }, - "Algae" : { - "name" : "Built Algae Cropper" - }, - "AlgaePond" : { - "name" : "Discovered a Algae Pond" - }, - "AmalgusMeadow" : { - "name" : "Discovered an Amalgus Meadow" - }, - "Apple" : { - "name" : "Built Apple Orchard" - }, - "Archaeology" : { - "name" : "Built Archaeology Ministry" - }, - "ArtMuseum" : { - "name" : "Installed Art Museum" - }, - "AtmosphericEvaporator" : { - "name" : "Built Atmospheric Evaporator" - }, - "Beach1" : { - "name" : "Built Beach (section 1)" - }, - "Beach10" : { - "name" : "Built Beach (section 10)" - }, - "Beach11" : { - "name" : "Built Beach (section 11)" - }, - "Beach12" : { - "name" : "Built Beach (section 12)" - }, - "Beach13" : { - "name" : "Built Beach (section 13)" - }, - "Beach2" : { - "name" : "Built Beach (section 2)" - }, - "Beach3" : { - "name" : "Built Beach (section 3)" - }, - "Beach4" : { - "name" : "Built Beach (section 4)" - }, - "Beach5" : { - "name" : "Built Beach (section 5)" - }, - "Beach6" : { - "name" : "Built Beach (section 6)" - }, - "Beach7" : { - "name" : "Built Beach (section 7)" - }, - "Beach8" : { - "name" : "Built Beach (section 8)" - }, - "Beach9" : { - "name" : "Built Beach (section 9)" - }, - "Bean" : { - "name" : "Built Bean Plantation" - }, - "Beeldeban" : { - "name" : "Built Beeldeban Herder" - }, - "BeeldebanNest" : { - "name" : "Discovered a Beeldeban Nest" - }, - "BlackHoleGenerator" : { - "name" : "Discovered a Black Hole Generator" - }, - "Bread" : { - "name" : "Built Bakery" - }, - "Burger" : { - "name" : "Built Burger Factory" - }, - "Capitol" : { - "name" : "Built Capitol" - }, - "Cheese" : { - "name" : "Built Cheese Factory" - }, - "Chip" : { - "name" : "Built Chip Frier" - }, - "Cider" : { - "name" : "Built Cider Bottler" - }, - "CitadelOfKnope" : { - "name" : "Discovered the Citadel of Knope" - }, - "CloakingLab" : { - "name" : "Built Cloaking Lab" - }, - "Corn" : { - "name" : "Built Corn Plantation" - }, - "CornMeal" : { - "name" : "Built Corn Meal Grinder" - }, - "CrashedShipSite" : { - "name" : "Discovered a Crashed Ship Site" - }, - "Crater" : { - "name" : "Discovered a Crater" - }, - "CulinaryInstitute" : { - "name" : "Installed Culinary Institute" - }, - "Dairy" : { - "name" : "Built Dairy Farm" - }, - "Denton" : { - "name" : "Built Denton Root Farm" - }, - "DentonBrambles" : { - "name" : "Discovered Denton Brambles" - }, - "DeployedBleeder" : { - "name" : "Deployed a Bleeder" - }, - "Development" : { - "name" : "Built Development Ministry" - }, - "DistributionCenter" : { - "name" : "Built Distribution Center" - }, - "Embassy" : { - "name" : "Built Embassy" - }, - "EnergyReserve" : { - "name" : "Built Energy Reserve" - }, - "Entertainment" : { - "name" : "Built Entertainment District" - }, - "Espionage" : { - "name" : "Built Espionage Ministry" - }, - "EssentiaVein" : { - "name" : "Discovered a vein of Essentia" - }, - "Fission" : { - "name" : "Built Fission Reactor" - }, - "Fissure" : { - "name" : "Caused a Fissure" - }, - "FoodReserve" : { - "name" : "Built Food Reserve" - }, - "Fusion" : { - "name" : "Built Fusion Reactor" - }, - "G1" : { - "name" : "Settled G1 Type Gas Giant" - }, - "G2" : { - "name" : "Settled G2 Type Gas Giant" - }, - "G3" : { - "name" : "Settled G3 Type Gas Giant" - }, - "G4" : { - "name" : "Settled G4 Type Gas Giant" - }, - "G5" : { - "name" : "Settled G5 Type Gas Giant" - }, - "GasGiantLab" : { - "name" : "Built Gas Giant Lab" - }, - "GasGiantPlatform" : { - "name" : "Built Gas Giant Platform" - }, - "GeneticsLab" : { - "name" : "Built Genetics Lab" - }, - "Geo" : { - "name" : "Built Geo Energy Plant" - }, - "GeoThermalVent" : { - "name" : "Discovered a Geo Thermal Vent" - }, - "GratchsGauntlet" : { - "name" : "Discovered Gratch's Gauntlet" - }, - "GreatBallOfJunk" : { - "name" : "Built Great Ball of Junk" - }, - "Grove" : { - "name" : "Discovered a Grove of Trees" - }, - "HallsOfVrbansk" : { - "name" : "Discovered the Halls of Vrbansk" - }, - "Hydrocarbon" : { - "name" : "Built Hydrocarbon Energy Plant" - }, - "IBS" : { - "name" : "Installed Interstellar Broadcast System" - }, - "IntelTraining" : { - "name" : "Built Intel Training Facility" - }, - "Intelligence" : { - "name" : "Built Intelligence Ministry" - }, - "InterDimensionalRift" : { - "name" : "Discovered an Interdimensional Rift" - }, - "JunkHengeSculpture" : { - "name" : "Built Junk Henge Sculpture" - }, - "KalavianRuins" : { - "name" : "Discovered the Kalavian Ruins" - }, - "KasternsKeep" : { - "name" : "Discovered Kastern's Keep" - }, - "LCOTa" : { - "name" : "Discovered Lost City of Tyleon (A)" - }, - "LCOTb" : { - "name" : "Discovered Lost City of Tyleon (B)" - }, - "LCOTc" : { - "name" : "Discovered Lost City of Tyleon (C)" - }, - "LCOTd" : { - "name" : "Discovered Lost City of Tyleon (D)" - }, - "LCOTe" : { - "name" : "Discovered Lost City of Tyleon (E)" - }, - "LCOTf" : { - "name" : "Discovered Lost City of Tyleon (F)" - }, - "LCOTg" : { - "name" : "Discovered Lost City of Tyleon (G)" - }, - "LCOTh" : { - "name" : "Discovered Lost City of Tyleon (H)" - }, - "LCOTi" : { - "name" : "Discovered Lost City of Tyleon (I)" - }, - "Lagoon" : { - "name" : "Discovered a Lagoon" - }, - "Lake" : { - "name" : "Discovered a Lake" - }, - "Lapis" : { - "name" : "Built Lapis Orchard" - }, - "LapisForest" : { - "name" : "Discovered a Lapis Forest" - }, - "LibraryOfJith" : { - "name" : "Discovered the Library of Jith" - }, - "LuxuryHousing" : { - "name" : "Built Luxury Housing" - }, - "Malcud" : { - "name" : "Built Malcud Fungus Farm" - }, - "MalcudField" : { - "name" : "Discovered a Malcud Field" - }, - "MassadsHenge" : { - "name" : "Discovered Massad's Henge" - }, - "MayhemTraining" : { - "name" : "Built Mayhem Training Facility" - }, - "MercenariesGuild" : { - "name" : "Built Mercenaries Guild" - }, - "MetalJunkArches" : { - "name" : "Built Metal Junk Arches" - }, - "Mine" : { - "name" : "Built Mine" - }, - "MiningMinistry" : { - "name" : "Built Mining Ministry" - }, - "MiningPlatform" : { - "name" : "Built Mining Platform" - }, - "MissionCommand" : { - "name" : "Built Mission Command" - }, - "MunitionsLab" : { - "name" : "Built Munitions Lab" - }, - "NaturalSpring" : { - "name" : "Discovered a Natural Spring" - }, - "Network19" : { - "name" : "Built Network 19 Affiliate" - }, - "Observatory" : { - "name" : "Built Observatory" - }, - "OperaHouse" : { - "name" : "Installed Opera House" - }, - "OracleOfAnid" : { - "name" : "Discovered the Oracle of Anid" - }, - "OreRefinery" : { - "name" : "Built Ore Refinery" - }, - "OreStorage" : { - "name" : "Built Ore Storage Tank" - }, - "Oversight" : { - "name" : "Built Oversight Ministry" - }, - "P1" : { - "name" : "Settled P1 Type Planet" - }, - "P10" : { - "name" : "Settled P10 Type Planet" - }, - "P11" : { - "name" : "Settled P11 Type Planet" - }, - "P12" : { - "name" : "Settled P12 Type Planet" - }, - "P13" : { - "name" : "Settled P13 Type Planet" - }, - "P14" : { - "name" : "Settled P14 Type Planet" - }, - "P15" : { - "name" : "Settled P15 Type Planet" - }, - "P16" : { - "name" : "Settled P16 Type Planet" - }, - "P17" : { - "name" : "Settled P17 Type Planet" - }, - "P18" : { - "name" : "Settled P18 Type Planet" - }, - "P19" : { - "name" : "Settled P19 Type Planet" - }, - "P2" : { - "name" : "Settled P2 Type Planet" - }, - "P20" : { - "name" : "Settled P20 Type Planet" - }, - "P21" : { - "name" : "Settled P21 Type Planet" - }, - "P22" : { - "name" : "Settled P22 Type Planet" - }, - "P23" : { - "name" : "Settled P23 Type Planet" - }, - "P24" : { - "name" : "Settled P24 Type Planet" - }, - "P25" : { - "name" : "Settled P25 Type Planet" - }, - "P26" : { - "name" : "Settled P26 Type Planet" - }, - "P27" : { - "name" : "Settled P27 Type Planet" - }, - "P28" : { - "name" : "Settled P28 Type Planet" - }, - "P29" : { - "name" : "Settled P29 Type Planet" - }, - "P3" : { - "name" : "Settled P3 Type Planet" - }, - "P30" : { - "name" : "Settled P30 Type Planet" - }, - "P31" : { - "name" : "Settled P31 Type Planet" - }, - "P32" : { - "name" : "Settled P32 Type Planet" - }, - "P33" : { - "name" : "Settled P33 Type Planet" - }, - "P34" : { - "name" : "Settled P34 Type Planet" - }, - "P35" : { - "name" : "Settled P35 Type Planet" - }, - "P36" : { - "name" : "Settled P36 Type Planet" - }, - "P37" : { - "name" : "Settled P37 Type Planet" - }, - "P38" : { - "name" : "Settled P38 Type Planet" - }, - "P39" : { - "name" : "Settled P39 Type Planet" - }, - "P4" : { - "name" : "Settled P4 Type Planet" - }, - "P40" : { - "name" : "Settled P40 Type Planet" - }, - "P5" : { - "name" : "Settled P5 Type Planet" - }, - "P6" : { - "name" : "Settled P6 Type Planet" - }, - "P7" : { - "name" : "Settled P7 Type Planet" - }, - "P8" : { - "name" : "Settled P8 Type Planet" - }, - "P9" : { - "name" : "Settled P9 Type Planet" - }, - "Pancake" : { - "name" : "Built Pancake Factory" - }, - "PantheonOfHagness" : { - "name" : "Discovered the Pantheon of Hagness" - }, - "Park" : { - "name" : "Built Park" - }, - "Parliament" : { - "name" : "Installed Parliament" - }, - "Pie" : { - "name" : "Built Pie Factory" - }, - "PilotTraining" : { - "name" : "Built Pilot Training Facility" - }, - "PlanetaryCommand" : { - "name" : "Built Planetary Command Center" - }, - "PoliceStation" : { - "name" : "Built Police Station" - }, - "PoliticsTraining" : { - "name" : "Built Politics Training Facility" - }, - "Potato" : { - "name" : "Built Potato Plantation" - }, - "Propulsion" : { - "name" : "Built Propulsion Factory" - }, - "PyramidJunkSculpture" : { - "name" : "Built Pyramid Junk Sculpture" - }, - "Ravine" : { - "name" : "Discovered a Ravine" - }, - "RockyOutcrop" : { - "name" : "Discovered a Rocky Outcropping" - }, - "SAW" : { - "name" : "Built Shield Against Weapons" - }, - "SSLa" : { - "name" : "Built Space Station Lab (A)" - }, - "SSLb" : { - "name" : "Built Space Station Lab (B)" - }, - "SSLc" : { - "name" : "Built Space Station Lab (C)" - }, - "SSLd" : { - "name" : "Built Space Station Lab (D)" - }, - "Sand" : { - "name" : "Discovered a Patch of Sand" - }, - "Security" : { - "name" : "Built Security Ministry" - }, - "Shake" : { - "name" : "Built Shake Factory" - }, - "Shipyard" : { - "name" : "Built Shipyard" - }, - "Singularity" : { - "name" : "Built Singularity Energy Plant" - }, - "Soup" : { - "name" : "Built Soup Cannery" - }, - "SpaceJunkPark" : { - "name" : "Built Space Junk Park" - }, - "SpacePort" : { - "name" : "Built Space Port" - }, - "StationCommand" : { - "name" : "Installed Station Command Center" - }, - "Stockpile" : { - "name" : "Built Stockpile" - }, - "SubspaceSupplyDepot" : { - "name" : "Received Subspace Supply Depot" - }, - "SupplyPod" : { - "name" : "Received Supply Pod" - }, - "Syrup" : { - "name" : "Built Syrup Bottler" - }, - "TempleOfTheDrajilites" : { - "name" : "Discovered the Temple of the Drajilites" - }, - "TerraformingLab" : { - "name" : "Built Terraforming Lab" - }, - "TerraformingPlatform" : { - "name" : "Built Terraforming Platform" - }, - "TheDillonForge" : { - "name" : "Discovered the Dillon Forge" - }, - "TheftTraining" : { - "name" : "Built Theft Training Facility" - }, - "ThemePark" : { - "name" : "Built Theme Park" - }, - "TournamentVictory" : { - "name" : "Won a tournament" - }, - "Trade" : { - "name" : "Built Trade Ministry" - }, - "Transporter" : { - "name" : "Built Subspace Transporter" - }, - "TrelDefeated" : { - "name" : "Won the Four Trel Colonies tournament" - }, - "University" : { - "name" : "Built University" - }, - "Volcano" : { - "name" : "Discovered a Volcano" - }, - "Warehouse" : { - "name" : "Installed Warehouse" - }, - "WasteDigester" : { - "name" : "Built Waste Digester" - }, - "WasteEnergy" : { - "name" : "Built Waste Energy Plant" - }, - "WasteExchanger" : { - "name" : "Built Waste Exchanger" - }, - "WasteRecycling" : { - "name" : "Built Waste Recycling Center" - }, - "WasteSequestration" : { - "name" : "Built Waste Sequestration Well" - }, - "WasteTreatment" : { - "name" : "Built Waste Treatment Center" - }, - "WaterProduction" : { - "name" : "Built Water Production Plant" - }, - "WaterPurification" : { - "name" : "Built Water Purification Plant" - }, - "WaterReclamation" : { - "name" : "Built Water Reclamation Plant" - }, - "WaterStorage" : { - "name" : "Built Water Storage Tank" - }, - "Wheat" : { - "name" : "Built Wheat Farm" - }, - "abandoned_colony" : { - "name" : "Abandoned a Colony" - }, - "anthracite_glyph" : { - "name" : "Uncovered Anthracite Glyph" - }, - "barge" : { - "name" : "Built Barge" - }, - "bauxite_glyph" : { - "name" : "Uncovered Bauxite Glyph" - }, - "beryl_glyph" : { - "name" : "Uncovered Beryl Glyph" - }, - "best_attacker_in_the_game" : { - "image" : "v2/best_attacker_in_the_game", - "name" : "Best Attacker In The Game" - }, - "best_attacker_of_the_week" : { - "image" : "v2/best_attacker_of_the_week", - "name" : "Best Attacker Of The Week" - }, - "best_defender_in_the_game" : { - "image" : "v2/best_defender_in_the_game", - "name" : "Best Defender In The Game" - }, - "best_defender_of_the_week" : { - "image" : "v2/best_defender_of_the_week", - "name" : "Best Defender Of The Week" - }, - "best_defensive_spy_in_the_game" : { - "image" : "v2/best_defensive_spy_in_the_game", - "name" : "Best Defensive Spy In The Game" - }, - "best_defensive_spy_of_the_week" : { - "image" : "v2/best_defensive_spy_of_the_week", - "name" : "Best Defensive Spy Of The Week" - }, - "best_offensive_spy_in_the_game" : { - "image" : "v2/best_offensive_spy_in_the_game", - "name" : "Best Offensive Spy In The Game" - }, - "best_offensive_spy_of_the_week" : { - "image" : "v2/best_offensive_spy_of_the_week", - "name" : "Best Offensive Spy Of The Week" - }, - "best_spy_in_the_game" : { - "image" : "v2/best_spy_in_the_game", - "name" : "Best Spy In The Game" - }, - "best_spy_of_the_week" : { - "image" : "v2/best_spy_of_the_week", - "name" : "Best Spy Of The Week" - }, - "bleeder" : { - "name" : "Built Bleeder" - }, - "building1" : { - "name" : "Built Level 1 Building" - }, - "building10" : { - "name" : "Built Level 10 Building" - }, - "building11" : { - "name" : "Built Level 11 Building" - }, - "building12" : { - "name" : "Built Level 12 Building" - }, - "building13" : { - "name" : "Built Level 13 Building" - }, - "building14" : { - "name" : "Built Level 14 Building" - }, - "building15" : { - "name" : "Built Level 15 Building" - }, - "building16" : { - "name" : "Built Level 16 Building" - }, - "building17" : { - "name" : "Built Level 17 Building" - }, - "building18" : { - "name" : "Built Level 18 Building" - }, - "building19" : { - "name" : "Built Level 19 Building" - }, - "building2" : { - "name" : "Built Level 2 Building" - }, - "building20" : { - "name" : "Built Level 20 Building" - }, - "building21" : { - "name" : "Built Level 21 Building" - }, - "building22" : { - "name" : "Built Level 22 Building" - }, - "building23" : { - "name" : "Built Level 23 Building" - }, - "building24" : { - "name" : "Built Level 24 Building" - }, - "building25" : { - "name" : "Built Level 25 Building" - }, - "building26" : { - "name" : "Built Level 26 Building" - }, - "building27" : { - "name" : "Built Level 27 Building" - }, - "building28" : { - "name" : "Built Level 28 Building" - }, - "building29" : { - "name" : "Built Level 29 Building" - }, - "building3" : { - "name" : "Built Level 3 Building" - }, - "building30" : { - "name" : "Built Level 30 Building" - }, - "building31" : { - "name" : "Built Level 31 Building" - }, - "building4" : { - "name" : "Built Level 4 Building" - }, - "building5" : { - "name" : "Built Level 5 Building" - }, - "building6" : { - "name" : "Built Level 6 Building" - }, - "building7" : { - "name" : "Built Level 7 Building" - }, - "building8" : { - "name" : "Built Level 8 Building" - }, - "building9" : { - "name" : "Built Level 9 Building" - }, - "buildingX" : { - "name" : "Built Building outside range" - }, - "cargo_ship" : { - "name" : "Built Cargo Ship" - }, - "chalcopyrite_glyph" : { - "name" : "Uncovered Chalcopyrite Glyph" - }, - "chromite_glyph" : { - "name" : "Uncovered Chromite Glyph" - }, - "colony_ship" : { - "name" : "Built Colony Ship" - }, - "detonator" : { - "name" : "Built Detonator" - }, - "dirtiest_empire_in_the_game" : { - "image" : "v2/dirtiest_empire_in_the_game", - "name" : "Dirtiest Empire In The Game" - }, - "dirtiest_empire_of_the_week" : { - "image" : "v2/dirtiest_empire_of_the_week", - "name" : "Dirtiest Empire Of The Week" - }, - "dirtiest_spy_in_the_game" : { - "image" : "v2/dirtiest_spy_in_the_game", - "name" : "Dirtiest Spy In The Game" - }, - "dirtiest_spy_of_the_week" : { - "image" : "v2/dirtiest_spy_of_the_week", - "name" : "Dirtiest Spy Of The Week" - }, - "dory" : { - "name" : "Built Dory" - }, - "drone" : { - "name" : "Built Drone" - }, - "excavator" : { - "name" : "Built Excavator" - }, - "fastest_growing_colony" : { - "image" : "v2/fastest_growing_colony", - "name" : "Fastest Growing Colony" - }, - "fastest_growing_empire" : { - "image" : "v2/fastest_growing_empire", - "name" : "Fastest Growing Empire" - }, - "fighter" : { - "name" : "Built Fighter" - }, - "fissure_explosion" : { - "name" : "Suffered a Fissure Explosion on a Colony" - }, - "fissure_repair" : { - "name" : "Closed a Fissure" - }, - "fissure_sealer" : { - "name" : "Built Fissure Sealer" - }, - "flipped" : { - "image" : "v2/flipped", - "name" : "Ran a successful insurrection" - }, - "fluorite_glyph" : { - "name" : "Uncovered Fluorite Glyph" - }, - "freighter" : { - "name" : "Built Freighter" - }, - "galena_glyph" : { - "name" : "Uncovered Galena Glyph" - }, - "galleon" : { - "name" : "Built Galleon" - }, - "gas_giant_settlement_ship" : { - "name" : "Built Gas Giant Settlement Platform Ship" - }, - "goethite_glyph" : { - "name" : "Uncovered Goethite Glyph" - }, - "gold_glyph" : { - "name" : "Uncovered Gold Glyph" - }, - "gypsum_glyph" : { - "name" : "Uncovered Gypsum Glyph" - }, - "halite_glyph" : { - "name" : "Uncovered Halite Glyph" - }, - "hulk" : { - "image" : "v2/hulk", - "name" : "Built Hulk" - }, - "hulk_fast" : { - "image" : "v2/hulk_fast", - "name" : "Built Fast Hulk" - }, - "hulk_huge" : { - "image" : "v2/hulk_huge", - "name" : "Built Huge Hulk" - }, - "kerogen_glyph" : { - "name" : "Uncovered Kerogen Glyph" - }, - "largest_colony" : { - "image" : "v2/largest_colony", - "name" : "Largest Colony" - }, - "largest_empire" : { - "image" : "v2/largest_empire", - "name" : "Largest Empire" - }, - "magnetite_glyph" : { - "name" : "Uncovered Magnetite Glyph" - }, - "methane_glyph" : { - "name" : "Uncovered Methane Glyph" - }, - "mining_platform_ship" : { - "name" : "Built Mining Platform Ship" - }, - "monazite_glyph" : { - "name" : "Uncovered Monazite Glyph" - }, - "most_improved_spy_of_the_week" : { - "image" : "v2/most_improved_spy_of_the_week", - "name" : "Most Improved Spy Of The Week" - }, - "observatory_seeker" : { - "name" : "Built Observatory Seeker" - }, - "patch" : { - "name" : "Submitted an accepted patch" - }, - "placebo" : { - "name" : "Built Placebo" - }, - "placebo2" : { - "name" : "Built Placebo II" - }, - "placebo3" : { - "name" : "Built Placebo III" - }, - "placebo4" : { - "name" : "Built Placebo IV" - }, - "placebo5" : { - "name" : "Built Placebo V" - }, - "placebo6" : { - "name" : "Built Placebo VI" - }, - "pleased_to_meet_you" : { - "image" : "v2/pleased_to_meet_you", - "name" : "Meeting the Lacunans" - }, - "probe" : { - "name" : "Built Probe" - }, - "rutile_glyph" : { - "name" : "Uncovered Rutile Glyph" - }, - "scanner" : { - "name" : "Built Scanner" - }, - "scow" : { - "image" : "v2/scow", - "name" : "Built Scow" - }, - "scow_fast" : { - "image" : "v2/scow_fast", - "name" : "Built Fast Scow" - }, - "scow_large" : { - "image" : "v2/scow_large", - "name" : "Built Large Scow" - }, - "scow_mega" : { - "image" : "v2/scow_mega", - "name" : "Built Mega Scow" - }, - "security_ministry_seeker" : { - "name" : "Built Security Ministry Seeker" - }, - "short_range_colony_ship" : { - "name" : "Built Short Range Colony Ship" - }, - "smuggler_ship" : { - "name" : "Built Smuggler Ship" - }, - "snark" : { - "name" : "Built Snark" - }, - "snark2" : { - "name" : "Built Snark II" - }, - "snark3" : { - "name" : "Built Snark III" - }, - "space_station" : { - "name" : "Built Space Station Hull" - }, - "space_station_deployed" : { - "name" : "Deployed a Space Station" - }, - "spaceport_seeker" : { - "name" : "Built SpacePort Seeker" - }, - "spy_pod" : { - "name" : "Built Spy Pod" - }, - "spy_shuttle" : { - "name" : "Built Spy Shuttle" - }, - "stake" : { - "name" : "Built Stake" - }, - "sulfur_glyph" : { - "name" : "Uncovered Sulfur Glyph" - }, - "supply_pod" : { - "image" : "v2/supply_pod", - "name" : "Built Supply Pod" - }, - "supply_pod2" : { - "image" : "v2/supply_pod2", - "name" : "Built Supply Pod II" - }, - "supply_pod3" : { - "image" : "v2/supply_pod3", - "name" : "Built Supply Pod III" - }, - "supply_pod4" : { - "image" : "v2/supply_pod4", - "name" : "Built Supply Pod IV" - }, - "supply_pod5" : { - "image" : "v2/supply_pod5", - "name" : "Built Supply Pod V" - }, - "surveyor" : { - "name" : "Built Surveyor" - }, - "sweeper" : { - "name" : "Built Sweeper" - }, - "terraforming_platform_ship" : { - "name" : "Built Terraforming Platform Ship" - }, - "thud" : { - "name" : "Built Thud" - }, - "trona_glyph" : { - "name" : "Uncovered Trona Glyph" - }, - "uraninite_glyph" : { - "name" : "Uncovered Uraninite Glyph" - }, - "zircon_glyph" : { - "name" : "Uncovered Zircon Glyph" - } -} - diff --git a/lacuna/config/puma.rb b/lacuna/config/puma.rb deleted file mode 100644 index cc3b7837..00000000 --- a/lacuna/config/puma.rb +++ /dev/null @@ -1,39 +0,0 @@ -# This configuration file will be evaluated by Puma. The top-level methods that -# are invoked here are part of Puma's configuration DSL. For more information -# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. -# -# Puma starts a configurable number of processes (workers) and each process -# serves each request in a thread from an internal thread pool. -# -# You can control the number of workers using ENV['WEB_CONCURRENCY']. You -# should only set this value when you want to run 2 or more workers. The -# default is already 1. You can set it to `auto` to automatically start a worker -# for each available processor. -# -# The ideal number of threads per worker depends both on how much time the -# application spends waiting for IO operations and on how much you wish to -# prioritize throughput over latency. -# -# As a rule of thumb, increasing the number of threads will increase how much -# traffic a given process can handle (throughput), but due to CRuby's -# Global VM Lock (GVL) it has diminishing returns and will degrade the -# response time (latency) of the application. -# -# The default is set to 3 threads as it's deemed a decent compromise between -# throughput and latency for the average Rails application. -# -# Any libraries that use a connection pool or another resource pool should -# be configured to provide at least as many connections as the number of -# threads. This includes Active Record's `pool` parameter in `database.yml`. -threads_count = ENV.fetch('RAILS_MAX_THREADS', 3) -threads threads_count, threads_count - -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch('PORT', 3000) - -# Allow puma to be restarted by `bin/rails restart` command. -plugin :tmp_restart - -# Specify the PID file. Defaults to tmp/pids/server.pid in development. -# In other environments, only set the PID file if requested. -pidfile ENV['PIDFILE'] if ENV['PIDFILE'] diff --git a/lacuna/config/routes.rb b/lacuna/config/routes.rb deleted file mode 100644 index 462ac459..00000000 --- a/lacuna/config/routes.rb +++ /dev/null @@ -1,1591 +0,0 @@ -Rails.application.routes.draw do - - namespace :empire do - post :view_profile - post :get_status - post :authorize_sitters - post :boost_building - post :boost_energy - post :boost_food - post :boost_happiness - post :boost_ore - post :boost_spy_training - post :boost_storage - post :boost_water - post :change_password - post :create - post :deauthorize_sitters - post :disable_self_destruct - post :edit_profile - post :enable_self_destruct - post :fetch_captcha - post :find - post :found - post :get_invite_friend_url - post :get_species_templates - post :invite_friend - post :is_name_available - post :login - post :logout - post :redeem_essentia_code - post :redefine_species - post :redefine_species_limits - post :reset_password - post :send_password_reset_message - post :set_status_message - post :update_species - post :view_authorized_sitters - post :view_boosts - post :view_public_profile - post :view_species_stats - end - - namespace :body do - post :get_status - post :abandon - post :get_buildable - post :get_buildable_locations - post :get_buildings - post :rearrange_buildings - post :rename - post :repair_list - post :set_colony_notes - post :view_laws - end - - namespace :algae do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :algaepond do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :alliance do - post :find - post :view_profile - end - - namespace :amalgusmeadow do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :apple do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :archaeology do - post :abandon_excavator - post :assemble_glyphs - post :build - post :demolish - post :downgrade - post :get_glyph_summary - post :get_ores_available_for_processing - post :get_stats_for_level - post :mass_abandon_excavator - post :repair - post :search_for_glyph - post :subsidize_search - post :upgrade - post :view - post :view_excavators - end - - namespace :artmuseum do - post :view - end - - namespace :atmosphericevaporator do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :beach do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :bean do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :beeldeban do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :beeldebannest do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :blackholegenerator do - post :build - post :demolish - post :downgrade - post :generate_singularity - post :get_actions_for - post :get_stats_for_level - post :repair - post :subsidize_cooldown - post :upgrade - post :view - end - - namespace :bread do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :burger do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :capitol do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :rename_empire - post :repair - post :upgrade - post :view - end - - namespace :captcha do - post :fetch - post :solve - end - - namespace :cheese do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :chip do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :cider do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :citadelofknope do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :cloakinglab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :corn do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :cornmeal do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :crashedshipsite do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :crater do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :culinaryinstitute do - post :view - end - - namespace :dairy do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :denton do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :dentonbrambles do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :deployedbleeder do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :development do - post :build - post :cancel_build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :subsidize_build_queue - post :subsidize_one_build - post :upgrade - post :view - end - - namespace :distributioncenter do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :get_stored_resources - post :release_reserve - post :repair - post :reserve - post :upgrade - post :view - end - - namespace :embassy do - post :accept_invite - post :assign_alliance_leader - post :build - post :cast_vote - post :create_alliance - post :demolish - post :dissolve_alliance - post :donate_to_stash - post :downgrade - post :exchange_with_stash - post :expel_member - post :get_alliance_status - post :get_my_invites - post :get_pending_invites - post :get_stats_for_level - post :leave_alliance - post :reject_invite - post :repair - post :send_invite - post :update_alliance - post :upgrade - post :view - post :view_propositions - post :view_stash - post :withdraw_invite - end - - namespace :energyreserve do - post :build - post :demolish - post :downgrade - post :dump - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :entertainment do - post :build - post :demolish - post :downgrade - post :duck_quack - post :get_lottery_voting_options - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :espionage do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :essentiavein do - post :build - post :demolish - post :downgrade - post :drain - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :fission do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :fissure do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :foodreserve do - post :build - post :demolish - post :downgrade - post :dump - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :fusion do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :gasgiantlab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :gasgiantplatform do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :geneticslab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :prepare_experiment - post :rename_species - post :repair - post :run_experiment - post :upgrade - post :view - end - - namespace :geo do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :geothermalvent do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :gratchsgauntlet do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :greatballofjunk do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :grove do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :hallsofvrbansk do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :hydrocarbon do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :ibs do - post :view - end - - namespace :inbox do - post :archive_messages - post :read_message - post :send_message - post :trash_messages - post :trash_messages_where - post :view_archived - post :view_inbox - post :view_sent - post :view_trashed - post :view_unread - end - - namespace :intelligence do - post :assign_spy - post :build - post :burn_spy - post :demolish - post :downgrade - post :get_stats_for_level - post :name_spies - post :name_spy - post :repair - post :subsidize_training - post :train_spy - post :upgrade - post :view - post :view_all_spies - post :view_spies - end - - namespace :inteltraining do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :interdimensionalrift do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :junkhengesculpture do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :kalavianruins do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :kasternskeep do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :lagoon do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :lake do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :lapis do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :lapisforest do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :libraryofjith do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :research_species - post :upgrade - post :view - end - - namespace :lostcityoftyleon do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :luxuryhousing do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :malcud do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :malcudfield do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :map do - post :check_star_for_incoming_probe - post :get_star - post :get_star_by_name - post :get_star_by_xy - post :get_star_map - post :get_stars - post :probe_summary_fissures - post :search_stars - post :view_laws - end - - namespace :massadshenge do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :mayhemtraining do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :mercenariesguild do - post :accept_from_market - post :add_to_market - post :build - post :demolish - post :downgrade - post :get_spies - post :get_stats_for_level - post :get_trade_ships - post :repair - post :report_abuse - post :upgrade - post :view - post :view_market - post :view_my_market - post :withdraw_from_market - end - - namespace :metaljunkarches do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :mine do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :miningministry do - post :abandon_platform - post :add_cargo_ship_to_fleet - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :mass_abandon_platform - post :remove_cargo_ship_from_fleet - post :repair - post :upgrade - post :view - post :view_platforms - post :view_ships - end - - namespace :missioncommand do - post :build - post :complete_mission - post :demolish - post :downgrade - post :get_missions - post :get_stats_for_level - post :repair - post :skip_mission - post :upgrade - post :view - end - - namespace :munitionslab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :naturalspring do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :network19 do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :restrict_coverage - post :upgrade - post :view - post :view_news - end - - namespace :observatory do - post :abandon_all_probes - post :abandon_probe - post :build - post :demolish - post :downgrade - post :get_probed_stars - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :operahouse do - post :view - end - - namespace :oracleofanid do - post :build - post :demolish - post :downgrade - post :get_probed_stars - post :get_star - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :orerefinery do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :orestorage do - post :build - post :demolish - post :downgrade - post :dump - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :oversight do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :pancake do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :pantheonofhagness do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :park do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :subsidize_party - post :throw_a_party - post :upgrade - post :view - end - - namespace :parliament do - post :allow_bhg_by_alliance - post :cast_vote - post :get_bodies_for_star_in_jurisdiction - post :get_mining_platforms_for_asteroid_in_jurisdiction - post :get_stars_in_jurisdiction - post :propose_broadcast_on_network19 - post :propose_elect_new_leader - post :propose_evict_mining_platform - post :propose_expel_member - post :propose_fire_bfg - post :propose_foreign_aid - post :propose_induct_member - post :propose_members_only_colonization - post :propose_members_only_excavation - post :propose_members_only_mining_rights - post :propose_members_only_stations - post :propose_neutralize_bhg - post :propose_rename_asteroid - post :propose_rename_star - post :propose_rename_uninhabited - post :propose_repeal_law - post :propose_taxation - post :propose_transfer_station_ownership - post :propose_writ - post :view - post :view_laws - post :view_propositions - post :view_taxes_collected - end - - namespace :pie do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :pilottraining do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :planetarycommand do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :subsidize_pod_cooldown - post :upgrade - post :view - post :view_incoming_supply_chains - post :view_plans - end - - namespace :policestation do - post :execute_prisoner - post :release_prisoner - post :view - post :view_foreign_ships - post :view_foreign_spies - post :view_prisoners - post :view_ships_orbiting - post :view_ships_travelling - end - - namespace :politicstraining do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :potato do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :propulsion do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :pyramidjunksculpture do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :ravine do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :rockyoutcrop do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :sand do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :saw do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :security do - post :build - post :demolish - post :downgrade - post :execute_prisoner - post :get_stats_for_level - post :release_prisoner - post :repair - post :upgrade - post :view - post :view_foreign_spies - post :view_prisoners - end - - namespace :shake do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :shipyard do - post :build - post :build_ship - post :build_ships - post :demolish - post :downgrade - post :get_buildable - post :get_stats_for_level - post :repair - post :subsidize_build_queue - post :subsidize_ship - post :upgrade - post :view - post :view_build_queue - end - - namespace :singularity do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :soup do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :spacejunkpark do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :spaceport do - post :build - post :demolish - post :downgrade - post :fetch_spies - post :get_fleet_for - post :get_ships_for - post :get_stats_for_level - post :mass_scuttle_ship - post :name_ship - post :prepare_fetch_spies - post :prepare_send_spies - post :recall_all - post :recall_ship - post :repair - post :scuttle_ship - post :send_fleet - post :send_ship - post :send_ship_types - post :send_spies - post :upgrade - post :view - post :view_all_ships - post :view_battle_logs - post :view_foreign_ships - post :view_ships_orbiting - post :view_ships_travelling - end - - namespace :spacestationlab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :make_plan - post :repair - post :subsidize_plan - post :upgrade - post :view - end - - namespace :stationcommand do - post :view - post :view_incoming_supply_chains - post :view_plans - end - - namespace :stats do - post :alliance_rank - post :colony_rank - post :credits - post :empire_rank - post :find_alliance_rank - post :find_empire_rank - post :spy_rank - post :weekly_medal_winners - end - - namespace :stockpile do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :subspacesupplydepot do - post :build - post :complete_build_queue - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :transmit_energy - post :transmit_food - post :transmit_ore - post :transmit_water - post :upgrade - post :view - end - - namespace :supplypod do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :syrup do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :templeofthedrajilites do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :list_planets - post :repair - post :upgrade - post :view - post :view_planet - end - - namespace :terraforminglab do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :terraformingplatform do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :thedillonforge do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :make_plan - post :repair - post :split_plan - post :subsidize - post :upgrade - post :view - end - - namespace :thefttraining do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :themepark do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :operate - post :repair - post :upgrade - post :view - end - - namespace :trade do - post :accept_from_market - post :add_supply_ship_to_fleet - post :add_to_market - post :add_waste_ship_to_fleet - post :build - post :create_supply_chain - post :delete_supply_chain - post :demolish - post :downgrade - post :get_glyph_summary - post :get_plan_summary - post :get_prisoners - post :get_ships - post :get_stats_for_level - post :get_stored_resources - post :get_supply_ships - post :get_trade_ships - post :get_waste_ships - post :push_items - post :remove_supply_ship_from_fleet - post :remove_waste_ship_from_fleet - post :repair - post :report_abuse - post :update_supply_chain - post :update_waste_chain - post :upgrade - post :view - post :view_market - post :view_my_market - post :view_supply_chains - post :view_waste_chains - post :withdraw_from_market - end - - namespace :transporter do - post :accept_from_market - post :add_to_market - post :build - post :demolish - post :downgrade - post :get_glyph_summary - post :get_plan_summary - post :get_prisoners - post :get_ships - post :get_stats_for_level - post :get_stored_resources - post :push_items - post :repair - post :report_abuse - post :trade_one_for_one - post :upgrade - post :view - post :view_market - post :view_my_market - post :withdraw_from_market - end - - namespace :university do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :volcano do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :warehouse do - post :view - end - - namespace :wastedigester do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :wasteenergy do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :wasteexchanger do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :recycle - post :repair - post :subsidize_recycling - post :upgrade - post :view - end - - namespace :wasterecycling do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :recycle - post :repair - post :subsidize_recycling - post :upgrade - post :view - end - - namespace :wastesequestration do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :wastetreatment do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :waterproduction do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :waterpurification do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :waterreclamation do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :waterstorage do - post :build - post :demolish - post :downgrade - post :dump - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - namespace :wheat do - post :build - post :demolish - post :downgrade - post :get_stats_for_level - post :repair - post :upgrade - post :view - end - - # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. - # Can be used by load balancers and uptime monitors to verify that the app is live. - get 'up' => 'rails/health#show', as: :rails_health_check -end diff --git a/lacuna/db/schema.rb b/lacuna/db/schema.rb deleted file mode 100644 index 26b58fec..00000000 --- a/lacuna/db/schema.rb +++ /dev/null @@ -1,1129 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# This file is the source Rails uses to define your schema when running `bin/rails -# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to -# be faster and is potentially less error prone than running all of your -# migrations from scratch. Old migrations may fail to apply correctly if those -# migrations use external dependencies or application code. -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema[8.1].define(version: 0) do - create_table "ai_battle_summary", id: :integer, default: nil, charset: "latin1", force: :cascade do |t| - t.integer "attack_spy_hours", null: false - t.integer "attack_victories", null: false - t.integer "attacking_empire_id", null: false - t.integer "defending_empire_id", null: false - t.integer "defense_victories", null: false - t.index ["defending_empire_id"], name: "ai_battle_summary_idx_defending_empire_id" - end - - create_table "ai_scratch_pad", id: :integer, default: nil, charset: "latin1", force: :cascade do |t| - t.integer "ai_empire_id", null: false - t.integer "body_id" - t.binary "pad", size: :medium - t.index ["ai_empire_id"], name: "ai_scratch_pad_idx_ai_empire_id" - t.index ["body_id"], name: "ai_scratch_pad_idx_body_id" - end - - create_table "alliance", id: :integer, charset: "latin1", force: :cascade do |t| - t.text "announcements" - t.datetime "date_created", precision: nil, null: false - t.text "description" - t.string "forum_uri", null: false - t.string "image", default: "default", null: false - t.integer "leader_id" - t.string "name", limit: 30, null: false - t.binary "stash", size: :medium - t.index ["leader_id"], name: "alliance_idx_leader_id" - end - - create_table "alliance_invite", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id", null: false - t.datetime "date_created", precision: nil, null: false - t.integer "empire_id", null: false - t.index ["alliance_id"], name: "alliance_invite_idx_alliance_id" - t.index ["empire_id"], name: "alliance_invite_idx_empire_id" - end - - create_table "alliance_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id", null: false - t.string "alliance_name", limit: 30, null: false - t.float "average_building_level", null: false - t.bigint "average_empire_size", null: false - t.integer "average_empire_size_rank", null: false - t.float "average_university_level", null: false - t.integer "building_count", null: false - t.integer "colony_count", null: false - t.datetime "date_stamp", precision: nil, null: false - t.float "defense_success_rate", null: false - t.integer "defense_success_rate_rank", null: false - t.integer "dirtiest", default: 0, null: false - t.integer "dirtiest_rank", default: 0, null: false - t.integer "influence", null: false - t.integer "influence_rank", null: false - t.integer "member_count", null: false - t.float "offense_success_rate", null: false - t.integer "offense_success_rate_rank", null: false - t.bigint "population", null: false - t.integer "population_rank", null: false - t.integer "space_station_count", null: false - t.integer "space_station_count_rank", null: false - t.integer "spy_count", null: false - t.index ["average_empire_size_rank"], name: "idx_average_empire_size_rank" - t.index ["defense_success_rate_rank"], name: "idx_defense_success_rate_rank" - t.index ["dirtiest_rank"], name: "idx_dirtiest_rank" - t.index ["influence_rank"], name: "idx_influence_rank" - t.index ["offense_success_rate_rank"], name: "idx_offense_success_rate_rank" - t.index ["population_rank"], name: "idx_population_rank" - end - - create_table "api_key", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_stamp", precision: nil, null: false - t.string "email" - t.string "ip_address", limit: 15 - t.string "name", limit: 30 - t.string "private_key", limit: 36, null: false - t.string "public_key", limit: 36, null: false - t.index ["private_key"], name: "idx_private_key" - t.index ["public_key"], name: "idx_public_key" - end - - create_table "battle_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "attacked_body_id", null: false - t.string "attacked_body_name", limit: 30, null: false - t.integer "attacked_empire_id" - t.string "attacked_empire_name", limit: 30 - t.integer "attacking_body_id", null: false - t.string "attacking_body_name", limit: 30, null: false - t.integer "attacking_empire_id", null: false - t.string "attacking_empire_name", limit: 30, null: false - t.integer "attacking_number", null: false - t.string "attacking_type", limit: 60, null: false - t.string "attacking_unit_name", limit: 60, null: false - t.datetime "date_stamp", precision: nil, null: false - t.integer "defending_body_id", null: false - t.string "defending_body_name", limit: 30, null: false - t.integer "defending_empire_id" - t.string "defending_empire_name", limit: 30 - t.integer "defending_number", null: false - t.string "defending_type", limit: 60, null: false - t.string "defending_unit_name", limit: 60, null: false - t.string "victory_to", limit: 8, null: false - t.index ["attacking_body_id"], name: "idx_attacking_body_id" - t.index ["attacking_body_name"], name: "idx_attacking_body_name" - t.index ["attacking_empire_id"], name: "idx_attacking_empire_id" - t.index ["attacking_empire_name"], name: "idx_attacking_empire_name" - t.index ["date_stamp"], name: "idx_datestamp" - t.index ["defending_body_id"], name: "idx_defending_body_id" - t.index ["defending_body_name"], name: "idx_defending_body_name" - t.index ["defending_empire_id"], name: "idx_defending_empire_id" - t.index ["defending_empire_name"], name: "idx_defending_empire_name" - end - - create_table "body", id: :integer, charset: "latin1", force: :cascade do |t| - t.bigint "algae_production_hour", default: 0, null: false - t.bigint "algae_stored", default: 0, null: false - t.integer "alliance_id" - t.bigint "anthracite_hour", default: 0, null: false - t.bigint "anthracite_stored", default: 0, null: false - t.bigint "apple_production_hour", default: 0, null: false - t.bigint "apple_stored", default: 0, null: false - t.bigint "bauxite_hour", default: 0, null: false - t.bigint "bauxite_stored", default: 0, null: false - t.bigint "bean_production_hour", default: 0, null: false - t.bigint "bean_stored", default: 0, null: false - t.bigint "beetle_production_hour", default: 0, null: false - t.bigint "beetle_stored", default: 0, null: false - t.bigint "beryl_hour", default: 0, null: false - t.bigint "beryl_stored", default: 0, null: false - t.integer "boost_enabled", limit: 1, default: 0, null: false - t.bigint "bread_production_hour", default: 0, null: false - t.bigint "bread_stored", default: 0, null: false - t.bigint "burger_production_hour", default: 0, null: false - t.bigint "burger_stored", default: 0, null: false - t.bigint "chalcopyrite_hour", default: 0, null: false - t.bigint "chalcopyrite_stored", default: 0, null: false - t.bigint "cheese_production_hour", default: 0, null: false - t.bigint "cheese_stored", default: 0, null: false - t.bigint "chip_production_hour", default: 0, null: false - t.bigint "chip_stored", default: 0, null: false - t.bigint "chromite_hour", default: 0, null: false - t.bigint "chromite_stored", default: 0, null: false - t.bigint "cider_production_hour", default: 0, null: false - t.bigint "cider_stored", default: 0, null: false - t.string "class", null: false - t.bigint "corn_production_hour", default: 0, null: false - t.bigint "corn_stored", default: 0, null: false - t.integer "empire_id" - t.bigint "energy_capacity", default: 0, null: false - t.bigint "energy_hour", default: 0, null: false - t.bigint "energy_stored", default: 0, null: false - t.bigint "fluorite_hour", default: 0, null: false - t.bigint "fluorite_stored", default: 0, null: false - t.bigint "food_capacity", default: 0, null: false - t.bigint "food_consumption_hour", default: 0, null: false - t.bigint "fungus_production_hour", default: 0, null: false - t.bigint "fungus_stored", default: 0, null: false - t.bigint "galena_hour", default: 0, null: false - t.bigint "galena_stored", default: 0, null: false - t.bigint "goethite_hour", default: 0, null: false - t.bigint "goethite_stored", default: 0, null: false - t.bigint "gold_hour", default: 0, null: false - t.bigint "gold_stored", default: 0, null: false - t.bigint "gypsum_hour", default: 0, null: false - t.bigint "gypsum_stored", default: 0, null: false - t.bigint "halite_hour", default: 0, null: false - t.bigint "halite_stored", default: 0, null: false - t.bigint "happiness", default: 0, null: false - t.bigint "happiness_hour", default: 0, null: false - t.bigint "kerogen_hour", default: 0, null: false - t.bigint "kerogen_stored", default: 0, null: false - t.bigint "lapis_production_hour", default: 0, null: false - t.bigint "lapis_stored", default: 0, null: false - t.datetime "last_tick", precision: nil, null: false - t.bigint "magnetite_hour", default: 0, null: false - t.bigint "magnetite_stored", default: 0, null: false - t.integer "max_berth", limit: 1, default: 1, null: false - t.bigint "meal_production_hour", default: 0, null: false - t.bigint "meal_stored", default: 0, null: false - t.bigint "methane_hour", default: 0, null: false - t.bigint "methane_stored", default: 0, null: false - t.bigint "milk_production_hour", default: 0, null: false - t.bigint "milk_stored", default: 0, null: false - t.bigint "monazite_hour", default: 0, null: false - t.bigint "monazite_stored", default: 0, null: false - t.string "name", limit: 30, null: false - t.integer "needs_recalc", limit: 1, default: 0, null: false - t.integer "needs_surface_refresh", limit: 1, default: 0, null: false - t.datetime "neutral_entry", precision: nil, null: false - t.text "notes" - t.integer "orbit", default: 0, null: false - t.bigint "ore_capacity", default: 0, null: false - t.bigint "ore_consumption_hour", default: 0, null: false - t.bigint "pancake_production_hour", default: 0, null: false - t.bigint "pancake_stored", default: 0, null: false - t.bigint "pie_production_hour", default: 0, null: false - t.bigint "pie_stored", default: 0, null: false - t.integer "plots_available", limit: 1, default: 0, null: false - t.bigint "potato_production_hour", default: 0, null: false - t.bigint "potato_stored", default: 0, null: false - t.integer "propaganda_boost", default: 0, null: false - t.integer "restrict_coverage", limit: 1, default: 0, null: false - t.bigint "root_production_hour", default: 0, null: false - t.bigint "root_stored", default: 0, null: false - t.bigint "rutile_hour", default: 0, null: false - t.bigint "rutile_stored", default: 0, null: false - t.bigint "shake_production_hour", default: 0, null: false - t.bigint "shake_stored", default: 0, null: false - t.integer "size", default: 0, null: false - t.bigint "soup_production_hour", default: 0, null: false - t.bigint "soup_stored", default: 0, null: false - t.integer "star_id", null: false - t.bigint "sulfur_hour", default: 0, null: false - t.bigint "sulfur_stored", default: 0, null: false - t.integer "surface_version", limit: 1, default: 0, null: false - t.bigint "syrup_production_hour", default: 0, null: false - t.bigint "syrup_stored", default: 0, null: false - t.bigint "trona_hour", default: 0, null: false - t.bigint "trona_stored", default: 0, null: false - t.integer "unhappy", limit: 1, default: 0, null: false - t.datetime "unhappy_date", precision: nil, null: false - t.bigint "uraninite_hour", default: 0, null: false - t.bigint "uraninite_stored", default: 0, null: false - t.integer "usable_as_starter", default: 0, null: false - t.integer "usable_as_starter_enabled", limit: 1, default: 0, null: false - t.bigint "waste_capacity", default: 0, null: false - t.bigint "waste_hour", default: 0, null: false - t.bigint "waste_stored", default: 0, null: false - t.bigint "water_capacity", default: 0, null: false - t.bigint "water_hour", default: 0, null: false - t.bigint "water_stored", default: 0, null: false - t.bigint "wheat_production_hour", default: 0, null: false - t.bigint "wheat_stored", default: 0, null: false - t.integer "x", default: 0, null: false - t.integer "y", default: 0, null: false - t.bigint "zircon_hour", default: 0, null: false - t.bigint "zircon_stored", default: 0, null: false - t.string "zone", limit: 16, null: false - t.index ["alliance_id"], name: "body_idx_alliance_id" - t.index ["class"], name: "idx_class" - t.index ["empire_id"], name: "body_idx_empire_id" - t.index ["name"], name: "idx_name" - t.index ["star_id"], name: "body_idx_star_id" - t.index ["usable_as_starter"], name: "idx_usable_as_starter" - t.index ["usable_as_starter_enabled", "usable_as_starter"], name: "idx_planet_search" - t.index ["usable_as_starter_enabled"], name: "idx_usable_as_starter_enabled" - t.index ["x", "y"], name: "idx_x_y" - t.index ["zone"], name: "idx_zone" - end - - create_table "building", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "body_id", null: false - t.string "class", null: false - t.datetime "date_created", precision: nil, null: false - t.integer "efficiency", default: 100, null: false - t.integer "is_upgrading", limit: 1, default: 0, null: false - t.integer "is_working", limit: 1, default: 0, null: false - t.datetime "last_check", precision: nil, null: false - t.integer "level", default: 0, null: false - t.datetime "upgrade_ends", precision: nil, null: false - t.datetime "upgrade_started", precision: nil, null: false - t.binary "work", size: :medium - t.datetime "work_ends", precision: nil, null: false - t.datetime "work_started", precision: nil, null: false - t.integer "x", default: 0, null: false - t.integer "y", default: 0, null: false - t.index ["body_id"], name: "building_idx_body_id" - t.index ["class"], name: "idx_class" - t.index ["is_upgrading"], name: "idx_is_upgrading" - t.index ["is_working"], name: "idx_is_working" - t.index ["x", "y"], name: "idx_x_y" - end - - create_table "captcha", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "guid", limit: 36, null: false - t.string "riddle", limit: 12, null: false - t.string "solution", limit: 5, null: false - end - - create_table "cargo_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "body_id", null: false - t.binary "data", size: :medium - t.datetime "date_stamp", precision: nil, null: false - t.string "message", null: false - t.integer "object_id", null: false - t.string "object_type", null: false - end - - create_table "colony_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.float "average_building_level", null: false - t.float "average_spy_success_rate", default: 0.0, null: false - t.integer "body_id", default: 0, null: false - t.integer "building_count", limit: 1, null: false - t.datetime "date_stamp", precision: nil, null: false - t.float "defense_success_rate", default: 0.0, null: false - t.float "defense_success_rate_delta", default: 0.0, null: false - t.integer "dirtiest", default: 0, null: false - t.integer "dirtiest_delta", default: 0, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "energy_hour", null: false - t.integer "food_hour", null: false - t.integer "happiness_hour", null: false - t.integer "highest_building_level", limit: 1, null: false - t.integer "influence", default: 0, null: false - t.integer "is_space_station", default: 0, null: false - t.float "offense_success_rate", default: 0.0, null: false - t.float "offense_success_rate_delta", default: 0.0, null: false - t.integer "ore_hour", null: false - t.integer "planet_id", null: false - t.string "planet_name", limit: 30, null: false - t.integer "population", null: false - t.integer "population_delta", null: false - t.integer "population_rank", null: false - t.integer "spy_count", null: false - t.integer "waste_hour", null: false - t.integer "water_hour", null: false - t.integer "x", default: 0, null: false - t.integer "y", default: 0, null: false - t.string "zone", limit: 16, default: "0", null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["planet_id"], name: "idx_planet_id" - t.index ["planet_name"], name: "idx_planet_name" - t.index ["population_rank"], name: "idx_population_rank" - end - - create_table "config", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "name", limit: 30, null: false - t.string "value", limit: 256, null: false - t.index ["name"], name: "c_idx_key" - end - - create_table "economy_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.date "date_stamp", null: false - t.integer "in_mission", default: 0, null: false - t.integer "in_other", default: 0, null: false - t.integer "in_purchase", default: 0, null: false - t.integer "in_redemption", default: 0, null: false - t.integer "in_trade", default: 0, null: false - t.integer "in_tutorial", default: 0, null: false - t.integer "in_vein", default: 0, null: false - t.integer "in_vote", default: 0, null: false - t.integer "out_boost", default: 0, null: false - t.integer "out_building", default: 0, null: false - t.integer "out_delete", default: 0, null: false - t.integer "out_glyph", default: 0, null: false - t.integer "out_mission", default: 0, null: false - t.integer "out_other", default: 0, null: false - t.integer "out_party", default: 0, null: false - t.integer "out_recycle", default: 0, null: false - t.integer "out_ship", default: 0, null: false - t.integer "out_spy", default: 0, null: false - t.integer "out_trade", default: 0, null: false - t.integer "purchases_100", default: 0, null: false - t.integer "purchases_1300", default: 0, null: false - t.integer "purchases_200", default: 0, null: false - t.integer "purchases_30", default: 0, null: false - t.integer "purchases_600", default: 0, null: false - t.integer "total_users", default: 0, null: false - t.index ["date_stamp"], name: "idx_date_stamp" - end - - create_table "empire", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id" - t.datetime "building_boost", precision: nil, null: false - t.string "city", limit: 100 - t.string "country", limit: 100 - t.datetime "date_created", precision: nil, null: false - t.integer "deception_affinity", limit: 1, default: 4, null: false - t.text "description" - t.integer "dont_replace_excavator", limit: 1, default: 0, null: false - t.string "email" - t.datetime "energy_boost", precision: nil, null: false - t.integer "environmental_affinity", limit: 1, default: 4, null: false - t.float "essentia_free", default: 0.0, null: false - t.float "essentia_game", default: 0.0, null: false - t.float "essentia_paid", default: 0.0, null: false - t.integer "farming_affinity", limit: 1, default: 4, null: false - t.datetime "food_boost", precision: nil, null: false - t.integer "growth_affinity", limit: 1, default: 4, null: false - t.datetime "happiness_boost", precision: nil, null: false - t.integer "home_planet_id" - t.integer "in_stasis", limit: 1, default: 0, null: false - t.integer "is_admin", limit: 1, default: 0, null: false - t.integer "is_isolationist", limit: 1, default: 1, null: false - t.integer "is_mission_curator", limit: 1, default: 0, null: false - t.datetime "last_login", precision: nil, null: false - t.integer "latest_message_id" - t.integer "management_affinity", limit: 1, default: 4, null: false - t.integer "manufacturing_affinity", limit: 1, default: 4, null: false - t.integer "max_orbit", limit: 1, default: 3, null: false - t.integer "min_orbit", limit: 1, default: 3, null: false - t.integer "mining_affinity", limit: 1, default: 4, null: false - t.string "name", limit: 30, null: false - t.text "notes" - t.datetime "ore_boost", precision: nil, null: false - t.integer "outlaw", limit: 1, default: 0, null: false - t.datetime "outlaw_date", precision: nil, default: "2010-10-03 18:17:26", null: false - t.string "password", limit: 43, null: false - t.string "password_recovery_key", limit: 36 - t.string "player_name", limit: 100 - t.integer "political_affinity", limit: 1, default: 4, null: false - t.integer "research_affinity", limit: 1, default: 4, null: false - t.integer "science_affinity", limit: 1, default: 4, null: false - t.integer "self_destruct_active", limit: 1, default: 0, null: false - t.datetime "self_destruct_date", precision: nil, null: false - t.string "sitter_password", limit: 30, null: false - t.integer "skip_attack_messages", limit: 1, default: 0, null: false - t.integer "skip_excavator_artifact", limit: 1, default: 0, null: false - t.integer "skip_excavator_destroyed", limit: 1, default: 0, null: false - t.integer "skip_excavator_glyph", limit: 1, default: 0, null: false - t.integer "skip_excavator_plan", limit: 1, default: 0, null: false - t.integer "skip_excavator_replace_msg", limit: 1, default: 0, null: false - t.integer "skip_excavator_resources", limit: 1, default: 0, null: false - t.integer "skip_found_nothing", limit: 1, default: 0, null: false - t.integer "skip_happiness_warnings", limit: 1, default: 0, null: false - t.integer "skip_incoming_ships", limit: 1, default: 0, null: false - t.integer "skip_medal_messages", limit: 1, default: 0, null: false - t.integer "skip_pollution_warnings", limit: 1, default: 0, null: false - t.integer "skip_probe_detected", limit: 1, default: 0, null: false - t.integer "skip_resource_warnings", limit: 1, default: 0, null: false - t.integer "skip_spy_recovery", limit: 1, default: 0, null: false - t.string "skype", limit: 100 - t.text "species_description" - t.string "species_name", limit: 30, default: "Human", null: false - t.datetime "spy_training_boost", precision: nil, null: false - t.string "stage", limit: 30, default: "new", null: false - t.string "status_message", null: false - t.datetime "storage_boost", precision: nil, null: false - t.integer "timeout", limit: 1, default: 0, null: false - t.integer "trade_affinity", limit: 1, default: 4, null: false - t.text "tutorial_scratch" - t.string "tutorial_stage", limit: 30, default: "explore_the_ui", null: false - t.integer "university_level", limit: 1, default: 0, null: false - t.datetime "water_boost", precision: nil, null: false - t.index ["alliance_id"], name: "empire_idx_alliance_id" - t.index ["home_planet_id"], name: "empire_idx_home_planet_id" - t.index ["last_login", "self_destruct_active"], name: "idx_inactives" - t.index ["latest_message_id"], name: "empire_idx_latest_message_id" - t.index ["name", "is_admin"], name: "idx_admins" - t.index ["name"], name: "name", unique: true - t.index ["password_recovery_key"], name: "idx_password_recovery_key" - t.index ["self_destruct_active", "self_destruct_date"], name: "idx_self_destruct" - end - - create_table "empire_admin_notes", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "creator", limit: 30, null: false - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.text "notes", null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - end - - create_table "empire_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id" - t.string "alliance_name", limit: 30 - t.float "average_building_level", null: false - t.integer "building_count", limit: 2, null: false - t.integer "colony_count", limit: 1, null: false - t.integer "colony_count_delta", limit: 1, null: false - t.datetime "date_stamp", precision: nil, null: false - t.float "defense_success_rate", null: false - t.float "defense_success_rate_delta", default: 0.0, null: false - t.integer "defense_success_rate_rank", null: false - t.integer "dirtiest", default: 0, null: false - t.integer "dirtiest_delta", default: 0, null: false - t.integer "dirtiest_rank", default: 0, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.bigint "empire_size", null: false - t.integer "empire_size_delta", null: false - t.integer "empire_size_rank", null: false - t.integer "energy_hour", null: false - t.integer "food_hour", null: false - t.integer "happiness_hour", null: false - t.integer "highest_building_level", limit: 1, null: false - t.integer "influence", default: 0, null: false - t.float "offense_success_rate", null: false - t.float "offense_success_rate_delta", default: 0.0, null: false - t.integer "offense_success_rate_rank", null: false - t.integer "ore_hour", null: false - t.integer "population", null: false - t.integer "population_delta", null: false - t.integer "space_station_count", default: 0, null: false - t.integer "spy_count", null: false - t.integer "university_level", limit: 1, null: false - t.integer "university_level_rank", limit: 1, null: false - t.integer "waste_hour", null: false - t.integer "water_hour", null: false - t.index ["defense_success_rate_rank"], name: "idx_defense_success_rate_rank" - t.index ["dirtiest_rank"], name: "idx_dirtiest_rank" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["empire_size_rank"], name: "idx_empire_size_rank" - t.index ["offense_success_rate_rank"], name: "idx_offense_success_rate_rank" - t.index ["university_level_rank"], name: "idx_university_level_rank" - end - - create_table "empire_name_change_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.string "old_empire_name", limit: 30, null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - end - - create_table "empire_rpc_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "limits", default: 0, null: false - t.integer "rpc", default: 0, null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - end - - create_table "essentia_code", id: :integer, charset: "latin1", force: :cascade do |t| - t.float "amount", null: false - t.string "code", limit: 36, null: false - t.datetime "date_created", precision: nil, null: false - t.string "description", limit: 50, null: false - t.integer "empire_id", null: false - t.integer "used", limit: 1, default: 0, null: false - t.index ["code"], name: "idx_code" - end - - create_table "essentia_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.float "amount", null: false - t.string "api_key", limit: 40 - t.datetime "date_stamp", precision: nil, null: false - t.string "description", limit: 90, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "from_id", null: false - t.string "from_name", limit: 30, null: false - t.string "transaction_id", limit: 36 - t.index ["api_key"], name: "idx_api_key" - t.index ["empire_id", "description", "amount"], name: "idx_essentiacode" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["transaction_id"], name: "idx_transaction_id" - end - - create_table "excavators", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "body_id", null: false - t.datetime "date_landed", precision: nil, null: false - t.integer "empire_id", null: false - t.integer "planet_id", null: false - t.index ["body_id"], name: "excavators_idx_body_id" - t.index ["empire_id"], name: "excavators_idx_empire_id" - t.index ["planet_id"], name: "excavators_idx_planet_id" - end - - create_table "fleet", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "berth_level", null: false - t.integer "body_id", null: false - t.integer "combat", null: false - t.datetime "date_available", precision: nil, null: false - t.datetime "date_started", precision: nil, null: false - t.string "direction", limit: 3, null: false - t.integer "fleet_speed", null: false - t.integer "foreign_body_id" - t.integer "foreign_star_id" - t.integer "hold_size", null: false - t.string "mark", limit: 10, null: false - t.string "name", limit: 30, null: false - t.binary "payload", size: :medium - t.integer "roundtrip", limit: 1, default: 0, null: false - t.integer "shipyard_id", null: false - t.integer "speed", null: false - t.integer "stealth", null: false - t.string "task", limit: 30, null: false - t.string "type", limit: 30, null: false - t.index ["body_id"], name: "fleet_idx_body_id" - t.index ["foreign_body_id"], name: "fleet_idx_foreign_body_id" - t.index ["foreign_star_id"], name: "fleet_idx_foreign_star_id" - end - - create_table "glyph", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "body_id", null: false - t.integer "quantity", default: 0, null: false - t.string "type", limit: 20, null: false - t.index ["body_id"], name: "glyph_idx_body_id" - end - - create_table "invite", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "accept_date", precision: nil, null: false - t.string "code", limit: 36, null: false - t.string "email" - t.datetime "invite_date", precision: nil, null: false - t.integer "invitee_id" - t.integer "inviter_id", null: false - t.string "zone", limit: 16, null: false - t.index ["invitee_id"], name: "invite_idx_invitee_id" - t.index ["inviter_id"], name: "invite_idx_inviter_id" - end - - create_table "laws", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_enacted", precision: nil, null: false - t.text "description" - t.string "name", limit: 30, null: false - t.binary "scratch", size: :medium - t.integer "star_id" - t.integer "station_id", null: false - t.string "type", limit: 30, null: false - t.index ["date_enacted"], name: "idx_date_enacted" - t.index ["star_id"], name: "laws_idx_star_id" - t.index ["station_id"], name: "laws_idx_station_id" - end - - create_table "login_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "api_key", limit: 36 - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "extended", default: 0, null: false - t.string "ip_address", limit: 15 - t.integer "is_sitter", default: 0, null: false - t.datetime "log_out_date", precision: nil - t.string "session_id", limit: 36, null: false - t.index ["api_key"], name: "idx_api_key" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["session_id"], name: "idx_session_id" - end - - create_table "lottery_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "api_key", limit: 40 - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.string "ip_address", limit: 15 - t.string "url", null: false - t.index ["api_key"], name: "idx_api_key" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["ip_address"], name: "idx_ip_address" - t.index ["url"], name: "idx_url" - end - - create_table "market", id: :integer, charset: "latin1", force: :cascade do |t| - t.float "ask", null: false - t.integer "body_id", null: false - t.datetime "date_offered", precision: nil, null: false - t.integer "has_energy", limit: 1, default: 0, null: false - t.integer "has_food", limit: 1, default: 0, null: false - t.integer "has_glyph", limit: 1, default: 0, null: false - t.integer "has_ore", limit: 1, default: 0, null: false - t.integer "has_plan", limit: 1, default: 0, null: false - t.integer "has_prisoner", limit: 1, default: 0, null: false - t.integer "has_ship", limit: 1, default: 0, null: false - t.integer "has_waste", limit: 1, default: 0, null: false - t.integer "has_water", limit: 1, default: 0, null: false - t.integer "max_university" - t.integer "offer_cargo_space_needed", default: 0, null: false - t.binary "payload", size: :medium - t.integer "ship_id" - t.integer "speed", default: 0, null: false - t.integer "trade_range", default: 0, null: false - t.string "transfer_type", limit: 16, null: false - t.integer "x", default: 0, null: false - t.integer "y", default: 0, null: false - t.index ["body_id", "transfer_type"], name: "idx_market_zone" - t.index ["body_id"], name: "market_idx_body_id" - t.index ["ship_id"], name: "market_idx_ship_id" - end - - create_table "medals", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "datestamp", precision: nil, null: false - t.integer "empire_id", null: false - t.integer "public", limit: 1, default: 1, null: false - t.integer "times_earned", default: 1, null: false - t.string "type", limit: 30, null: false - t.index ["empire_id"], name: "medals_idx_empire_id" - end - - create_table "mercenary_market", id: :integer, charset: "latin1", force: :cascade do |t| - t.float "ask", null: false - t.integer "body_id", null: false - t.float "cost", null: false - t.datetime "date_offered", precision: nil, null: false - t.binary "payload", size: :medium - t.integer "ship_id", null: false - t.index ["body_id"], name: "mercenary_market_idx_body_id" - end - - create_table "message", id: :integer, charset: "latin1", force: :cascade do |t| - t.binary "attachments", size: :medium - t.text "body", size: :medium - t.datetime "date_sent", precision: nil, null: false - t.integer "from_id", null: false - t.string "from_name", limit: 30, null: false - t.integer "has_archived", limit: 1, default: 0, null: false - t.integer "has_read", limit: 1, default: 0, null: false - t.integer "has_replied", limit: 1, default: 0, null: false - t.integer "has_trashed", limit: 1, default: 0, null: false - t.integer "in_reply_to" - t.binary "recipients", size: :medium - t.string "repeat_check", limit: 30 - t.string "subject", limit: 64, null: false - t.string "tag", limit: 15 - t.integer "to_id" - t.string "to_name", limit: 30, null: false - t.index ["from_id"], name: "message_idx_from_id" - t.index ["has_archived", "has_read", "to_id", "date_sent"], name: "idx_recent_messages" - t.index ["has_archived", "to_id", "date_sent"], name: "idx_inbox_only" - t.index ["has_trashed", "to_id", "date_sent"], name: "idx_trash_only" - t.index ["repeat_check", "date_sent"], name: "idx_repeat_check_date_sent" - t.index ["to_id"], name: "message_idx_to_id" - end - - create_table "mining_platforms", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "anthracite_hour", default: 0, null: false - t.integer "asteroid_id", null: false - t.integer "bauxite_hour", default: 0, null: false - t.integer "beryl_hour", default: 0, null: false - t.integer "chalcopyrite_hour", default: 0, null: false - t.integer "chromite_hour", default: 0, null: false - t.integer "fluorite_hour", default: 0, null: false - t.integer "galena_hour", default: 0, null: false - t.integer "goethite_hour", default: 0, null: false - t.integer "gold_hour", default: 0, null: false - t.integer "gypsum_hour", default: 0, null: false - t.integer "halite_hour", default: 0, null: false - t.integer "kerogen_hour", default: 0, null: false - t.integer "magnetite_hour", default: 0, null: false - t.integer "methane_hour", default: 0, null: false - t.integer "monazite_hour", default: 0, null: false - t.integer "percent_ship_capacity", default: -1, null: false - t.integer "planet_id", null: false - t.integer "rutile_hour", default: 0, null: false - t.integer "sulfur_hour", default: 0, null: false - t.integer "trona_hour", default: 0, null: false - t.integer "uraninite_hour", default: 0, null: false - t.integer "zircon_hour", default: 0, null: false - t.index ["asteroid_id"], name: "mining_platforms_idx_asteroid_id" - t.index ["planet_id"], name: "mining_platforms_idx_planet_id" - end - - create_table "mission", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_posted", precision: nil, null: false - t.integer "max_university_level", limit: 1, null: false - t.string "mission_file_name", limit: 100, null: false - t.binary "scratch", size: :medium - t.string "zone", limit: 16, null: false - t.index ["zone", "date_posted"], name: "idx_zone_date_posted" - end - - create_table "mission_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.bigint "complete_uni_level", default: 0, null: false - t.integer "completes", default: 0, null: false - t.string "filename", null: false - t.integer "incompletes", default: 0, null: false - t.integer "offers", default: 0, null: false - t.bigint "seconds_to_complete", default: 0, null: false - t.bigint "skip_uni_level", default: 0, null: false - t.integer "skips", default: 0, null: false - end - - create_table "news", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_posted", precision: nil, null: false - t.string "headline", limit: 140, null: false - t.string "zone", limit: 16, null: false - t.index ["date_posted"], name: "idx_date_posted" - t.index ["zone", "date_posted"], name: "idx_zone_date_posted" - end - - create_table "noexist_with_empire_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - end - - create_table "plan", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "body_id", null: false - t.string "class", null: false - t.integer "extra_build_level", limit: 1, default: 0 - t.integer "level", limit: 1, null: false - t.integer "quantity", null: false - t.index ["body_id"], name: "plan_idx_body_id" - end - - create_table "probes", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id" - t.integer "body_id", null: false - t.integer "empire_id", null: false - t.integer "star_id", null: false - t.integer "virtual", default: 0 - t.index ["alliance_id"], name: "probes_idx_alliance_id" - t.index ["body_id"], name: "probes_idx_body_id" - t.index ["empire_id"], name: "probes_idx_empire_id" - t.index ["star_id"], name: "probes_idx_star_id" - end - - create_table "promotion", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "end_date", precision: nil, null: false - t.integer "max_purchase" - t.integer "min_purchase" - t.binary "payload", size: :medium - t.datetime "start_date", precision: nil, null: false - t.string "type", limit: 30, null: false - end - - create_table "propositions", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_ends", precision: nil, null: false - t.text "description" - t.string "name", limit: 30, null: false - t.integer "proposed_by_id", null: false - t.binary "scratch", size: :medium - t.integer "station_id", null: false - t.string "status", limit: 10, default: "Pending", null: false - t.string "type", limit: 30, null: false - t.index ["proposed_by_id"], name: "propositions_idx_proposed_by_id" - t.index ["station_id"], name: "propositions_idx_station_id" - t.index ["status", "date_ends"], name: "idx_status_date_ends" - end - - create_table "rpc_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "api_key", limit: 40 - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.string "module", null: false - t.index ["api_key"], name: "idx_api_key" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["module"], name: "idx_module" - end - - create_table "schedule", id: :integer, charset: "latin1", force: :cascade do |t| - t.binary "args", size: :medium - t.datetime "delivery", precision: nil, null: false - t.integer "job_id", null: false - t.integer "parent_id", null: false - t.string "parent_table", limit: 30, null: false - t.integer "priority", default: 1000, null: false - t.string "queue", limit: 30, null: false - t.string "task", limit: 30, null: false - end - - create_table "ships", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "berth_level", null: false - t.integer "body_id", null: false - t.integer "combat", null: false - t.datetime "date_available", precision: nil, null: false - t.datetime "date_started", precision: nil, null: false - t.string "direction", limit: 3, null: false - t.integer "fleet_speed", null: false - t.integer "foreign_body_id" - t.integer "foreign_star_id" - t.integer "hold_size", null: false - t.string "name", limit: 30, null: false - t.integer "number_of_docks" - t.binary "payload", size: :medium - t.integer "roundtrip", limit: 1, default: 0, null: false - t.integer "shipyard_id", null: false - t.integer "speed", null: false - t.integer "stealth", null: false - t.string "task", limit: 30, null: false - t.string "type", limit: 30, null: false - t.index ["body_id"], name: "ships_idx_body_id" - t.index ["foreign_body_id"], name: "ships_idx_foreign_body_id" - t.index ["foreign_star_id"], name: "ships_idx_foreign_star_id" - t.index ["type"], name: "idx_shiptype" - end - - create_table "sitter_auths", primary_key: ["baby_id", "sitter_id"], charset: "latin1", force: :cascade do |t| - t.integer "baby_id", null: false - t.datetime "expiry", precision: nil, null: false - t.integer "sitter_id", null: false - t.index ["baby_id"], name: "sitter_auths_idx_baby_id" - t.index ["sitter_id"], name: "sitter_auths_idx_sitter_id" - end - - create_table "spies", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "available_on", precision: nil, null: false - t.datetime "date_created", precision: nil, null: false - t.integer "defense", default: 1, null: false - t.integer "defense_mission_count", default: 0, null: false - t.integer "defense_mission_successes", default: 0, null: false - t.integer "empire_id", null: false - t.integer "from_body_id", null: false - t.integer "intel_xp", default: 0, null: false - t.integer "level", limit: 1, default: 0, null: false - t.integer "mayhem_xp", default: 0, null: false - t.string "name", limit: 30, default: "Agent Null", null: false - t.string "next_task", limit: 30, default: "Idle", null: false - t.integer "offense", default: 1, null: false - t.integer "offense_mission_count", default: 0, null: false - t.integer "offense_mission_successes", default: 0, null: false - t.integer "on_body_id", null: false - t.integer "politics_xp", default: 0, null: false - t.integer "seeds_planted", default: 0, null: false - t.integer "spies_captured", default: 0, null: false - t.integer "spies_killed", default: 0, null: false - t.integer "spies_turned", default: 0, null: false - t.datetime "started_assignment", precision: nil, null: false - t.string "task", limit: 30, default: "Idle", null: false - t.integer "theft_xp", default: 0, null: false - t.integer "things_destroyed", default: 0, null: false - t.integer "things_stolen", default: 0, null: false - t.integer "times_captured", default: 0, null: false - t.integer "times_turned", default: 0, null: false - t.index ["empire_id"], name: "spies_idx_empire_id" - t.index ["from_body_id"], name: "spies_idx_from_body_id" - t.index ["on_body_id"], name: "spies_idx_on_body_id" - end - - create_table "spy_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "age", null: false - t.datetime "date_stamp", precision: nil, null: false - t.float "defense_success_rate", null: false - t.float "defense_success_rate_delta", default: 0.0, null: false - t.integer "dirtiest", default: 0, null: false - t.integer "dirtiest_delta", default: 0, null: false - t.integer "dirtiest_rank", null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "level", null: false - t.integer "level_delta", default: 0, null: false - t.integer "level_rank", null: false - t.float "offense_success_rate", null: false - t.float "offense_success_rate_delta", default: 0.0, null: false - t.integer "planet_id", null: false - t.string "planet_name", limit: 30, null: false - t.integer "seeds_planted", default: 0, null: false - t.integer "spies_captured", default: 0, null: false - t.integer "spies_killed", default: 0, null: false - t.integer "spies_turned", default: 0, null: false - t.integer "spy_id", null: false - t.string "spy_name", limit: 30, null: false - t.float "success_rate", null: false - t.float "success_rate_delta", default: 0.0, null: false - t.integer "success_rate_rank", null: false - t.integer "things_destroyed", default: 0, null: false - t.integer "things_stolen", default: 0, null: false - t.integer "times_captured", default: 0, null: false - t.integer "times_turned", default: 0, null: false - t.index ["dirtiest_rank"], name: "idx_dirtiest_rank" - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - t.index ["level_rank"], name: "idx_level_rank" - t.index ["planet_id"], name: "idx_planet_id" - t.index ["planet_name"], name: "idx_planet_name" - t.index ["spy_id"], name: "idx_spy_id" - t.index ["spy_name"], name: "idx_spy_name" - t.index ["success_rate_rank"], name: "idx_success_rate_rank" - end - - create_table "star", id: :integer, charset: "latin1", force: :cascade do |t| - t.string "color", limit: 7, null: false - t.integer "influence" - t.string "name", limit: 30, null: false - t.integer "needs_recalc", limit: 1, default: 0, null: false - t.integer "station_id" - t.integer "x", default: 0, null: false - t.integer "y", default: 0, null: false - t.string "zone", limit: 16, null: false - t.index ["needs_recalc"], name: "idx_recalc" - t.index ["station_id"], name: "star_idx_station_id" - end - - create_table "stationinfluence", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "alliance_id", null: false - t.integer "influence", null: false - t.integer "oldinfluence", null: false - t.datetime "oldstart", precision: nil, null: false - t.integer "star_id", null: false - t.datetime "started_influence", precision: nil, null: false - t.integer "station_id", null: false - t.index ["alliance_id"], name: "stationinfluence_idx_alliance_id" - t.index ["star_id"], name: "stationinfluence_idx_star_id" - t.index ["station_id"], name: "stationinfluence_idx_station_id" - end - - create_table "supply_chain", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "building_id", null: false - t.integer "percent_transferred", default: 0, null: false - t.integer "planet_id", null: false - t.integer "resource_hour", default: 0, null: false - t.string "resource_type", default: "", null: false - t.integer "stalled", default: 0, null: false - t.integer "target_id", null: false - t.index ["building_id"], name: "supply_chain_idx_building_id" - t.index ["planet_id"], name: "supply_chain_idx_planet_id" - t.index ["target_id"], name: "supply_chain_idx_target_id" - end - - create_table "survey", primary_key: "empire_id", id: :integer, default: nil, charset: "latin1", force: :cascade do |t| - t.integer "choice" - t.text "comment" - t.index ["empire_id"], name: "empire_id" - end - - create_table "taxes", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "empire_id", null: false - t.integer "paid_0", null: false - t.integer "paid_1", null: false - t.integer "paid_2", null: false - t.integer "paid_3", null: false - t.integer "paid_4", null: false - t.integer "paid_5", null: false - t.integer "paid_6", null: false - t.integer "station_id", null: false - t.index ["empire_id"], name: "taxes_idx_empire_id" - t.index ["station_id"], name: "taxes_idx_station_id" - end - - create_table "viral_log", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "abandons", default: 0, null: false - t.integer "accepts", default: 0, null: false - t.integer "active_duration", default: 0, null: false - t.integer "creates", default: 0, null: false - t.date "date_stamp", null: false - t.integer "deletes", default: 0, null: false - t.integer "invites", default: 0, null: false - t.integer "total_users", default: 0, null: false - t.index ["date_stamp"], name: "idx_date_stamp" - end - - create_table "votes", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "empire_id", null: false - t.integer "proposition_id", null: false - t.integer "vote", default: 0, null: false - t.index ["empire_id"], name: "votes_idx_empire_id" - t.index ["proposition_id"], name: "votes_idx_proposition_id" - end - - create_table "waste_chain", id: :integer, charset: "latin1", force: :cascade do |t| - t.integer "percent_transferred", default: 0, null: false - t.integer "planet_id", null: false - t.integer "star_id", null: false - t.integer "waste_hour", default: 0, null: false - t.index ["planet_id"], name: "waste_chain_idx_planet_id" - t.index ["star_id"], name: "waste_chain_idx_star_id" - end - - create_table "weekly_medal_winner", id: :integer, charset: "latin1", force: :cascade do |t| - t.datetime "date_stamp", precision: nil, null: false - t.integer "empire_id", null: false - t.string "empire_name", limit: 30, null: false - t.integer "medal_id", null: false - t.string "medal_image", limit: 50, null: false - t.string "medal_name", limit: 50, null: false - t.integer "times_earned", null: false - t.index ["empire_id"], name: "idx_empire_id" - t.index ["empire_name"], name: "idx_empire_name" - end - - add_foreign_key "ai_battle_summary", "empire", column: "defending_empire_id", name: "ai_battle_summary_fk_defending_empire_id" - add_foreign_key "ai_scratch_pad", "body", name: "ai_scratch_pad_fk_body_id" - add_foreign_key "ai_scratch_pad", "empire", column: "ai_empire_id", name: "ai_scratch_pad_fk_ai_empire_id" - add_foreign_key "alliance", "empire", column: "leader_id", name: "alliance_fk_leader_id", on_delete: :nullify - add_foreign_key "alliance_invite", "alliance", name: "alliance_invite_fk_alliance_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "alliance_invite", "empire", name: "alliance_invite_fk_empire_id" - add_foreign_key "body", "alliance", name: "body_fk_alliance_id", on_delete: :nullify - add_foreign_key "body", "empire", name: "body_fk_empire_id" - add_foreign_key "body", "star", name: "body_fk_star_id" - add_foreign_key "building", "body", name: "building_fk_body_id" - add_foreign_key "empire", "alliance", name: "empire_fk_alliance_id", on_update: :cascade, on_delete: :nullify - add_foreign_key "empire", "body", column: "home_planet_id", name: "empire_fk_home_planet_id" - add_foreign_key "empire", "message", column: "latest_message_id", name: "empire_fk_latest_message_id", on_delete: :nullify - add_foreign_key "excavators", "body", column: "planet_id", name: "excavators_fk_planet_id" - add_foreign_key "excavators", "body", name: "excavators_fk_body_id" - add_foreign_key "excavators", "empire", name: "excavators_fk_empire_id" - add_foreign_key "fleet", "body", column: "foreign_body_id", name: "fleet_fk_foreign_body_id" - add_foreign_key "fleet", "body", name: "fleet_fk_body_id" - add_foreign_key "fleet", "star", column: "foreign_star_id", name: "fleet_fk_foreign_star_id" - add_foreign_key "glyph", "body", name: "glyph_fk_body_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "invite", "empire", column: "invitee_id", name: "invite_fk_invitee_id" - add_foreign_key "invite", "empire", column: "inviter_id", name: "invite_fk_inviter_id" - add_foreign_key "laws", "body", column: "station_id", name: "laws_fk_station_id" - add_foreign_key "laws", "star", name: "laws_fk_star_id", on_delete: :nullify - add_foreign_key "market", "body", name: "market_fk_body_id" - add_foreign_key "market", "ships", name: "market_fk_ship_id" - add_foreign_key "medals", "empire", name: "medals_fk_empire_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "mercenary_market", "body", name: "mercenary_market_fk_body_id" - add_foreign_key "message", "empire", column: "from_id", name: "message_fk_from_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "message", "empire", column: "to_id", name: "message_fk_to_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "mining_platforms", "body", column: "asteroid_id", name: "mining_platforms_fk_asteroid_id" - add_foreign_key "mining_platforms", "body", column: "planet_id", name: "mining_platforms_fk_planet_id" - add_foreign_key "plan", "body", name: "plan_fk_body_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "probes", "alliance", name: "probes_fk_alliance_id" - add_foreign_key "probes", "body", name: "probes_fk_body_id" - add_foreign_key "probes", "empire", name: "probes_fk_empire_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "probes", "star", name: "probes_fk_star_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "propositions", "body", column: "station_id", name: "propositions_fk_station_id" - add_foreign_key "propositions", "empire", column: "proposed_by_id", name: "propositions_fk_proposed_by_id" - add_foreign_key "ships", "body", column: "foreign_body_id", name: "ships_fk_foreign_body_id" - add_foreign_key "ships", "body", name: "ships_fk_body_id" - add_foreign_key "ships", "star", column: "foreign_star_id", name: "ships_fk_foreign_star_id" - add_foreign_key "sitter_auths", "empire", column: "baby_id", name: "sitter_auths_fk_baby_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "sitter_auths", "empire", column: "sitter_id", name: "sitter_auths_fk_sitter_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "spies", "body", column: "from_body_id", name: "spies_fk_from_body_id" - add_foreign_key "spies", "body", column: "on_body_id", name: "spies_fk_on_body_id" - add_foreign_key "spies", "empire", name: "spies_fk_empire_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "star", "body", column: "station_id", name: "star_fk_station_id", on_update: :cascade, on_delete: :nullify - add_foreign_key "stationinfluence", "alliance", name: "stationinfluence_fk_alliance_id" - add_foreign_key "stationinfluence", "body", column: "station_id", name: "stationinfluence_fk_station_id", on_delete: :cascade - add_foreign_key "stationinfluence", "star", name: "stationinfluence_fk_star_id" - add_foreign_key "supply_chain", "body", column: "planet_id", name: "supply_chain_fk_planet_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "supply_chain", "body", column: "target_id", name: "supply_chain_fk_target_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "supply_chain", "building", name: "supply_chain_fk_building_id" - add_foreign_key "survey", "empire", name: "survey_fk_empire_id", on_delete: :cascade - add_foreign_key "taxes", "body", column: "station_id", name: "taxes_fk_station_id" - add_foreign_key "taxes", "empire", name: "taxes_fk_empire_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "votes", "empire", name: "votes_fk_empire_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "votes", "propositions", name: "votes_fk_proposition_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "waste_chain", "body", column: "planet_id", name: "waste_chain_fk_planet_id", on_update: :cascade, on_delete: :cascade - add_foreign_key "waste_chain", "star", name: "waste_chain_fk_star_id" -end diff --git a/lacuna/db/seeds.rb b/lacuna/db/seeds.rb deleted file mode 100644 index 50f6f72f..00000000 --- a/lacuna/db/seeds.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This file should ensure the existence of records required to run the application in every environment (production, -# development, test). The code here should be idempotent so that it can be executed at any point in every environment. -# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). -# -# Example: -# -# ['Action', 'Comedy', 'Drama', 'Horror'].each do |genre_name| -# MovieGenre.find_or_create_by!(name: genre_name) -# end diff --git a/lacuna/lib/tasks/.keep b/lacuna/lib/tasks/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/lib/tasks/annotate_rb.rake b/lacuna/lib/tasks/annotate_rb.rake deleted file mode 100644 index c4d4f2d5..00000000 --- a/lacuna/lib/tasks/annotate_rb.rake +++ /dev/null @@ -1,10 +0,0 @@ -# This rake task was added by annotate_rb gem. - -# Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this -if Rails.env.development? && ENV["ANNOTATERB_SKIP_ON_DB_TASKS"].nil? - require "annotate_rb" - - # Can modify the config path here if needed - by default, it's .annotaterb.yml in the root of the project - # AnnotateRb::ConfigFinder.config_path = "" - AnnotateRb::Core.load_rake_tasks -end diff --git a/lacuna/log/.keep b/lacuna/log/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/public/robots.txt b/lacuna/public/robots.txt deleted file mode 100644 index c19f78ab..00000000 --- a/lacuna/public/robots.txt +++ /dev/null @@ -1 +0,0 @@ -# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/lacuna/script/.keep b/lacuna/script/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/storage/.keep b/lacuna/storage/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/controllers/.keep b/lacuna/test/controllers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/controllers/body_controller_test.rb b/lacuna/test/controllers/body_controller_test.rb deleted file mode 100644 index 72c8dc56..00000000 --- a/lacuna/test/controllers/body_controller_test.rb +++ /dev/null @@ -1,144 +0,0 @@ -require_relative '../test_helper.rb' - -class BodyControllerTest < ActionDispatch::IntegrationTest - teardown { teardown_test_sessions } - - # ActionDispatch::IntegrationTest already defines a `body` method of its own (request body - # helpers), which shadows the `body(:label)` fixture accessor Rails would otherwise generate - # for test/fixtures/body.yml — so the fixture's known id is used directly here instead. - BODY_ID = 14954 - - test 'get_status requires a session' do - post '/body/get_status', params: { body_id: BODY_ID } - assert_response :unauthorized - end - - test 'get_status 404s for a body the caller cannot access' do - stranger = Empire.create!( - name: 'RailsParityStranger', stage: 'founded', date_created: Time.now.utc, - self_destruct_date: Time.now.utc, sitter_password: 'x', status_message: 'x', - password: 'x', last_login: Time.now.utc, storage_boost: Time.now.utc, food_boost: Time.now.utc, - water_boost: Time.now.utc, ore_boost: Time.now.utc, energy_boost: Time.now.utc, - happiness_boost: Time.now.utc, building_boost: Time.now.utc, spy_training_boost: Time.now.utc, - outlaw_date: Time.now.utc, - ) - id = write_test_session(empire_id: stranger.id, is_sitter: 0) - - post '/body/get_status', params: { body_id: BODY_ID }, - headers: { 'Authorization' => "Token #{id}" } - - assert_response :not_found - ensure - stranger&.destroy - end - - test 'get_status matches the golden Perl response for the owner' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/body/get_status', params: { body_id: BODY_ID }, - headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - assert_matches_golden('get_status/body_status_planet_owner_golden.json', response.body) - end - - test 'get_buildings requires a session' do - post '/body/get_buildings', params: { body_id: BODY_ID } - assert_response :unauthorized - end - - test 'get_buildings 404s for a body the caller cannot access' do - stranger = Empire.create!( - name: 'RailsParityStranger2', stage: 'founded', date_created: Time.now.utc, - self_destruct_date: Time.now.utc, sitter_password: 'x', status_message: 'x', - password: 'x', last_login: Time.now.utc, storage_boost: Time.now.utc, food_boost: Time.now.utc, - water_boost: Time.now.utc, ore_boost: Time.now.utc, energy_boost: Time.now.utc, - happiness_boost: Time.now.utc, building_boost: Time.now.utc, spy_training_boost: Time.now.utc, - outlaw_date: Time.now.utc, - ) - id = write_test_session(empire_id: stranger.id, is_sitter: 0) - - post '/body/get_buildings', params: { body_id: BODY_ID }, - headers: { 'Authorization' => "Token #{id}" } - - assert_response :not_found - ensure - stranger&.destroy - end - - # No live-Perl golden capture here (unlike the other endpoints in this file): the shared dev - # DB's `building` row id 14382 still has an invalid `class` ("...::Apartment", which doesn't - # exist in lib/ — see test/fixtures/building.yml's header comment) that Perl's DynamicSubclass - # component can't instantiate, so the live Perl server 500s on this body's get_buildings today. - # This is a structural/wiring test against the (corrected) fixture data instead. - test 'get_buildings returns per-building summaries with the right conditional keys' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/body/get_buildings', params: { body_id: BODY_ID }, - headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - json = response.parsed_body - assert_equal({ 'surface_image' => 'surface-p7' }, json['body']) - - buildings = json['buildings'] - assert_equal %w[8911 14381 14382].sort, buildings.keys.sort - - crater = buildings['8911'] - assert_equal( - { 'url' => '/crater', 'image' => 'crater1', 'name' => 'Crater', 'x' => 1, 'y' => -5, - 'level' => 1, 'efficiency' => 100 }, crater - ) - assert_not crater.key?('pending_build') - assert_not crater.key?('work') - assert_not crater.key?('repair_costs') - - development = buildings['14381'] - assert_equal( - { 'url' => '/development', 'image' => 'devel5', 'name' => 'Development Ministry', 'x' => 0, - 'y' => 0, 'level' => 5, 'efficiency' => 100 }, development - ) - assert_not development.key?('pending_build') - assert_not development.key?('work') - assert_not development.key?('repair_costs') - - luxury_housing = buildings['14382'] - assert_equal '/luxuryhousing', luxury_housing['url'] - assert_equal 'luxuryhousing3', luxury_housing['image'] - assert_equal 'Luxury Housing', luxury_housing['name'] - assert_equal 80, luxury_housing['efficiency'] - - assert luxury_housing.key?('pending_build') - assert_equal LacunaDateFormat.format(Building.find(14382).upgrade_started), - luxury_housing['pending_build']['start'] - assert_equal LacunaDateFormat.format(Building.find(14382).upgrade_ends), - luxury_housing['pending_build']['end'] - - assert luxury_housing.key?('work') - assert_equal 0, luxury_housing['work']['seconds_remaining'] # fixture's timers are in the past - assert_equal LacunaDateFormat.format(Building.find(14382).work_started), - luxury_housing['work']['start'] - assert_equal LacunaDateFormat.format(Building.find(14382).work_ends), - luxury_housing['work']['end'] - - assert luxury_housing.key?('repair_costs') - assert_equal %w[energy food ore water].sort, luxury_housing['repair_costs'].keys.sort - luxury_housing['repair_costs'].each_value { |v| assert v.is_a?(Integer) && v.positive? } - end - - test 'get_buildings clears needs_surface_refresh as a side effect' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - Body.find(BODY_ID).update!(needs_surface_refresh: true) - - post '/body/get_buildings', params: { body_id: BODY_ID }, - headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - assert_not Body.find(BODY_ID).needs_surface_refresh? - ensure - Body.find(BODY_ID).update!(needs_surface_refresh: false) - end -end diff --git a/lacuna/test/controllers/empire_controller_test.rb b/lacuna/test/controllers/empire_controller_test.rb deleted file mode 100644 index f57931e4..00000000 --- a/lacuna/test/controllers/empire_controller_test.rb +++ /dev/null @@ -1,165 +0,0 @@ -require_relative '../test_helper.rb' - -class EmpireControllerTest < ActionDispatch::IntegrationTest - teardown { teardown_test_sessions } - - test 'view_profile requires a session' do - post '/empire/view_profile' - assert_response :unauthorized - end - - test 'view_profile requires a valid, non-expired session token' do - post '/empire/view_profile', headers: { 'Authorization' => 'Token not-a-real-session' } - assert_response :unauthorized - end - - test 'view_profile forbids sitter sessions' do - id = write_test_session(empire_id: empire(:rails_parity_owner).id, is_sitter: 1) - - post '/empire/view_profile', headers: { 'Authorization' => "Token #{id}" } - - assert_response :forbidden - assert_equal 'Sitters cannot modify preferences.', response.parsed_body['error'] - end - - test 'view_profile returns the profile and medals for a normal session' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/view_profile', headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - body = response.parsed_body - assert_equal empire.status_message, body['profile']['status_message'] - assert_equal empire.player_name, body['profile']['player_name'] - - medal = medals(:twenty_stars) - medal_json = body['profile']['medals'][medal.id.to_s] - assert_equal 'Won the Twenty Stars tournament', medal_json['name'] - assert_equal medal.times_earned, medal_json['times_earned'] - - assert_match(/\A\d{2} \d{2} \d{4} \d{2}:\d{2}:\d{2} [+-]\d{4}\z/, body['status']['server']['time']) - end - - test 'get_status matches the golden Perl response' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/get_status', headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - assert_matches_golden('get_status/empire_status_golden.json', response.body) - end - - test 'view_boosts matches the golden Perl response' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/view_boosts', headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - assert_matches_golden('view_boosts/empire_view_boosts_golden.json', response.body, - ignore_paths: [%w[status server time], %w[status empire rpc_count]]) - end - - test 'boost_ore requires a session' do - post '/empire/boost_ore' - assert_response :unauthorized - end - - test 'boost_ore defaults weeks to 1, spends 5 essentia, and extends the boost column' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 20.0) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/boost_ore', headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - empire.reload - assert_in_delta 15.0, empire.essentia_free, 0.001 - assert_in_delta (Time.now.utc + 7.days).to_i, empire.ore_boost.to_i, 5 - - # `ActionDispatch::IntegrationTest` already defines its own `body` method, shadowing the - # `body(:label)` fixture accessor — use the known fixture id directly (see - # test/fixtures/files/get_status/README.md's sibling gotcha note for BodyController). - home = Body.find(14954) - assert home.needs_recalc? - assert home.boost_enabled? - - log = EssentiaLog.where(empire_id: empire.id).order(:id).last - assert_equal(-5.0, log.amount) - assert_equal 'ore_boost boost', log.description - assert_equal 'tester', log.api_key - - body_json = response.parsed_body - assert_equal LacunaDateFormat.format(empire.ore_boost), body_json['boosts']['ore'] - end - - test 'boost_water accepts an explicit weeks and stacks onto an existing future expiry' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 100.0, water_boost: 1.week.from_now) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - original_expiry = empire.water_boost - - post '/empire/boost_water', params: { weeks: 2 }, headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - empire.reload - assert_in_delta 90.0, empire.essentia_free, 0.001 - assert_in_delta (original_expiry + 14.days).to_i, empire.water_boost.to_i, 5 - end - - test 'boost_energy rejects a negative or non-integer weeks with no side effects' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 20.0) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/boost_energy', params: { weeks: -1 }, headers: { 'Authorization' => "Token #{id}" } - assert_response :unprocessable_entity - - post '/empire/boost_energy', params: { weeks: 1.5 }, headers: { 'Authorization' => "Token #{id}" } - assert_response :unprocessable_entity - - empire.reload - assert_in_delta 20.0, empire.essentia_free, 0.001 - assert_not EssentiaLog.exists?(empire_id: empire.id, description: 'energy_boost boost') - end - - test 'boost_energy allows weeks: 0 as a legal no-op purchase' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 20.0) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/boost_energy', params: { weeks: 0 }, headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - empire.reload - assert_in_delta 20.0, empire.essentia_free, 0.001 - end - - test 'boost_food returns 402 when essentia is insufficient, with no side effects' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 0.0, essentia_game: 0.0, essentia_paid: 0.0) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/boost_food', headers: { 'Authorization' => "Token #{id}" } - - assert_response :payment_required - assert_equal 'Not enough essentia.', response.parsed_body['error'] - assert_not EssentiaLog.exists?(empire_id: empire.id, description: 'food_boost boost') - end - - test 'boost_storage cascades the essentia spend across free, game, and paid buckets' do - empire = empire(:rails_parity_owner) - empire.update!(essentia_free: 2.0, essentia_game: 1.0, essentia_paid: 10.0) - id = write_test_session(empire_id: empire.id, is_sitter: 0) - - post '/empire/boost_storage', params: { weeks: 1 }, headers: { 'Authorization' => "Token #{id}" } - - assert_response :success - empire.reload - assert_in_delta 0.0, empire.essentia_free, 0.001 - assert_in_delta 0.0, empire.essentia_game, 0.001 - assert_in_delta 8.0, empire.essentia_paid, 0.001 - end -end diff --git a/lacuna/test/fixtures/alliance.yml b/lacuna/test/fixtures/alliance.yml deleted file mode 100644 index 68cc26e6..00000000 --- a/lacuna/test/fixtures/alliance.yml +++ /dev/null @@ -1,5 +0,0 @@ -rails_parity_alliance: - id: 55 - name: Rails Parity Testers - forum_uri: https://example.test/forum - date_created: 2026-08-01 12:00:00 diff --git a/lacuna/test/fixtures/body.yml b/lacuna/test/fixtures/body.yml deleted file mode 100644 index e62d1969..00000000 --- a/lacuna/test/fixtures/body.yml +++ /dev/null @@ -1,130 +0,0 @@ -# Captured from the real home planet ("Ow Friafae 3", id 14954) of the test empire in -# test/fixtures/empire.yml, immediately after generating the get_status golden fixtures — see -# test/fixtures/files/get_status/README.md. These are the exact column values live at the -# moment the golden JSON was captured (Perl's own `tick` had already run server-side by then). -ow_friafae_3: - id: 14954 - name: Ow Friafae 3 - x: 102 - y: 63 - zone: "0|0" - star_id: 2081 - alliance_id: - orbit: 3 - class: Lacuna::DB::Result::Map::Body::Planet::P7 - size: 55 - usable_as_starter: 0 - usable_as_starter_enabled: 0 - empire_id: 6 - last_tick: 2026-08-16 14:06:10 - happiness_hour: 50 - happiness: 1112302 - waste_hour: 2 - waste_stored: 5000 - waste_capacity: 5000 - energy_hour: 80 - energy_stored: 10000 - energy_capacity: 10000 - water_hour: 100 - water_stored: 10000 - water_capacity: 10000 - ore_capacity: 10000 - rutile_stored: 9850 - chromite_stored: 150 - chalcopyrite_stored: 0 - galena_stored: 0 - gold_stored: 0 - uraninite_stored: 0 - bauxite_stored: 0 - goethite_stored: 0 - halite_stored: 0 - gypsum_stored: 0 - trona_stored: 0 - kerogen_stored: 0 - methane_stored: 0 - anthracite_stored: 0 - sulfur_stored: 0 - zircon_stored: 0 - monazite_stored: 0 - fluorite_stored: 0 - beryl_stored: 0 - magnetite_stored: 0 - rutile_hour: 5 - chromite_hour: 3 - chalcopyrite_hour: 0 - galena_hour: 0 - gold_hour: 0 - uraninite_hour: 0 - bauxite_hour: 0 - goethite_hour: 0 - halite_hour: 0 - gypsum_hour: 0 - trona_hour: 0 - kerogen_hour: 0 - methane_hour: 0 - anthracite_hour: 0 - sulfur_hour: 0 - zircon_hour: 0 - monazite_hour: 0 - fluorite_hour: 0 - beryl_hour: 0 - magnetite_hour: 0 - ore_consumption_hour: 4 - food_capacity: 10000 - food_consumption_hour: 15 - lapis_production_hour: 0 - potato_production_hour: 0 - apple_production_hour: 0 - root_production_hour: 0 - corn_production_hour: 10 - cider_production_hour: 0 - wheat_production_hour: 0 - bread_production_hour: 20 - soup_production_hour: 0 - chip_production_hour: 0 - pie_production_hour: 0 - pancake_production_hour: 0 - milk_production_hour: 0 - meal_production_hour: 0 - algae_production_hour: 0 - syrup_production_hour: 0 - fungus_production_hour: 0 - burger_production_hour: 0 - shake_production_hour: 0 - beetle_production_hour: 0 - bean_production_hour: 0 - cheese_production_hour: 0 - cheese_stored: 0 - bean_stored: 0 - lapis_stored: 0 - potato_stored: 0 - apple_stored: 0 - root_stored: 0 - corn_stored: 9500 - cider_stored: 0 - wheat_stored: 0 - bread_stored: 500 - soup_stored: 0 - chip_stored: 0 - pie_stored: 0 - pancake_stored: 0 - milk_stored: 0 - meal_stored: 0 - algae_stored: 0 - syrup_stored: 0 - fungus_stored: 0 - burger_stored: 0 - shake_stored: 0 - beetle_stored: 0 - boost_enabled: 0 - needs_recalc: 0 - needs_surface_refresh: 0 - restrict_coverage: 0 - plots_available: 5 - surface_version: 1 - max_berth: 1 - unhappy_date: 2023-12-30 04:05:32 - unhappy: 0 - propaganda_boost: 10 - neutral_entry: 2026-08-16 14:01:54 - notes: diff --git a/lacuna/test/fixtures/building.yml b/lacuna/test/fixtures/building.yml deleted file mode 100644 index 03bc5cc7..00000000 --- a/lacuna/test/fixtures/building.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Captured from the real buildings on test/fixtures/body.yml's body (id 14954) — see -# test/fixtures/files/get_status/README.md. The Permanent::Crater exists on every generated -# body from map creation; Development and LuxuryHousing were added to exercise -# population/building_count/build_queue_size/build_queue_length. -# -# luxury_housing (id 14382) was originally seeded with class -# "Lacuna::DB::Result::Building::Apartment", which does not exist anywhere in lib/ — not a real -# Perl class, so it could not have been captured from a live server. Corrected here to -# LuxuryHousing (a real, thematically close class) with efficiency dropped to 80 so this same -# row also exercises get_buildings's `repair_costs` conditional key. NOTE: the live dev DB's -# `building` table (id 14382) still has the original bogus class/efficiency=100 — fix that row -# too (or point a golden capture at a different building) before capturing a get_buildings -# golden JSON against the live Perl server, since a golden capture must reflect real DB state. -permanent_crater: - id: 8911 - class: Lacuna::DB::Result::Building::Permanent::Crater - level: 1 - efficiency: 100 - is_upgrading: 0 - is_working: 0 - date_created: 2023-12-30 04:05:32 - last_check: 2023-12-30 04:05:32 - upgrade_ends: 2023-12-30 04:05:32 - upgrade_started: 2023-12-30 04:05:32 - work_ends: 2023-12-30 04:05:32 - work_started: 2023-12-30 04:05:32 - x: 1 - y: -5 - body_id: 14954 - -development: - id: 14381 - class: Lacuna::DB::Result::Building::Development - level: 5 - efficiency: 100 - is_upgrading: 0 - is_working: 0 - date_created: 2026-08-16 14:02:26 - last_check: 2026-08-16 14:02:26 - upgrade_ends: 2026-08-16 14:02:26 - upgrade_started: 2026-08-16 14:02:26 - work_ends: 2026-08-16 14:02:26 - work_started: 2026-08-16 14:02:26 - x: 0 - y: 0 - body_id: 14954 - -luxury_housing: - id: 14382 - class: Lacuna::DB::Result::Building::LuxuryHousing - level: 3 - efficiency: 80 - is_upgrading: 1 - is_working: 1 - date_created: 2026-08-16 14:02:26 - last_check: 2026-08-16 14:02:26 - upgrade_ends: 2026-08-16 14:02:26 - upgrade_started: 2026-08-16 14:02:26 - work_ends: 2026-08-16 14:02:26 - work_started: 2026-08-16 14:02:26 - x: 1 - y: 0 - body_id: 14954 diff --git a/lacuna/test/fixtures/empire.yml b/lacuna/test/fixtures/empire.yml deleted file mode 100644 index fcb2caee..00000000 --- a/lacuna/test/fixtures/empire.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Captured from a real test empire ("RailsParityOwner", id 6) created in the shared dev DB -# (via bin/make_rails_test_empire.pl) while generating the get_status golden fixtures — see -# test/fixtures/files/get_status/README.md. -rails_parity_owner: - id: 6 - name: RailsParityOwner - stage: founded - date_created: 2026-08-16 13:58:50 - self_destruct_date: 2026-08-16 13:58:50 - self_destruct_active: 0 - home_planet_id: 14954 - status_message: Rails parity test empire. - password: E9JJ8stBJ7QM+nV4ZoUCeHk/gU3tPFh/5YieiJp6n2w - sitter_password: testsitter - last_login: 2026-08-16 14:02:53 - essentia_free: 0.0 - essentia_game: 0.0 - essentia_paid: 0.0 - university_level: 10 - tutorial_stage: explore_the_ui - tutorial_scratch: Ow Friafae 3 - is_isolationist: 1 - storage_boost: 2026-08-16 13:58:50 - food_boost: 2026-08-16 13:58:50 - water_boost: 2026-08-16 13:58:50 - ore_boost: 2026-08-16 13:58:50 - energy_boost: 2026-08-16 13:58:50 - happiness_boost: 2026-08-16 13:58:50 - building_boost: 2026-08-16 13:58:50 - spy_training_boost: 2026-08-16 13:58:50 - alliance_id: - species_name: Human - min_orbit: 3 - max_orbit: 3 - manufacturing_affinity: 4 - deception_affinity: 4 - research_affinity: 4 - management_affinity: 4 - farming_affinity: 4 - mining_affinity: 4 - science_affinity: 4 - environmental_affinity: 4 - political_affinity: 4 - trade_affinity: 4 - growth_affinity: 4 - skip_medal_messages: 0 - skip_pollution_warnings: 0 - skip_resource_warnings: 0 - skip_happiness_warnings: 0 - is_admin: 0 - is_mission_curator: 0 - skip_found_nothing: 0 - skip_excavator_resources: 0 - skip_excavator_glyph: 0 - skip_excavator_plan: 0 - skip_spy_recovery: 0 - skip_probe_detected: 0 - skip_attack_messages: 0 - skip_excavator_artifact: 0 - skip_excavator_destroyed: 0 - skip_excavator_replace_msg: 0 - dont_replace_excavator: 0 - latest_message_id: 205 - skip_incoming_ships: 0 - in_stasis: 0 - timeout: 0 - outlaw: 0 - outlaw_date: 2010-10-03 18:17:26 diff --git a/lacuna/test/fixtures/files/.keep b/lacuna/test/fixtures/files/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/fixtures/files/get_status/README.md b/lacuna/test/fixtures/files/get_status/README.md deleted file mode 100644 index 1439eeca..00000000 --- a/lacuna/test/fixtures/files/get_status/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# get_status golden fixtures - -These JSON files are frozen snapshots of real `Lacuna::RPC::Empire#get_status` / -`Lacuna::RPC::Body#get_status` responses, captured by hitting a live Perl server directly: - -``` -curl -s -X POST http://localhost:3050/empire -H 'Content-Type: application/json' \ - -d '{"jsonrpc":"2.0","id":1,"method":"get_status","params":[""]}' - -curl -s -X POST http://localhost:3050/body -H 'Content-Type: application/json' \ - -d '{"jsonrpc":"2.0","id":1,"method":"get_status","params":["", ]}' -``` - -Only the `result` payload is kept (the `jsonrpc`/`id` envelope is stripped). - -**These golden files and the AR fixtures they pair with must be updated together.** Each golden -file is a snapshot of one specific empire/body's real DB state at capture time — the AR fixtures -(`test/fixtures/empire.yml`, `body.yml`, `star.yml`, `building.yml`, `message.yml`) transcribe -that exact same state so Rails' `get_status` computation over the fixture rows reproduces the -golden JSON. If you recapture a golden file, re-read the source rows (`SELECT * FROM body WHERE -id = ...`, etc.) and update the matching fixture YAML to match — don't edit one without the other. - -## Test empire - -Captured from a throwaway empire "RailsParityOwner" (empire id 6, home planet "Ow Friafae 3", -body id 14954), created via `bin/make_rails_test_empire.pl` in the shared dev DB, then manually -seeded with two buildings (a level-5 Development and a level-3 Apartment, alongside the -Permanent::Crater every generated body already has) to exercise -population/building_count/build_queue_size/build_queue_length. A background game job -(pollution-warning mail) sent it an unread message during capture, which is why -`test/fixtures/message.yml` exists — it's needed for `has_new_messages` to match. - -## Files - -- `empire_status_golden.json` — `Empire#get_status`, no body involved. -- `body_status_planet_owner_golden.json` — `Body#get_status` for the empire's own home planet - (a plain, non-station Planet), viewed as owner — the only permission tier reachable through - `BodyController#get_status`, since its accessibility check (mirroring - `Lacuna::RPC::get_body`) only ever admits the owner, an alliance station-mate, or a sitter of - the owner. The "ally" (alignment-only) and "stranger" (minimal hostile block) tiers of - `Body#get_status`'s permission branching are exercised at the model level directly in - `test/models/body_test.rb`, not through this controller endpoint, since they're unreachable - through it in practice. - -## Known non-matches (see test/support/golden_status_assertions.rb's DEFAULT_IGNORE_PATHS) - -- `server.time` — current time, obviously non-deterministic. -- `empire.rpc_count` — memcached request-count, increments on every real RPC call; impossible - to freeze. -- `body.needs_surface_refresh` / `body.surface_version` — Perl's `Planet#get_status` can - self-mutate `surface_version` as a side effect of reading it (see - lib/Lacuna/DB/Result/Map/Body/Planet.pm:523-528); the Rails port is read-only and never - increments it, which is a deliberate, documented parity gap, not a bug. - -Also note: `body.happiness` and other resource fields reflect whatever Perl's `tick` last -computed at capture time — the Rails port doesn't replicate `tick` (another documented gap, -see Body#get_status's comment), so these fixtures only stay meaningful as long as nothing -re-ticks the underlying Perl-side row; the AR fixtures are static copies, unaffected by that. diff --git a/lacuna/test/fixtures/files/get_status/body_status_planet_owner_golden.json b/lacuna/test/fixtures/files/get_status/body_status_planet_owner_golden.json deleted file mode 100644 index c8eacebd..00000000 --- a/lacuna/test/fixtures/files/get_status/body_status_planet_owner_golden.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "body": { - "build_queue_len": 1, - "build_queue_size": 6, - "building_count": 2, - "empire": { - "alignment": "self", - "id": 6, - "is_isolationist": 1, - "name": "RailsParityOwner" - }, - "energy_capacity": 10000, - "energy_hour": 80, - "energy_stored": 10000, - "food_capacity": 10000, - "food_hour": 15, - "food_stored": 10000, - "happiness": 1112302, - "happiness_hour": 50, - "id": 14954, - "image": "p7-3", - "name": "Ow Friafae 3", - "needs_surface_refresh": 0, - "neutral_entry": "16 08 2026 14:01:54 +0000", - "notes": null, - "num_incoming_ally": 0, - "num_incoming_enemy": 0, - "num_incoming_own": 0, - "orbit": 3, - "ore": { - "anthracite": 1, - "bauxite": 1700, - "beryl": 1000, - "chalcopyrite": 2800, - "chromite": 1, - "fluorite": 1, - "galena": 1, - "goethite": 2400, - "gold": 1, - "gypsum": 2100, - "halite": 1, - "kerogen": 1, - "magnetite": 1, - "methane": 1, - "monazite": 1, - "rutile": 1, - "sulfur": 1, - "trona": 1, - "uraninite": 1, - "zircon": 1 - }, - "ore_capacity": 10000, - "ore_hour": 4, - "ore_stored": 10000, - "plots_available": 5, - "population": 80000, - "propaganda_boost": 10, - "size": 55, - "star_id": 2081, - "star_name": "Ow Friafae", - "surface_version": 1, - "type": "habitable planet", - "waste_capacity": 5000, - "waste_hour": 2, - "waste_stored": 5000, - "water": 5700, - "water_capacity": 10000, - "water_hour": 100, - "water_stored": 10000, - "x": 102, - "y": 63, - "zone": "0|0" - }, - "empire": { - "bodies": { - "colonies": [ - { - "empire_id": 6, - "empire_name": "RailsParityOwner", - "id": 14954, - "name": "Ow Friafae 3", - "orbit": 3, - "star_id": 2081, - "star_name": "Ow Friafae", - "type": "p7", - "x": 102, - "y": 63, - "zone": "0|0" - } - ] - }, - "colonies": { - "14954": "Ow Friafae 3" - }, - "essentia": 0, - "has_new_messages": 1, - "home_planet_id": 14954, - "id": 6, - "insurrect_value": 100000, - "is_isolationist": 1, - "latest_message_id": 205, - "name": "RailsParityOwner", - "next_colony_cost": 100000, - "next_colony_srcs": 100000, - "next_station_cost": 10000000000000000000, - "planets": { - "14954": "Ow Friafae 3" - }, - "rpc_count": 6, - "self_destruct_active": 0, - "self_destruct_date": "16 08 2026 13:58:50 +0000", - "stations": {}, - "status_message": "Rails parity test empire.", - "tech_level": 10 - }, - "server": { - "rpc_limit": 10000, - "star_map_size": { - "x": [ - -1500, - 1500 - ], - "y": [ - -1500, - 1500 - ] - }, - "time": "16 08 2026 14:07:23 +0000", - "version": 4.0001 - } -} diff --git a/lacuna/test/fixtures/files/get_status/empire_status_golden.json b/lacuna/test/fixtures/files/get_status/empire_status_golden.json deleted file mode 100644 index 2cc07b9b..00000000 --- a/lacuna/test/fixtures/files/get_status/empire_status_golden.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "empire": { - "bodies": { - "colonies": [ - { - "empire_id": 6, - "empire_name": "RailsParityOwner", - "id": 14954, - "name": "Ow Friafae 3", - "orbit": 3, - "star_id": 2081, - "star_name": "Ow Friafae", - "type": "p7", - "x": 102, - "y": 63, - "zone": "0|0" - } - ] - }, - "colonies": { - "14954": "Ow Friafae 3" - }, - "essentia": 0, - "has_new_messages": 1, - "home_planet_id": 14954, - "id": 6, - "insurrect_value": 100000, - "is_isolationist": 1, - "latest_message_id": 205, - "name": "RailsParityOwner", - "next_colony_cost": 100000, - "next_colony_srcs": 100000, - "next_station_cost": 10000000000000000000, - "planets": { - "14954": "Ow Friafae 3" - }, - "rpc_count": 5, - "self_destruct_active": 0, - "self_destruct_date": "16 08 2026 13:58:50 +0000", - "stations": {}, - "status_message": "Rails parity test empire.", - "tech_level": 10 - }, - "server": { - "rpc_limit": 10000, - "star_map_size": { - "x": [ - -1500, - 1500 - ], - "y": [ - -1500, - 1500 - ] - }, - "time": "16 08 2026 14:07:23 +0000", - "version": 4.0001 - } -} diff --git a/lacuna/test/fixtures/files/view_boosts/README.md b/lacuna/test/fixtures/files/view_boosts/README.md deleted file mode 100644 index 12a0c199..00000000 --- a/lacuna/test/fixtures/files/view_boosts/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# view_boosts golden fixture - -`empire_view_boosts_golden.json` is a frozen snapshot of a real `Lacuna::RPC::Empire#view_boosts` -response, captured by hitting a live Perl server directly: - -``` -curl -s -X POST http://localhost:3050/empire -H 'Content-Type: application/json' \ - -d '{"jsonrpc":"2.0","id":1,"method":"view_boosts","params":[""]}' -``` - -Only the `result` payload is kept (the `jsonrpc`/`id` envelope is stripped). - -Captured against the same "RailsParityOwner" test empire (id 6) used by the `get_status` -goldens — see `../get_status/README.md` for how that empire/fixture set was created. No new -fixture rows were needed: `view_boosts` reads straight off `empire.yml`'s eight `*_boost` -columns plus the same `Empire#get_status` payload the `get_status` golden already pins down. - -Unlike this directory's sibling, this response nests `server`/`empire` one level deeper (under -`status`), so the test passes explicit `ignore_paths: [%w[status server time], %w[status empire -rpc_count]]` to `assert_matches_golden` rather than relying on `DEFAULT_IGNORE_PATHS`, which is -anchored at the top level. diff --git a/lacuna/test/fixtures/files/view_boosts/empire_view_boosts_golden.json b/lacuna/test/fixtures/files/view_boosts/empire_view_boosts_golden.json deleted file mode 100644 index 0e20f1b2..00000000 --- a/lacuna/test/fixtures/files/view_boosts/empire_view_boosts_golden.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "boosts": { - "happiness": "16 08 2026 13:58:50 +0000", - "storage": "16 08 2026 13:58:50 +0000", - "spy_training": "16 08 2026 13:58:50 +0000", - "energy": "16 08 2026 13:58:50 +0000", - "food": "16 08 2026 13:58:50 +0000", - "water": "16 08 2026 13:58:50 +0000", - "ore": "16 08 2026 13:58:50 +0000", - "building": "16 08 2026 13:58:50 +0000" - }, - "status": { - "server": { - "time": "23 08 2026 10:34:01 +0000", - "star_map_size": { "y": [-1500, 1500], "x": [-1500, 1500] }, - "rpc_limit": 10000, - "version": 4.0001 - }, - "empire": { - "next_colony_srcs": 100000, - "stations": {}, - "planets": { "14954": "Ow Friafae 3" }, - "status_message": "Rails parity test empire.", - "tech_level": 10, - "rpc_count": 1, - "home_planet_id": 14954, - "is_isolationist": 1, - "id": 6, - "next_colony_cost": 100000, - "insurrect_value": 100000, - "self_destruct_active": 0, - "next_station_cost": 10000000000000000000, - "latest_message_id": 205, - "has_new_messages": 1, - "bodies": { - "colonies": [ - { - "zone": "0|0", - "star_id": 2081, - "empire_id": 6, - "empire_name": "RailsParityOwner", - "star_name": "Ow Friafae", - "orbit": 3, - "id": 14954, - "y": 63, - "type": "p7", - "x": 102, - "name": "Ow Friafae 3" - } - ] - }, - "self_destruct_date": "16 08 2026 13:58:50 +0000", - "name": "RailsParityOwner", - "essentia": 0, - "colonies": { "14954": "Ow Friafae 3" } - } - } -} diff --git a/lacuna/test/fixtures/medals.yml b/lacuna/test/fixtures/medals.yml deleted file mode 100644 index 467835ab..00000000 --- a/lacuna/test/fixtures/medals.yml +++ /dev/null @@ -1,8 +0,0 @@ -# `type` must be a real key in config/medals.json so Medal#name/#image resolve deterministically. -twenty_stars: - id: 1 - empire_id: 6 - datestamp: 2026-08-01 12:00:00 - public: 1 - times_earned: 1 - type: 20Stars diff --git a/lacuna/test/fixtures/message.yml b/lacuna/test/fixtures/message.yml deleted file mode 100644 index a97f340a..00000000 --- a/lacuna/test/fixtures/message.yml +++ /dev/null @@ -1,20 +0,0 @@ -# The pollution-warning message a background job sent to test/fixtures/empire.yml's empire -# while generating the get_status golden fixtures — needed so Empire#has_new_messages (which -# counts unread `received_messages`) matches the golden JSON's `has_new_messages: 1`. See -# test/fixtures/files/get_status/README.md. -pollution_warning: - id: 205 - from_id: 6 - to_id: 6 - from_name: RailsParityOwner - to_name: RailsParityOwner - subject: Pollution Causing Outrage - body: "The citizens are up in arms about pollution." - date_sent: 2026-08-16 14:03:00 - has_read: 0 - has_replied: 0 - has_trashed: 0 - has_archived: 0 - repeat_check: complaint_pollution14954 - tag: Complaint - recipients: '["RailsParityOwner"]' diff --git a/lacuna/test/fixtures/star.yml b/lacuna/test/fixtures/star.yml deleted file mode 100644 index d2bce55a..00000000 --- a/lacuna/test/fixtures/star.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Captured from the shared dev DB's real "Ow Friafae" star (id 2081) while manually -# generating the get_status golden fixtures (see test/fixtures/files/get_status/README.md). -ow_friafae: - id: 2081 - name: Ow Friafae - x: 100 - y: 64 - zone: "0|0" - color: white - station_id: - needs_recalc: 0 diff --git a/lacuna/test/integration/.keep b/lacuna/test/integration/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/mailers/.keep b/lacuna/test/mailers/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/models/.keep b/lacuna/test/models/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/lacuna/test/models/body_test.rb b/lacuna/test/models/body_test.rb deleted file mode 100644 index 1beb5261..00000000 --- a/lacuna/test/models/body_test.rb +++ /dev/null @@ -1,65 +0,0 @@ -require_relative '../test_helper' - -class BodyTest < ActiveSupport::TestCase - test 'get_status with no viewer shows only the minimal hostile empire block' do - body = body(:ow_friafae_3) - - status = body.get_status - - # The owner fixture (test/fixtures/empire.yml) has is_isolationist: 1. - assert_equal 'hostile-isolationist', status[:empire][:alignment] - assert_nil status[:population] - assert_nil status[:num_incoming_own] - end - - test 'get_status shows full detail to the owner' do - body = body(:ow_friafae_3) - owner = empire(:rails_parity_owner) - - status = body.get_status(owner) - - assert_equal 'self', status[:empire][:alignment] - assert_equal 80_000, status[:population] - assert_equal 2, status[:building_count] - assert_equal 6, status[:build_queue_size] - assert_equal 1, status[:build_queue_len] - end - - test 'get_status shows an alignment-only block to a non-owning ally' do - body = body(:ow_friafae_3) - owner = empire(:rails_parity_owner) - ally = Empire.new(id: -100, alliance_id: 55, is_isolationist: 0) - owner.update_column(:alliance_id, 55) # body.empire is a fresh query, so this must be persisted - - status = body.get_status(ally) - - assert_equal 'ally-isolationist', status[:empire][:alignment] - assert_nil status[:population] - ensure - owner.update_column(:alliance_id, nil) - end - - test 'get_status shows a hostile block to a stranger empire' do - body = body(:ow_friafae_3) - stranger = Empire.new(id: -101, alliance_id: nil, is_isolationist: 0) - - status = body.get_status(stranger) - - assert_equal 'hostile-isolationist', status[:empire][:alignment] - assert_nil status[:population] - end - - test 'ore_stored and food_stored sum the per-type stored columns' do - body = body(:ow_friafae_3) - - assert_equal 10_000, body.ore_stored - assert_equal 10_000, body.food_stored - end - - test 'get_type and image reflect the leaf Perl class' do - body = body(:ow_friafae_3) - - assert_equal 'habitable planet', body.get_type - assert_equal 'p7-3', body.image_name - end -end diff --git a/lacuna/test/models/building_test.rb b/lacuna/test/models/building_test.rb deleted file mode 100644 index eab71f10..00000000 --- a/lacuna/test/models/building_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -require_relative '../test_helper' - -class BuildingTest < ActiveSupport::TestCase - test 'image_level clamps to a max suffix of 9' do - b = building(:development) # level 5 - assert_equal 'devel5', b.image_level - - b.level = 12 - assert_equal 'devel9', b.image_level - end - - test 'current_level_cost mirrors INFLATION ** (level - 1)' do - b = building(:development) - assert_in_delta Empire::INFLATION**(b.level - 1), b.current_level_cost, 0.0001 - end - - test 'upgrade_status is nil when not upgrading' do - assert_nil building(:development).upgrade_status - end - - test 'upgrade_status reports the timer when upgrading' do - b = building(:luxury_housing) - status = b.upgrade_status - assert_equal LacunaDateFormat.format(b.upgrade_started), status[:start] - assert_equal LacunaDateFormat.format(b.upgrade_ends), status[:end] - assert_equal b.upgrade_ends.to_i - Time.now.utc.to_i, status[:seconds_remaining] - end - - test 'work_seconds_remaining is 0 when not working or when the timer has already elapsed' do - assert_equal 0, building(:development).work_seconds_remaining - assert_equal 0, building(:luxury_housing).work_seconds_remaining # fixture's work_ends is in the past - end - - # Independently re-derives the expected damage cost from the building-class-info JSON directly - # (rather than calling #current_level_cost), so this catches a wrong-column mapping bug - # (e.g. ore/water swapped) in #repair_costs, not just a formula typo shared by both. - test 'repair_costs scales each build-cost constant by the damage fraction' do - b = building(:luxury_housing) # efficiency: 80, level: 3 - class_info = Building::CLASS_INFO.fetch(b.perl_class) - - level_cost = Empire::INFLATION**(b.level - 1) - damage_cost = level_cost * (100 - b.efficiency) / 100.0 - - expected = { - ore: (class_info['ore_to_build'] * damage_cost).round, - water: (class_info['water_to_build'] * damage_cost).round, - food: (class_info['food_to_build'] * damage_cost).round, - energy: (class_info['energy_to_build'] * damage_cost).round, - } - - assert_equal expected, b.repair_costs - end - - test 'summary omits pending_build/work/repair_costs when not applicable' do - b = building(:development) # efficiency 100, not upgrading, not working - summary = b.summary - - assert_not summary.key?(:pending_build) - assert_not summary.key?(:work) - assert_not summary.key?(:repair_costs) - end - - test 'summary includes pending_build/work/repair_costs when applicable' do - b = building(:luxury_housing) - summary = b.summary - - assert summary.key?(:pending_build) - assert summary.key?(:work) - assert summary.key?(:repair_costs) - end -end diff --git a/lacuna/test/models/session_test.rb b/lacuna/test/models/session_test.rb deleted file mode 100644 index 02f79f0b..00000000 --- a/lacuna/test/models/session_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -require_relative '../test_helper' - -class SessionTest < ActiveSupport::TestCase - teardown { teardown_test_sessions } - - test 'find returns nil for a blank id' do - assert_nil Session.find(nil) - assert_nil Session.find('') - end - - test 'find returns nil when the memcached key is missing' do - assert_nil Session.find('test-session-does-not-exist') - end - - test 'find returns nil for a malformed (non-JSON) cached value' do - id = "test-session-#{SecureRandom.hex(8)}" - Rails.application.config.x.memcached.set("session:#{id}", 'not json', 60) - assert_nil Session.find(id) - ensure - Rails.application.config.x.memcached.delete("session:#{id}") - end - - test 'find returns a Session with the expected attributes' do - empire = empire(:rails_parity_owner) - id = write_test_session(empire_id: empire.id, is_sitter: 1, real_empire_id: empire.id) - - session = Session.find(id) - - assert_equal empire.id, session.empire_id - assert_equal empire, session.current_empire - assert_equal 1, session.is_sitter - end -end diff --git a/lacuna/test/support/golden_status_assertions.rb b/lacuna/test/support/golden_status_assertions.rb deleted file mode 100644 index 1f4b3c2e..00000000 --- a/lacuna/test/support/golden_status_assertions.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Shared assertion for comparing a get_status controller response against a golden JSON -# fixture captured from a real, running Perl server — see -# test/fixtures/files/get_status/README.md for how these were produced and what they pin down. -module GoldenStatusAssertions - # Fields that are inherently non-deterministic (change on every request/tick) even when - # replaying the exact same fixture data — never worth comparing exactly. - DEFAULT_IGNORE_PATHS = [ - %w[server time], - %w[empire rpc_count], - %w[body needs_surface_refresh], - %w[body surface_version], - ].freeze - - def assert_matches_golden(golden_filename, actual_json, ignore_paths: []) - expected = JSON.parse(file_fixture(golden_filename).read) - actual = JSON.parse(actual_json) - - (DEFAULT_IGNORE_PATHS + ignore_paths).each do |path| - deep_delete(expected, path) - deep_delete(actual, path) - end - - assert_equal expected, actual - end - - private - - def deep_delete(hash, path) - *parents, leaf = path - target = parents.reduce(hash) { |h, key| h.is_a?(Hash) ? h[key] : nil } - target.delete(leaf) if target.is_a?(Hash) - end -end diff --git a/lacuna/test/support/session_test_helper.rb b/lacuna/test/support/session_test_helper.rb deleted file mode 100644 index 820b8195..00000000 --- a/lacuna/test/support/session_test_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Writes a Perl-shaped session hash directly into the shared memcached instance, the same way -# Lacuna::Session#update does (lib/Lacuna/Session.pm:121-137) — lets tests authenticate as a -# fixture empire without a real Perl login. Session ids are namespaced and cleaned up so they -# never collide with real sessions in the shared dev/test memcached instance. -module SessionTestHelper - def write_test_session(empire_id:, is_sitter: 0, real_empire_id: nil, extended: 0) - id = "test-session-#{SecureRandom.hex(8)}" - (@written_test_sessions ||= []) << id - payload = { - 'real_empire_id' => real_empire_id || empire_id, - 'empire_id' => empire_id, - 'api_key' => 'tester', - 'extended' => extended, - 'is_sitter' => is_sitter, - 'is_from_admin' => 0, - 'ip_address' => '127.0.0.1', - } - Rails.application.config.x.memcached.set("session:#{id}", payload.to_json, 3600) - id - end - - def teardown_test_sessions - (@written_test_sessions || []).each { |id| Rails.application.config.x.memcached.delete("session:#{id}") } - end -end diff --git a/lacuna/test/test_helper.rb b/lacuna/test/test_helper.rb deleted file mode 100644 index 6e34ded3..00000000 --- a/lacuna/test/test_helper.rb +++ /dev/null @@ -1,31 +0,0 @@ -ENV['RAILS_ENV'] ||= 'test' - -require 'simplecov' -SimpleCov.start do - load_profile 'rails' - project_name 'Lacuna' -end - -require_relative '../config/environment' - -require 'rails/test_help' -require 'minitest/rails' -require 'minitest/pride' - -require_relative 'support/golden_status_assertions' -require_relative 'support/session_test_helper' - -module ActiveSupport - class TestCase - include GoldenStatusAssertions - include SessionTestHelper - - # Run tests in parallel with specified workers - parallelize(workers: :number_of_processors) - - # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. - fixtures :all - - # Add more helper methods to be used by all tests here... - end -end -- 2.54.0