mirror of
https://github.com/kemko/liquid.git
synced 2026-01-03 00:35:40 +03:00
Compare commits
10 Commits
usage-trac
...
liquid-usa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8318be2edc | ||
|
|
b6547f322e | ||
|
|
b316ff8413 | ||
|
|
806b2622da | ||
|
|
c34f7c9b2c | ||
|
|
604d899496 | ||
|
|
ddb45cd658 | ||
|
|
9876096cf4 | ||
|
|
8750b4b006 | ||
|
|
d67de1c9b2 |
1027
.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml
Normal file
1027
.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml
Normal file
File diff suppressed because it is too large
Load Diff
118
.rubocop.yml
118
.rubocop.yml
@@ -1,6 +1,6 @@
|
|||||||
inherit_from:
|
inherit_from:
|
||||||
|
- https://shopify.github.io/ruby-style-guide/rubocop.yml
|
||||||
- .rubocop_todo.yml
|
- .rubocop_todo.yml
|
||||||
- ./.rubocop_todo.yml
|
|
||||||
|
|
||||||
require: rubocop-performance
|
require: rubocop-performance
|
||||||
|
|
||||||
@@ -9,123 +9,7 @@ Performance:
|
|||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'performance/shopify/*'
|
|
||||||
- 'vendor/bundle/**/*'
|
- 'vendor/bundle/**/*'
|
||||||
- 'pkg/**'
|
|
||||||
|
|
||||||
Metrics/BlockNesting:
|
|
||||||
Max: 3
|
|
||||||
|
|
||||||
Metrics/ModuleLength:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Metrics/ClassLength:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/AssignmentInCondition:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/AmbiguousOperator:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/AmbiguousRegexpLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Lint/UnusedBlockArgument:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/EndAlignment:
|
|
||||||
EnforcedStyleAlignWith: variable
|
|
||||||
|
|
||||||
Lint/UnusedMethodArgument:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SingleLineBlockParams:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/DoubleNegation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/StringLiteralsInInterpolation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/AndOr:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SignalException:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/StringLiterals:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/BracesAroundHashParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/NumericLiterals:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/SpaceInsideArrayLiteralBrackets:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/SpaceBeforeBlockBraces:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/Documentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ClassAndModuleChildren:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/TrailingCommaInArrayLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/TrailingCommaInHashLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/FormatString:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/AlignParameters:
|
|
||||||
EnforcedStyle: with_fixed_indentation
|
|
||||||
|
|
||||||
Layout/MultilineOperationIndentation:
|
|
||||||
EnforcedStyle: indented
|
|
||||||
|
|
||||||
Style/IfUnlessModifier:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/RaiseArgs:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/PreferredHashMethods:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/RegexpLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SymbolLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Naming/ConstantName:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Layout/CaseIndentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/ClassVars:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/PerlBackrefs:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/TrivialAccessors:
|
|
||||||
AllowPredicates: true
|
|
||||||
|
|
||||||
Style/WordArray:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Naming/MethodName:
|
Naming/MethodName:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@@ -1,34 +1,12 @@
|
|||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config`
|
# `rubocop --auto-gen-config`
|
||||||
# on 2019-08-29 00:43:36 +1000 using RuboCop version 0.74.0.
|
# on 2019-08-29 12:16:25 +1000 using RuboCop version 0.74.0.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 13
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
|
|
||||||
# Include: **/*.gemspec
|
|
||||||
Gemspec/OrderedDependencies:
|
|
||||||
Exclude:
|
|
||||||
- 'liquid.gemspec'
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Configuration parameters: Include.
|
|
||||||
# Include: **/*.gemspec,
|
|
||||||
Gemspec/RequiredRubyVersion:
|
|
||||||
Exclude:
|
|
||||||
- 'liquid.gemspec'
|
|
||||||
|
|
||||||
# Offense count: 124
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
||||||
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
||||||
Layout/AlignArguments:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 7
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||||
# SupportedHashRocketStyles: key, separator, table
|
# SupportedHashRocketStyles: key, separator, table
|
||||||
@@ -38,32 +16,17 @@ Layout/AlignHash:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/condition.rb'
|
- 'lib/liquid/condition.rb'
|
||||||
- 'lib/liquid/expression.rb'
|
- 'lib/liquid/expression.rb'
|
||||||
|
- 'performance/shopify/comment_form.rb'
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
- 'test/unit/context_unit_test.rb'
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 6
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Layout/ClosingHeredocIndentation:
|
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
||||||
|
Layout/ExtraSpacing:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/integration/tags/for_tag_test.rb'
|
- 'performance/shopify/paginate.rb'
|
||||||
|
|
||||||
# Offense count: 27
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Layout/EmptyLineAfterGuardClause:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/liquid/block.rb'
|
|
||||||
- 'lib/liquid/block_body.rb'
|
|
||||||
- 'lib/liquid/context.rb'
|
|
||||||
- 'lib/liquid/drop.rb'
|
|
||||||
- 'lib/liquid/lexer.rb'
|
|
||||||
- 'lib/liquid/parser.rb'
|
|
||||||
- 'lib/liquid/standardfilters.rb'
|
|
||||||
- 'lib/liquid/strainer.rb'
|
|
||||||
- 'lib/liquid/tags/for.rb'
|
|
||||||
- 'lib/liquid/tags/if.rb'
|
|
||||||
- 'lib/liquid/tags/include.rb'
|
|
||||||
- 'lib/liquid/utils.rb'
|
|
||||||
- 'lib/liquid/variable.rb'
|
|
||||||
- 'lib/liquid/variable_lookup.rb'
|
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 5
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -83,12 +46,61 @@ Layout/MultilineMethodCallBraceLayout:
|
|||||||
- 'test/integration/error_handling_test.rb'
|
- 'test/integration/error_handling_test.rb'
|
||||||
- 'test/unit/strainer_unit_test.rb'
|
- 'test/unit/strainer_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 4
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowForAlignment.
|
# Configuration parameters: AllowForAlignment.
|
||||||
Layout/SpaceAroundOperators:
|
Layout/SpaceAroundOperators:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/condition.rb'
|
- 'lib/liquid/condition.rb'
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
|
|
||||||
|
# Offense count: 9
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
|
# SupportedStylesForEmptyBraces: space, no_space
|
||||||
|
Layout/SpaceBeforeBlockBraces:
|
||||||
|
Exclude:
|
||||||
|
- 'example/server/server.rb'
|
||||||
|
- 'lib/liquid/variable.rb'
|
||||||
|
- 'test/integration/drop_test.rb'
|
||||||
|
- 'test/integration/standard_filter_test.rb'
|
||||||
|
- 'test/integration/tags/if_else_tag_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 19
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
||||||
|
# SupportedStyles: space, no_space, compact
|
||||||
|
# SupportedStylesForEmptyBrackets: space, no_space
|
||||||
|
Layout/SpaceInsideArrayLiteralBrackets:
|
||||||
|
Exclude:
|
||||||
|
- 'test/integration/drop_test.rb'
|
||||||
|
- 'test/integration/standard_filter_test.rb'
|
||||||
|
- 'test/integration/tags/for_tag_test.rb'
|
||||||
|
- 'test/integration/tags/include_tag_test.rb'
|
||||||
|
- 'test/integration/tags/standard_tag_test.rb'
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
Lint/AmbiguousOperator:
|
||||||
|
Exclude:
|
||||||
|
- 'test/unit/condition_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 16
|
||||||
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
|
Lint/AssignmentInCondition:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/block_body.rb'
|
||||||
|
- 'lib/liquid/lexer.rb'
|
||||||
|
- 'lib/liquid/standardfilters.rb'
|
||||||
|
- 'lib/liquid/tags/for.rb'
|
||||||
|
- 'lib/liquid/tags/if.rb'
|
||||||
|
- 'lib/liquid/tags/include.rb'
|
||||||
|
- 'lib/liquid/tags/raw.rb'
|
||||||
|
- 'lib/liquid/variable.rb'
|
||||||
|
- 'performance/profile.rb'
|
||||||
|
- 'test/test_helper.rb'
|
||||||
|
- 'test/unit/tokenizer_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -98,87 +110,133 @@ Lint/InheritException:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/interrupts.rb'
|
- 'lib/liquid/interrupts.rb'
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
||||||
|
Lint/UnusedBlockArgument:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/condition.rb'
|
||||||
|
- 'lib/liquid/context.rb'
|
||||||
|
- 'lib/liquid/document.rb'
|
||||||
|
- 'lib/liquid/parse_context.rb'
|
||||||
|
- 'lib/liquid/template.rb'
|
||||||
|
- 'performance/shopify/json_filter.rb'
|
||||||
|
- 'test/integration/filter_test.rb'
|
||||||
|
- 'test/integration/render_profiling_test.rb'
|
||||||
|
- 'test/integration/variable_test.rb'
|
||||||
|
- 'test/unit/condition_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 12
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
||||||
|
Lint/UnusedMethodArgument:
|
||||||
|
Exclude:
|
||||||
|
- 'example/server/liquid_servlet.rb'
|
||||||
|
- 'test/integration/blank_test.rb'
|
||||||
|
- 'test/integration/error_handling_test.rb'
|
||||||
|
- 'test/integration/filter_test.rb'
|
||||||
|
- 'test/integration/output_test.rb'
|
||||||
|
- 'test/integration/standard_filter_test.rb'
|
||||||
|
- 'test/integration/tags/include_tag_test.rb'
|
||||||
|
- 'test/unit/strainer_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
Lint/UselessAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
||||||
Lint/Void:
|
Lint/Void:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/parse_context.rb'
|
- 'lib/liquid/parse_context.rb'
|
||||||
|
|
||||||
# Offense count: 53
|
# Offense count: 95
|
||||||
Metrics/AbcSize:
|
|
||||||
Max: 56
|
|
||||||
|
|
||||||
# Offense count: 12
|
|
||||||
Metrics/CyclomaticComplexity:
|
|
||||||
Max: 13
|
|
||||||
|
|
||||||
# Offense count: 118
|
|
||||||
# Configuration parameters: CountComments, ExcludedMethods.
|
|
||||||
Metrics/MethodLength:
|
|
||||||
Max: 38
|
|
||||||
|
|
||||||
# Offense count: 9
|
|
||||||
Metrics/PerceivedComplexity:
|
|
||||||
Max: 11
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: PreferredName.
|
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||||
Naming/RescuedExceptionsVariableName:
|
# URISchemes: http, https
|
||||||
Exclude:
|
Metrics/LineLength:
|
||||||
- 'lib/liquid/context.rb'
|
Max: 294
|
||||||
|
|
||||||
# Offense count: 20
|
# Offense count: 44
|
||||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
Naming/ConstantName:
|
||||||
# AllowedNames: io, id, to, by, on, in, at, ip, db
|
|
||||||
Naming/UncommunicativeMethodParamName:
|
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'example/server/example_servlet.rb'
|
- 'lib/liquid.rb'
|
||||||
- 'lib/liquid/condition.rb'
|
- 'lib/liquid/block_body.rb'
|
||||||
- 'lib/liquid/context.rb'
|
- 'lib/liquid/tags/assign.rb'
|
||||||
- 'lib/liquid/standardfilters.rb'
|
- 'lib/liquid/tags/capture.rb'
|
||||||
|
- 'lib/liquid/tags/case.rb'
|
||||||
|
- 'lib/liquid/tags/cycle.rb'
|
||||||
|
- 'lib/liquid/tags/for.rb'
|
||||||
- 'lib/liquid/tags/if.rb'
|
- 'lib/liquid/tags/if.rb'
|
||||||
|
- 'lib/liquid/tags/include.rb'
|
||||||
|
- 'lib/liquid/tags/raw.rb'
|
||||||
|
- 'lib/liquid/tags/table_row.rb'
|
||||||
- 'lib/liquid/variable.rb'
|
- 'lib/liquid/variable.rb'
|
||||||
|
- 'performance/shopify/comment_form.rb'
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
|
- 'test/integration/tags/include_tag_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Configuration parameters: .
|
||||||
|
# SupportedStyles: snake_case, camelCase
|
||||||
|
Naming/MethodName:
|
||||||
|
EnforcedStyle: snake_case
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle.
|
||||||
|
# SupportedStyles: always, conditionals
|
||||||
|
Style/AndOr:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/i18n.rb'
|
||||||
|
- 'lib/liquid/tags/table_row.rb'
|
||||||
|
- 'lib/liquid/tokenizer.rb'
|
||||||
|
|
||||||
|
# Offense count: 40
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle.
|
||||||
|
# SupportedStyles: braces, no_braces, context_dependent
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Exclude:
|
||||||
|
- 'test/integration/error_handling_test.rb'
|
||||||
- 'test/integration/filter_test.rb'
|
- 'test/integration/filter_test.rb'
|
||||||
|
- 'test/integration/render_profiling_test.rb'
|
||||||
- 'test/integration/standard_filter_test.rb'
|
- 'test/integration/standard_filter_test.rb'
|
||||||
|
- 'test/integration/tags/echo_test.rb'
|
||||||
|
- 'test/integration/tags/increment_tag_test.rb'
|
||||||
|
- 'test/integration/tags/standard_tag_test.rb'
|
||||||
- 'test/integration/template_test.rb'
|
- 'test/integration/template_test.rb'
|
||||||
- 'test/unit/condition_unit_test.rb'
|
- 'test/unit/condition_unit_test.rb'
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 5
|
||||||
# Configuration parameters: EnforcedStyle.
|
Style/ClassVars:
|
||||||
# SupportedStyles: inline, group
|
|
||||||
Style/AccessModifierDeclarations:
|
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/block_body.rb'
|
- 'lib/liquid/condition.rb'
|
||||||
- 'lib/liquid/tag.rb'
|
- 'lib/liquid/strainer.rb'
|
||||||
- 'lib/liquid/tags/include.rb'
|
- 'lib/liquid/template.rb'
|
||||||
- 'test/unit/strainer_unit_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 10
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: prefer_alias, prefer_alias_method
|
|
||||||
Style/Alias:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/liquid/drop.rb'
|
|
||||||
- 'lib/liquid/i18n.rb'
|
|
||||||
- 'lib/liquid/profiler/hooks.rb'
|
|
||||||
- 'lib/liquid/standardfilters.rb'
|
|
||||||
- 'lib/liquid/tag.rb'
|
|
||||||
- 'lib/liquid/tags/include.rb'
|
|
||||||
- 'lib/liquid/variable.rb'
|
|
||||||
|
|
||||||
# Offense count: 22
|
|
||||||
Style/CommentedKeyword:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
||||||
# SupportedStyles: assign_to_condition, assign_inside_condition
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
||||||
Style/ConditionalAssignment:
|
Style/ConditionalAssignment:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/errors.rb'
|
- 'lib/liquid/errors.rb'
|
||||||
|
- 'performance/shopify/shop_filter.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: AllowCoercion.
|
||||||
|
Style/DateTime:
|
||||||
|
Exclude:
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EachWithObject:
|
||||||
|
Exclude:
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -186,71 +244,50 @@ Style/EmptyCaseCondition:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/lexer.rb'
|
- 'lib/liquid/lexer.rb'
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: compact, expanded
|
# SupportedStyles: each, for
|
||||||
Style/EmptyMethod:
|
Style/For:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/tag.rb'
|
- 'performance/shopify/shop_filter.rb'
|
||||||
- 'lib/liquid/tags/comment.rb'
|
|
||||||
- 'lib/liquid/tags/include.rb'
|
|
||||||
- 'test/integration/tags/include_tag_test.rb'
|
|
||||||
- 'test/unit/context_unit_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 9
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/Encoding:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/liquid/version.rb'
|
|
||||||
- 'liquid.gemspec'
|
|
||||||
- 'test/integration/standard_filter_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 2
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/ExpandPathArguments:
|
|
||||||
Exclude:
|
|
||||||
- 'Rakefile'
|
|
||||||
- 'liquid.gemspec'
|
|
||||||
|
|
||||||
# Offense count: 7
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: annotated, template, unannotated
|
# SupportedStyles: format, sprintf, percent
|
||||||
Style/FormatStringToken:
|
Style/FormatString:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'example/server/example_servlet.rb'
|
||||||
|
- 'performance/shopify/money_filter.rb'
|
||||||
|
- 'performance/shopify/weight_filter.rb'
|
||||||
- 'test/integration/filter_test.rb'
|
- 'test/integration/filter_test.rb'
|
||||||
- 'test/integration/hash_ordering_test.rb'
|
- 'test/integration/hash_ordering_test.rb'
|
||||||
|
|
||||||
# Offense count: 106
|
# Offense count: 115
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: always, never
|
# SupportedStyles: always, never
|
||||||
Style/FrozenStringLiteralComment:
|
Style/FrozenStringLiteralComment:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 14
|
# Offense count: 30
|
||||||
# Configuration parameters: MinBodyLength.
|
|
||||||
Style/GuardClause:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/liquid/condition.rb'
|
|
||||||
- 'lib/liquid/lexer.rb'
|
|
||||||
- 'lib/liquid/strainer.rb'
|
|
||||||
- 'lib/liquid/tags/assign.rb'
|
|
||||||
- 'lib/liquid/tags/capture.rb'
|
|
||||||
- 'lib/liquid/tags/case.rb'
|
|
||||||
- 'lib/liquid/tags/for.rb'
|
|
||||||
- 'lib/liquid/tags/include.rb'
|
|
||||||
- 'lib/liquid/tags/raw.rb'
|
|
||||||
- 'lib/liquid/tags/table_row.rb'
|
|
||||||
- 'lib/liquid/variable.rb'
|
|
||||||
- 'test/unit/tokenizer_unit_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 53
|
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: IgnoreMacros, IgnoredMethods, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, EnforcedStyle.
|
||||||
# SupportedStyles: literals, strict
|
# SupportedStyles: require_parentheses, omit_parentheses
|
||||||
Style/MutableConstant:
|
Style/MethodCallWithArgsParentheses:
|
||||||
Enabled: false
|
Exclude:
|
||||||
|
- 'Gemfile'
|
||||||
|
- 'Rakefile'
|
||||||
|
- 'lib/liquid/block_body.rb'
|
||||||
|
- 'lib/liquid/parser.rb'
|
||||||
|
- 'lib/liquid/tags/for.rb'
|
||||||
|
- 'liquid.gemspec'
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
- 'performance/shopify/liquid.rb'
|
||||||
|
- 'test/test_helper.rb'
|
||||||
|
- 'test/unit/condition_unit_test.rb'
|
||||||
|
- 'test/unit/tags/if_tag_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -260,29 +297,17 @@ Style/Next:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/tags/for.rb'
|
- 'lib/liquid/tags/for.rb'
|
||||||
|
|
||||||
# Offense count: 13
|
# Offense count: 52
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
Style/PerlBackrefs:
|
||||||
# SupportedStyles: predicate, comparison
|
Enabled: false
|
||||||
Style/NumericPredicate:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/**/*'
|
|
||||||
- 'lib/liquid/context.rb'
|
|
||||||
- 'lib/liquid/forloop_drop.rb'
|
|
||||||
- 'lib/liquid/standardfilters.rb'
|
|
||||||
- 'lib/liquid/tablerowloop_drop.rb'
|
|
||||||
- 'test/integration/standard_filter_test.rb'
|
|
||||||
- 'test/integration/template_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 14
|
# Offense count: 33
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: PreferredDelimiters.
|
# Configuration parameters: EnforcedStyle.
|
||||||
Style/PercentLiteralDelimiters:
|
# SupportedStyles: compact, exploded
|
||||||
Exclude:
|
Style/RaiseArgs:
|
||||||
- 'lib/liquid/tags/if.rb'
|
Enabled: false
|
||||||
- 'liquid.gemspec'
|
|
||||||
- 'test/integration/assign_test.rb'
|
|
||||||
- 'test/integration/standard_filter_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -290,6 +315,17 @@ Style/RedundantSelf:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/strainer.rb'
|
- 'lib/liquid/strainer.rb'
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
||||||
|
# SupportedStyles: slashes, percent_r, mixed
|
||||||
|
Style/RegexpLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/file_system.rb'
|
||||||
|
- 'lib/liquid/standardfilters.rb'
|
||||||
|
- 'performance/shopify/shop_filter.rb'
|
||||||
|
- 'test/unit/condition_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
|
||||||
@@ -300,21 +336,31 @@ Style/SafeNavigation:
|
|||||||
- 'lib/liquid/strainer.rb'
|
- 'lib/liquid/strainer.rb'
|
||||||
- 'lib/liquid/tokenizer.rb'
|
- 'lib/liquid/tokenizer.rb'
|
||||||
|
|
||||||
# Offense count: 9
|
# Offense count: 10
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowAsExpressionSeparator.
|
# Configuration parameters: AllowAsExpressionSeparator.
|
||||||
Style/Semicolon:
|
Style/Semicolon:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
- 'test/integration/error_handling_test.rb'
|
- 'test/integration/error_handling_test.rb'
|
||||||
- 'test/integration/template_test.rb'
|
- 'test/integration/template_test.rb'
|
||||||
- 'test/unit/context_unit_test.rb'
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 7
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: MinSize.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: percent, brackets
|
# SupportedStyles: use_perl_names, use_english_names
|
||||||
Style/SymbolArray:
|
Style/SpecialGlobalVars:
|
||||||
EnforcedStyle: brackets
|
Exclude:
|
||||||
|
- 'performance/shopify/liquid.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle.
|
||||||
|
# SupportedStyles: single_quotes, double_quotes
|
||||||
|
Style/StringLiteralsInInterpolation:
|
||||||
|
Exclude:
|
||||||
|
- 'performance/shopify/tag_filter.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
@@ -325,6 +371,33 @@ Style/TernaryParentheses:
|
|||||||
- 'lib/liquid/context.rb'
|
- 'lib/liquid/context.rb'
|
||||||
- 'lib/liquid/utils.rb'
|
- 'lib/liquid/utils.rb'
|
||||||
|
|
||||||
|
# Offense count: 21
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyleForMultiline.
|
||||||
|
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||||
|
Style/TrailingCommaInArrayLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/parse_tree_visitor.rb'
|
||||||
|
- 'lib/liquid/tags/include.rb'
|
||||||
|
- 'test/integration/parse_tree_visitor_test.rb'
|
||||||
|
- 'test/integration/standard_filter_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 9
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyleForMultiline.
|
||||||
|
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||||
|
Style/TrailingCommaInHashLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/condition.rb'
|
||||||
|
- 'lib/liquid/lexer.rb'
|
||||||
|
- 'lib/liquid/standardfilters.rb'
|
||||||
|
- 'performance/shopify/comment_form.rb'
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
|
- 'performance/theme_runner.rb'
|
||||||
|
- 'test/integration/output_test.rb'
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/UnneededPercentQ:
|
Style/UnneededPercentQ:
|
||||||
@@ -336,10 +409,3 @@ Style/UnneededPercentQ:
|
|||||||
Style/WhileUntilModifier:
|
Style/WhileUntilModifier:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/tags/case.rb'
|
- 'lib/liquid/tags/case.rb'
|
||||||
|
|
||||||
# Offense count: 665
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
||||||
# URISchemes: http, https
|
|
||||||
Metrics/LineLength:
|
|
||||||
Max: 294
|
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@@ -20,6 +20,6 @@ group :test do
|
|||||||
gem 'rubocop-performance', require: false
|
gem 'rubocop-performance', require: false
|
||||||
|
|
||||||
platform :mri, :truffleruby do
|
platform :mri, :truffleruby do
|
||||||
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'liquid-tag'
|
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'master'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -106,3 +106,9 @@ template = Liquid::Template.parse("{{x}} {{y}}")
|
|||||||
template.render!({ 'x' => 1}, { strict_variables: true })
|
template.render!({ 'x' => 1}, { strict_variables: true })
|
||||||
#=> Liquid::UndefinedVariable: Liquid error: undefined variable y
|
#=> Liquid::UndefinedVariable: Liquid error: undefined variable y
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Usage tracking
|
||||||
|
|
||||||
|
To help track usages of a feature or code path in production, we have released opt-in usage tracking. To enable this, we provide an empty `Liquid:: Usage.increment` method which you can customize to your needs. The feature is well suited to https://github.com/Shopify/statsd-instrument. However, the choice of implementation is up to you.
|
||||||
|
|
||||||
|
Once you have enabled usage tracking, we recommend reporting any events through Github Issues that your system may be logging. It is highly likely this event has been added to consider deprecating or improving code specific to this event, so please raise any concerns.
|
||||||
@@ -80,7 +80,3 @@ require 'liquid/usage'
|
|||||||
# Load all the tags of the standard library
|
# Load all the tags of the standard library
|
||||||
#
|
#
|
||||||
Dir["#{__dir__}/liquid/tags/*.rb"].each { |f| require f }
|
Dir["#{__dir__}/liquid/tags/*.rb"].each { |f| require f }
|
||||||
|
|
||||||
# Load all usage tracking
|
|
||||||
#
|
|
||||||
Dir["#{__dir__}/liquid/usages/*.rb"].each { |f| require f }
|
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ module Liquid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initialize(environments = {}, outer_scope = {}, registers = {}, rethrow_errors = false, resource_limits = nil, static_registers = {}, static_environments = {})
|
def initialize(environments = {}, outer_scope = {}, registers = {}, rethrow_errors = false, resource_limits = nil, static_registers = {}, static_environments = {})
|
||||||
@environments = [environments].flatten
|
@environments = [environments]
|
||||||
@static_environments = [static_environments].flatten.map(&:freeze).freeze
|
@environments.flatten!
|
||||||
|
|
||||||
|
@static_environments = [static_environments].flat_map(&:freeze).freeze
|
||||||
@scopes = [(outer_scope || {})]
|
@scopes = [(outer_scope || {})]
|
||||||
@registers = registers
|
@registers = registers
|
||||||
@static_registers = static_registers.freeze
|
@static_registers = static_registers.freeze
|
||||||
|
|||||||
@@ -421,6 +421,7 @@ module Liquid
|
|||||||
|
|
||||||
def default(input, default_value = ''.freeze)
|
def default(input, default_value = ''.freeze)
|
||||||
if !input || input.respond_to?(:empty?) && input.empty?
|
if !input || input.respond_to?(:empty?) && input.empty?
|
||||||
|
Usage.increment("default_filter_received_false_value") if input == false # See https://github.com/Shopify/liquid/issues/1127
|
||||||
default_value
|
default_value
|
||||||
else
|
else
|
||||||
input
|
input
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
module Liquid
|
module Liquid
|
||||||
class Render < Tag
|
class Render < Tag
|
||||||
Syntax = /(#{QuotedString})#{QuotedFragment}*/o
|
SYNTAX = /(#{QuotedString})#{QuotedFragment}*/o
|
||||||
|
|
||||||
attr_reader :template_name_expr, :attributes
|
attr_reader :template_name_expr, :attributes
|
||||||
|
|
||||||
def initialize(tag_name, markup, options)
|
def initialize(tag_name, markup, options)
|
||||||
super
|
super
|
||||||
|
|
||||||
raise SyntaxError.new(options[:locale].t("errors.syntax.render".freeze)) unless markup =~ Syntax
|
raise SyntaxError.new(options[:locale].t("errors.syntax.render".freeze)) unless markup =~ SYNTAX
|
||||||
|
|
||||||
template_name = $1
|
template_name = $1
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,6 @@
|
|||||||
module Liquid
|
module Liquid
|
||||||
# Usage is used to store
|
module Usage
|
||||||
class Usage
|
def self.increment(name)
|
||||||
@messages = {}
|
|
||||||
class << self
|
|
||||||
def enable
|
|
||||||
Liquid::Context.send(:alias_method, :try_variable_find_in_environments, :try_variable_find_in_environments_usage)
|
|
||||||
end
|
|
||||||
|
|
||||||
def disable
|
|
||||||
Liquid::Context.send(:alias_method, :try_variable_find_in_environments, :try_variable_find_in_environments_original)
|
|
||||||
end
|
|
||||||
|
|
||||||
def track(message)
|
|
||||||
@messages[message] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
def results
|
|
||||||
@messages
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
module Liquid
|
|
||||||
class Context
|
|
||||||
alias try_variable_find_in_environments_original try_variable_find_in_environments
|
|
||||||
|
|
||||||
def try_variable_find_in_environments_usage(key, raise_on_not_found:)
|
|
||||||
Usage.track("Using try_variable_find_in_environment")
|
|
||||||
@environments.each do |environment|
|
|
||||||
found_variable = lookup_and_evaluate(environment, key, raise_on_not_found: raise_on_not_found)
|
|
||||||
if !found_variable.nil? || @strict_variables && raise_on_not_found
|
|
||||||
return found_variable
|
|
||||||
end
|
|
||||||
|
|
||||||
Usage.track("try_variable_find_in_environment reports Nil but responds to key") if environment.key?(key)
|
|
||||||
end
|
|
||||||
@static_environments.each do |environment|
|
|
||||||
found_variable = lookup_and_evaluate(environment, key, raise_on_not_found: raise_on_not_found)
|
|
||||||
if !found_variable.nil? || @strict_variables && raise_on_not_found
|
|
||||||
return found_variable
|
|
||||||
end
|
|
||||||
|
|
||||||
Usage.track("try_variable_find_in_environment reports Nil but responds to key") if environment.key?(key)
|
|
||||||
end
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Liquid::Usage.track("Usage is enabled")
|
|
||||||
@@ -110,7 +110,7 @@ class RenderTagTest < Minitest::Test
|
|||||||
file_system = StubFileSystem.new('snippet' => 'echo')
|
file_system = StubFileSystem.new('snippet' => 'echo')
|
||||||
assert_equal 'echoecho',
|
assert_equal 'echoecho',
|
||||||
Template.parse('{% render "snippet" %}{% render "snippet" %}')
|
Template.parse('{% render "snippet" %}{% render "snippet" %}')
|
||||||
.render!({}, registers: { file_system: file_system })
|
.render!({}, registers: { file_system: file_system })
|
||||||
assert_equal 1, file_system.file_read_count
|
assert_equal 1, file_system.file_read_count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class TryVariablesUsageTest < Minitest::Test
|
|
||||||
include Liquid
|
|
||||||
|
|
||||||
def test_test_usages
|
|
||||||
Usage.enable
|
|
||||||
template = Template.parse(%({{test}}))
|
|
||||||
assert_equal 'worked', template.render!('test' => 'worked')
|
|
||||||
assert_equal 'worked wonderfully', template.render!('test' => 'worked wonderfully')
|
|
||||||
assert_equal true, Usage.results["Using try_variable_find_in_environment"]
|
|
||||||
Usage.disable
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class UsageEnabledUsageTest < Minitest::Test
|
|
||||||
include Liquid
|
|
||||||
|
|
||||||
def test_live_usages
|
|
||||||
assert_equal true, Usage.results["Usage is enabled"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -4,7 +4,7 @@ class PartialCacheUnitTest < Minitest::Test
|
|||||||
def test_uses_the_file_system_register_if_present
|
def test_uses_the_file_system_register_if_present
|
||||||
context = Liquid::Context.build(
|
context = Liquid::Context.build(
|
||||||
registers: {
|
registers: {
|
||||||
file_system: StubFileSystem.new('my_partial' => 'my partial body')
|
file_system: StubFileSystem.new('my_partial' => 'my partial body'),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,12 +41,12 @@ class PartialCacheUnitTest < Minitest::Test
|
|||||||
)
|
)
|
||||||
context_one = Liquid::Context.build(
|
context_one = Liquid::Context.build(
|
||||||
registers: {
|
registers: {
|
||||||
file_system: shared_file_system
|
file_system: shared_file_system,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
context_two = Liquid::Context.build(
|
context_two = Liquid::Context.build(
|
||||||
registers: {
|
registers: {
|
||||||
file_system: shared_file_system
|
file_system: shared_file_system,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user