easol-canvas 3.4.0 → 4.0.0

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: 2e5275a64698399c6ccd64afd11014f878d10e8807bf74e64c0d48e85a3d8bb9
4
- data.tar.gz: ceee5b6ac86486dbc5c359efe9a25bbe50f798180c6b64eb4b926c51bba45b6c
3
+ metadata.gz: dc609cfddb0df9a458af860e381eda6b754b87c059f3cd5d98e88bfe4d2f0ba1
4
+ data.tar.gz: db1a86ed56ebb2dd0ef04c26648a92027fd53be43dd8ec143fcf36cc22c7ead3
5
5
  SHA512:
6
- metadata.gz: 4c83c2f825f1564e12d208098a0af2f926352d27e4e7c4b6aa6002d5983d06153bab1650edb7a02b52fcd9f2fb79302653ee58c9d481e8e86ef50d11d80a46c8
7
- data.tar.gz: 6e28e6f1839eb050eecc0ca9ecaff1f8c13b0a0ab19a4d979a7aa4714c3423148f8de97f6aee0957eeaa789773f5b43ffc48b477f4e94d32caad51a7c928562d
6
+ metadata.gz: 8daf60e7d01290bcbee438acc338ed817ba21cdf9a3b47a4adc2faad0288595cc8fa2c46093ab31c9182bbdc2ab1ec1dd3104484a11534b7044b315263072759
7
+ data.tar.gz: d02ec887f74f5c30092500c4c92514f91f1253090fb0fac3b33d4aa6c6cb35c6eee44c82a5df9ed0d9ce7eb5a4a231dbdd5eb8db443c98472a42abb105815423
@@ -38,6 +38,7 @@ module Canvas
38
38
  ensure_has_required_keys &&
39
39
  ensure_no_unrecognized_keys &&
40
40
  ensure_keys_are_correct_types &&
41
+ ensure_key_is_lowercase &&
41
42
  ensure_key_value_is_not_reserved &&
42
43
  ensure_no_duplicate_attributes &&
43
44
  ensure_attributes_are_valid &&
@@ -92,6 +93,13 @@ module Canvas
92
93
  true
93
94
  end
94
95
 
96
+ def ensure_key_is_lowercase
97
+ return true if schema["key"] == schema["key"].downcase
98
+
99
+ @errors << %("key" #{schema["key"]} must be lowercase)
100
+ false
101
+ end
102
+
95
103
  # Ensuring the value for key doesn't clash with our primitive type keys.
96
104
  # See {Canvas::Constants::PRIMITIVE_TYPES}
97
105
  def ensure_key_value_is_not_reserved
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canvas
4
- VERSION = "3.4.0"
4
+ VERSION = "4.0.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: 3.4.0
4
+ version: 4.0.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: 2023-03-20 00:00:00.000000000 Z
12
+ date: 2023-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor