Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/liquid.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Liquid
on: [push, pull_request]
on: [push]

env:
BUNDLE_JOBS: 4
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
}
- { ruby: head, allowed-failure: true, rubyopt: "--yjit" }
- { ruby: head, allowed-failure: true, rubyopt: "--zjit" }
name: Test Ruby ${{ matrix.entry.ruby }}
name: Test Ruby ${{ matrix.entry.ruby }} ${{ matrix.entry.rubyopt }} --${{ matrix.entry.allowed-failure && 'allowed-failure' || 'strict' }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: ruby/setup-ruby@a25f1e45f0e65a92fcb1e95e8847f78fb0a7197a # v1.273.0
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ group :test do
end

group :spec do
# Using feature branch until https://github.com/Shopify/liquid-spec/pull/97 is merged
gem 'liquid-spec', github: 'Shopify/liquid-spec', branch: 'main'
gem 'activesupport', require: false
end
9 changes: 4 additions & 5 deletions spec/ruby_liquid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@

# Compile a template string into a Liquid::Template
LiquidSpec.compile do |ctx, source, options|
Liquid::Template.parse(source, **options)
ctx[:template] = Liquid::Template.parse(source, **options)
end

# Render a compiled template with the given context
# @param ctx [Hash] adapter context (unused)
# @param template [Liquid::Template] compiled template
# @param ctx [Hash] adapter context containing :template
# @param assigns [Hash] environment variables
# @param options [Hash] :registers, :strict_errors, :exception_renderer
LiquidSpec.render do |ctx, template, assigns, options|
LiquidSpec.render do |ctx, assigns, options|
registers = Liquid::Registers.new(options[:registers] || {})

context = Liquid::Context.build(
Expand All @@ -33,5 +32,5 @@

context.exception_renderer = options[:exception_renderer] if options[:exception_renderer]

template.render(context)
ctx[:template].render(context)
end
6 changes: 3 additions & 3 deletions spec/ruby_liquid_lax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
LiquidSpec.compile do |ctx, source, options|
# Force lax mode
options = options.merge(error_mode: :lax)
Liquid::Template.parse(source, **options)
ctx[:template] = Liquid::Template.parse(source, **options)
end

# Render a compiled template with the given context
LiquidSpec.render do |ctx, template, assigns, options|
LiquidSpec.render do |ctx, assigns, options|
registers = Liquid::Registers.new(options[:registers] || {})

context = Liquid::Context.build(
Expand All @@ -30,5 +30,5 @@

context.exception_renderer = options[:exception_renderer] if options[:exception_renderer]

template.render(context)
ctx[:template].render(context)
end
9 changes: 4 additions & 5 deletions spec/ruby_liquid_with_active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@

# Compile a template string into a Liquid::Template
LiquidSpec.compile do |ctx, source, options|
Liquid::Template.parse(source, **options)
ctx[:template] = Liquid::Template.parse(source, **options)
end

# Render a compiled template with the given context
# @param ctx [Hash] adapter context (unused)
# @param template [Liquid::Template] compiled template
# @param ctx [Hash] adapter context containing :template
# @param assigns [Hash] environment variables
# @param options [Hash] :registers, :strict_errors, :exception_renderer
LiquidSpec.render do |ctx, template, assigns, options|
LiquidSpec.render do |ctx, assigns, options|
registers = Liquid::Registers.new(options[:registers] || {})

context = Liquid::Context.build(
Expand All @@ -34,5 +33,5 @@

context.exception_renderer = options[:exception_renderer] if options[:exception_renderer]

template.render(context)
ctx[:template].render(context)
end
6 changes: 3 additions & 3 deletions spec/ruby_liquid_yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
LiquidSpec.compile do |ctx, source, options|
# Force strict mode
options = { error_mode: :strict }.merge(options)
Liquid::Template.parse(source, **options)
ctx[:template] = Liquid::Template.parse(source, **options)
end

# Render a compiled template with the given context
LiquidSpec.render do |ctx, template, assigns, options|
LiquidSpec.render do |ctx, assigns, options|
registers = Liquid::Registers.new(options[:registers] || {})

context = Liquid::Context.build(
Expand All @@ -37,5 +37,5 @@

context.exception_renderer = options[:exception_renderer] if options[:exception_renderer]

template.render(context)
ctx[:template].render(context)
end