[WIP] Implement deploy example using Kamal#60
Draft
davidstosik wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
PR Overview
This PR introduces a deploy example using Kamal, updating configuration files and integrating cookie caching for the Money Forward session.
- Adds new configuration files for deployment (deploy.yml and mfynab.yml)
- Updates Gemfile with dependencies for Kamal and mfynab
- Implements cookie caching in the Money Forward session and documents a timezone issue in account status parsing
Reviewed Changes
| File | Description |
|---|---|
| docker_example/kamal/config/deploy.yml | New deploy configuration for Kamal example |
| docker_example/kamal/config/mfynab.yml | New configuration for Money Forward account mapping |
| docker_example/kamal/Gemfile | Dependency additions for Kamal and mfynab |
| lib/mfynab/money_forward/account_status.rb | Added comments regarding timezone issues in date parsing |
| lib/mfynab/money_forward/session.rb | Implements cookie caching with read and write cache functions |
| README.md | Added WIP notes regarding container login issues via email auth |
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Comment on lines
+44
to
+45
| cookie_attributes = JSON.parse(File.read(COOKIE_CACHE_PATH)) | ||
| self.cookie = Ferrum::Cookies::Cookie.new(cookie_attributes) |
There was a problem hiding this comment.
Consider adding error handling around JSON.parse in case the cookie cache file contains invalid JSON, to prevent runtime crashes.
Suggested change
| cookie_attributes = JSON.parse(File.read(COOKIE_CACHE_PATH)) | |
| self.cookie = Ferrum::Cookies::Cookie.new(cookie_attributes) | |
| begin | |
| cookie_attributes = JSON.parse(File.read(COOKIE_CACHE_PATH)) | |
| self.cookie = Ferrum::Cookies::Cookie.new(cookie_attributes) | |
| rescue JSON::ParserError => e | |
| logger.error("Failed to parse cookie cache: #{e.message}") | |
| nil | |
| end |
| - money_forward_name: "モバイルSuica" | ||
| ynab_name: "SUICA" | ||
| - money_forward_name: "VIEW CARD" | ||
| ynab_name: "VIEW card" |
There was a problem hiding this comment.
[nitpick] Consider using consistent casing for account names. For example, change 'VIEW card' to 'VIEW Card' to match the style of other entries.
Suggested change
| ynab_name: "VIEW card" | |
| ynab_name: "VIEW Card" |
davidstosik
force-pushed
the
sto/docker
branch
5 times, most recently
from
March 26, 2025 04:38
760c024 to
f4c7417
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.