arosa 0.1.2 → 0.1.4

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: c555ecabcec62d73bcd5ee867d159f9d252c060768162c04d030ee60e8dffdb3
4
- data.tar.gz: 5c44999e566598db01ba4466201f227f0c73d097c51f6f90b1326d81e2c513a1
3
+ metadata.gz: 864110d868191dd3d85bc28a8712989acb813639b15fbe3ba00b91846b0f60f4
4
+ data.tar.gz: 9802be1b634b0d2b452cd82fa3027703651290074c2be02a1cb01034b836578f
5
5
  SHA512:
6
- metadata.gz: d74aa331bfbc5526f2bd5cafe7ba5cc971a205cdaec8a48b83b1c8b72b684f32dae6f4f7202332bced79f043682d2964d385cbb469e96ecc902bd5c9ee5d70b7
7
- data.tar.gz: de9ce485b436df0a360ce9dcb75fdb98e07c91abd01815454e76afffc6cccaed414d044532c05e32802ec45ada79496a0583597e054bdfb92fad6cfad4b25f31
6
+ metadata.gz: b980ac66616ff6ad262d8f91a96e59fc0ffe91256f321859ab7e9d3836da8d52cefd1c5916558e43f301183d4f97521d9063667fa710fd17b0fc5c54ad712216
7
+ data.tar.gz: 0f90176c6f1a91054c64fe95eb121305aacbf79c468d69fff4d38095c3027be1ed12094adc4a55f47dbaf36e390a835cff368b3eaa95c50a47991d09d773f1e8
data/README.md CHANGED
@@ -25,6 +25,7 @@ Then `bundle install`.
25
25
  | [ListItem](#listitem) | [schema.org/ListItem](https://schema.org/ListItem) |
26
26
  | [Language](#language) | [schema.org/Language](https://schema.org/Language) |
27
27
  | [WebApplication](#webapplication) | [schema.org/WebApplication](https://schema.org/WebApplication) |
28
+ | [Article](#article) | [schema.org/Article](https://schema.org/Article) |
28
29
 
29
30
  More types coming.
30
31
 
@@ -256,6 +257,51 @@ Arosa::Schemas::WebApplication.new(
256
257
  )
257
258
  ```
258
259
 
260
+ ### Article
261
+
262
+ | Property | Type |
263
+ |----------|------|
264
+ | name | String |
265
+ | url | String |
266
+ | image | String |
267
+ | same_as | Array of String |
268
+ | headline | String |
269
+ | alternative_headline | String |
270
+ | description | String |
271
+ | author | String |
272
+ | publisher | String |
273
+ | date_published | Date |
274
+ | date_modified | Date |
275
+ | date_created | Date |
276
+ | keywords | String |
277
+ | in_language | String |
278
+ | thumbnail_url | String |
279
+ | abstract | String |
280
+ | comment_count | Integer |
281
+ | copyright_holder | String |
282
+ | copyright_year | Integer |
283
+ | editor | String |
284
+ | genre | String |
285
+ | is_accessible_for_free | Boolean |
286
+ | license | String |
287
+ | article_section | String |
288
+ | word_count | Integer |
289
+
290
+ ```ruby
291
+ Arosa::Schemas::Article.new(
292
+ headline: "How to Tie a Reef Knot",
293
+ author: "John Doe",
294
+ date_published: Date.new(2026, 2, 26),
295
+ description: "A step-by-step guide to tying the classic reef knot.",
296
+ article_section: "Outdoors",
297
+ word_count: 1200,
298
+ image: "https://example.com/images/reef-knot.jpg",
299
+ keywords: "knots, sailing, outdoors",
300
+ in_language: "en",
301
+ is_accessible_for_free: true
302
+ )
303
+ ```
304
+
259
305
  ## Validation
260
306
 
261
307
  Wrong types and unknown properties raise errors immediately:
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Arosa
4
+ module Schemas
5
+ # Schema.org Article type
6
+ #
7
+ # https://schema.org/Article
8
+ class Article < Schema
9
+ schema_type "Article"
10
+
11
+ property :name, type: String
12
+ property :url, type: String
13
+ property :image, type: String
14
+ property :same_as, type: [String]
15
+ property :headline, type: String
16
+ property :alternative_headline, type: String
17
+ property :description, type: String
18
+ property :author
19
+ property :publisher
20
+ property :date_published, type: Date
21
+ property :date_modified, type: Date
22
+ property :date_created, type: Date
23
+ property :keywords, type: String
24
+ property :in_language, type: String
25
+ property :thumbnail_url, type: String
26
+ property :abstract, type: String
27
+ property :comment_count, type: Integer
28
+ property :copyright_holder, type: String
29
+ property :copyright_year, type: Integer
30
+ property :editor, type: String
31
+ property :genre, type: String
32
+ property :is_accessible_for_free
33
+ property :license, type: String
34
+ property :article_section, type: String
35
+ property :word_count, type: Integer
36
+ end
37
+ end
38
+ end
data/lib/arosa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arosa
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/arosa.rb CHANGED
@@ -13,6 +13,7 @@ require_relative "arosa/schemas/organization"
13
13
  require_relative "arosa/schemas/list_item"
14
14
  require_relative "arosa/schemas/breadcrumb_list"
15
15
  require_relative "arosa/schemas/web_application"
16
+ require_relative "arosa/schemas/article"
16
17
 
17
18
  module Arosa
18
19
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arosa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuenti
@@ -22,6 +22,7 @@ files:
22
22
  - Rakefile
23
23
  - lib/arosa.rb
24
24
  - lib/arosa/schema.rb
25
+ - lib/arosa/schemas/article.rb
25
26
  - lib/arosa/schemas/breadcrumb_list.rb
26
27
  - lib/arosa/schemas/contact_point.rb
27
28
  - lib/arosa/schemas/language.rb
@@ -52,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
53
  - !ruby/object:Gem::Version
53
54
  version: '0'
54
55
  requirements: []
55
- rubygems_version: 4.0.3
56
+ rubygems_version: 4.0.6
56
57
  specification_version: 4
57
58
  summary: Generate schema.org structured data as JSON-LD
58
59
  test_files: []