liquid 5.5.0 → 5.5.1

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: 4d5699469b4a46eb15532bf2d5000925eeeff4f2eb5fef683d53bf09f0ec8825
4
- data.tar.gz: df2bebc1a371dc250c768d46996c861fc22db9a1e2afc77f2f12247baa9a2e71
3
+ metadata.gz: '0598b29e6fcedc82da9cda31e60387a4365e688fc23bee62ebdc5b57830453fd'
4
+ data.tar.gz: e3f0a880eafbb93c5a06ee6a5f82691fe0486b259c6407258382647aaf717b09
5
5
  SHA512:
6
- metadata.gz: e953d07e402f2325e56953a1cce6f4d334a183548fd70db1a472695b491f3f2efb6318625c1582e708362f5d2cff81f932d9c0d30c3da23d63fdfdab12b50725
7
- data.tar.gz: d6abf81f05029169f17da65b9c93af90c96c93fccd6179cff3a02d050f5736e177c2686348b1d62af4caa432e6332ffc19c37c86004d139e422876049856fc97
6
+ metadata.gz: bee97a129194c9309265d15c6a076b2f3ff71732d5478901c218589eceec5c55779b2dad99de0a7061419d991974a253d3a8e095e7b98687f4de89e2bda52391
7
+ data.tar.gz: d28b48a963d1b5ebb753353a6c71e5c0226b5def5c7b46799b9019a80506c67fe7006ed296ba56ec117e7e33bc7af16f8d0ad1c60518de559d57f821a809ca85
@@ -27,7 +27,7 @@ module Liquid
27
27
  @environments.flatten!
28
28
 
29
29
  @static_environments = [static_environments].flatten(1).freeze
30
- @scopes = [(outer_scope || {})]
30
+ @scopes = [outer_scope || {}]
31
31
  @registers = registers.is_a?(Registers) ? registers : Registers.new(registers)
32
32
  @errors = []
33
33
  @partial = false
@@ -26,14 +26,20 @@ module Liquid
26
26
  when NamedSyntax
27
27
  @variables = variables_from_string(Regexp.last_match(2))
28
28
  @name = parse_expression(Regexp.last_match(1))
29
+ @is_named = true
29
30
  when SimpleSyntax
30
31
  @variables = variables_from_string(markup)
31
32
  @name = @variables.to_s
33
+ @is_named = !@name.match?(/\w+:0x\h{8}/)
32
34
  else
33
35
  raise SyntaxError, options[:locale].t("errors.syntax.cycle")
34
36
  end
35
37
  end
36
38
 
39
+ def named?
40
+ @is_named
41
+ end
42
+
37
43
  def render_to_output_buffer(context, output)
38
44
  context.registers[:cycle] ||= {}
39
45
 
@@ -111,7 +111,7 @@ module Liquid
111
111
  def parse_binary_comparisons(p)
112
112
  condition = parse_comparison(p)
113
113
  first_condition = condition
114
- while (op = (p.id?('and') || p.id?('or')))
114
+ while (op = p.id?('and') || p.id?('or'))
115
115
  child_condition = parse_comparison(p)
116
116
  condition.send(op, child_condition)
117
117
  condition = child_condition
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Liquid
5
- VERSION = "5.5.0"
5
+ VERSION = "5.5.1"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.0
4
+ version: 5.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Lütke
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-21 00:00:00.000000000 Z
11
+ date: 2024-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description:
41
+ description:
42
42
  email:
43
43
  - tobi@leetsoft.com
44
44
  executables: []
@@ -115,7 +115,7 @@ licenses:
115
115
  - MIT
116
116
  metadata:
117
117
  allowed_push_host: https://rubygems.org
118
- post_install_message:
118
+ post_install_message:
119
119
  rdoc_options: []
120
120
  require_paths:
121
121
  - lib
@@ -130,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: 1.3.7
132
132
  requirements: []
133
- rubygems_version: 3.5.6
134
- signing_key:
133
+ rubygems_version: 3.5.16
134
+ signing_key:
135
135
  specification_version: 4
136
136
  summary: A secure, non-evaling end user template engine with aesthetic markup.
137
137
  test_files: []