easol-canvas 4.18.0 → 4.20.0

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: 012fee086d69a166e3b2e062e0e8d9f658db0749bed1dad6e5a30c25ea4c8678
4
- data.tar.gz: fb1a4df7f2aa7961c16e85b26472dd35e728b4c5519ef7f7a99c41a14c25e82a
3
+ metadata.gz: fa515bf37be7d80d67de3a67e92d6097e17d7298fc436a916acf0ca04687d78c
4
+ data.tar.gz: bbc64745d8df45188a081795995e0c92fc86b99f53beef20a69b72741657dd91
5
5
  SHA512:
6
- metadata.gz: 56ced44aa44c09a09f254c459dc35962b9114e5a747c5d257df0cef32d2bdd94739dd46c779344ecd4fb7df58c54a9614179bda162405ae889c9fb70fc33cc1a
7
- data.tar.gz: 23128bde9e9f69d7faf52e121f8bc077ec68a9407cad32b7ff15b4863fa8dadb3f0bf92cff5e1a2a1b1b27f88ac833a934d6636825178a80eadde036d5e8d65b
6
+ metadata.gz: c91c9b333de32d036428dd9bd0c88840e57ea37c3509bb266440ffa6df89fd50d7161edf155ea40f4e22898a0ff1e0a55e0c9900f03fc67a33e0eebf3dbaed19
7
+ data.tar.gz: 2a8d559a57048b770104a5a3faf5536539c081571f37f44717b2850bd4f9ab7e2975f897f87da1b34014e42d5de7ed11712a9ba90b062a8cb6b3cd6676dafd98
@@ -6,9 +6,11 @@ module Canvas
6
6
  # custom types that are defined in the /types directory.
7
7
  class ValidCustomTypesCheck < Check
8
8
  def run
9
+ custom_types = Canvas::FetchCustomTypes.call
10
+
9
11
  custom_type_files.each do |filename|
10
12
  schema = extract_json(filename)
11
- validator = Validator::CustomType.new(schema: schema)
13
+ validator = Validator::CustomType.new(schema: schema, custom_types: custom_types)
12
14
 
13
15
  next if validator.validate
14
16
 
@@ -30,27 +30,30 @@ module Canvas
30
30
  ::Liquid::Template.register_tag(name, klass)
31
31
  end
32
32
 
33
- # These are the tags that we define in the Rails app. If we add a new custom tag
34
- # in the Rails app, we'll need to register it here.
33
+ # These are the tags that we define in the Rails app. If we add a
34
+ # new custom tag in the Rails app, we'll need to register it here.
35
35
  def register_tags!
36
- register_tag("form", ::Liquid::Block)
37
- register_tag("product_search", ::Liquid::Block)
38
- register_tag("easol_badge", ::Liquid::Tag)
39
- register_tag("accommodation_availability", ::Liquid::Block)
40
- register_tag("cache", ::Liquid::Block)
41
- register_tag("currency_switcher", ::Liquid::Tag)
42
- register_tag("json", ::Liquid::Block)
43
- register_tag("variant_pricing", ::Liquid::Tag)
44
- register_tag("dynamic_package_booking_price", ::Liquid::Tag)
36
+ # Single statement non-block tags, no closing tag required.
45
37
  register_tag("cart_timer", ::Liquid::Tag)
46
38
  register_tag("cart_timer_add_time", ::Liquid::Tag)
47
- register_tag("experience_slot_search", ::Liquid::Block)
48
- register_tag("experience_slot_calendar", ::Liquid::Block)
49
- register_tag("package_availability", Liquid::Block)
50
- register_tag("package_price", Liquid::Block)
39
+ register_tag("currency_switcher", ::Liquid::Tag)
40
+ register_tag("dynamic_package_booking_price", ::Liquid::Tag)
41
+ register_tag("easol_badge", ::Liquid::Tag)
51
42
  register_tag("input", ::Liquid::Tag)
52
43
  register_tag("label", ::Liquid::Tag)
44
+ register_tag("variant_pricing", ::Liquid::Tag)
45
+ # Tags wrapping nested content with a closing tag.
46
+ register_tag("accommodation_availability", ::Liquid::Block)
47
+ register_tag("cache", ::Liquid::Block)
48
+ register_tag("experience_slot_calendar", ::Liquid::Block)
49
+ register_tag("experience_slot_search", ::Liquid::Block)
50
+ register_tag("form", ::Liquid::Block)
51
+ register_tag("json", ::Liquid::Block)
52
+ register_tag("package_availability", ::Liquid::Block)
53
+ register_tag("package_price", ::Liquid::Block)
53
54
  register_tag("package_step_product_search", ::Liquid::Block)
55
+ register_tag("packages_search_and_calendar", ::Liquid::Block)
56
+ register_tag("product_search", ::Liquid::Block)
54
57
  end
55
58
  end
56
59
  end
@@ -26,10 +26,11 @@ module Canvas
26
26
  class CustomType
27
27
  REQUIRED_KEYS = %w[key name attributes].freeze
28
28
 
29
- attr_reader :schema, :errors
29
+ attr_reader :schema, :errors, :custom_types
30
30
 
31
- def initialize(schema:)
31
+ def initialize(schema:, custom_types: [])
32
32
  @schema = schema
33
+ @custom_types = custom_types
33
34
  @errors = []
34
35
  end
35
36
 
@@ -127,7 +128,7 @@ module Canvas
127
128
  schema["attributes"].each do |attribute_schema|
128
129
  attr_validator = Validator::SchemaAttribute.new(
129
130
  attribute: attribute_schema,
130
- custom_types: []
131
+ custom_types: custom_types
131
132
  )
132
133
  next if attr_validator.validate
133
134
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canvas
4
- VERSION = "4.18.0"
4
+ VERSION = "4.20.0"
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.18.0
4
+ version: 4.20.0
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: 2025-08-26 00:00:00.000000000 Z
12
+ date: 2026-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor