better_seo 0.6.0 → 0.7.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: 4b1f457db06f6ed1a5654363c639448945eb0c8ee11f311203333edf3de5b499
4
- data.tar.gz: bbb3f5e0f831a1f3437b1dd171b4e7c8cc953fc654b102670037da19cc96ae73
3
+ metadata.gz: 5c5febaa764505c7680d89bd6858600708fbd362d811818c7206b6e8f8768b32
4
+ data.tar.gz: 7a6928082bed979115b7411049182fbd6591ac0156fa5670a9cadb843d3b23d8
5
5
  SHA512:
6
- metadata.gz: '0978f9a96df030f0b10c10e409c9938c7cca9d5b881212c10135de040f6e51cbd1631f5b6d76ffe9af9efad722336d4f522edb7abf6872d7abd86ae2e516f7ce'
7
- data.tar.gz: e3fcdde3228d074d75f3a47abcfb81c5145c827191512642745254df0c93c8be1f7a2f82c0d9aaed783c64951dc1b753b436e928fd29d6fc22fce6091b97ea7b
6
+ metadata.gz: 8a4c80163add6a90ddabb694ec95c6defddf0ef4a3357bc0e3defc2ea4cb3ace4556bec7f5303571dbc72caf860f0092f54c43e61a4f8a70f573b88d6d39b146
7
+ data.tar.gz: 9abc8a475e9380e85b0a410547f63eca11682f21b0271acbab83a6f855212c888c3a937d9db5358e0518697acb3af61d9e852060a0f871dd80b86c313eb43916
data/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.0] - 2025-01-23
11
+
12
+ ### Added
13
+ - Additional Structured Data types for e-commerce and navigation
14
+ - `StructuredData::Product` - E-commerce products with comprehensive schema
15
+ - `StructuredData::BreadcrumbList` - Navigation breadcrumbs for site structure
16
+ - Product features
17
+ - Full product information (name, description, image, brand)
18
+ - SKU, GTIN, MPN identifiers support
19
+ - Offers with price, currency, availability (InStock, OutOfStock, PreOrder, etc.)
20
+ - Multiple offers support for variants
21
+ - Aggregate ratings with review count
22
+ - Individual reviews with author and rating
23
+ - Multiple reviews array support
24
+ - Availability URL mapping to Schema.org standards
25
+ - BreadcrumbList features
26
+ - Add single items with `add_item`
27
+ - Add multiple items with `add_items`
28
+ - Automatic position numbering
29
+ - Manual position override support
30
+ - Clear all items with `clear`
31
+ - Fluent method chaining
32
+ - Generates proper ListItem structure
33
+ - Generator helper methods
34
+ - `Generator.product` factory method with block support
35
+ - `Generator.breadcrumb_list` factory method
36
+ - Rails integration examples
37
+ - Product page structured data helpers
38
+ - Breadcrumb integration with Rails routes
39
+ - E-commerce view helpers
40
+
41
+ ### Test Coverage
42
+ - 530 tests passing (+39 from v0.6.0)
43
+ - 98.89% code coverage (894/904 lines)
44
+ - 39 new tests for Product and BreadcrumbList
45
+
10
46
  ## [0.6.0] - 2025-01-23
11
47
 
12
48
  ### Added
data/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a clean, fluent DSL for managing meta tags, Open Graph, Twitter Cards, structured data, sitemaps, and more.
4
4
 
