liquidum 1.1.1 → 1.1.2

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: d1a19fc1988722ecc75d48fdc1e25101679f91af1cc0de696118198d5a35d08b
4
- data.tar.gz: fc6a6a5d26c79dc15fb0be0e9b0ec404b97387395d80221b3b38d2d0b86cbcbe
3
+ metadata.gz: 07f82032cfc0adb076d2e0ed424c2eb19747e85322bfdebbb668d6995f7cdb2b
4
+ data.tar.gz: 3933ec803077049700a2f5ed63599968f6477dd679a29b0c2a9e89ca81373fd7
5
5
  SHA512:
6
- metadata.gz: 384e81ad24db742d2995fa4af3bf3891f4a6d10ded6f47c43a05a9d708409e1297f07749264ec5c845711b7fc8b63d2b2f1d3c6ce464835d4450b6716428699b
7
- data.tar.gz: 6dd9b4c3eb08256f02a5c92cb1ada34937606bd5154497c7618a8355c06b2ca4072e3e206e7a2d048726541de3f77be30bc0fe963af78a7c23cf0fdd27f7469a
6
+ metadata.gz: 0ab256dde0cbce5bdf1615a72e519350066f506063caae818ed0e4b2d99028360c85da1b039a546ba284800a6c0fc56c6d828c31472d80b116f09760877906e2
7
+ data.tar.gz: 1b52586a9e4fa54c80b35dda4c4af75eef3a2b16a1761490d931fa9d18170934c0fedd454fb1c59fd84607fe4dc527ece70671a382c4055a0eb08248a0de3419
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Liquidum
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
data/lib/liquidum.rb CHANGED
@@ -1,25 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'liquid'
4
- require 'tilt'
5
- require 'sassc'
6
- require 'addressable/uri'
7
-
8
- require 'liquidum/version'
9
- require 'liquidum/engine'
10
- require 'liquidum/configuration'
11
- require 'liquidum/drop'
12
-
13
- require 'liquidum/liquid/liquid_helpers'
14
- require 'liquidum/liquid/liquid_template_extensions'
15
- require 'liquidum/liquid/liquidum_block'
16
- require 'liquidum/liquid/liquidum_tag'
17
- require 'liquidum/liquid/parser'
3
+ require "liquid"
4
+ require "tilt"
5
+ require "sassc"
6
+ require "addressable/uri"
7
+
8
+ require "liquidum/version"
9
+ require "liquidum/engine"
10
+ require "liquidum/configuration"
11
+ require "liquidum/drop"
12
+
13
+ require "liquidum/liquid/liquid_helpers"
14
+ require "liquidum/liquid/liquid_template_extensions"
15
+ require "liquidum/liquid/liquidum_block"
16
+ require "liquidum/liquid/liquidum_tag"
17
+ require "liquidum/liquid/parser"
18
18
 
19
19
  module Liquidum
20
20
  extend Configurable
21
21
 
22
22
  class Error < StandardError; end
23
+
23
24
  class UnknownStepTypeError < Error; end
24
25
 
25
26
  class LiquidumFileSystem
@@ -30,12 +31,12 @@ module Liquidum
30
31
  end
31
32
 
32
33
  def read_template_file(template_path)
33
- current_content = registers['content']
34
+ current_content = registers["content"]
34
35
 
35
36
  contents = current_content.site.contents.published
36
37
 
37
38
  content = contents.include(template_path).first
38
- content&.data || ''
39
+ content&.data || ""
39
40
  end
40
41
  end
41
42
 
@@ -44,20 +45,20 @@ module Liquidum
44
45
  template = Liquid::Template.parse(content)
45
46
  options[:assigns] ||= {}
46
47
  options[:registers] ||= {}
47
- options[:registers]['file_system'] =
48
+ options[:registers]["file_system"] =
48
49
  Liquidum.config.liquidum_file_system.constantize.new(options[:registers])
49
50
  result = template.render(options[:context] || options[:assigns].stringify_keys,
50
- registers: options[:registers])
51
+ registers: options[:registers])
51
52
 
52
53
  if template.errors.present?
53
- Liquidum.config.logger.error '--- Template rendering errors: ' + '-' * 49
54
+ Liquidum.config.logger.error "--- Template rendering errors: " + "-" * 49
54
55
  template.errors.map do |error|
55
56
  next unless error.cause
56
57
 
57
58
  Liquidum.config.logger.error error
58
- Liquidum.config.logger.error '=> ' + error.cause.backtrace.first.to_s + ': ' + error.cause.message
59
+ Liquidum.config.logger.error "=> " + error.cause.backtrace.first.to_s + ": " + error.cause.message
59
60
  end
60
- Liquidum.config.logger.error '-' * 80
61
+ Liquidum.config.logger.error "-" * 80
61
62
  end
62
63
 
63
64
  assigns = options[:assigns].deep_stringify_keys
@@ -70,8 +71,8 @@ module Liquidum
70
71
  end.render
71
72
  end
72
73
  if options[:layout].present?
73
- result = render(options[:layout], assigns: assigns.merge('content' => result),
74
- registers: options[:registers])
74
+ result = render(options[:layout], assigns: assigns.merge("content" => result),
75
+ registers: options[:registers])
75
76
  end
76
77
 
77
78
  result
data/liquidum.gemspec CHANGED
@@ -28,17 +28,18 @@ Gem::Specification.new do |spec|
28
28
  spec.add_runtime_dependency("i18n", ["~> 1.8"])
29
29
  spec.add_runtime_dependency("kramdown", ["~> 2.1"])
30
30
  spec.add_runtime_dependency("kramdown-parser-gfm", ["~> 1.0"])
31
- spec.add_runtime_dependency("liquid", ["~> 5.1"])
31
+ spec.add_runtime_dependency("liquid", ["< 5.4"])
32
32
  spec.add_runtime_dependency("parslet", [">= 0"])
33
33
  spec.add_runtime_dependency("pg", [">= 0"])
34
34
  spec.add_runtime_dependency("rails", [">= 5.2"])
35
35
  spec.add_runtime_dependency("sassc", ["~> 2.2"])
36
36
  spec.add_runtime_dependency "slim-rails", "~> 3.6"
37
+
37
38
  spec.add_development_dependency("minitest", ["~> 5.11"])
38
39
  spec.add_development_dependency("minitest-reporters", ["~> 1.1"])
39
40
  spec.add_development_dependency("pry", ["> 0"])
40
41
  spec.add_development_dependency("pry-rails", ["~> 0.3"])
41
42
  spec.add_development_dependency "rubocop", "~> 1"
42
-
43
43
  spec.add_development_dependency "standard", "~> 1"
44
+ spec.add_development_dependency "debug", "~> 1"
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidum
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-06 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: liquid
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - "<"
88
88
  - !ruby/object:Gem::Version
89
- version: '5.1'
89
+ version: '5.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - "<"
95
95
  - !ruby/object:Gem::Version
96
- version: '5.1'
96
+ version: '5.4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: parslet
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -248,6 +248,20 @@ dependencies:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '1'
251
+ - !ruby/object:Gem::Dependency
252
+ name: debug
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '1'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '1'
251
265
  description: Ready made set of tags, parsings and awesomeness
252
266
  email:
253
267
  - tom@degrunt.nl