Necessary to allow the SVG output of QR code generation to be used in responsive design so folks can allow these images to shrink/grow as desired.
The `standalone` key was dropped since this is default behavior so no need to be explicit.
The test suite was updated to account for the new `view` attribute by using REXML to acquire all attributes of the resulting SVG image. This allows each test to be explicit while improving readability.
RuboCop was updated to account for this change. We can't fix until customers are migrated to the new functionality and then we can come back and fix these violations.
Issue: 17
Milestone: minor
Necessary to match link:https://shopify.github.io/liquid/filters/date[Liquid Date] behavior where you can use special words (i.e. "now" or "today") to equate to `Time.now`.
The specs use regular expressions because we are dealing with relative dates which would cause build failures if using exact string matches.
Milestone: minor
This simplfies the date/time logic so only `Time` is used since `DateTime` is more of a relic because it's less performant, doesn't handle daylight savings time, and isn't based on the Gregorian calendar (which is what is most used these days).
These changes allow us to reach 95% line coverage as a minimum. The reason branch converage isn't there is because of all of the fallback logic which still needs to be addressed.
Milestone: patch
Ensures specs exist so more lines of code (and conditional logic) is tested. This does not cover the fallback logic as of yet (more on that soon).
Milestone: minor
This fixes all remaining RuboCop issues. For the rest, I've left RuboCop TODO comments around the troublesome code so we can quickly find and fix further when time allows.
The Rakefile is also updated to ensure these checks run locally and in CI.
Milestone: patch
The design of this gem is to build an instance (i.e. environment) which is fully encapsulated. The fact that an environment is the type returned is more of an implementation detail.
Use of `.build_environment` still works but you'll now get deprecation warnings. We can completely remove support after a few more versions have rolled out and people have had time to upgrade accordingly.
Milestone: minor
Necessary to be explicit about loading Rails functionality (i.e. optional feature). This provides the following benefits:
* Forces you to use the Rails stack when loading Rails functionality.
* Removes the conditional logic used to _implicilty_ load the Rails environment in favor of being _explicit_.
* Removes the nested `Filters::Helpers` class which is also a link:https://alchemists.io/articles/ruby_antipatterns#_nested_classes[Nested Class] antipattern. This is now handled by the recently added `RailsHelpers` module.
There's still a link:https://alchemists.io/articles/connascence#_name[CoN] issue with so many hard coded constants in the `Filters` module. Hope to clean that up soon too.
RSpec has been updated to load everything prior to running the test suite in order to ensure the environment is fully loaded for testing purposes.
Milestone: minor
Necessary to extract from the `Filters` module since the current implementation uses a nested class. There's a couple of reasons why this is important:
* Use of a class is unnecessary and wasteful since there is no state. This is also known as the link:https://alchemists.io/articles/ruby_antipatterns#_nonclasses[Nonclass] antipattern.
* Due to the class having no state, the functionalitity can be fully encapsulated within a module as purely functional methods.
* Modules are the most lightweight and performant objects in Ruby.
We'll soon be able to replace the nested `Filters` class with this implementation.
Milestone: minor
Necessary to test top level configuration.
Note that `TRMNL::Liquid::FileSystem` is injected instead of being hard coded. This was done to allow building of the environment to be flexible in case someone wanted to swap our in-memory file system out with a better implementation or something altogether different.
Milestone: minor
No longer necessary since we've switched to using Circle CI. This also makes things much easier to debug because GitHub Action images are very hard to use locally.
Milestone: minor
Ran RuboCop auto correct to clean all this up which reduced a ton of issues. ~19 offenses remain which require manual intervention to fix.
Milestone: patch