schema_dot_org 2.3.1 → 2.3.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/schema_dot_org.rb +3 -2
- data/schema_dot_org.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2dfc9bdff909553c6fe2167179c1271676e9cee1d1422dd65eb26e0816d6dbd
|
4
|
+
data.tar.gz: 34a1e0e972e11ec617d7f4fc5c8317b15f63af7168b750ff75949ab0c1326aad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52c0da39657a4ffba96c64eee10c489f6d0102196fd6b1e7e097a410f449c0fa5c16b0be535a804493bdf5e2671e45ae82c5cc6e1bb795e373844ed114bf594a
|
7
|
+
data.tar.gz: 3db26074e88294c49d4e50705d7a8b059668c741a7b3a0942d35779f107006034df4556c17fae605835ade306028e5a6b508267bd5053f64718f78fe1c3d29fe
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -109,7 +109,7 @@ I move on to other things.
|
|
109
109
|
|
110
110
|
See each type's RSpec for an example of how to use it.
|
111
111
|
|
112
|
-
|
|
112
|
+
| Name | Schema.org Page | RSpec Spec | Source Code |
|
113
113
|
| ---------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
114
114
|
| AggregateOffer | [Schema.org](https://schema.org/AggregateOffer) | | [Source](https://github.com/dogweather/schema-dot-org/blob/master/lib/schema_dot_org/aggregate_offer.rb) |
|
115
115
|
| CollegeOrUniversity | [Schema.org](https://schema.org/CollegeOrUniversity) | [RSpec](https://github.com/dogweather/schema-dot-org/blob/master/spec/schema_dot_org/college_or_university_spec.rb) | [Source](https://github.com/dogweather/schema-dot-org/blob/master/lib/schema_dot_org/college_or_university.rb) |
|
data/lib/schema_dot_org.rb
CHANGED
@@ -7,6 +7,7 @@ require 'validated_object'
|
|
7
7
|
#
|
8
8
|
module SchemaDotOrg
|
9
9
|
class SchemaType < ValidatedObject::Base
|
10
|
+
EXCLUDED_INSTANCE_VARIABLES = %i[@context_for_validation @validation_context @errors].freeze
|
10
11
|
ROOT_ATTR = { "@context" => "https://schema.org" }.freeze
|
11
12
|
UNQUALIFIED_CLASS_NAME_REGEX = /([^:]+)$/
|
12
13
|
|
@@ -85,7 +86,7 @@ module SchemaDotOrg
|
|
85
86
|
|
86
87
|
elsif is_schema_type?(value)
|
87
88
|
value.to_json_struct
|
88
|
-
|
89
|
+
|
89
90
|
else
|
90
91
|
value
|
91
92
|
end
|
@@ -98,7 +99,7 @@ module SchemaDotOrg
|
|
98
99
|
|
99
100
|
|
100
101
|
def attrs
|
101
|
-
instance_variables.reject{ |v|
|
102
|
+
instance_variables.reject{ |v| EXCLUDED_INSTANCE_VARIABLES.include?(v) }
|
102
103
|
end
|
103
104
|
|
104
105
|
|
data/schema_dot_org.gemspec
CHANGED
@@ -7,7 +7,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.required_ruby_version = '>= 3.0'
|
9
9
|
spec.name = 'schema_dot_org'
|
10
|
-
spec.version = '2.3.
|
10
|
+
spec.version = '2.3.2'
|
11
11
|
spec.authors = ['Robb Shecter']
|
12
12
|
spec.email = ['robb@public.law']
|
13
13
|
|