Skip to content

[WIP] Implement deploy example using Kamal#60

Draft
davidstosik wants to merge 2 commits into
sto/dockerfrom
sto/kamal
Draft

[WIP] Implement deploy example using Kamal#60
davidstosik wants to merge 2 commits into
sto/dockerfrom
sto/kamal

Conversation

@davidstosik

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copilot AI Mar 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.
- money_forward_name: "モバイルSuica"
ynab_name: "SUICA"
- money_forward_name: "VIEW CARD"
ynab_name: "VIEW card"

Copilot AI Mar 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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"

Copilot uses AI. Check for mistakes.
@davidstosik
davidstosik force-pushed the sto/docker branch 5 times, most recently from 760c024 to f4c7417 Compare March 26, 2025 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants