locomotivecms_steam 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dcf9666c7fcd392c8570476374e32a3db2492bc9a56449e0faa0667a87dcb5d
4
- data.tar.gz: e92dbc7da55147cba7c476fa088ee28fda6e7da0aadcad796d97e20f70de13f0
3
+ metadata.gz: f5fcd89084fca2167fb869e5819dce44029256761bbed64ceaec4274b4d24bfc
4
+ data.tar.gz: fc263ea755d1e716e2f288a2a8b88ed87419b47916a8a1945f4b13679a380744
5
5
  SHA512:
6
- metadata.gz: 6a5d931f8f0fe0007a45422a0d256dd93de213f450246c103a682f95829a5c75b4f9c4069142e3e166736a87a9b1f03bda40a1035165b5bfbc024017b8303b82
7
- data.tar.gz: f5cedd73e0abb3a7f7b9309a778b3e9ee5bacaa9eb54cbe3adaef787322ad829bd9cef78769804bd553a0844fc994d94f346f8835a66cafefec8afa956e40641
6
+ metadata.gz: f8d908e44d028406732eae11fc5fdc73b774a684afef6b4cf40a55c0b27342dc86bd3ed512ffb77917fcedae0c4791ba4bc6d25418ef284587f0c191d18a9e3f
7
+ data.tar.gz: 46357b80f3a669cb0306045ecd5dbb961aed2d2c9124836aaebd2583752d757df4b43c8be8c34a1df15894362d3c85640899c38264df4a848e82b2a9e64b7e75
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- locomotivecms_steam (1.5.2)
4
+ locomotivecms_steam (1.5.3)
5
5
  RedCloth (~> 4.3.2)
6
6
  autoprefixer-rails (~> 8.0.0)
7
7
  bcrypt (~> 3.1.11)
@@ -19,7 +19,7 @@ PATH
19
19
  moneta (~> 1.0.0)
20
20
  morphine (~> 0.1.1)
21
21
  multi_json (~> 1.13.1)
22
- nokogiri (~> 1.10.4)
22
+ nokogiri (~> 1.10.8)
23
23
  pony (~> 1.12)
24
24
  rack-cache (~> 1.7.0)
25
25
  rack-rewrite (~> 1.5.1)
@@ -82,7 +82,7 @@ GEM
82
82
  rack (>= 1.3)
83
83
  duktape (2.0.1.1)
84
84
  execjs (2.7.0)
85
- ffi (1.12.1)
85
+ ffi (1.12.2)
86
86
  flamegraph (0.9.5)
87
87
  haml (5.0.4)
88
88
  temple (>= 0.8.0)
@@ -124,7 +124,7 @@ GEM
124
124
  multi_json (1.13.1)
125
125
  multi_xml (0.6.0)
126
126
  nio4r (2.5.2)
127
- nokogiri (1.10.7)
127
+ nokogiri (1.10.8)
128
128
  mini_portile2 (~> 2.4.0)
129
129
  nokogumbo (1.5.0)
130
130
  nokogiri
@@ -19,13 +19,13 @@ module Locomotive
19
19
 
20
20
  Syntax = /(#{::Liquid::VariableSignature}+)\s*from\s*(#{::Liquid::QuotedFragment}+),?(.+)?/o.freeze
21
21
 
22
- attr_reader :variable_name, :url, :expires_in
22
+ attr_reader :variable_name, :url_expr, :url, :expires_in
23
23
 
24
24
  def initialize(tag_name, markup, options)
25
25
  super
26
26
 
27
27
  if markup =~ Syntax
28
- @variable_name, @url, attributes = $1.to_s, ::Liquid::Expression.parse($2), $3
28
+ @variable_name, @url_expr, attributes = $1.to_s, ::Liquid::Expression.parse($2), $3
29
29
 
30
30
  parse_attributes(attributes)
31
31
  else
@@ -41,7 +41,7 @@ module Locomotive
41
41
  @expires_in = attributes.delete(:expires_in)&.to_i
42
42
 
43
43
  # the URL can come from a variable
44
- @url = context.evaluate(url)
44
+ @url = context.evaluate(url_expr)
45
45
 
46
46
  if url.blank?
47
47
  Locomotive::Common::Logger.error "A consume tag can't call an empty URL."
@@ -85,7 +85,9 @@ module Locomotive
85
85
  # to only return pages which will be displayed in the nav.
86
86
  def children_of(page)
87
87
  children = (page_repository.children_of(page) || [])
88
- children.select { |child| self.include_page?(child) }
88
+ children
89
+ .map { |child| decorate_page(child) }
90
+ .select { |child| self.include_page?(child) }
89
91
  end
90
92
 
91
93
  # Determine whether or not a page should be a part of the menu.
@@ -179,7 +181,6 @@ module Locomotive
179
181
  # @return [ String ] The HTML output
180
182
  #
181
183
  def render_entry_link(page, css, depth, context)
182
- page = decorate_page(page)
183
184
  url = self.entry_url(page)
184
185
  label = self.entry_label(page, context)
185
186
  css = self.entry_css(page, css)
@@ -243,7 +244,7 @@ module Locomotive
243
244
  self.current_page = context.registers[:page]
244
245
  self.services = context.registers[:services]
245
246
  self.current_locale = context.registers[:locale]
246
- self.page_repository = self.services.repositories.page
247
+ self.page_repository = services.repositories.page
247
248
  end
248
249
 
249
250
  # Parse the template of the snippet give in option of the tag.
@@ -3,6 +3,6 @@
3
3
  # 1.0.0.alpha < 1.0.0.alpha1 < 1.0.0.beta < 1.0.0.beta2 < 1.0.0.beta11 < 1.0.0.rc1 < 1.0.0
4
4
  module Locomotive
5
5
  module Steam
6
- VERSION = '1.5.2'
6
+ VERSION = '1.5.3'
7
7
  end
8
8
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_development_dependency 'mongo', '~> 2.8.0'
21
21
  spec.add_development_dependency 'origin', '~> 2.3.1'
22
22
 
23
- spec.add_dependency 'nokogiri', '~> 1.10.4'
23
+ spec.add_dependency 'nokogiri', '~> 1.10.8'
24
24
  spec.add_dependency 'sanitize', '~> 4.6.4'
25
25
  spec.add_dependency 'morphine', '~> 0.1.1'
26
26
  spec.add_dependency 'httparty', '~> 0.16.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_steam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-01-30 00:00:00.000000000 Z
14
+ date: 2020-02-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 1.10.4
64
+ version: 1.10.8
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: 1.10.4
71
+ version: 1.10.8
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: sanitize
74
74
  requirement: !ruby/object:Gem::Requirement