5
- [![Tests](https://img.shields.io/badge/tests-491%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
- [![Coverage](https://img.shields.io/badge/coverage-99.64%25-brightgreen)](https://github.com/yourusername/better_seo)
5
+ [![Tests](https://img.shields.io/badge/tests-530%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
+ [![Coverage](https://img.shields.io/badge/coverage-98.89%25-brightgreen)](https://github.com/yourusername/better_seo)
7
7
  [![Ruby](https://img.shields.io/badge/ruby-%3E%3D%203.0.0-red)](https://www.ruby-lang.org)
8
8
  [![Rails](https://img.shields.io/badge/rails-%3E%3D%206.1-red)](https://rubyonrails.org)
9
9
 
10
10
  ## Features
11
11
 
12
- ### ✅ Implemented (v0.6.0)
12
+ ### ✅ Implemented (v0.7.0)
13
13
 
14
14
  - **Core Configuration System**
15
15
  - Singleton configuration with block-style setup
@@ -53,6 +53,8 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
53
53
  - **Organization**: Company/organization information with address, social profiles
54
54
  - **Article**: Blog posts, news articles with author, publisher, metadata
55
55
  - **Person**: Author profiles, team members with job title, social links
56
+ - **Product**: E-commerce products with price, availability, ratings, reviews
57
+ - **BreadcrumbList**: Navigation breadcrumbs for improved site structure
56
58
  - **Generator Helper**: Factory methods and batch script tag generation
57
59
  - **Nested Data**: Automatic handling of complex object relationships
58
60
  - **JSON-LD Output**: Valid Schema.org JSON-LD format
@@ -60,12 +62,12 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
60
62
 
61
63
  ### 🚧 Planned
62
64
 
63
- - **Additional Structured Data Types** (v0.7.0)
64
- - Product (e-commerce with price, availability)
65
- - BreadcrumbList (navigation breadcrumbs)
66
- - LocalBusiness (physical locations)
67
- - Event (conferences, webinars)
68
- - FAQPage, HowTo, Recipe
65
+ - **Additional Structured Data Types** (v0.8.0)
66
+ - LocalBusiness (physical locations with hours, geo)
67
+ - Event (conferences, webinars with dates, location)
68
+ - FAQPage (structured FAQ with questions/answers)
69
+ - HowTo (step-by-step guides)
70
+ - Recipe (cooking recipes with ingredients)
69
71
 
70
72
  - **Advanced Generators** (v0.7.0)
71
73
  - Breadcrumbs HTML generator
@@ -97,7 +99,7 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
97
99
  Add this line to your application's Gemfile:
98
100
 
99
101
  ```ruby
100
- gem 'better_seo', '~> 0.6.0'
102
+ gem 'better_seo', '~> 0.7.0'
101
103
  ```
102
104
 
103
105
  And then execute:
@@ -117,7 +119,7 @@ gem install better_seo
117
119
  Add this line to your application's Gemfile:
118
120
 
119
121
  ```ruby
120
- gem 'better_seo', git: 'https://github.com/alessiobussolari/better_seo.git', tag: 'v0.6.0'
122
+ gem 'better_seo', git: 'https://github.com/alessiobussolari/better_seo.git', tag: 'v0.7.0'
121
123
  ```
122
124
 
123
125
  Or clone and build locally:
@@ -126,7 +128,7 @@ Or clone and build locally:
126
128
  git clone https://github.com/alessiobussolari/better_seo.git
127
129
  cd better_seo
128
130
  gem build better_seo.gemspec
129
- gem install better_seo-0.6.0.gem
131
+ gem install better_seo-0.7.0.gem
130
132
  ```
131
133
 
132
134
  ## Quick Start
@@ -1126,6 +1128,37 @@ person.same_as([
1126
1128
  ])
1127
1129
  ```
1128
1130
 
1131
+ **Product** - E-commerce products:
1132
+
1133
+ ```ruby
1134
+ product = BetterSeo::StructuredData::Product.new
1135
+ product.name("Premium Wireless Headphones")
1136
+ product.description("High-quality wireless headphones with noise cancellation")
1137
+ product.image("https://example.com/headphones.jpg")
1138
+ product.brand("AudioTech")
1139
+ product.sku("HEADPHONES-WL-NC-2024")
1140
+ product.offers(
1141
+ price: 299.99,
1142
+ price_currency: "USD",
1143
+ availability: "InStock",
1144
+ url: "https://example.com/products/headphones"
1145
+ )
1146
+ product.aggregate_rating(
1147
+ rating_value: 4.7,
1148
+ review_count: 342
1149
+ )
1150
+ ```
1151
+
1152
+ **BreadcrumbList** - Navigation breadcrumbs:
1153
+
1154
+ ```ruby
1155
+ breadcrumb = BetterSeo::StructuredData::BreadcrumbList.new
1156
+ breadcrumb
1157
+ .add_item(name: "Home", url: "https://example.com")
1158
+ .add_item(name: "Electronics", url: "https://example.com/electronics")
1159
+ .add_item(name: "Headphones", url: "https://example.com/electronics/headphones")
1160
+ ```
1161
+
1129
1162
  #### Method Chaining
1130
1163
 
1131
1164
  All structured data classes support fluent method chaining:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterSeo
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/better_seo.rb CHANGED
@@ -21,6 +21,8 @@ require_relative "better_seo/structured_data/base"
21
21
  require_relative "better_seo/structured_data/organization"
22
22
  require_relative "better_seo/structured_data/article"
23
23
  require_relative "better_seo/structured_data/person"
24
+ require_relative "better_seo/structured_data/product"
25
+ require_relative "better_seo/structured_data/breadcrumb_list"
24
26
  require_relative "better_seo/structured_data/generator"
25
27
 
26
28
  module BetterSeo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_seo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alessiobussolari