better_seo 0.8.0 → 0.9.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: 8e54a1f72d1782db6366637bd76336b7af2bf1d51dd3241dc7ba4be9f0deb75b
4
- data.tar.gz: a2bc94c2c62edc86b3bf50db8f56424b11649d7aa4d3b53867b55d3561a69a5d
3
+ metadata.gz: 02c10b033ffd80fd718852f24434af741e4804e8353b792dfa37bdb70ea1583c
4
+ data.tar.gz: cec2c0bd8391ec44eeffeedaf9f64c35c2070e575f9addb999e4f04034da561e
5
5
  SHA512:
6
- metadata.gz: b53dd20aa929536a0de6f293bf2e1efe35437cb9431db5f86f0865bf4bdc8ec3575fd95dbc9843fdb4ebb3c259da65bf9f39ee636c199ec4818141019f71dcbb
7
- data.tar.gz: 79f5dd0ae283b0a05af28c3f5372db36e9d618fffc4596a5c716b3c67ae4ea5751b2e697dc637837dcb6619d94801be79519364621b339b0df40a3701ed552c5
6
+ metadata.gz: d03af8f52407d32434526df94a5b871dc797a28cb6352d52acf850b5b4626b30db22bb35641858801f7d25ae07614ac94913718558c1486d89a69caecc295966
7
+ data.tar.gz: 003afa3422b02cfb5f043b92799b67ab099304f95fe99e80469226dae9c67dfcfb1f1835692462a203b4c3b8fbf4db5ed092866c333d7ddf8abaaf2247e6b644
data/CHANGELOG.md CHANGED
@@ -7,6 +7,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.0] - 2025-01-23
11
+
12
+ ### Added
13
+ - Five additional Structured Data types for comprehensive SEO coverage
14
+ - `StructuredData::LocalBusiness` - Physical business locations
15
+ - Complete address with PostalAddress schema
16
+ - Geographic coordinates with GeoCoordinates
17
+ - Opening hours (string and structured specification)
18
+ - Price range and cuisine information
19
+ - Aggregate ratings for customer reviews
20
+ - `StructuredData::Event` - Conferences, webinars, and events
21
+ - Event dates with Date/Time/DateTime support
22
+ - Event status (EventScheduled, EventCancelled, EventPostponed, EventRescheduled)
23
+ - Event attendance mode (Offline, Online, Mixed)
24
+ - Physical and virtual locations with Place/VirtualLocation
25
+ - Organizer (Organization or Person)
26
+ - Multiple ticket offers with pricing and availability
27
+ - Performer support (single or multiple)
28
+ - `StructuredData::FAQPage` - Structured FAQ pages
29
+ - Add single or multiple questions
30
+ - Automatic Question/Answer schema formatting
31
+ - Clear method to reset questions
32
+ - Rich snippets support in search results
33
+ - `StructuredData::HowTo` - Step-by-step guides
34
+ - Named steps with descriptions
35
+ - Automatic position numbering
36
+ - Supply and tool lists
37
+ - Total time estimation
38
+ - Step images and URLs
39
+ - `StructuredData::Recipe` - Cooking recipes
40
+ - Ingredients list management
41
+ - Step-by-step instructions with HowToStep format
42
+ - Prep time, cook time, total time
43
+ - Recipe yield, category, cuisine
44
+ - Nutrition information with NutritionInformation schema
45
+ - Aggregate ratings
46
+ - Keywords support
47
+ - Generator helper methods for all new types
48
+ - `Generator.local_business` with block support
49
+ - `Generator.event` with block support
50
+ - `Generator.faq_page` with block support
51
+ - `Generator.how_to` with block support
52
+ - `Generator.recipe` with block support
53
+ - Rails view helpers for all new types
54
+ - `local_business_sd(**properties, &block)`
55
+ - `event_sd(**properties, &block)`
56
+ - `faq_page_sd(questions:, &block)` - with array support
57
+ - `how_to_sd(steps:, &block)` - with array support
58
+ - `recipe_sd(ingredients:, instructions:, &block)` - with array support
59
+ - Enhanced TYPE_MAPPING in StructuredDataHelper with all 10 types
60
+
61
+ ### Test Coverage
62
+ - 669 tests passing (+117 from v0.8.0)
63
+ - 95.79% code coverage (1205/1258 lines)
64
+ - 117 new tests across 5 structured data types:
65
+ - LocalBusiness: 25 tests
66
+ - Event: 36 tests
67
+ - FAQPage: 11 tests
68
+ - HowTo: 18 tests
69
+ - Recipe: 27 tests
70
+
10
71
  ## [0.8.0] - 2025-01-23
11
72
 
12
73
  ### 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-552%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
