degica / kaiser

Commandline Gem that allows you to work with web apps better
https://tech.degica.com/kaiser/
MIT License
12 stars 1 forks source link

Fix migration incompatibility #72

Closed davidsiaw closed 2 years ago

davidsiaw commented 2 years ago

This fixes the migration for config dotfiles. It is done by a oneliner that unfortunately only works in bash. We write a procedural version here that is compatible with any system that uses ruby.

You can test this manually by

  1. rename your ~/.kaiser/config.yml to ~/.kaiser/.config.yml
  2. run kaiser up
  3. and check that ls -a ~/.kaiser will show you no dotfiles.
degicat commented 2 years ago

@yunshine can you help us review this PR, please?

yunshine commented 2 years ago

@davidsiaw I'm sorry to ask, but since I don't have much experience with Kaiser, would you mind explaining to me how to test this PR? I've read the documentation for the migrate_dotted_config_files method, and I can see what x.sub(%r{/\.([a-z.]+)$}, '/\1') is doing, so the changes you've made in this PR seem fine to me. 👍🏻 However, I'm just not sure how to check that the changes to the code do what's intended. 😅 Thank you in advance!

davidsiaw commented 2 years ago

@yunshine you are absolutely right. i will write some tests for it so you can check it better. and write a manual test procedure

davidsiaw commented 2 years ago

@yunshine I wrote a little thing for you to manually try but I will write a test too.