easol-canvas 4.22.0 → 4.23.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: 0fa0678ffa894425ea5bd8ff4c249b8af1e84d25cbee4d896a2f79593c566b52
4
- data.tar.gz: 131e3da485d6b2870f31d015b37d9d3f9b4c0ae7eac4bfd873c69193efa6db1b
3
+ metadata.gz: 94f4dc27cf361fbf85c47c331913ce6b671126adac19148c17a5ae4c32d6bf51
4
+ data.tar.gz: 6c955f86cdeef741fc861780d0bfb5eb77789ea9a423d0c4cae7b273a29dafbf
5
5
  SHA512:
6
- metadata.gz: 6d35d31e01450bdb3ebc4e837d581afd7ebab0ccdc3b6e324fba03344977c675ebeec2b66b12df8ed4ab13194fb2893e022c1dc33ed3a42eeb19fc7b674b1723
7
- data.tar.gz: b1ea0c67c83e01b9ad908f194d00abf7f53d2a54c1dde9715b7d7486a8f57d4334439d750e0c5d7c8aaee4f6cceea746493316e959704bbc64145296b1073818
6
+ metadata.gz: 2cddea94e53ac37253e2c7b54fda0628d80c29bb2659fe80901049b332865d8128f527c6e1ee45e55d9c570ad9c03ed7267ed123a39c6cbb75e06dbad2e267c9
7
+ data.tar.gz: 53a7fab10d4801a7695a9d759534b776be54d4f2394815f13de4a6a5beba7dce354f8dc0823bb29fd68cf0a61fa59ad9dde3d041d6c6ec7ce56e9cee83dfb210
@@ -46,6 +46,7 @@ module Canvas
46
46
  register_tag("accommodation_availability", ::Liquid::Block)
47
47
  register_tag("cache", ::Liquid::Block)
48
48
  register_tag("experience_slot_calendar", ::Liquid::Block)
49
+ register_tag("experience_slot_lookup", ::Liquid::Block)
49
50
  register_tag("experience_slot_search", ::Liquid::Block)
50
51
  register_tag("form", ::Liquid::Block)
51
52
  register_tag("json", ::Liquid::Block)
@@ -1,13 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "open3"
3
+ require "sass-embedded"
4
4
 
5
5
  module Canvas
6
- # This is a thin wrapper around the dartsass binary as provided by
7
- # dartsass-rails.
6
+ # Compiles SCSS with dart-sass via the sass-embedded Ruby API.
8
7
  #
9
8
  # It is compatible with SassC::Engine as much as we were using it, but 100%
10
9
  # compatability is not a goal.
10
+ #
11
+ # We use the in-process API rather than shelling out to the `dartsass`
12
+ # executable: the CLI resolves `Gem.bin_path("sass-embedded", "sass")`, which
13
+ # is ambiguous (and noisy on stderr) whenever another bundled gem — e.g. the
14
+ # legacy `sass` gem — also ships a `sass` executable. The API has no such
15
+ # dependency on executable resolution and avoids a subprocess per render.
11
16
  class DartSass
12
17
  Error = Class.new(StandardError)
13
18
 
@@ -17,31 +22,15 @@ module Canvas
17
22
  end
18
23
 
19
24
  def render
20
- stdout, stderr, status = Open3.capture3(*command, stdin_data: @css)
21
-
22
- if status == 0
23
- stdout
24
- else
25
- raise Error.new(stderr)
26
- end
27
- end
28
-
29
- private
30
-
31
- def command
32
- [dartsass, "--stdin", style, *load_paths].compact
33
- end
34
-
35
- def dartsass
36
- Gem.bin_path("dartsass-rails", "dartsass").shellescape
37
- end
38
-
39
- def style
40
- (s = @config[:style]) && "--style=#{s.to_s.shellescape}"
41
- end
42
-
43
- def load_paths
44
- Array(@config[:load_paths]).map { "--load-path=#{_1.shellescape}" }
25
+ Sass.compile_string(
26
+ @css,
27
+ load_paths: Array(@config[:load_paths]),
28
+ style: @config[:style] || :expanded
29
+ ).css
30
+ rescue Sass::CompileError => e
31
+ # detailed_message keeps the formatted dart-sass error (source snippet and
32
+ # line:column) the CLI used to print to stderr; highlight: false strips ANSI.
33
+ raise Error.new(e.detailed_message(highlight: false))
45
34
  end
46
35
  end
47
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canvas
4
- VERSION = "4.22.0"
4
+ VERSION = "4.23.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easol-canvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.22.0
4
+ version: 4.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Byrne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-02-26 00:00:00.000000000 Z
12
+ date: 2026-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -81,6 +81,20 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0.4'
84
+ - !ruby/object:Gem::Dependency
85
+ name: sass-embedded
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '1.0'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: json-schema
86
100
  requirement: !ruby/object:Gem::Requirement