minitest_shopify_themes 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c93992986e47e83e7d81af19832e5fbdd05281444dc20992a7bf5fcce9e0886b
4
- data.tar.gz: 646dcc863bc5ceebae020eaac691d2eebca236aedb120665fb0bd41c6127a695
3
+ metadata.gz: b659a8ff715b5e0dc337e33da74a2c432a4b18fb7e3ec9c58b1b3263b5a06830
4
+ data.tar.gz: c7d0c72f38eef841957679ce4497f239c5afdfa0a6432bf534c5321eee07b2fa
5
5
  SHA512:
6
- metadata.gz: a501321c5e52ed4d1efa4e8aa5635069a24d8a8694ebcb86a11eb688d58704bbe701c282e6fa65dd0b14a43606a167dbaf417c2743fc0fc6340614e7ada43a88
7
- data.tar.gz: e32d14b57184b516fa70340d42f142903a79b5cbcac6343ff438878a314d330ead7b7a2a88662b7c65ba4e5eb21fe12336d6d3e3c3f18040b995e0c8de84e1bb
6
+ metadata.gz: 51aa0c0caf1ff495f2ff2b5754a3fb3cf277f2ddb86b1f848dfbccd6bfbaf9aaf9a1a51717f0ae6c351db3d2935bf98f41e40cdf41e5e875f29afe8c22775b2f
7
+ data.tar.gz: ed68f602965a3a1b920afadb87b3456f9cd7e3c1b4e3bd2908d6141f8eb5df691f120cf3d54cba4f355699b12dc218ac5b13c81ad8b9c87e1af8a8aaac287336
@@ -0,0 +1,9 @@
1
+ require 'json'
2
+
3
+ module MinitestShopifyThemes::Filters::JsonFilter
4
+ def json(input)
5
+ JSON.generate(input)
6
+ end
7
+
8
+ Liquid::Environment.default.register_filter(self)
9
+ end
@@ -45,7 +45,14 @@ class MinitestShopifyThemes::LiquidTest < Minitest::Test
45
45
  # Liquid expects string keys for variables, but Rails convention is to use symbols.
46
46
  # This method recursively converts all keys to strings so either convention can be used.
47
47
  hash.each_with_object({}) do |(key, value), acc|
48
- acc[key.to_s] = value.is_a?(Hash) ? deep_stringify_keys(value) : value
48
+ acc[key.to_s] = case value
49
+ when Hash
50
+ deep_stringify_keys(value)
51
+ when Array
52
+ value.map { |v| v.is_a?(Hash) ? deep_stringify_keys(v) : v }
53
+ else
54
+ value
55
+ end
49
56
  end
50
57
  end
51
58
  end
@@ -0,0 +1,8 @@
1
+ class MinitestShopifyThemes::Tags::StyleTag < Liquid::Block
2
+ def render(context)
3
+ # Do not render anything for style tags.
4
+ nil
5
+ end
6
+
7
+ Liquid::Environment.default.register_tag('style', self)
8
+ end
@@ -0,0 +1,8 @@
1
+ class MinitestShopifyThemes::Tags::StylesheetTag < Liquid::Block
2
+ def render(context)
3
+ # Do not render anything for stylesheet tags.
4
+ nil
5
+ end
6
+
7
+ Liquid::Environment.default.register_tag('stylesheet', self)
8
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MinitestShopifyThemes
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest_shopify_themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Belzer
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-06-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: capybara
@@ -175,12 +175,15 @@ files:
175
175
  - lib/minitest_shopify_themes/configuration.rb
176
176
  - lib/minitest_shopify_themes/filters/assets_filter.rb
177
177
  - lib/minitest_shopify_themes/filters/image_filter.rb
178
+ - lib/minitest_shopify_themes/filters/json_filter.rb
178
179
  - lib/minitest_shopify_themes/filters/money_filter.rb
179
180
  - lib/minitest_shopify_themes/filters/translations_filter.rb
180
181
  - lib/minitest_shopify_themes/liquid_test.rb
181
182
  - lib/minitest_shopify_themes/local_file_system.rb
182
183
  - lib/minitest_shopify_themes/tags/schema_tag.rb
183
184
  - lib/minitest_shopify_themes/tags/section_tag.rb
185
+ - lib/minitest_shopify_themes/tags/style_tag.rb
186
+ - lib/minitest_shopify_themes/tags/stylesheet_tag.rb
184
187
  - lib/minitest_shopify_themes/version.rb
185
188
  - lib/minitest_shopify_themes/view_test.rb
186
189
  homepage: https://github.com/nebulab/minitest-shopify?tab=readme-ov-file#readme
@@ -206,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
209
  - !ruby/object:Gem::Version
207
210
  version: '0'
208
211
  requirements: []
209
- rubygems_version: 3.6.2
212
+ rubygems_version: 3.7.2
210
213
  specification_version: 4
211
214
  summary: A minitest plugin for testing Shopify Liquid themes
212
215
  test_files: []