Ensures `fixed` is quoted in order to prevent Liquid from translating the local variable (which doesn't exist) into `nil` when we need a literal "fixed" string instead.
Co-authored-by: Ikraam Ghoor <ikraamghoor@gmail.com>
Milestone: patch
As mentioned in 2fe0094 (Updated to SimpleCov 1.0.0), Liquid violates the _Liskov Substitution Principle_ due to expecting an object to be passed to both the `#inspect` and `#to_s` methods which breaks the `Object` (superclass) contract. Doesn't help that Liquid doesn't even try to be a good citizen when it comes to link:https://alchemists.io/articles/ruby_object_inspection[Ruby Object Inspection] in general.
The following takes this a step further by monkey patching `Liquid::Utils` (yes, this is ugly but is the best we can do until Liquid patches their implementation). The specs were updated to account for this since Liquid also doesn't bother to properly format hashes when inspected like Ruby does by default.
All of this work means that we can finally build SimpleCov reports in CI. Again, none of this happens when running locally on macOS. This only crops up in CI.
Milestone: patch
link:https://github.com/simplecov-ruby/simplecov[Details].
We have to capture the `ArgumentError` when SimpleCov exits because Liquid violates the _Liskov Substitution Principle_ due to expecting an object to be passed into the `#inspect` method which breaks the expectation of `Object` (superclass). _This only happens in CI, not locally._ Created an link:https://github.com/Shopify/liquid/issues/2107[issue] to track this.
Until the Liquid issue is resolved, this does mean that _no_ SimpleCov artifact will be generated in CI.
Milestone: minor
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