I am currently working on a rails app. The app uses some pages from a common library (pulled into the app by a gem). Some of these pages are now outdated. The html pages are rendered in haml with the help of yaml files.
I am currently trying to update one of the haml pages from the common library(the gem).
I need to update the page to display current information but also to display correctly to pass an audit.
Currently the only way to test if the refactoring works is to change the haml in the file in the common library. Put in a PR for it, updating the gem version so I can pull it after it's approved. When this gets approved, I can try to merge it then I can try to pull it locally and run the full app to see how it renders.
This is taking a long time and I am trying to see if there is a way to just render the haml code locally without running the rails server. A little like how I can just check an html file by opening it in a browser.
I tried using an html to haml converter but this doesn't work for the app I am working on. The yaml file it references causes problems, when I refactor the main app it takes a few tweaks (extra or less indentation) to get it right. I would like to check dev tools to make sure it renders correctly to the browser for accessibility.
The yaml file is pulled in by using variables to display the html. For example:
=link_to t(something.something_else.this)...```
I would suggest forking the gem into your own github account and downloading your own forked version to your dev machine.
For speed, while you are developing, you can pull the local version of the gem into your app by using the path
option in your Gemfile:
# Gemfile
gem 'the_gem_i_like', path: '/path/to/the/gem`
You can make changes locally, push them to your forked version, and generate a PR for the original when you're ready.