Commit graph

502 commits

Author SHA1 Message Date
7b74105e63
Updates to Ruby 3.3.7 (#163)
* Update .ruby-version and Gemfile

* Update .ruby-gemset

* Update Gemfile.lock
2025-01-15 21:31:49 -08:00
d75e4a8448
Downloader fixes (#162)
* Fix summon data

* Update logic for downloaders

These are responsible for downloading variants (01, 02, etc)

* Update puts statement

* Simplify ImageDownloader

* Simplify DownloadManager
2025-01-15 19:15:58 -08:00
fa386511e1
Some final post-deploy fixes (#161)
* Fix track_record error

* Add newlines

* Update PR templates
2025-01-15 18:06:20 -08:00
52f213d4cb
Update importer (#160)
* Importer now displays validation errors

This will help people debug errors before submitting their PR.

* Fix errors in the outstanding updates
2025-01-15 17:46:14 -08:00
0fd3f0f801
Importer should no longer look for recruits_id (#159) 2025-01-15 16:21:10 -08:00
aac629debc
Update recruits_id to recruits (#158) 2025-01-15 16:13:05 -08:00
b454ce2785
Update 20250113-summons-002.csv (#157) 2025-01-15 16:04:32 -08:00
a8ca474e4c
Add second batch of new items to database (#153)
* Adds more new items to the database

* Updates to older migrations

These were manually updated in the database

* Adds more new items to the database

* Fixes misclassification of Grand Weapons

* Add the final new items

* Delete 20250115-summons-003.csv

* Updates weapons with granblue_id reference to Characters

* Remove extra empty lines

* Adds Orologia summon

* Modify deployment manager

Use - to make it easier to copy paste into Github PR
2025-01-15 15:57:47 -08:00
1ffd96633b
Try to fix data migration error in post-deploy script (#156) 2025-01-15 15:35:13 -08:00
d71b78e5f8
Update post-deploy script and Rails credentials (#155)
* Fresh credentials.yml.enc

* Update .ruby-gemset

* Made PostDeploymentManager modular

We broke PostDeploymentManager out into several files to make it easier to maintain.

We also added a "force" mode that forces the script to consider all CSV files. This is useful for testing the post-deploy script itself. This should only be used in test mode or you will dirty your database.

We also fine tuned some of the logging to make sure that both verbose and non-verbose modes are helpful.
2025-01-15 14:56:38 -08:00
0d46cb3833
Link Character and Weapon tables with granblue_id (#154)
* Add recruits column to weapons

* Populate recruits column with granblue_ids

* Remove recruits_id and index recruits
2025-01-15 02:11:06 -08:00
386515cd18
Rename data_update_request_template.md to pull_request_template.md (#152) 2025-01-15 01:28:56 -08:00
df7454af4e
Add migration to post-deploy script (#151) 2025-01-13 06:36:01 -08:00
1d6dff18de
Add the first batch of new items (#149) 2025-01-13 06:12:56 -08:00
a03b1bfe20
Create data_update_request_template.md (#150) 2025-01-13 05:54:09 -08:00
c0922203a7
Create pipeline for importing data via PRs (#148)
* Add table for data version and migrate

* Modify migration and re-migrate

* Create data_version.rb

Adds a model for DataVersion

* Add aws-sdk-s3 and create aws_service.rb

AwsService handles streaming game image files from the Granblue Fantasy server to our S3 instance.

* Add importers

The Importer libraries take CSV data and import them into the database for each type. We currently support characters, summons and weapons.

* Add downloaders

Downloaders take Granblue IDs and download images for those items from the Granblue Fantasy server in all relevant sizes.

Downloaders can download to disk or stream the file directly to S3.

* Create data_importer.rb

* Fetches a list of all CSV files present in the updates folder
* Checks which have already been imported
* Sends unimported data to the appropriate Importer to handle

* Create download_manager.rb

Creates an appropriate downloader for each Granblue ID it receives

* Update download_images.rake

Most of this task has been extracted into the Downloader libraries

* Update import_data.rake

* Create deploy.rake

This task is to be run as a post-deploy script. It checks for new unimported data, imports it, then downloads the relevant images to S3 or local disk depending on the parameters provided.

* Update credentials.yml.enc

* Began working on a README and added example CSVs

* Modify importer to handle updates

This way we can also add FLBs and other uncaps easier.

* Updates only require values that will change

When updating a row, fields that don't have a provided value will not be changed

* Rebuild search indices in post deploy

* Clean up logs with LoggingHelper

* More logging adjustments

Trying to get a nice-looking output

* Change some ASCII characters

* Final ASCII changes

* Fix issues with Summon and Weapon importers

* Finish README for contributing
2025-01-13 05:33:04 -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
53760bf87a
Add raids#show (#145) 2024-02-21 23:25:11 -05:00
6809030b5a
Fix transcendence date column type (#144) 2024-01-25 19:35:21 -08:00
67b5959afb
Updated image downloader (#143)
At the expense of making database calls, the image downloader now only attempts to download images that will exist for the specific object based on how many uncaps it has.
2024-01-25 02:25:08 -08:00
9cf8626752
Add support for weapon transcendence (#142)
* Add migrations

* Add weapon key 4 column

* Update schema.rb

* Add transcendence date to weapon

* Rename summon XLB to match weapon

* Update blueprints

* Update search

* Accept weapon transcendence step

* Update XLB to transcendence for summons

* Add logic for transcending weapons

* Add transcendence step to weapon blueprint
2024-01-15 14:05:17 -08:00
4cf6516fe5
Allow PartiesController to accept nested attributes (#141) 2024-01-13 09:56:55 -08:00
d465b87da6
Hotfix so weapon key search translates ints to arrays (#140) 2023-12-30 06:20:22 -08:00
10901a74da
Don't index on nicknames for now (#139)
This is causing us to be unable to re-index for some reason
2023-12-26 14:03:29 -08:00
00e5ec8c4b
API updates for Draconic Weapons Providence (#138)
* Make weapon key series an array

Draconic Weapons Providence can have original Draconic Weapon keys, but also have a new key that can only be equipped to them. Thanks, Cygames.

* Update weapon.rb

* Update to check key compatibility against an array instead of an int
* Add convenience function to check if the weapon is part of a Draconic Weapon series

* Update grid_weapon.rb

Update conflict detection to:
* Detect Draconic Weapons Providence
* Add multiple weapons to conflicting weapons instead of just one

* (WIP) Update conflict view rendering

Conflict blueprints should render multiple conflict weapons instead of just one.

Also adds Draconic Weapon Providence series to various places that check series by number

* Finish last bugs

We tested to ensure that conflict resolution appears for

* Opus and Draconic
* Draconic and Draconic 2
* Draconic 2 + Opus and Draconic 1
2023-12-26 03:21:06 -08:00
92f29dfa08
Set extra from raid party, not extra property (#137) 2023-11-05 14:30:08 -08:00
3356701671
Fix not_owner method (#136) 2023-10-11 11:25:02 +09:00
4945a82980
Nullify edit key when party is remixed (#135)
This stops logged in users from editing remixed parties
2023-09-26 07:53:14 +09:00
f8815043e6
Return the user's role in login and user blueprints (#133) 2023-09-09 02:29:32 -07:00
0cf1e629bf
Fix editing items without AX skills (#132)
Add & to check that the `ax_strength` keys exist before testing for `zero?`
2023-09-03 14:16:46 -07:00
2dd37d1a1e
Null out empty AX values before saving (#131) 2023-09-01 11:19:37 -07:00
5cd357be3f
Allow World Weapons in Extra slots (#130) 2023-08-31 18:42:20 -07:00
39b353d9bd
(Hotfix) Fix summon transcendence (#129)
Manually setting summon transcendence was not working due to a change that passed in the canonical object instead of the grid object to `max_uncap_level`
2023-08-26 15:38:54 -07:00
8381c668bc
Implement roles and visibility (#128)
* Add migrations to add user roles and party visibility.

* Update schema.rb

* Add admin check in User model

* Implement rudimentary visibility of teams

* Adds checks to Party model
* Hides parties from collection views depending on visibility
* Disallows viewing private parties if you're not the owner

* Add a party's visibility to blueprint

* Add admin mode

The API Controller checks if the user is logged in and whether they are an admin, and checks for the X-Admin-Mode header

* Implement admin mode overrides

* Add admin_mode to authorize

* Note to self: Implement user editing by admins

* Fix syntax error with equality in SQL

* Fix syntax error with method name

* Fix bug in who can see restricted parties

* Add privacy control to user profiles
2023-08-25 15:53:56 -07:00
c79d2717cc
Hotfix 20230821 (#127)
* Fix favorites page by fixing how query is built

* Set uncap level when GridSummon is created

If you don't, then NULL entries get sent to the database from the bookmarklet.
2023-08-24 20:41:31 -07:00
ac7f5ab80a
Send characters and summons in preview layout (#126) 2023-08-23 23:52:32 -07:00
af960d7a93
Fix favorites page by fixing how query is built (#125) 2023-08-21 20:42:54 -07:00
d2c5455120
Add support for inclusions/exclusions (#124)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons

* Search is broken in Japanese!

* Grid model object updates

* Adds has_one association to canonical objects
* GridWeapon is_mainhand refactored
* GridCharacter add_awakening refactored

* (WIP) Add support for inclusion/exclusion + refactor

This commit adds basic support for including/excluding objects from collection filters. There is also a refactor of the filter logic as a whole. It is only implemented in `teams` for now and is a work in progress.

* Update multisearch for exclusions

* Add nicknames to the index for multisearchable
2023-08-21 20:01:15 -07:00
4ee7a3a644
Order search results by release or update date (#123)
The list of all items that shows up when you open the search modal will now list all items sorted latest first, whether the item is brand new or an item that recently got an uncap.
2023-08-20 01:56:15 -07:00
1646f3d555
Update item search with better fallbacks and nicknames (#122)
* Add migrations for nicknames

* Rename migrations to be after last migration

* Migrate database

* Update search in models

* Search against nickname columns
* Add dictionary search to EN search so its not only trigrams
2023-08-20 00:46:25 -07:00
0ccbb7ecfe
Implement wiki parsers (#121)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons

* Search is broken in Japanese!

* Grid model object updates

* Adds has_one association to canonical objects
* GridWeapon is_mainhand refactored
* GridCharacter add_awakening refactored

* (WIP) Add support for inclusion/exclusion + refactor

This commit adds basic support for including/excluding objects from collection filters. There is also a refactor of the filter logic as a whole. It is only implemented in `teams` for now and is a work in progress.

* Revert "Grid model object updates"

This reverts commit 70e820b781.

* Revert "(WIP) Add support for inclusion/exclusion + refactor"

This reverts commit b5f9889c00.

* Add new dependencies

* Update database with new columns

* Create WikiError

This is modeled after the errors we might receive from the wiki

* Update GranblueWiki

This is an adaptation and cleanup of the original GranblueWiki class. We extracted the object-related code into a parser, and this class is now only responsible for requests and fetching common property maps.

* Create CharacterParser

The CharacterParser is responsible for taking the response from a wiki object and turning it into something usable. Most of the logic from the original GranblueWiki object ended up here.

To use, you can instantiate a CharacterParser with a Granblue ID. It will create the wiki object for you using the provided character and fetch data when you call `fetch` on the CharacterParser.

You can also fetch data for all characters with the static method `fetch_all`

Currently a specific subset of fields are persisted, but in the future more can and probably should be saved

* Add data tables for weapons and summons

This lets us store wiki data and release dates for weapons and summons

* Add mapping for bullets

* Properly pass props

* Update debug string

* Update character parser to use correct vars

* Add weapon parser

The weapon parser parses through weapon pages.

It has the ability to parse skills but that is not complete yet.

It can go through every weapon on the wiki with the aid of the new `wiki_en` column and parse basic data successfully

* Update code for FLB

If a weapon has ULB, it has FLB too

* Add summon parser

The summon parser parses through summon pages. Aura/Call parsing has not been added.

* Add XLB date column for summons

* Add fetch_from_list static method

This backports the `fetch_from_list` static method to CharacterParser and WeaponParser. This will let us fetch data for a specific set of items instead of having to fetch one-by-one or fetch the entire dataset again.
2023-08-19 23:05:32 -07:00
c7b0c48428
Search was broken in Japanese! (#120)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons

* Search is broken in Japanese!
2023-07-06 18:08:08 -07:00
6d51033d0e
Fix summon update_uncap_level (#119)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search

* Update grid_summons_controller.rb

Set the proper uncap level for transcended summons
2023-07-06 17:10:18 -07:00
39a0d33bee
July 2023 Feature Release: Tagging objects (#118)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code

* Add granblue.team to cors

This works now!

* Implement all-entity search to support tagging objects (#117)

* Add table for multisearch

* Add new route for searching all entities

* Make models multisearchable

We're going to start with Character, Summon, Weapon and Jobs

* Add method to Search controller

This will search with trigram first, and then if there aren't enough results, search with prefixed text search

* Add support for Japanese all-entity search
2023-07-05 21:51:36 -07:00
10d222fddc
Enable CORS for granblue.team (#116)
* Add granblue.team to cors
2023-07-05 13:08:51 -07:00
13a9644bb0
(Hotfix) Fixes a variety of small bugs (#115)
* Remove ap call

* Fix remix render method

* Downcase username on db end

There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.

* Remove ap call and unused code
2023-07-04 03:21:02 -07:00
78b5b063fc
Deploy July Quality Update (#114)
* 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

* Allow users to delete parties with remixes (#111)

There was a bug that prevented users from deleting parties with remixes, because the source party reference was not being nulled.

We fixed that with `dependent: :nullify` but also added a boolean key to the parties database to track if a party is a remix or not. This way, if a party is flagged as a remix but the source party is null, we know that the original party was deleted and can message this on the frontend.

* Fix deleting grid summons (#112)

A bad decision to try to reduce code in `set` made this fail with a 422 because `summon_params` was being tested against but... didn't exist? was nil?

I fixed it by not using `set` before calling `destroy`, and just finding the summon in the `destroy` method itself

* Usernames in URLs should not be case-sensitive (#113)

Amateur hour mistake

* Change default filters in users controller
2023-07-04 00:40:06 -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
e588b81d4a
(Hotfix) Fix awakening-related API errors (#108)
* 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
2023-06-21 01:10:05 -07:00
0befd788fc
(Hotfix) Fix stale migrations (#107)
* Remove print statements from data migration

* (Hotfix) Fix data migration failing due to nil

* Fix stale migration errors
2023-06-21 00:35:31 -07:00