better_seo 0.14.0 → 1.0.0.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/.rubocop.yml +30 -0
- data/.rubocop_todo.yml +360 -0
- data/CHANGELOG.md +105 -0
- data/README.md +280 -180
- data/docs/00_OVERVIEW.md +472 -0
- data/docs/01_CORE_AND_CONFIGURATION.md +913 -0
- data/docs/02_META_TAGS_AND_OPEN_GRAPH.md +251 -0
- data/docs/03_STRUCTURED_DATA.md +140 -0
- data/docs/04_SITEMAP_AND_ROBOTS.md +131 -0
- data/docs/05_RAILS_INTEGRATION.md +175 -0
- data/docs/06_I18N_PAGE_GENERATOR.md +233 -0
- data/docs/07_IMAGE_OPTIMIZATION.md +260 -0
- data/docs/DEPENDENCIES.md +383 -0
- data/docs/README.md +180 -0
- data/docs/TESTING_STRATEGY.md +663 -0
- data/lib/better_seo/analytics/google_analytics.rb +83 -0
- data/lib/better_seo/analytics/google_tag_manager.rb +74 -0
- data/lib/better_seo/configuration.rb +322 -0
- data/lib/better_seo/dsl/base.rb +86 -0
- data/lib/better_seo/dsl/meta_tags.rb +55 -0
- data/lib/better_seo/dsl/open_graph.rb +105 -0
- data/lib/better_seo/dsl/twitter_cards.rb +129 -0
- data/lib/better_seo/errors.rb +31 -0
- data/lib/better_seo/generators/amp_generator.rb +77 -0
- data/lib/better_seo/generators/breadcrumbs_generator.rb +127 -0
- data/lib/better_seo/generators/canonical_url_manager.rb +100 -0
- data/lib/better_seo/generators/meta_tags_generator.rb +101 -0
- data/lib/better_seo/generators/open_graph_generator.rb +110 -0
- data/lib/better_seo/generators/robots_txt_generator.rb +96 -0
- data/lib/better_seo/generators/twitter_cards_generator.rb +102 -0
- data/lib/better_seo/image/optimizer.rb +145 -0
- data/lib/better_seo/rails/helpers/controller_helpers.rb +120 -0
- data/lib/better_seo/rails/helpers/seo_helper.rb +172 -0
- data/lib/better_seo/rails/helpers/structured_data_helper.rb +123 -0
- data/lib/better_seo/rails/model_helpers.rb +62 -0
- data/lib/better_seo/rails/railtie.rb +22 -0
- data/lib/better_seo/sitemap/builder.rb +65 -0
- data/lib/better_seo/sitemap/generator.rb +57 -0
- data/lib/better_seo/sitemap/sitemap_index.rb +73 -0
- data/lib/better_seo/sitemap/url_entry.rb +155 -0
- data/lib/better_seo/structured_data/article.rb +55 -0
- data/lib/better_seo/structured_data/base.rb +74 -0
- data/lib/better_seo/structured_data/breadcrumb_list.rb +49 -0
- data/lib/better_seo/structured_data/event.rb +205 -0
- data/lib/better_seo/structured_data/faq_page.rb +55 -0
- data/lib/better_seo/structured_data/generator.rb +75 -0
- data/lib/better_seo/structured_data/how_to.rb +96 -0
- data/lib/better_seo/structured_data/local_business.rb +94 -0
- data/lib/better_seo/structured_data/organization.rb +67 -0
- data/lib/better_seo/structured_data/person.rb +51 -0
- data/lib/better_seo/structured_data/product.rb +123 -0
- data/lib/better_seo/structured_data/recipe.rb +134 -0
- data/lib/better_seo/validators/seo_recommendations.rb +165 -0
- data/lib/better_seo/validators/seo_validator.rb +205 -0
- data/lib/better_seo/version.rb +1 -1
- data/lib/better_seo.rb +1 -0
- data/lib/generators/better_seo/install_generator.rb +21 -0
- data/lib/generators/better_seo/templates/README +29 -0
- data/lib/generators/better_seo/templates/better_seo.rb +40 -0
- metadata +57 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b84e5710a5341706bdb97aa9f749b144663b90902c011c48fd4cbcd238e3233f
|
|
4
|
+
data.tar.gz: 0664a50e770192833f11b6c0a62cf403448a77b57ed7edd19784a46d5baf3a4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1171e5880886e9fa74d1b41dd6c607748c332da72d1ee3bc6658892f7ef9f5dbd9a3ba4a52fed08581a5aff25428ae33221677282647a77ad34ab164e2d054f4
|
|
7
|
+
data.tar.gz: 2172411a1032be710814367ef02efc1e14c4349111ab6d341cf8cf9349251d486e7bbe08598f46ecd633efb059c44197c4573ceaf0147ae36e7b0112b40e8415
|
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,38 @@
|
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
1
3
|
AllCops:
|
|
2
4
|
TargetRubyVersion: 3.0
|
|
5
|
+
NewCops: enable
|
|
6
|
+
|
|
7
|
+
plugins:
|
|
8
|
+
- rubocop-rake
|
|
9
|
+
- rubocop-rspec
|
|
3
10
|
|
|
4
11
|
Style/StringLiterals:
|
|
5
12
|
EnforcedStyle: double_quotes
|
|
6
13
|
|
|
7
14
|
Style/StringLiteralsInInterpolation:
|
|
8
15
|
EnforcedStyle: double_quotes
|
|
16
|
+
|
|
17
|
+
# Allow validate! and other bang methods
|
|
18
|
+
Naming/PredicateMethod:
|
|
19
|
+
Enabled: false
|
|
20
|
+
|
|
21
|
+
# Allow development dependencies in gemspec
|
|
22
|
+
Gemspec/DevelopmentDependencies:
|
|
23
|
+
Enabled: false
|
|
24
|
+
|
|
25
|
+
# These are intentional duplicate branches for clarity
|
|
26
|
+
Lint/DuplicateBranch:
|
|
27
|
+
Enabled: false
|
|
28
|
+
|
|
29
|
+
# Allow block parameters even if not explicitly referenced (used via yield)
|
|
30
|
+
Lint/UnusedMethodArgument:
|
|
31
|
+
AllowUnusedKeywordArguments: true
|
|
32
|
+
IgnoreEmptyMethods: false
|
|
33
|
+
Exclude:
|
|
34
|
+
- "lib/better_seo/rails/helpers/controller_helpers.rb"
|
|
35
|
+
|
|
36
|
+
# Allow @_better_seo_data naming to avoid conflicts
|
|
37
|
+
Naming/MemoizedInstanceVariableName:
|
|
38
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000`
|
|
3
|
+
# on 2025-10-24 11:07:58 UTC using RuboCop version 1.81.6.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 11
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
12
|
+
# URISchemes: http, https
|
|
13
|
+
Layout/LineLength:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'better_seo.gemspec'
|
|
16
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
17
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
18
|
+
- 'lib/better_seo/validators/seo_validator.rb'
|
|
19
|
+
- 'spec/structured_data/faq_page_spec.rb'
|
|
20
|
+
- 'spec/validators/seo_validator_spec.rb'
|
|
21
|
+
|
|
22
|
+
# Offense count: 3
|
|
23
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
24
|
+
# Configuration parameters: AllowComments.
|
|
25
|
+
Lint/EmptyConditionalBody:
|
|
26
|
+
Exclude:
|
|
27
|
+
- 'lib/better_seo/dsl/open_graph.rb'
|
|
28
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
29
|
+
|
|
30
|
+
# Offense count: 1
|
|
31
|
+
Lint/ReturnInVoidContext:
|
|
32
|
+
Exclude:
|
|
33
|
+
- 'lib/better_seo/generators/canonical_url_manager.rb'
|
|
34
|
+
|
|
35
|
+
# Offense count: 25
|
|
36
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
37
|
+
Metrics/AbcSize:
|
|
38
|
+
Exclude:
|
|
39
|
+
- 'lib/better_seo/configuration.rb'
|
|
40
|
+
- 'lib/better_seo/dsl/meta_tags.rb'
|
|
41
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
42
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
43
|
+
- 'lib/better_seo/generators/meta_tags_generator.rb'
|
|
44
|
+
- 'lib/better_seo/generators/open_graph_generator.rb'
|
|
45
|
+
- 'lib/better_seo/generators/robots_txt_generator.rb'
|
|
46
|
+
- 'lib/better_seo/generators/twitter_cards_generator.rb'
|
|
47
|
+
- 'lib/better_seo/rails/helpers/seo_helper.rb'
|
|
48
|
+
- 'lib/better_seo/sitemap/generator.rb'
|
|
49
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
50
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
51
|
+
- 'lib/better_seo/validators/seo_recommendations.rb'
|
|
52
|
+
- 'lib/better_seo/validators/seo_validator.rb'
|
|
53
|
+
|
|
54
|
+
# Offense count: 5
|
|
55
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
56
|
+
Metrics/ClassLength:
|
|
57
|
+
Exclude:
|
|
58
|
+
- 'lib/better_seo/configuration.rb'
|
|
59
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
60
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
61
|
+
- 'lib/better_seo/validators/seo_recommendations.rb'
|
|
62
|
+
- 'lib/better_seo/validators/seo_validator.rb'
|
|
63
|
+
|
|
64
|
+
# Offense count: 10
|
|
65
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
66
|
+
Metrics/CyclomaticComplexity:
|
|
67
|
+
Exclude:
|
|
68
|
+
- 'lib/better_seo/configuration.rb'
|
|
69
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
70
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
71
|
+
- 'lib/better_seo/generators/robots_txt_generator.rb'
|
|
72
|
+
- 'lib/better_seo/rails/helpers/seo_helper.rb'
|
|
73
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
74
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
75
|
+
- 'lib/better_seo/structured_data/recipe.rb'
|
|
76
|
+
|
|
77
|
+
# Offense count: 46
|
|
78
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
79
|
+
Metrics/MethodLength:
|
|
80
|
+
Exclude:
|
|
81
|
+
- 'lib/better_seo/analytics/google_analytics.rb'
|
|
82
|
+
- 'lib/better_seo/configuration.rb'
|
|
83
|
+
- 'lib/better_seo/dsl/base.rb'
|
|
84
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
85
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
86
|
+
- 'lib/better_seo/generators/canonical_url_manager.rb'
|
|
87
|
+
- 'lib/better_seo/generators/open_graph_generator.rb'
|
|
88
|
+
- 'lib/better_seo/generators/robots_txt_generator.rb'
|
|
89
|
+
- 'lib/better_seo/generators/twitter_cards_generator.rb'
|
|
90
|
+
- 'lib/better_seo/image/optimizer.rb'
|
|
91
|
+
- 'lib/better_seo/rails/helpers/seo_helper.rb'
|
|
92
|
+
- 'lib/better_seo/sitemap/generator.rb'
|
|
93
|
+
- 'lib/better_seo/sitemap/sitemap_index.rb'
|
|
94
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
95
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
96
|
+
- 'lib/better_seo/structured_data/faq_page.rb'
|
|
97
|
+
- 'lib/better_seo/structured_data/how_to.rb'
|
|
98
|
+
- 'lib/better_seo/structured_data/organization.rb'
|
|
99
|
+
- 'lib/better_seo/structured_data/product.rb'
|
|
100
|
+
- 'lib/better_seo/structured_data/recipe.rb'
|
|
101
|
+
- 'lib/better_seo/validators/seo_recommendations.rb'
|
|
102
|
+
- 'lib/better_seo/validators/seo_validator.rb'
|
|
103
|
+
|
|
104
|
+
# Offense count: 1
|
|
105
|
+
# Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
|
|
106
|
+
Metrics/ParameterLists:
|
|
107
|
+
Exclude:
|
|
108
|
+
- 'lib/better_seo/structured_data/recipe.rb'
|
|
109
|
+
|
|
110
|
+
# Offense count: 7
|
|
111
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
112
|
+
Metrics/PerceivedComplexity:
|
|
113
|
+
Exclude:
|
|
114
|
+
- 'lib/better_seo/configuration.rb'
|
|
115
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
116
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
117
|
+
- 'lib/better_seo/generators/robots_txt_generator.rb'
|
|
118
|
+
- 'lib/better_seo/rails/helpers/seo_helper.rb'
|
|
119
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
120
|
+
|
|
121
|
+
# Offense count: 2
|
|
122
|
+
Naming/AccessorMethodName:
|
|
123
|
+
Exclude:
|
|
124
|
+
- 'lib/better_seo/rails/helpers/controller_helpers.rb'
|
|
125
|
+
|
|
126
|
+
# Offense count: 1
|
|
127
|
+
RSpec/BeforeAfterAll:
|
|
128
|
+
Exclude:
|
|
129
|
+
- '**/spec/spec_helper.rb'
|
|
130
|
+
- '**/spec/rails_helper.rb'
|
|
131
|
+
- '**/spec/support/**/*.rb'
|
|
132
|
+
- 'spec/image/optimizer_spec.rb'
|
|
133
|
+
|
|
134
|
+
# Offense count: 3
|
|
135
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
136
|
+
# Prefixes: when, with, without
|
|
137
|
+
RSpec/ContextWording:
|
|
138
|
+
Exclude:
|
|
139
|
+
- 'spec/configuration_spec.rb'
|
|
140
|
+
|
|
141
|
+
# Offense count: 1
|
|
142
|
+
# Configuration parameters: IgnoredMetadata.
|
|
143
|
+
RSpec/DescribeClass:
|
|
144
|
+
Exclude:
|
|
145
|
+
- '**/spec/features/**/*'
|
|
146
|
+
- '**/spec/requests/**/*'
|
|
147
|
+
- '**/spec/routing/**/*'
|
|
148
|
+
- '**/spec/system/**/*'
|
|
149
|
+
- '**/spec/views/**/*'
|
|
150
|
+
- 'spec/errors_spec.rb'
|
|
151
|
+
|
|
152
|
+
# Offense count: 2
|
|
153
|
+
RSpec/DescribeMethod:
|
|
154
|
+
Exclude:
|
|
155
|
+
- 'spec/sitemap/url_entry_extensions_spec.rb'
|
|
156
|
+
- 'spec/sitemap/url_entry_hreflang_spec.rb'
|
|
157
|
+
|
|
158
|
+
# Offense count: 293
|
|
159
|
+
# Configuration parameters: Max, CountAsOne.
|
|
160
|
+
RSpec/ExampleLength:
|
|
161
|
+
Exclude:
|
|
162
|
+
- 'spec/analytics/google_analytics_spec.rb'
|
|
163
|
+
- 'spec/analytics/google_tag_manager_spec.rb'
|
|
164
|
+
- 'spec/better_seo_spec.rb'
|
|
165
|
+
- 'spec/configuration_spec.rb'
|
|
166
|
+
- 'spec/dsl/base_spec.rb'
|
|
167
|
+
- 'spec/dsl/meta_tags_spec.rb'
|
|
168
|
+
- 'spec/dsl/open_graph_spec.rb'
|
|
169
|
+
- 'spec/dsl/twitter_cards_spec.rb'
|
|
170
|
+
- 'spec/generators/amp_generator_spec.rb'
|
|
171
|
+
- 'spec/generators/breadcrumbs_generator_spec.rb'
|
|
172
|
+
- 'spec/generators/meta_tags_generator_spec.rb'
|
|
173
|
+
- 'spec/generators/open_graph_generator_spec.rb'
|
|
174
|
+
- 'spec/generators/robots_txt_generator_spec.rb'
|
|
175
|
+
- 'spec/generators/twitter_cards_generator_spec.rb'
|
|
176
|
+
- 'spec/image/optimizer_spec.rb'
|
|
177
|
+
- 'spec/rails/helpers/controller_helpers_spec.rb'
|
|
178
|
+
- 'spec/rails/helpers/seo_helper_spec.rb'
|
|
179
|
+
- 'spec/rails/helpers/structured_data_helper_spec.rb'
|
|
180
|
+
- 'spec/rails/model_helpers_spec.rb'
|
|
181
|
+
- 'spec/sitemap/builder_spec.rb'
|
|
182
|
+
- 'spec/sitemap/generator_spec.rb'
|
|
183
|
+
- 'spec/sitemap/sitemap_index_spec.rb'
|
|
184
|
+
- 'spec/sitemap/url_entry_extensions_spec.rb'
|
|
185
|
+
- 'spec/sitemap/url_entry_hreflang_spec.rb'
|
|
186
|
+
- 'spec/sitemap/url_entry_spec.rb'
|
|
187
|
+
- 'spec/structured_data/article_spec.rb'
|
|
188
|
+
- 'spec/structured_data/base_spec.rb'
|
|
189
|
+
- 'spec/structured_data/breadcrumb_list_spec.rb'
|
|
190
|
+
- 'spec/structured_data/event_spec.rb'
|
|
191
|
+
- 'spec/structured_data/faq_page_spec.rb'
|
|
192
|
+
- 'spec/structured_data/generator_spec.rb'
|
|
193
|
+
- 'spec/structured_data/how_to_spec.rb'
|
|
194
|
+
- 'spec/structured_data/local_business_spec.rb'
|
|
195
|
+
- 'spec/structured_data/organization_spec.rb'
|
|
196
|
+
- 'spec/structured_data/person_spec.rb'
|
|
197
|
+
- 'spec/structured_data/product_spec.rb'
|
|
198
|
+
- 'spec/structured_data/recipe_spec.rb'
|
|
199
|
+
- 'spec/validators/seo_recommendations_spec.rb'
|
|
200
|
+
- 'spec/validators/seo_validator_spec.rb'
|
|
201
|
+
|
|
202
|
+
# Offense count: 6
|
|
203
|
+
# Configuration parameters: AssignmentOnly.
|
|
204
|
+
RSpec/InstanceVariable:
|
|
205
|
+
Exclude:
|
|
206
|
+
- 'spec/image/optimizer_spec.rb'
|
|
207
|
+
|
|
208
|
+
# Offense count: 1
|
|
209
|
+
# Configuration parameters: .
|
|
210
|
+
# SupportedStyles: have_received, receive
|
|
211
|
+
RSpec/MessageSpies:
|
|
212
|
+
EnforcedStyle: receive
|
|
213
|
+
|
|
214
|
+
# Offense count: 357
|
|
215
|
+
# Configuration parameters: Max.
|
|
216
|
+
RSpec/MultipleExpectations:
|
|
217
|
+
Exclude:
|
|
218
|
+
- 'spec/analytics/google_analytics_spec.rb'
|
|
219
|
+
- 'spec/analytics/google_tag_manager_spec.rb'
|
|
220
|
+
- 'spec/better_seo_spec.rb'
|
|
221
|
+
- 'spec/configuration_spec.rb'
|
|
222
|
+
- 'spec/dsl/base_spec.rb'
|
|
223
|
+
- 'spec/dsl/meta_tags_spec.rb'
|
|
224
|
+
- 'spec/dsl/open_graph_spec.rb'
|
|
225
|
+
- 'spec/dsl/twitter_cards_spec.rb'
|
|
226
|
+
- 'spec/generators/amp_generator_spec.rb'
|
|
227
|
+
- 'spec/generators/breadcrumbs_generator_spec.rb'
|
|
228
|
+
- 'spec/generators/canonical_url_manager_spec.rb'
|
|
229
|
+
- 'spec/generators/meta_tags_generator_spec.rb'
|
|
230
|
+
- 'spec/generators/open_graph_generator_spec.rb'
|
|
231
|
+
- 'spec/generators/robots_txt_generator_spec.rb'
|
|
232
|
+
- 'spec/generators/twitter_cards_generator_spec.rb'
|
|
233
|
+
- 'spec/image/optimizer_spec.rb'
|
|
234
|
+
- 'spec/rails/helpers/controller_helpers_spec.rb'
|
|
235
|
+
- 'spec/rails/helpers/seo_helper_spec.rb'
|
|
236
|
+
- 'spec/rails/helpers/structured_data_helper_spec.rb'
|
|
237
|
+
- 'spec/rails/model_helpers_spec.rb'
|
|
238
|
+
- 'spec/sitemap/builder_spec.rb'
|
|
239
|
+
- 'spec/sitemap/generator_spec.rb'
|
|
240
|
+
- 'spec/sitemap/sitemap_index_spec.rb'
|
|
241
|
+
- 'spec/sitemap/url_entry_extensions_spec.rb'
|
|
242
|
+
- 'spec/sitemap/url_entry_hreflang_spec.rb'
|
|
243
|
+
- 'spec/sitemap/url_entry_spec.rb'
|
|
244
|
+
- 'spec/structured_data/article_spec.rb'
|
|
245
|
+
- 'spec/structured_data/base_spec.rb'
|
|
246
|
+
- 'spec/structured_data/breadcrumb_list_spec.rb'
|
|
247
|
+
- 'spec/structured_data/event_spec.rb'
|
|
248
|
+
- 'spec/structured_data/faq_page_spec.rb'
|
|
249
|
+
- 'spec/structured_data/generator_spec.rb'
|
|
250
|
+
- 'spec/structured_data/how_to_spec.rb'
|
|
251
|
+
- 'spec/structured_data/local_business_spec.rb'
|
|
252
|
+
- 'spec/structured_data/organization_spec.rb'
|
|
253
|
+
- 'spec/structured_data/person_spec.rb'
|
|
254
|
+
- 'spec/structured_data/product_spec.rb'
|
|
255
|
+
- 'spec/structured_data/recipe_spec.rb'
|
|
256
|
+
- 'spec/validators/seo_recommendations_spec.rb'
|
|
257
|
+
- 'spec/validators/seo_validator_spec.rb'
|
|
258
|
+
|
|
259
|
+
# Offense count: 6
|
|
260
|
+
RSpec/RepeatedExample:
|
|
261
|
+
Exclude:
|
|
262
|
+
- 'spec/dsl/twitter_cards_spec.rb'
|
|
263
|
+
- 'spec/structured_data/event_spec.rb'
|
|
264
|
+
|
|
265
|
+
# Offense count: 39
|
|
266
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata.
|
|
267
|
+
RSpec/SpecFilePathFormat:
|
|
268
|
+
Exclude:
|
|
269
|
+
- '**/spec/routing/**/*'
|
|
270
|
+
- 'spec/analytics/google_analytics_spec.rb'
|
|
271
|
+
- 'spec/analytics/google_tag_manager_spec.rb'
|
|
272
|
+
- 'spec/configuration_spec.rb'
|
|
273
|
+
- 'spec/dsl/base_spec.rb'
|
|
274
|
+
- 'spec/dsl/meta_tags_spec.rb'
|
|
275
|
+
- 'spec/dsl/open_graph_spec.rb'
|
|
276
|
+
- 'spec/dsl/twitter_cards_spec.rb'
|
|
277
|
+
- 'spec/generators/amp_generator_spec.rb'
|
|
278
|
+
- 'spec/generators/breadcrumbs_generator_spec.rb'
|
|
279
|
+
- 'spec/generators/canonical_url_manager_spec.rb'
|
|
280
|
+
- 'spec/generators/meta_tags_generator_spec.rb'
|
|
281
|
+
- 'spec/generators/open_graph_generator_spec.rb'
|
|
282
|
+
- 'spec/generators/robots_txt_generator_spec.rb'
|
|
283
|
+
- 'spec/generators/twitter_cards_generator_spec.rb'
|
|
284
|
+
- 'spec/image/optimizer_spec.rb'
|
|
285
|
+
- 'spec/rails/helpers/controller_helpers_spec.rb'
|
|
286
|
+
- 'spec/rails/helpers/seo_helper_spec.rb'
|
|
287
|
+
- 'spec/rails/helpers/structured_data_helper_spec.rb'
|
|
288
|
+
- 'spec/rails/model_helpers_spec.rb'
|
|
289
|
+
- 'spec/sitemap/builder_spec.rb'
|
|
290
|
+
- 'spec/sitemap/generator_spec.rb'
|
|
291
|
+
- 'spec/sitemap/sitemap_index_spec.rb'
|
|
292
|
+
- 'spec/sitemap/url_entry_extensions_spec.rb'
|
|
293
|
+
- 'spec/sitemap/url_entry_hreflang_spec.rb'
|
|
294
|
+
- 'spec/sitemap/url_entry_spec.rb'
|
|
295
|
+
- 'spec/structured_data/article_spec.rb'
|
|
296
|
+
- 'spec/structured_data/base_spec.rb'
|
|
297
|
+
- 'spec/structured_data/breadcrumb_list_spec.rb'
|
|
298
|
+
- 'spec/structured_data/event_spec.rb'
|
|
299
|
+
- 'spec/structured_data/faq_page_spec.rb'
|
|
300
|
+
- 'spec/structured_data/generator_spec.rb'
|
|
301
|
+
- 'spec/structured_data/how_to_spec.rb'
|
|
302
|
+
- 'spec/structured_data/local_business_spec.rb'
|
|
303
|
+
- 'spec/structured_data/organization_spec.rb'
|
|
304
|
+
- 'spec/structured_data/person_spec.rb'
|
|
305
|
+
- 'spec/structured_data/product_spec.rb'
|
|
306
|
+
- 'spec/structured_data/recipe_spec.rb'
|
|
307
|
+
- 'spec/validators/seo_recommendations_spec.rb'
|
|
308
|
+
- 'spec/validators/seo_validator_spec.rb'
|
|
309
|
+
|
|
310
|
+
# Offense count: 1
|
|
311
|
+
RSpec/SubjectStub:
|
|
312
|
+
Exclude:
|
|
313
|
+
- 'spec/dsl/base_spec.rb'
|
|
314
|
+
|
|
315
|
+
# Offense count: 40
|
|
316
|
+
# Configuration parameters: AllowedConstants.
|
|
317
|
+
Style/Documentation:
|
|
318
|
+
Exclude:
|
|
319
|
+
- 'spec/**/*'
|
|
320
|
+
- 'test/**/*'
|
|
321
|
+
- 'lib/better_seo.rb'
|
|
322
|
+
- 'lib/better_seo/analytics/google_analytics.rb'
|
|
323
|
+
- 'lib/better_seo/analytics/google_tag_manager.rb'
|
|
324
|
+
- 'lib/better_seo/configuration.rb'
|
|
325
|
+
- 'lib/better_seo/dsl/base.rb'
|
|
326
|
+
- 'lib/better_seo/dsl/meta_tags.rb'
|
|
327
|
+
- 'lib/better_seo/dsl/open_graph.rb'
|
|
328
|
+
- 'lib/better_seo/dsl/twitter_cards.rb'
|
|
329
|
+
- 'lib/better_seo/generators/amp_generator.rb'
|
|
330
|
+
- 'lib/better_seo/generators/breadcrumbs_generator.rb'
|
|
331
|
+
- 'lib/better_seo/generators/canonical_url_manager.rb'
|
|
332
|
+
- 'lib/better_seo/generators/meta_tags_generator.rb'
|
|
333
|
+
- 'lib/better_seo/generators/open_graph_generator.rb'
|
|
334
|
+
- 'lib/better_seo/generators/robots_txt_generator.rb'
|
|
335
|
+
- 'lib/better_seo/generators/twitter_cards_generator.rb'
|
|
336
|
+
- 'lib/better_seo/image/optimizer.rb'
|
|
337
|
+
- 'lib/better_seo/rails/helpers/controller_helpers.rb'
|
|
338
|
+
- 'lib/better_seo/rails/helpers/seo_helper.rb'
|
|
339
|
+
- 'lib/better_seo/rails/helpers/structured_data_helper.rb'
|
|
340
|
+
- 'lib/better_seo/rails/model_helpers.rb'
|
|
341
|
+
- 'lib/better_seo/rails/railtie.rb'
|
|
342
|
+
- 'lib/better_seo/sitemap/builder.rb'
|
|
343
|
+
- 'lib/better_seo/sitemap/generator.rb'
|
|
344
|
+
- 'lib/better_seo/sitemap/sitemap_index.rb'
|
|
345
|
+
- 'lib/better_seo/sitemap/url_entry.rb'
|
|
346
|
+
- 'lib/better_seo/structured_data/article.rb'
|
|
347
|
+
- 'lib/better_seo/structured_data/base.rb'
|
|
348
|
+
- 'lib/better_seo/structured_data/breadcrumb_list.rb'
|
|
349
|
+
- 'lib/better_seo/structured_data/event.rb'
|
|
350
|
+
- 'lib/better_seo/structured_data/faq_page.rb'
|
|
351
|
+
- 'lib/better_seo/structured_data/generator.rb'
|
|
352
|
+
- 'lib/better_seo/structured_data/how_to.rb'
|
|
353
|
+
- 'lib/better_seo/structured_data/local_business.rb'
|
|
354
|
+
- 'lib/better_seo/structured_data/organization.rb'
|
|
355
|
+
- 'lib/better_seo/structured_data/person.rb'
|
|
356
|
+
- 'lib/better_seo/structured_data/product.rb'
|
|
357
|
+
- 'lib/better_seo/structured_data/recipe.rb'
|
|
358
|
+
- 'lib/better_seo/validators/seo_recommendations.rb'
|
|
359
|
+
- 'lib/better_seo/validators/seo_validator.rb'
|
|
360
|
+
- 'lib/generators/better_seo/install_generator.rb'
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,111 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.0.2] - 2025-01-24
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Resolved all RuboCop offenses by establishing baseline configuration
|
|
14
|
+
- Added `.rubocop_todo.yml` for incremental code quality improvements
|
|
15
|
+
- Updated `.rubocop.yml` with `NewCops: enable` and project-specific settings
|
|
16
|
+
- Applied auto-corrections for 39 offenses (string interpolations, operator precedence, etc.)
|
|
17
|
+
- Fixed breadcrumbs generator for better code readability
|
|
18
|
+
- Preserved block parameters in controller helpers
|
|
19
|
+
- Maintained 94.16% code coverage with all 916 tests passing
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Comprehensive RuboCop configuration with baseline approach
|
|
23
|
+
- `.rubocop_todo.yml` documenting existing offenses for future fixes
|
|
24
|
+
|
|
25
|
+
## [1.0.0.1] - 2025-01-24
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Fixed nested configuration setters to support syntax like `config.open_graph.default_image.url = "value"`
|
|
29
|
+
- Modified `NestedConfiguration#initialize` to automatically wrap nested hashes
|
|
30
|
+
- Modified `NestedConfiguration#[]=` to wrap hash values
|
|
31
|
+
- Modified `NestedConfiguration#method_missing` setter to wrap hash values
|
|
32
|
+
- Modified `NestedConfiguration#merge!` to wrap nested hashes after merge
|
|
33
|
+
- Modified `NestedConfiguration#to_h` to recursively convert back to plain hashes
|
|
34
|
+
- Fixed SEO helper to automatically merge with configuration defaults
|
|
35
|
+
- Added `build_seo_config` private method in `SeoHelper`
|
|
36
|
+
- Automatic site_name appending to titles when configured
|
|
37
|
+
- Automatic generation of Open Graph and Twitter Card tags with defaults
|
|
38
|
+
- Support for `default_title` when not set in controller
|
|
39
|
+
- Fixed Railtie loading by adding require in `lib/better_seo.rb`
|
|
40
|
+
- Updated README with improved footer (Made with ❤️ by Alessio Bussolari)
|
|
41
|
+
- Removed Roadmap section from README (version history moved to CHANGELOG)
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
- 17 new tests for nested configuration hash wrapping
|
|
45
|
+
- Tests for initialization, assignment, merge, and edge cases
|
|
46
|
+
- Real-world generator template syntax tests
|
|
47
|
+
- Total: 916 tests passing (899 + 17)
|
|
48
|
+
|
|
49
|
+
### Enhanced
|
|
50
|
+
- Improved user experience with automatic defaults in SEO tags
|
|
51
|
+
- Better configuration system with deep nested object support
|
|
52
|
+
- More intuitive initializer template generation
|
|
53
|
+
|
|
54
|
+
## [1.0.0] - 2025-01-23 🎉
|
|
55
|
+
|
|
56
|
+
### 🚀 First Stable Release - Production Ready!
|
|
57
|
+
|
|
58
|
+
BetterSeo v1.0.0 is a comprehensive, production-ready SEO gem for Ruby and Rails applications.
|
|
59
|
+
|
|
60
|
+
### Highlights
|
|
61
|
+
|
|
62
|
+
- **899 tests passing** with **94.3% code coverage**
|
|
63
|
+
- **Strict TDD methodology** - Every feature developed with RED → GREEN → REFACTOR
|
|
64
|
+
- **Complete SEO toolkit** - Meta tags, structured data, sitemaps, analytics, validation
|
|
65
|
+
- **Enterprise-ready** - GTM integration, image optimization, SEO recommendations
|
|
66
|
+
- **Rails-first** - Deep Rails integration with helpers, generators, and railtie
|
|
67
|
+
- **Well documented** - Comprehensive README with 100+ examples
|
|
68
|
+
|
|
69
|
+
### What's Included
|
|
70
|
+
|
|
71
|
+
**Core SEO Features:**
|
|
72
|
+
- Meta tags DSL (title, description, keywords, robots, canonical)
|
|
73
|
+
- Open Graph protocol (complete implementation)
|
|
74
|
+
- Twitter Cards (all card types)
|
|
75
|
+
- 10+ Structured Data types (Schema.org JSON-LD)
|
|
76
|
+
- XML Sitemaps with extensions (hreflang, images, videos, sitemap index)
|
|
77
|
+
|
|
78
|
+
**Advanced Features:**
|
|
79
|
+
- Robots.txt generator
|
|
80
|
+
- SEO Validator with scoring (0-100)
|
|
81
|
+
- AI-powered SEO recommendations
|
|
82
|
+
- Image optimizer (WebP conversion, resize, compress)
|
|
83
|
+
- Breadcrumbs HTML generator with Schema.org
|
|
84
|
+
- AMP HTML support
|
|
85
|
+
- Canonical URL management
|
|
86
|
+
|
|
87
|
+
**Analytics & Tracking:**
|
|
88
|
+
- Google Analytics 4 (GA4) integration
|
|
89
|
+
- Google Tag Manager (GTM) complete setup
|
|
90
|
+
- E-commerce tracking
|
|
91
|
+
- Custom event tracking
|
|
92
|
+
- GDPR-compliant (anonymize IP)
|
|
93
|
+
|
|
94
|
+
**Rails Integration:**
|
|
95
|
+
- View helpers for all features
|
|
96
|
+
- Controller helpers (set_page_title, set_page_description, etc.)
|
|
97
|
+
- Model helpers (seo_attributes macro)
|
|
98
|
+
- Install generator (`rails g better_seo:install`)
|
|
99
|
+
- Automatic railtie initialization
|
|
100
|
+
|
|
101
|
+
### Migration from v0.14.0
|
|
102
|
+
|
|
103
|
+
No breaking changes. Simply update your Gemfile:
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
gem 'better_seo', '~> 1.0'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Thank You!
|
|
110
|
+
|
|
111
|
+
This gem was developed with **strict Test-Driven Development** through 14 development steps, implementing every feature with comprehensive test coverage. Special thanks to the Ruby and Rails communities for their excellent tools and documentation.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
10
115
|
## [0.14.0] - 2025-01-23
|
|
11
116
|
|
|
12
117
|
### Added
|