schema_dot_org 2.2.3 → 2.3.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: 5e190c183425efbb7808c9e18f253cd377b91a4ce927d8f401f02158d6d704cf
4
- data.tar.gz: 5e01217b962ed0ec450bda73923e2fbdff9ec4baeee2433c96cdc27c53e08bbf
3
+ metadata.gz: 6b0120204cb5305a8efc64697f917b6e3ada14584f172f61cf16537f71a7a7d9
4
+ data.tar.gz: 496bde815fba8a32a86f9c1c6bf6ff810bd49b8c6f6d05a73682d2fb49ce68c8
5
5
  SHA512:
6
- metadata.gz: 36a893438da0d2731fba7a14a5d2a04b4a406688b5be906c6080ad30b2bb42865553943451fcb25e22a737e2e5478ac95a72f8fadf6447f28791c8e0ff89d2d9
7
- data.tar.gz: 2b1feab097655a4efd511838774f1f4c5224c0767cf78aa970f7feb7b57bd6e7a74bf7327aee2eecd2578d38aee68eb494c5ea5b6ff6131651c82c429f27cb70
6
+ metadata.gz: 914246c1e12f48142d896d357f22607e383402e3ee5dc3bcf4087ecdbe9db93b8dbd37ce95d0b3622719de8990934aec37b4b05dd35deb916d6089b12dda28c4
7
+ data.tar.gz: 4d9a8f13cbbe2a9519f47e2bb2dd09ffb69874dc403512a3f0cf3269efff6c9904fe05a19b571d039fbb6cdbdd12425c3c56c1ed8b1a4a76e430416ffa903e5b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- schema_dot_org (2.2.3)
4
+ schema_dot_org (2.3.0)
5
5
  validated_object (~> 2.3)
6
6
 
7
7
  GEM
@@ -53,7 +53,7 @@ GEM
53
53
  sorbet-runtime (>= 0.5.5890)
54
54
 
55
55
  PLATFORMS
56
- arm64-darwin-22
56
+ arm64-darwin-24
57
57
 
58
58
  DEPENDENCIES
