Commit graph

24 commits

Author SHA1 Message Date
11d324efe9
Fix image embeds 3 (#176)
* Add default preview images

* Update application.rb

* Adds app assets path in API mode
* Cleans up file

* Create assets.rb

An initializer for font assets (for image generation)

* Updates to Canvas and Coordinator

* Update parties_controller.rb

* Adds retry header if generation is still in progress
* Streams S3 content instead of redirecting to prevent 302

* Update coordinator.rbs

* Create previews.rake

A rake task for generating images offline

* Add commands to build phase
2025-01-20 03:55:22 -08:00
1c1ed0dd9d
Work towards fixing embed images (#174)
* Add Redis and Sidekiq

* Rename PreviewGenerationMonitor

* Update production.rb

require master key

* Initialize AWS at application start

* Add fallbacks for credentials

* Add logging

* Create railway.toml
2025-01-18 11:46:41 -08:00
e3a44ca0d5
Implement embed images (#173)
* Add mini_magick and rufus-scheduler

* Expose attributes and add sigs to AwsService

* Get Party ready for preview state

* Added new fields for preview state and generated_at timestamp
* Add preview state enum to model
* Add preview_relevant_changes? after_commit hook

* Add jobs for generating and cleaning up party previews

* Add new endpoints to PartiesController

* `preview` shows the preview and queues it up for generation if it doesn't exist yet
* `regenerate_preview` allows the party owner to force regeneration of previews

* Schedule jobs

* Stalled jobs are checked every 5 minutes
* Failed jobs are retried every hour
* Old preview jobs are cleaned up daily

* Add the preview service

This is where the bulk of the work is. This service renders out the preview images bit by bit. Currently we render the party name, creator, job icon, and weapon grid.

This includes signatures and some fonts.
2025-01-18 09:08:15 -08:00
0d5d4d5f59
Jedmund/import (#167)
* Move app/helpers/granblue_wiki to lib/parsers/wiki

This clears up the namespace beginning with "Granblue"

* Removed some top-level Granblue libs

DataImporter and DownloadManager exist inside of the PostDeployment namespace now so these files are redundant

* Fix Downloaders namespace

Our namespace was singular Downloader, now it is plural Downloaders to match the folder name

* Fix import paths

* DownloadManager was moved to downloaders/
* import_data task now uses the PostDeployment version of DataImporter

* Update application.rb

Eager-Load/Autoload the lib/ folder

* Update cors.rb

Add Granblue website and Extension ID to CORS

* Add transformers

Transformers take raw data from Granblue Fantasy and transforms them into hensei-compatible JSON. Transformers heavily borrow from vazkii/hensei-transfer.

* Add ImportController and route

This adds the controller that handles creating a full party from transformed Granblue Fantasy data
2025-01-17 12:02:12 -08:00
0e490df113
Assorted updates (#146)
* Syntax updates

* Update rake task for image downloading

* Add endpoints for showing a single job
2025-01-08 12:19:19 -08:00
10d222fddc
Enable CORS for granblue.team (#116)
* Add granblue.team to cors
2023-07-05 13:08:51 -07:00
293e94437b
Update seeds and fix deletion bug (#110)
* Remove print statements from data migration

* (Hotfix) Fix data migration failing due to nil

* Fix stale migration errors

* Ensure new characters have Awakenings

Every character starts with Balanced Lv1 awakening

* Ensure weapons without awakenings do not expose key

* Updates database seeds (#109)

* Destroy favorites when a party is deleted
2023-06-23 20:34:08 -07:00
06f8d28874
February 2023 Update (#48) 2023-02-04 23:46:12 -08:00
540df78ee9 Change CORS for production or dev env 2023-01-02 16:24:40 -08:00
c102d68dd7 Update blueprinter.rb 2022-12-21 03:31:24 -08:00
7720d5400f Configure Blueprinter 2022-12-21 01:17:04 -08:00
712c866296 Remove rabl 2022-12-21 01:16:34 -08:00
91d4dcb416 Update cors.rb 2022-02-01 05:02:44 -08:00
423d7047cb i give up 2022-01-30 02:12:09 -08:00
61842ba0c8 Update cors.rb 2022-01-30 01:21:21 -08:00
2aa868682e Update cors.rb 2022-01-30 01:14:02 -08:00
a87eba7aa6 Update cors.rb 2022-01-30 01:09:59 -08:00
51dd504a9f Test CORS 2022-01-30 01:07:14 -08:00
47576dff36 Move CORS definitions to env variable 2022-01-30 00:10:21 -08:00
e539bb16b6 Disable Doorkeeper's new client authentication for passwords
This will be removed eventually but figuring this out is not where I'm mentally at right now
2021-10-28 10:49:07 -07:00
2c9c6de915 Add doorkeeper files 2020-09-25 10:53:06 -07:00
a1030ebc58 Update cors.rb 2020-09-16 23:56:10 -07:00
703bcbdf9d Configure for ngrok 2020-09-16 03:41:03 -07:00
f616fe23db Restart on Rails 2020-09-14 18:30:54 -07:00