- [![Coverage](https://img.shields.io/badge/coverage-98.83%25-brightgreen)](https://github.com/yourusername/better_seo)
5
+ [![Tests](https://img.shields.io/badge/tests-669%20passing-brightgreen)](https://github.com/yourusername/better_seo)
6
+ [![Coverage](https://img.shields.io/badge/coverage-95.79%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.8.0)
12
+ ### ✅ Implemented (v0.9.0)
13
13
 
14
14
  - **Core Configuration System**
15
15
  - Singleton configuration with block-style setup
@@ -34,7 +34,7 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
34
34
 
35
35
  - **Rails Integration**
36
36
  - **SEO View Helpers**: `seo_meta_tags`, `seo_open_graph_tags`, `seo_twitter_tags`, `seo_tags`
37
- - **Structured Data Helpers**: `structured_data_tag`, `organization_sd`, `article_sd`, `person_sd`, `product_sd`, `breadcrumb_list_sd`
37
+ - **Structured Data Helpers**: `structured_data_tag`, `organization_sd`, `article_sd`, `person_sd`, `product_sd`, `breadcrumb_list_sd`, `local_business_sd`, `event_sd`, `faq_page_sd`, `how_to_sd`, `recipe_sd`
38
38
  - Support for hash configuration and DSL blocks
39
39
  - Automatic HTML safety with `raw` helper
40
40
  - Integration with global configuration defaults
@@ -49,27 +49,25 @@ A comprehensive SEO gem for Ruby and Rails applications. BetterSeo provides a cl
49
49
  - **Validation**: Automatic URL validation (format, protocol)
50
50
  - **Method Chaining**: Fluent interface for adding multiple URLs
51
51
 
52
- - **Structured Data (JSON-LD)**
52
+ - **Structured Data (JSON-LD)** - 10 comprehensive types
53
53
  - **Base Class**: Generic structured data with full Schema.org support
54
54
  - **Organization**: Company/organization information with address, social profiles
55
55
  - **Article**: Blog posts, news articles with author, publisher, metadata
56
56
  - **Person**: Author profiles, team members with job title, social links
57
57
  - **Product**: E-commerce products with price, availability, ratings, reviews
58
58
  - **BreadcrumbList**: Navigation breadcrumbs for improved site structure
59
- - **Generator Helper**: Factory methods and batch script tag generation
59
+ - **LocalBusiness**: Physical locations with address, hours, geo coordinates, ratings
60
+ - **Event**: Conferences, webinars with dates, location, tickets, performers
61
+ - **FAQPage**: Structured FAQ with questions/answers for rich snippets
62
+ - **HowTo**: Step-by-step guides with supplies, tools, and instructions
63
+ - **Recipe**: Cooking recipes with ingredients, nutrition, cooking time
64
+ - **Generator Helper**: Factory methods for all types with block support
60
65
  - **Nested Data**: Automatic handling of complex object relationships
61
66
  - **JSON-LD Output**: Valid Schema.org JSON-LD format
62
- - **Rails Integration**: View helpers and layout integration
67
+ - **Rails Integration**: Complete view helpers for all types
63
68
 
64
69
  ### 🚧 Planned
65
70
 
66
- - **Additional Structured Data Types** (v0.8.0)
67
- - LocalBusiness (physical locations with hours, geo)
68
- - Event (conferences, webinars with dates, location)
69
- - FAQPage (structured FAQ with questions/answers)
70
- - HowTo (step-by-step guides)
71
- - Recipe (cooking recipes with ingredients)
72
-
73
71
  - **Advanced Generators** (v0.7.0)
74
72
  - Breadcrumbs HTML generator
75
73
  - AMP HTML generator
@@ -1647,12 +1645,12 @@ bundle exec rspec --format documentation
1647
1645
  ```
1648
1646
 
1649
1647
  Current test statistics:
1650
- - **552 tests** passing
1651
- - **98.83% code coverage** (931/942 lines)
1648
+ - **669 tests** passing
1649
+ - **95.79% code coverage** (1205/1258 lines)
1652
1650
  - **3 DSL builders** fully tested
1653
1651
  - **3 HTML generators** fully tested
1654
1652
  - **2 Rails view helper modules** fully tested
1655
- - **5 Structured data types** fully tested
1653
+ - **10 Structured data types** fully tested
1656
1654
  - **1 Sitemap generation system** fully tested
1657
1655
  - **1 core configuration system** fully tested
1658
1656
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterSeo
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
data/lib/better_seo.rb CHANGED
@@ -22,6 +22,11 @@ require_relative "better_seo/structured_data/article"
22
22
  require_relative "better_seo/structured_data/person"
23
23
  require_relative "better_seo/structured_data/product"
24
24
  require_relative "better_seo/structured_data/breadcrumb_list"
25
+ require_relative "better_seo/structured_data/local_business"
26
+ require_relative "better_seo/structured_data/event"
27
+ require_relative "better_seo/structured_data/faq_page"
28
+ require_relative "better_seo/structured_data/how_to"
29
+ require_relative "better_seo/structured_data/recipe"
25
30
  require_relative "better_seo/structured_data/generator"
26
31
  require_relative "better_seo/rails/helpers/seo_helper"
27
32
  require_relative "better_seo/rails/helpers/structured_data_helper"
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.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alessiobussolari