59
59
  bundler (~> 2.4)
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Easily create [Structured Data](https://developers.google.com/search/docs/guides/intro-structured-data) with **correct syntax and semantics**.
6
6
  Good structured data [helps enhance a website's search result appearance](https://developers.google.com/search/docs/guides/enhance-site):
7
7
 
8
- > Google Search works hard to understand the content of a page. You can help us by providing explicit clues about the meaning of a page . . .
8
+ > Google Search works hard to understand the content of a page. You can help us by providing explicit clues about the meaning of a page
9
9
 
10
10
  ## Usage
11
11
 
@@ -0,0 +1,24 @@
1
+
2
+ # frozen_string_literal: true
3
+
4
+ require 'date'
5
+ require_relative 'person'
6
+
7
+ #
8
+ # Model the Schema.org `Thing > CreativeWork > Comment`.
9
+ # See https://schema.org/Comment
10
+ #
11
+ module SchemaDotOrg
12
+ class Comment < SchemaType
13
+ validated_attr :author, type: Person, presence: true
14
+ validated_attr :datePublished, type: Date, presence: true
15
+
16
+ validated_attr :comment, type: Array, allow_nil: true
17
+ validated_attr :creativeWorkStatus, type: String, allow_nil: true
18
+ validated_attr :image, type: Array, allow_nil: true
19
+ validated_attr :inLanguage, type: Array, allow_nil: true
20
+ validated_attr :interactionStatistic, type: Array, allow_nil: true
21
+ validated_attr :text, type: String, allow_nil: true
22
+ validated_attr :url, type: String, allow_nil: true
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'date'
4
+ require_relative 'person'
5
+
6
+ #
7
+ # Model the Schema.org `Thing > CreativeWork > Article > SocialMediaPosting > DiscussionForumPosting`.
8
+ # See https://schema.org/DiscussionForumPosting
9
+ #
10
+ module SchemaDotOrg
11
+ class DiscussionForumPosting < SchemaType
12
+ # TODO: Allow for type Person or Organization
13
+ validated_attr :author, type: Person, presence: true
14
+ # TODO: Allow for type Date or DateTime
15
+ validated_attr :datePublished, type: Date, presence: true
16
+
17
+ validated_attr :comment, type: Array, allow_nil: true
18
+ validated_attr :commentCount, type: Integer, allow_nil: true
19
+ validated_attr :headline, type: String, allow_nil: true
20
+ validated_attr :image, type: Array, allow_nil: true
21
+ validated_attr :inLanguage, type: Array, allow_nil: true
22
+ validated_attr :interactionStatistic, type: Array, allow_nil: true
23
+ validated_attr :mainEntityOfPage, type: String, allow_nil: true
24
+ validated_attr :text, type: String, allow_nil: true
25
+ validated_attr :url, type: String, allow_nil: true
26
+ end
27
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Model the Schema.org `Thing > Intangible > StructuredValue > InteractionCounter`.
5
+ # See https://schema.org/InteractionCounter
6
+ #
7
+ module SchemaDotOrg
8
+ class InteractionCounter < SchemaType
9
+ validated_attr :userInteractionCount, type: Integer, presence: true
10
+ validated_attr :interactionType, type: String, presence: true
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Model the Schema.org `Thing > Intangible > Language`.
5
+ # See https://schema.org/Language
6
+ #
7
+ module SchemaDotOrg
8
+ class Language < SchemaType
9
+ validated_attr :alternateName, type: String, allow_nil: true
10
+ validated_attr :name, type: String, presence: true
11
+ end
12
+ end
@@ -116,8 +116,12 @@ end
116
116
 
117
117
  require 'schema_dot_org/aggregate_offer'
118
118
  require 'schema_dot_org/college_or_university'
119
+ require 'schema_dot_org/comment'
119
120
  require 'schema_dot_org/contact_point'
121
+ require 'schema_dot_org/discussion_forum_posting'
122
+ require 'schema_dot_org/interaction_counter'
120
123
  require 'schema_dot_org/item_list'
124
+ require 'schema_dot_org/language'
121
125
  require 'schema_dot_org/list_item'
122
126
  require 'schema_dot_org/organization'
123
127
  require 'schema_dot_org/person'
@@ -5,9 +5,9 @@ lib = File.expand_path('lib', __dir__)
5
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.required_ruby_version = '>= 2.6'
8
+ spec.required_ruby_version = '>= 3.0'
9
9
  spec.name = 'schema_dot_org'
10
- spec.version = '2.2.3'
10
+ spec.version = '2.3.0'
11
11
  spec.authors = ['Robb Shecter']
12
12
  spec.email = ['robb@public.law']
13
13
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_dot_org
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-10-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: validated_object
@@ -75,7 +74,6 @@ extra_rdoc_files: []
75
74
  files:
76
75
  - ".gitignore"
77
76
  - ".rspec"
78
- - ".ruby-version"
79
77
  - ".travis.yml"
80
78
  - Gemfile
81
79
  - Gemfile.lock
@@ -88,8 +86,12 @@ files:
88
86
  - lib/schema_dot_org.rb
89
87
  - lib/schema_dot_org/aggregate_offer.rb
90
88
  - lib/schema_dot_org/college_or_university.rb
89
+ - lib/schema_dot_org/comment.rb
91
90
  - lib/schema_dot_org/contact_point.rb
91
+ - lib/schema_dot_org/discussion_forum_posting.rb
92
+ - lib/schema_dot_org/interaction_counter.rb
92
93
  - lib/schema_dot_org/item_list.rb
94
+ - lib/schema_dot_org/language.rb
93
95
  - lib/schema_dot_org/list_item.rb
94
96
  - lib/schema_dot_org/offer.rb
95
97
  - lib/schema_dot_org/organization.rb
@@ -104,7 +106,6 @@ homepage: https://github.com/public-law/schema-dot-org
104
106
  licenses:
105
107
  - MIT
106
108
  metadata: {}
107
- post_install_message:
108
109
  rdoc_options: []
109
110
  require_paths:
110
111
  - lib
@@ -112,15 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
113
  requirements:
113
114
  - - ">="
114
115
  - !ruby/object:Gem::Version
115
- version: '2.6'
116
+ version: '3.0'
116
117
  required_rubygems_version: !ruby/object:Gem::Requirement
117
118
  requirements:
118
119
  - - ">="
119
120
  - !ruby/object:Gem::Version
120
121
  version: '0'
121
122
  requirements: []
122
- rubygems_version: 3.4.20
123
- signing_key:
123
+ rubygems_version: 3.6.9
124
124
  specification_version: 4
125
125
  summary: JSON-LD generator for Schema.org vocabulary
126
126
  test_files: []
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.6.6