mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 00:05:42 +03:00
Compare commits
8 Commits
context_si
...
shopify_ru
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d67de1c9b2 | ||
|
|
7b309dc75d | ||
|
|
8f68cffdf1 | ||
|
|
dd27d0fd1d | ||
|
|
7a26e6b3d8 | ||
|
|
cf4e77ab0c | ||
|
|
7bae55dd39 | ||
|
|
b16b109a80 |
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
134
.rubocop.yml
134
.rubocop.yml
@@ -1,132 +1,16 @@
|
|||||||
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
|
||||||
|
|
||||||
|
Performance:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'performance/shopify/*'
|
- '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
|
|
||||||
|
|
||||||
Layout/IndentHash:
|
|
||||||
EnforcedStyle: consistent
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Performance/Count:
|
|
||||||
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:
|
||||||
- 'example/server/liquid_servlet.rb'
|
- 'example/server/liquid_servlet.rb'
|
||||||
@@ -1,23 +1,37 @@
|
|||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config`
|
# `rubocop --auto-gen-config`
|
||||||
# on 2019-04-22 19:11:24 -0400 using RuboCop version 0.53.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.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||||
# Include: **/*.gemspec
|
# SupportedHashRocketStyles: key, separator, table
|
||||||
Gemspec/OrderedDependencies:
|
# SupportedColonStyles: key, separator, table
|
||||||
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||||
|
Layout/AlignHash:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'liquid.gemspec'
|
- 'lib/liquid/condition.rb'
|
||||||
|
- 'lib/liquid/expression.rb'
|
||||||
|
- 'performance/shopify/comment_form.rb'
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
||||||
|
Layout/ExtraSpacing:
|
||||||
|
Exclude:
|
||||||
|
- 'performance/shopify/paginate.rb'
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 5
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
# SupportedStyles: squiggly, active_support, powerpack, unindent
|
||||||
Layout/IndentHeredoc:
|
Layout/IndentHeredoc:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/integration/tags/for_tag_test.rb'
|
- 'test/integration/tags/for_tag_test.rb'
|
||||||
@@ -32,6 +46,62 @@ 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: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment.
|
||||||
|
Layout/SpaceAroundOperators:
|
||||||
|
Exclude:
|
||||||
|
- '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.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
@@ -40,145 +110,184 @@ 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:
|
# Cop supports --auto-correct.
|
||||||
Max: 56
|
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||||
|
# URISchemes: http, https
|
||||||
|
Metrics/LineLength:
|
||||||
|
Max: 294
|
||||||
|
|
||||||
# Offense count: 12
|
# Offense count: 44
|
||||||
Metrics/CyclomaticComplexity:
|
Naming/ConstantName:
|
||||||
Max: 13
|
|
||||||
|
|
||||||
# Offense count: 112
|
|
||||||
# Configuration parameters: CountComments.
|
|
||||||
Metrics/MethodLength:
|
|
||||||
Max: 38
|
|
||||||
|
|
||||||
# Offense count: 8
|
|
||||||
Metrics/PerceivedComplexity:
|
|
||||||
Max: 11
|
|
||||||
|
|
||||||
# Offense count: 52
|
|
||||||
# Configuration parameters: Blacklist.
|
|
||||||
# Blacklist: END, (?-mix:EO[A-Z]{1})
|
|
||||||
Naming/HeredocDelimiterNaming:
|
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/integration/assign_test.rb'
|
- 'lib/liquid.rb'
|
||||||
- 'test/integration/capture_test.rb'
|
- 'lib/liquid/block_body.rb'
|
||||||
- 'test/integration/trim_mode_test.rb'
|
- 'lib/liquid/tags/assign.rb'
|
||||||
|
- 'lib/liquid/tags/capture.rb'
|
||||||
# Offense count: 23
|
- 'lib/liquid/tags/case.rb'
|
||||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
- 'lib/liquid/tags/cycle.rb'
|
||||||
# AllowedNames: io, id
|
- 'lib/liquid/tags/for.rb'
|
||||||
Naming/UncommunicativeMethodParamName:
|
|
||||||
Exclude:
|
|
||||||
- 'example/server/example_servlet.rb'
|
|
||||||
- 'lib/liquid/condition.rb'
|
|
||||||
- 'lib/liquid/context.rb'
|
|
||||||
- 'lib/liquid/standardfilters.rb'
|
|
||||||
- 'lib/liquid/tags/if.rb'
|
- 'lib/liquid/tags/if.rb'
|
||||||
- 'lib/liquid/utils.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'
|
||||||
- 'test/integration/filter_test.rb'
|
- 'performance/shopify/comment_form.rb'
|
||||||
- 'test/integration/standard_filter_test.rb'
|
- 'performance/shopify/paginate.rb'
|
||||||
- 'test/integration/tags/for_tag_test.rb'
|
- 'test/integration/tags/include_tag_test.rb'
|
||||||
- 'test/integration/template_test.rb'
|
|
||||||
- 'test/unit/condition_unit_test.rb'
|
|
||||||
|
|
||||||
# Offense count: 12
|
# Offense count: 2
|
||||||
|
# Configuration parameters: .
|
||||||
|
# SupportedStyles: snake_case, camelCase
|
||||||
|
Naming/MethodName:
|
||||||
|
EnforcedStyle: snake_case
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
# SupportedStyles: prefer_alias, prefer_alias_method
|
# SupportedStyles: always, conditionals
|
||||||
Style/Alias:
|
Style/AndOr:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/drop.rb'
|
|
||||||
- 'lib/liquid/i18n.rb'
|
- 'lib/liquid/i18n.rb'
|
||||||
- 'lib/liquid/profiler/hooks.rb'
|
- 'lib/liquid/tags/table_row.rb'
|
||||||
- 'lib/liquid/standardfilters.rb'
|
- 'lib/liquid/tokenizer.rb'
|
||||||
- 'lib/liquid/tag.rb'
|
|
||||||
- 'lib/liquid/tags/include.rb'
|
|
||||||
- 'lib/liquid/variable.rb'
|
|
||||||
|
|
||||||
# Offense count: 22
|
# Offense count: 40
|
||||||
Style/CommentedKeyword:
|
# Cop supports --auto-correct.
|
||||||
Enabled: false
|
# 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/render_profiling_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/unit/condition_unit_test.rb'
|
||||||
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 5
|
||||||
|
Style/ClassVars:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/condition.rb'
|
||||||
|
- 'lib/liquid/strainer.rb'
|
||||||
|
- 'lib/liquid/template.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
# 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
|
# Offense count: 1
|
||||||
|
# Configuration parameters: AllowCoercion.
|
||||||
Style/DateTime:
|
Style/DateTime:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/unit/context_unit_test.rb'
|
- 'test/unit/context_unit_test.rb'
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
Style/EachWithObject:
|
||||||
|
Exclude:
|
||||||
|
- 'performance/shopify/database.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
Style/EmptyCaseCondition:
|
Style/EmptyCaseCondition:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/block_body.rb'
|
|
||||||
- '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: 14
|
# Offense count: 115
|
||||||
# Configuration parameters: MinBodyLength.
|
# Cop supports --auto-correct.
|
||||||
Style/GuardClause:
|
# Configuration parameters: EnforcedStyle.
|
||||||
|
# SupportedStyles: always, never
|
||||||
|
Style/FrozenStringLiteralComment:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Offense count: 30
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: IgnoreMacros, IgnoredMethods, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, EnforcedStyle.
|
||||||
|
# SupportedStyles: require_parentheses, omit_parentheses
|
||||||
|
Style/MethodCallWithArgsParentheses:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/condition.rb'
|
- 'Gemfile'
|
||||||
- 'lib/liquid/lexer.rb'
|
- 'Rakefile'
|
||||||
- 'lib/liquid/strainer.rb'
|
- 'lib/liquid/block_body.rb'
|
||||||
- 'lib/liquid/tags/assign.rb'
|
- 'lib/liquid/parser.rb'
|
||||||
- 'lib/liquid/tags/capture.rb'
|
|
||||||
- 'lib/liquid/tags/case.rb'
|
|
||||||
- 'lib/liquid/tags/for.rb'
|
- 'lib/liquid/tags/for.rb'
|
||||||
- 'lib/liquid/tags/include.rb'
|
- 'liquid.gemspec'
|
||||||
- 'lib/liquid/tags/raw.rb'
|
- 'performance/shopify/database.rb'
|
||||||
- 'lib/liquid/tags/table_row.rb'
|
- 'performance/shopify/liquid.rb'
|
||||||
- 'lib/liquid/variable.rb'
|
- 'test/test_helper.rb'
|
||||||
- 'test/unit/tokenizer_unit_test.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.
|
||||||
@@ -188,27 +297,17 @@ Style/Next:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/tags/for.rb'
|
- 'lib/liquid/tags/for.rb'
|
||||||
|
|
||||||
# Offense count: 4
|
# Offense count: 52
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
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'
|
|
||||||
|
|
||||||
# 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.
|
||||||
@@ -216,21 +315,52 @@ Style/RedundantSelf:
|
|||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/strainer.rb'
|
- 'lib/liquid/strainer.rb'
|
||||||
|
|
||||||
# Offense count: 9
|
# 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
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
|
||||||
|
# Whitelist: present?, blank?, presence, try, try!
|
||||||
|
Style/SafeNavigation:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/liquid/drop.rb'
|
||||||
|
- 'lib/liquid/strainer.rb'
|
||||||
|
- 'lib/liquid/tokenizer.rb'
|
||||||
|
|
||||||
|
# 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.
|
||||||
@@ -241,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:
|
||||||
@@ -252,9 +409,3 @@ Style/UnneededPercentQ:
|
|||||||
Style/WhileUntilModifier:
|
Style/WhileUntilModifier:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/liquid/tags/case.rb'
|
- 'lib/liquid/tags/case.rb'
|
||||||
|
|
||||||
# Offense count: 648
|
|
||||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
||||||
# URISchemes: http, https
|
|
||||||
Metrics/LineLength:
|
|
||||||
Max: 294
|
|
||||||
|
|||||||
14
.travis.yml
14
.travis.yml
@@ -1,20 +1,14 @@
|
|||||||
language: ruby
|
language: ruby
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
- 2.1
|
|
||||||
- 2.2
|
|
||||||
- 2.3
|
|
||||||
- 2.4
|
- 2.4
|
||||||
- 2.5
|
- 2.5
|
||||||
- &latest_ruby 2.6
|
- &latest_ruby 2.6
|
||||||
|
- 2.7
|
||||||
- ruby-head
|
- ruby-head
|
||||||
- jruby-head
|
- jruby-head
|
||||||
# - rbx-2
|
- truffleruby
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- libgmp3-dev
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -24,9 +18,9 @@ matrix:
|
|||||||
allow_failures:
|
allow_failures:
|
||||||
- rvm: ruby-head
|
- rvm: ruby-head
|
||||||
- rvm: jruby-head
|
- rvm: jruby-head
|
||||||
|
- rvm: truffleruby
|
||||||
|
|
||||||
install:
|
cache: bundler
|
||||||
- bundle install
|
|
||||||
|
|
||||||
script: bundle exec rake
|
script: bundle exec rake
|
||||||
|
|
||||||
|
|||||||
7
Gemfile
7
Gemfile
@@ -10,15 +10,16 @@ group :benchmark, :test do
|
|||||||
gem 'memory_profiler'
|
gem 'memory_profiler'
|
||||||
gem 'terminal-table'
|
gem 'terminal-table'
|
||||||
|
|
||||||
install_if -> { RUBY_PLATFORM !~ /mingw|mswin|java/ } do
|
install_if -> { RUBY_PLATFORM !~ /mingw|mswin|java/ && RUBY_ENGINE != 'truffleruby' } do
|
||||||
gem 'stackprof'
|
gem 'stackprof'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'rubocop', '~> 0.53.0'
|
gem 'rubocop', '~> 0.74.0', require: false
|
||||||
|
gem 'rubocop-performance', require: false
|
||||||
|
|
||||||
platform :mri do
|
platform :mri, :truffleruby do
|
||||||
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'liquid-tag'
|
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'liquid-tag'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
10
Rakefile
10
Rakefile
@@ -19,8 +19,10 @@ task :warn_test do
|
|||||||
end
|
end
|
||||||
|
|
||||||
task :rubocop do
|
task :rubocop do
|
||||||
require 'rubocop/rake_task'
|
if RUBY_ENGINE == 'ruby'
|
||||||
RuboCop::RakeTask.new
|
require 'rubocop/rake_task'
|
||||||
|
RuboCop::RakeTask.new
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'runs test suite with both strict and lax parsers'
|
desc 'runs test suite with both strict and lax parsers'
|
||||||
@@ -32,8 +34,8 @@ task :test do
|
|||||||
Rake::Task['base_test'].reenable
|
Rake::Task['base_test'].reenable
|
||||||
Rake::Task['base_test'].invoke
|
Rake::Task['base_test'].invoke
|
||||||
|
|
||||||
if RUBY_ENGINE == 'ruby'
|
if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'truffleruby'
|
||||||
ENV['LIQUID-C'] = '1'
|
ENV['LIQUID_C'] = '1'
|
||||||
|
|
||||||
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||||
Rake::Task['base_test'].reenable
|
Rake::Task['base_test'].reenable
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module Liquid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
@variable.render(context)
|
@variable.render_to_output_buffer(context, '')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|||||||
s.license = "MIT"
|
s.license = "MIT"
|
||||||
# s.description = "A secure, non-evaling end user template engine with aesthetic markup."
|
# s.description = "A secure, non-evaling end user template engine with aesthetic markup."
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.1.0"
|
s.required_ruby_version = ">= 2.4.0"
|
||||||
s.required_rubygems_version = ">= 1.3.7"
|
s.required_rubygems_version = ">= 1.3.7"
|
||||||
|
|
||||||
s.test_files = Dir.glob("{test}/**/*")
|
s.test_files = Dir.glob("{test}/**/*")
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class Profiler
|
|||||||
@retained << "#{report.scale_bytes(report.total_retained_memsize)} (#{report.total_retained} objects)"
|
@retained << "#{report.scale_bytes(report.total_retained_memsize)} (#{report.total_retained} objects)"
|
||||||
|
|
||||||
return if ENV['CI']
|
return if ENV['CI']
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
report_file = File.join(REPORTS_DIR, "#{sanitize(phase)}.txt")
|
report_file = File.join(REPORTS_DIR, "#{sanitize(phase)}.txt")
|
||||||
FileUtils.mkdir_p(REPORTS_DIR)
|
FileUtils.mkdir_p(REPORTS_DIR)
|
||||||
|
|||||||
@@ -5,72 +5,72 @@ class LiquidTagTest < Minitest::Test
|
|||||||
|
|
||||||
def test_liquid_tag
|
def test_liquid_tag
|
||||||
assert_template_result('1 2 3', <<~LIQUID, 'array' => [1, 2, 3])
|
assert_template_result('1 2 3', <<~LIQUID, 'array' => [1, 2, 3])
|
||||||
{%- liquid
|
{%- liquid
|
||||||
echo array | join: " "
|
echo array | join: " "
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_template_result('1 2 3', <<~LIQUID, 'array' => [1, 2, 3])
|
assert_template_result('1 2 3', <<~LIQUID, 'array' => [1, 2, 3])
|
||||||
{%- liquid
|
{%- liquid
|
||||||
for value in array
|
for value in array
|
||||||
echo value
|
echo value
|
||||||
unless forloop.last
|
unless forloop.last
|
||||||
echo " "
|
echo " "
|
||||||
endunless
|
endunless
|
||||||
endfor
|
endfor
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_template_result('4 8 12 6', <<~LIQUID, 'array' => [1, 2, 3])
|
assert_template_result('4 8 12 6', <<~LIQUID, 'array' => [1, 2, 3])
|
||||||
{%- liquid
|
{%- liquid
|
||||||
for value in array
|
for value in array
|
||||||
assign double_value = value | times: 2
|
assign double_value = value | times: 2
|
||||||
echo double_value | times: 2
|
echo double_value | times: 2
|
||||||
unless forloop.last
|
unless forloop.last
|
||||||
echo " "
|
echo " "
|
||||||
endunless
|
endunless
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo double_value
|
echo double_value
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_template_result('abc', <<~LIQUID)
|
assert_template_result('abc', <<~LIQUID)
|
||||||
{%- liquid echo "a" -%}
|
{%- liquid echo "a" -%}
|
||||||
b
|
b
|
||||||
{%- liquid echo "c" -%}
|
{%- liquid echo "c" -%}
|
||||||
LIQUID
|
LIQUID
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_liquid_tag_errors
|
def test_liquid_tag_errors
|
||||||
assert_match_syntax_error("syntax error (line 1): Unknown tag 'error'", <<~LIQUID)
|
assert_match_syntax_error("syntax error (line 1): Unknown tag 'error'", <<~LIQUID)
|
||||||
{%- liquid error no such tag -%}
|
{%- liquid error no such tag -%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_match_syntax_error("syntax error (line 7): Unknown tag 'error'", <<~LIQUID)
|
assert_match_syntax_error("syntax error (line 7): Unknown tag 'error'", <<~LIQUID)
|
||||||
{{ test }}
|
{{ test }}
|
||||||
|
|
||||||
{%-
|
{%-
|
||||||
liquid
|
liquid
|
||||||
for value in array
|
for value in array
|
||||||
|
|
||||||
error no such tag
|
error no such tag
|
||||||
endfor
|
endfor
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_match_syntax_error("syntax error (line 2): Unknown tag '!!! the guards are vigilant'", <<~LIQUID)
|
assert_match_syntax_error("syntax error (line 2): Unknown tag '!!! the guards are vigilant'", <<~LIQUID)
|
||||||
{%- liquid
|
{%- liquid
|
||||||
!!! the guards are vigilant
|
!!! the guards are vigilant
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
|
|
||||||
assert_match_syntax_error("syntax error (line 4): 'for' tag was never closed", <<~LIQUID)
|
assert_match_syntax_error("syntax error (line 4): 'for' tag was never closed", <<~LIQUID)
|
||||||
{%- liquid
|
{%- liquid
|
||||||
for value in array
|
for value in array
|
||||||
echo 'forgot to close the for tag'
|
echo 'forgot to close the for tag'
|
||||||
-%}
|
-%}
|
||||||
LIQUID
|
LIQUID
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -81,24 +81,24 @@ class LiquidTagTest < Minitest::Test
|
|||||||
|
|
||||||
def test_cannot_open_blocks_living_past_a_liquid_tag
|
def test_cannot_open_blocks_living_past_a_liquid_tag
|
||||||
assert_match_syntax_error("syntax error (line 3): 'if' tag was never closed", <<~LIQUID)
|
assert_match_syntax_error("syntax error (line 3): 'if' tag was never closed", <<~LIQUID)
|
||||||
{%- liquid
|
{%- liquid
|
||||||
if true
|
if true
|
||||||
-%}
|
-%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
LIQUID
|
LIQUID
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_quirk_can_close_blocks_created_before_a_liquid_tag
|
def test_quirk_can_close_blocks_created_before_a_liquid_tag
|
||||||
assert_template_result("42", <<~LIQUID)
|
assert_template_result("42", <<~LIQUID)
|
||||||
{%- if true -%}
|
{%- if true -%}
|
||||||
42
|
42
|
||||||
{%- liquid endif -%}
|
{%- liquid endif -%}
|
||||||
LIQUID
|
LIQUID
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_liquid_tag_in_raw
|
def test_liquid_tag_in_raw
|
||||||
assert_template_result("{% liquid echo 'test' %}\n", <<~LIQUID)
|
assert_template_result("{% liquid echo 'test' %}\n", <<~LIQUID)
|
||||||
{% raw %}{% liquid echo 'test' %}{% endraw %}
|
{% raw %}{% liquid echo 'test' %}{% endraw %}
|
||||||
LIQUID
|
LIQUID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if env_mode = ENV['LIQUID_PARSER_MODE']
|
|||||||
end
|
end
|
||||||
Liquid::Template.error_mode = mode
|
Liquid::Template.error_mode = mode
|
||||||
|
|
||||||
if ENV['LIQUID-C'] == '1'
|
if ENV['LIQUID_C'] == '1'
|
||||||
puts "-- LIQUID C"
|
puts "-- LIQUID C"
|
||||||
require 'liquid/c'
|
require 'liquid/c'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user