meta-tags 2.17.0 → 2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Appraisals +25 -0
- data/CHANGELOG.md +16 -1
- data/Gemfile +4 -23
- data/README.md +100 -91
- data/Rakefile +19 -12
- data/Steepfile +0 -2
- data/certs/kpumuk.pem +19 -18
- data/gemfiles/rails_5.1.gemfile +8 -0
- data/gemfiles/rails_5.1.gemfile.lock +200 -0
- data/gemfiles/rails_5.2.gemfile +8 -0
- data/gemfiles/rails_5.2.gemfile.lock +200 -0
- data/gemfiles/rails_6.0.gemfile +8 -0
- data/gemfiles/rails_6.0.gemfile.lock +202 -0
- data/gemfiles/rails_6.1.gemfile +8 -0
- data/gemfiles/rails_6.1.gemfile.lock +201 -0
- data/gemfiles/rails_7.0.gemfile +8 -0
- data/gemfiles/rails_7.0.gemfile.lock +201 -0
- data/gemfiles/rails_7.1.gemfile +8 -0
- data/gemfiles/rails_7.1.gemfile.lock +231 -0
- data/lib/generators/meta_tags/install_generator.rb +1 -1
- data/lib/meta-tags.rb +1 -1
- data/lib/meta_tags/configuration.rb +16 -16
- data/lib/meta_tags/controller_helper.rb +3 -3
- data/lib/meta_tags/meta_tags_collection.rb +25 -23
- data/lib/meta_tags/railtie.rb +4 -4
- data/lib/meta_tags/renderer.rb +27 -27
- data/lib/meta_tags/text_normalizer.rb +18 -18
- data/lib/meta_tags/version.rb +1 -1
- data/lib/meta_tags/view_helper.rb +2 -2
- data/lib/meta_tags.rb +12 -12
- data/meta-tags.gemspec +39 -30
- data/sig/lib/_internal/rails.rbs +3 -1
- data/sig/lib/meta_tags/controller_helper.rbs +1 -0
- data/sig/lib/meta_tags/view_helper.rbs +2 -0
- data/sig/lib/meta_tags.rbs +2 -0
- data.tar.gz.sig +0 -0
- metadata +145 -33
- metadata.gz.sig +0 -0
@@ -47,25 +47,25 @@ module MetaTags
|
|
47
47
|
def default_property_tags
|
48
48
|
[
|
49
49
|
# App Link metadata https://developers.facebook.com/docs/applinks/metadata-reference
|
50
|
-
|
50
|
+
"al",
|
51
51
|
# Open Graph Markup https://developers.facebook.com/docs/sharing/webmasters#markup
|
52
|
-
|
53
|
-
|
52
|
+
"fb",
|
53
|
+
"og",
|
54
54
|
# Facebook OpenGraph Object Types https://developers.facebook.com/docs/reference/opengraph
|
55
55
|
# Note that these tags are used in a regex, so including e.g. 'restaurant' will affect
|
56
56
|
# 'restaurant:category', 'restaurant:price_rating', and anything else under that namespace.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
"article",
|
58
|
+
"book",
|
59
|
+
"books",
|
60
|
+
"business",
|
61
|
+
"fitness",
|
62
|
+
"game",
|
63
|
+
"music",
|
64
|
+
"place",
|
65
|
+
"product",
|
66
|
+
"profile",
|
67
|
+
"restaurant",
|
68
|
+
"video"
|
69
69
|
].freeze
|
70
70
|
end
|
71
71
|
|
@@ -78,7 +78,7 @@ module MetaTags
|
|
78
78
|
@truncate_site_title_first = false
|
79
79
|
@description_limit = 300
|
80
80
|
@keywords_limit = 255
|
81
|
-
@keywords_separator =
|
81
|
+
@keywords_separator = ", "
|
82
82
|
@keywords_lowercase = true
|
83
83
|
@property_tags = default_property_tags.dup
|
84
84
|
@open_meta_tags = true
|
@@ -15,8 +15,8 @@ module MetaTags
|
|
15
15
|
# Processes the <tt>@page_title</tt>, <tt>@page_keywords</tt>, and
|
16
16
|
# <tt>@page_description</tt> instance variables and calls +render+.
|
17
17
|
def render(*args, &block)
|
18
|
-
meta_tags[:title]
|
19
|
-
meta_tags[:keywords]
|
18
|
+
meta_tags[:title] = @page_title if defined?(@page_title) && @page_title
|
19
|
+
meta_tags[:keywords] = @page_keywords if defined?(@page_keywords) && @page_keywords
|
20
20
|
meta_tags[:description] = @page_description if defined?(@page_description) && @page_description
|
21
21
|
|
22
22
|
super
|
@@ -25,7 +25,7 @@ module MetaTags
|
|
25
25
|
# Set meta tags for the page.
|
26
26
|
#
|
27
27
|
# See <tt>MetaTags::ViewHelper#set_meta_tags</tt> for details.
|
28
|
-
def set_meta_tags(meta_tags)
|
28
|
+
def set_meta_tags(meta_tags)
|
29
29
|
self.meta_tags.update(meta_tags)
|
30
30
|
end
|
31
31
|
protected :set_meta_tags
|
@@ -39,12 +39,12 @@ module MetaTags
|
|
39
39
|
#
|
40
40
|
def update(object = {})
|
41
41
|
meta_tags = if object.respond_to?(:to_meta_tags)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# @type var object: _MetaTagish & Object
|
43
|
+
object.to_meta_tags
|
44
|
+
else
|
45
|
+
# @type var object: Hash[String | Symbol, untyped]
|
46
|
+
object
|
47
|
+
end
|
48
48
|
@meta_tags.deep_merge! normalize_open_graph(meta_tags)
|
49
49
|
end
|
50
50
|
|
@@ -70,14 +70,16 @@ module MetaTags
|
|
70
70
|
with_defaults(defaults) { extract_full_title }
|
71
71
|
end
|
72
72
|
|
73
|
-
# Constructs the title without site title (for normalized parameters).
|
73
|
+
# Constructs the title without site title (for normalized parameters). When title is empty,
|
74
|
+
# use the site title instead.
|
74
75
|
#
|
75
76
|
# @return [String] page title.
|
76
77
|
#
|
77
78
|
def page_title(defaults = {})
|
78
79
|
old_site = @meta_tags[:site]
|
79
80
|
@meta_tags[:site] = nil
|
80
|
-
with_defaults(defaults) { extract_full_title }
|
81
|
+
full_title = with_defaults(defaults) { extract_full_title }
|
82
|
+
full_title.presence || old_site || ""
|
81
83
|
ensure
|
82
84
|
@meta_tags[:site] = old_site
|
83
85
|
end
|
@@ -104,10 +106,10 @@ module MetaTags
|
|
104
106
|
# @return [String] page title.
|
105
107
|
#
|
106
108
|
def extract_full_title
|
107
|
-
site_title = extract(:site) ||
|
108
|
-
title
|
109
|
-
separator
|
110
|
-
reverse
|
109
|
+
site_title = extract(:site) || ""
|
110
|
+
title = extract_title
|
111
|
+
separator = extract_separator
|
112
|
+
reverse = extract(:reverse) == true
|
111
113
|
|
112
114
|
TextNormalizer.normalize_title(site_title, title, separator, reverse)
|
113
115
|
end
|
@@ -134,15 +136,15 @@ module MetaTags
|
|
134
136
|
def extract_separator
|
135
137
|
if meta_tags[:separator] == false
|
136
138
|
# Special case: if separator is hidden, do not display suffix/prefix
|
137
|
-
prefix = separator = suffix =
|
139
|
+
prefix = separator = suffix = ""
|
138
140
|
else
|
139
|
-
prefix
|
140
|
-
separator = extract_separator_section(:separator,
|
141
|
-
suffix
|
141
|
+
prefix = extract_separator_section(:prefix, " ")
|
142
|
+
separator = extract_separator_section(:separator, "|")
|
143
|
+
suffix = extract_separator_section(:suffix, " ")
|
142
144
|
end
|
143
145
|
delete(:separator, :prefix, :suffix)
|
144
146
|
|
145
|
-
TextNormalizer.safe_join([prefix, separator, suffix],
|
147
|
+
TextNormalizer.safe_join([prefix, separator, suffix], "")
|
146
148
|
end
|
147
149
|
|
148
150
|
# Extracts noindex settings as a Hash mapping noindex tag name to value.
|
@@ -157,12 +159,12 @@ module MetaTags
|
|
157
159
|
[:noindex, :index],
|
158
160
|
# follow has higher priority than nofollow
|
159
161
|
[:follow, :nofollow],
|
160
|
-
:noarchive
|
162
|
+
:noarchive
|
161
163
|
].each do |attributes|
|
162
164
|
calculate_robots_attributes(result, attributes)
|
163
165
|
end
|
164
166
|
|
165
|
-
result.transform_values { |v| v.join(
|
167
|
+
result.transform_values { |v| v.join(", ") }
|
166
168
|
end
|
167
169
|
|
168
170
|
protected
|
@@ -186,7 +188,7 @@ module MetaTags
|
|
186
188
|
# @return [String] separator segment value.
|
187
189
|
#
|
188
190
|
def extract_separator_section(name, default)
|
189
|
-
meta_tags[name] == false ?
|
191
|
+
(meta_tags[name] == false) ? "" : (meta_tags[name] || default)
|
190
192
|
end
|
191
193
|
|
192
194
|
# Extracts robots attribute (noindex, nofollow, etc) name and value.
|
@@ -195,11 +197,11 @@ module MetaTags
|
|
195
197
|
# @return [Array<String>] pair of noindex attribute name and value.
|
196
198
|
#
|
197
199
|
def extract_robots_attribute(name)
|
198
|
-
noindex
|
199
|
-
noindex_name
|
200
|
+
noindex = extract(name)
|
201
|
+
noindex_name = (noindex.is_a?(String) || noindex.is_a?(Array)) ? noindex : "robots"
|
200
202
|
noindex_value = noindex ? name.to_s : nil
|
201
203
|
|
202
|
-
[
|
204
|
+
[noindex_name, noindex_value]
|
203
205
|
end
|
204
206
|
|
205
207
|
def calculate_robots_attributes(result, attributes)
|
data/lib/meta_tags/railtie.rb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
module MetaTags
|
4
4
|
class Railtie < Rails::Railtie
|
5
|
-
initializer
|
5
|
+
initializer "meta_tags.setup_action_controller" do
|
6
6
|
ActiveSupport.on_load :action_controller do
|
7
|
-
|
7
|
+
include MetaTags::ControllerHelper
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
initializer
|
11
|
+
initializer "meta_tags.setup_action_view" do
|
12
12
|
ActiveSupport.on_load :action_view do
|
13
|
-
|
13
|
+
include MetaTags::ViewHelper
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/meta_tags/renderer.rb
CHANGED
@@ -71,12 +71,12 @@ module MetaTags
|
|
71
71
|
return unless icon
|
72
72
|
|
73
73
|
# String? Value is an href
|
74
|
-
icon = [{
|
74
|
+
icon = [{href: icon}] if icon.is_a?(String)
|
75
75
|
# Hash? Single icon instead of a list of icons
|
76
|
-
icon = [icon] if icon.
|
76
|
+
icon = [icon] if icon.is_a?(Hash)
|
77
77
|
|
78
78
|
icon.each do |icon_params|
|
79
|
-
icon_params = {
|
79
|
+
icon_params = {rel: "icon", type: "image/x-icon"}.with_indifferent_access.merge(icon_params)
|
80
80
|
tags << Tag.new(:link, icon_params)
|
81
81
|
end
|
82
82
|
end
|
@@ -109,7 +109,7 @@ module MetaTags
|
|
109
109
|
#
|
110
110
|
def render_refresh(tags)
|
111
111
|
refresh = meta_tags.extract(:refresh)
|
112
|
-
tags << Tag.new(:meta,
|
112
|
+
tags << Tag.new(:meta, "http-equiv" => "refresh", :content => refresh.to_s) if refresh.present?
|
113
113
|
end
|
114
114
|
|
115
115
|
# Renders alternate link tags.
|
@@ -120,13 +120,13 @@ module MetaTags
|
|
120
120
|
alternate = meta_tags.extract(:alternate)
|
121
121
|
return unless alternate
|
122
122
|
|
123
|
-
if alternate.
|
123
|
+
if alternate.is_a?(Hash)
|
124
124
|
alternate.each do |hreflang, href|
|
125
|
-
tags << Tag.new(:link, rel:
|
125
|
+
tags << Tag.new(:link, rel: "alternate", href: href, hreflang: hreflang) if href.present?
|
126
126
|
end
|
127
|
-
elsif alternate.
|
127
|
+
elsif alternate.is_a?(Array)
|
128
128
|
alternate.each do |link_params|
|
129
|
-
tags << Tag.new(:link, {
|
129
|
+
tags << Tag.new(:link, {rel: "alternate"}.with_indifferent_access.merge(link_params))
|
130
130
|
end
|
131
131
|
end
|
132
132
|
end
|
@@ -143,7 +143,7 @@ module MetaTags
|
|
143
143
|
title = open_search[:title]
|
144
144
|
|
145
145
|
type = "application/opensearchdescription+xml"
|
146
|
-
tags << Tag.new(:link, rel:
|
146
|
+
tags << Tag.new(:link, rel: "search", type: type, href: href, title: title) if href.present?
|
147
147
|
end
|
148
148
|
|
149
149
|
# Renders links.
|
@@ -151,7 +151,7 @@ module MetaTags
|
|
151
151
|
# @param [Array<Tag>] tags a buffer object to store tag in.
|
152
152
|
#
|
153
153
|
def render_links(tags)
|
154
|
-
[
|
154
|
+
[:amphtml, :prev, :next, :image_src, :manifest].each do |tag_name|
|
155
155
|
href = meta_tags.extract(tag_name)
|
156
156
|
if href.present?
|
157
157
|
@normalized_meta_tags[tag_name] = href
|
@@ -189,7 +189,7 @@ module MetaTags
|
|
189
189
|
#
|
190
190
|
def render_hash(tags, key, **opts)
|
191
191
|
data = meta_tags.meta_tags[key]
|
192
|
-
return unless data.
|
192
|
+
return unless data.is_a?(Hash)
|
193
193
|
|
194
194
|
process_hash(tags, key, data, **opts)
|
195
195
|
meta_tags.extract(key)
|
@@ -202,7 +202,7 @@ module MetaTags
|
|
202
202
|
def render_custom(tags)
|
203
203
|
meta_tags.meta_tags.each do |name, data|
|
204
204
|
Array(data).each do |val|
|
205
|
-
tags << Tag.new(:meta, configured_name_key(name) => name, content
|
205
|
+
tags << Tag.new(:meta, configured_name_key(name) => name, :content => val)
|
206
206
|
end
|
207
207
|
meta_tags.extract(name)
|
208
208
|
end
|
@@ -217,14 +217,14 @@ module MetaTags
|
|
217
217
|
#
|
218
218
|
def process_tree(tags, property, content, itemprop: nil, **opts)
|
219
219
|
method = case content
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
220
|
+
when Hash
|
221
|
+
:process_hash
|
222
|
+
when Array
|
223
|
+
:process_array
|
224
|
+
else
|
225
|
+
iprop = itemprop
|
226
|
+
:render_tag
|
227
|
+
end
|
228
228
|
__send__(method, tags, property, content, itemprop: iprop, **opts)
|
229
229
|
end
|
230
230
|
|
@@ -237,18 +237,18 @@ module MetaTags
|
|
237
237
|
def process_hash(tags, property, content, **opts)
|
238
238
|
itemprop = content.delete(:itemprop)
|
239
239
|
content.each do |key, value|
|
240
|
-
if key.to_s ==
|
240
|
+
if key.to_s == "_"
|
241
241
|
iprop = itemprop
|
242
242
|
key = property
|
243
243
|
else
|
244
244
|
key = "#{property}:#{key}"
|
245
245
|
end
|
246
246
|
|
247
|
-
normalized_value = if value.
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
247
|
+
normalized_value = if value.is_a?(Symbol)
|
248
|
+
normalized_meta_tags[value]
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
252
|
process_tree(tags, key, normalized_value, **opts.merge(itemprop: iprop))
|
253
253
|
end
|
254
254
|
end
|
@@ -273,7 +273,7 @@ module MetaTags
|
|
273
273
|
#
|
274
274
|
def render_tag(tags, name, value, itemprop: nil)
|
275
275
|
name_key ||= configured_name_key(name)
|
276
|
-
tags << Tag.new(:meta, name_key => name.to_s, content
|
276
|
+
tags << Tag.new(:meta, name_key => name.to_s, :content => value, :itemprop => itemprop) if value.present?
|
277
277
|
end
|
278
278
|
|
279
279
|
# Returns meta tag property name for a give meta tag based on the
|
@@ -44,7 +44,7 @@ module MetaTags
|
|
44
44
|
# serves the same purpose we could just as it to convert itself to str
|
45
45
|
# and continue from there
|
46
46
|
description = cleanup_string(description)
|
47
|
-
return
|
47
|
+
return "" if description.blank?
|
48
48
|
|
49
49
|
truncate(description, MetaTags.config.description_limit)
|
50
50
|
end
|
@@ -56,7 +56,7 @@ module MetaTags
|
|
56
56
|
#
|
57
57
|
def normalize_keywords(keywords)
|
58
58
|
keywords = cleanup_strings(keywords)
|
59
|
-
return
|
59
|
+
return "" if keywords.blank?
|
60
60
|
|
61
61
|
keywords.each(&:downcase!) if MetaTags.config.keywords_lowercase
|
62
62
|
separator = cleanup_string MetaTags.config.keywords_separator, strip: false
|
@@ -107,12 +107,12 @@ module MetaTags
|
|
107
107
|
# space characters squashed into a single space.
|
108
108
|
#
|
109
109
|
def cleanup_string(string, strip: true)
|
110
|
-
return
|
111
|
-
raise ArgumentError,
|
110
|
+
return "" if string.nil?
|
111
|
+
raise ArgumentError, "Expected a string or an object that implements #to_str" unless string.respond_to?(:to_str)
|
112
112
|
|
113
113
|
s = strip_tags(string.to_str)
|
114
114
|
s = s.dup if s.frozen?
|
115
|
-
s.gsub!(/\s+/,
|
115
|
+
s.gsub!(/\s+/, " ")
|
116
116
|
s.strip! if strip
|
117
117
|
|
118
118
|
s
|
@@ -137,15 +137,15 @@ module MetaTags
|
|
137
137
|
# @param [String] natural_separator natural separator to truncate at.
|
138
138
|
# @return [String] truncated string.
|
139
139
|
#
|
140
|
-
def truncate(string, limit = nil, natural_separator =
|
141
|
-
return string if limit.to_i == 0
|
140
|
+
def truncate(string, limit = nil, natural_separator = " ")
|
141
|
+
return string if limit.to_i == 0
|
142
142
|
|
143
143
|
helpers.truncate(
|
144
144
|
string,
|
145
|
-
length:
|
145
|
+
length: limit,
|
146
146
|
separator: natural_separator,
|
147
|
-
omission:
|
148
|
-
escape:
|
147
|
+
omission: "",
|
148
|
+
escape: true
|
149
149
|
)
|
150
150
|
end
|
151
151
|
|
@@ -157,7 +157,7 @@ module MetaTags
|
|
157
157
|
# @param [String] natural_separator natural separator to truncate at.
|
158
158
|
# @return [Array<String>] truncated array of strings.
|
159
159
|
#
|
160
|
-
def truncate_array(string_array, limit = nil, separator =
|
160
|
+
def truncate_array(string_array, limit = nil, separator = "", natural_separator = " ")
|
161
161
|
return string_array if limit.nil? || limit <= 0
|
162
162
|
|
163
163
|
length = 0
|
@@ -188,14 +188,14 @@ module MetaTags
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def truncate_title(site_title, title, separator)
|
191
|
-
global_limit = MetaTags.config.title_limit.to_i
|
191
|
+
global_limit = MetaTags.config.title_limit.to_i
|
192
192
|
if global_limit > 0
|
193
193
|
site_title_limited_length, title_limited_length = calculate_title_limits(
|
194
|
-
site_title, title, separator, global_limit
|
194
|
+
site_title, title, separator, global_limit
|
195
195
|
)
|
196
196
|
|
197
|
-
title = title_limited_length > 0 ? truncate_array(title, title_limited_length, separator) : []
|
198
|
-
site_title = site_title_limited_length > 0 ? truncate(site_title, site_title_limited_length) : nil
|
197
|
+
title = (title_limited_length > 0) ? truncate_array(title, title_limited_length, separator) : []
|
198
|
+
site_title = (site_title_limited_length > 0) ? truncate(site_title, site_title_limited_length) : nil
|
199
199
|
end
|
200
200
|
|
201
201
|
[site_title, title]
|
@@ -208,13 +208,13 @@ module MetaTags
|
|
208
208
|
main_length = main_title.map(&:length).sum + ((main_title.size - 1) * separator.length)
|
209
209
|
main_limited_length = global_limit
|
210
210
|
|
211
|
-
secondary_limited_length = global_limit - (main_length > 0 ? main_length + separator.length : 0)
|
211
|
+
secondary_limited_length = global_limit - ((main_length > 0) ? main_length + separator.length : 0)
|
212
212
|
secondary_limited_length = [0, secondary_limited_length].max
|
213
213
|
|
214
214
|
if MetaTags.config.truncate_site_title_first
|
215
|
-
[
|
215
|
+
[secondary_limited_length, main_limited_length]
|
216
216
|
else
|
217
|
-
[
|
217
|
+
[main_limited_length, secondary_limited_length]
|
218
218
|
end
|
219
219
|
end
|
220
220
|
end
|
data/lib/meta_tags/version.rb
CHANGED
@@ -55,7 +55,7 @@ module MetaTags
|
|
55
55
|
#
|
56
56
|
# @see #display_meta_tags
|
57
57
|
#
|
58
|
-
def title(title = nil, headline =
|
58
|
+
def title(title = nil, headline = "")
|
59
59
|
set_meta_tags(title: title) unless title.nil?
|
60
60
|
headline.presence || meta_tags[:title]
|
61
61
|
end
|
@@ -203,7 +203,7 @@ module MetaTags
|
|
203
203
|
# <div data-page-container="true" title="<%= display_title title: 'My Page', site: 'PJAX Site' %>">
|
204
204
|
#
|
205
205
|
def display_title(defaults = {})
|
206
|
-
|
206
|
+
meta_tags.full_title(defaults)
|
207
207
|
end
|
208
208
|
end
|
209
209
|
end
|
data/lib/meta_tags.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "set"
|
4
|
+
require "active_support/core_ext/hash/indifferent_access"
|
5
5
|
|
6
6
|
# MetaTags gem namespace.
|
7
7
|
module MetaTags
|
@@ -24,15 +24,15 @@ module MetaTags
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
require
|
27
|
+
require "meta_tags/version"
|
28
28
|
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
33
|
-
require
|
34
|
-
require
|
35
|
-
require
|
36
|
-
require
|
29
|
+
require "meta_tags/configuration"
|
30
|
+
require "meta_tags/controller_helper"
|
31
|
+
require "meta_tags/meta_tags_collection"
|
32
|
+
require "meta_tags/renderer"
|
33
|
+
require "meta_tags/tag"
|
34
|
+
require "meta_tags/content_tag"
|
35
|
+
require "meta_tags/text_normalizer"
|
36
|
+
require "meta_tags/view_helper"
|
37
37
|
|
38
|
-
require
|
38
|
+
require "meta_tags/railtie" if defined?(Rails)
|
data/meta-tags.gemspec
CHANGED
@@ -1,43 +1,52 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require
|
5
|
+
require "meta_tags/version"
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
12
|
-
|
13
|
-
spec.summary
|
14
|
-
spec.description
|
15
|
-
spec.homepage
|
16
|
-
spec.license
|
17
|
-
spec.platform
|
18
|
-
spec.required_ruby_version =
|
19
|
-
|
20
|
-
spec.files
|
21
|
-
spec.bindir
|
22
|
-
spec.executables
|
8
|
+
spec.name = "meta-tags"
|
9
|
+
spec.version = MetaTags::VERSION
|
10
|
+
spec.authors = ["Dmytro Shteflyuk"]
|
11
|
+
spec.email = ["kpumuk@kpumuk.info"]
|
12
|
+
|
13
|
+
spec.summary = "Collection of SEO helpers for Ruby on Rails."
|
14
|
+
spec.description = "Search Engine Optimization (SEO) plugin for Ruby on Rails applications."
|
15
|
+
spec.homepage = "https://github.com/kpumuk/meta-tags"
|
16
|
+
spec.license = "MIT"
|
17
|
+
spec.platform = Gem::Platform::RUBY
|
18
|
+
spec.required_ruby_version = ">= 2.7.0"
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(\.|(bin|test|spec|features)/)}) }
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.
|
25
|
+
spec.add_runtime_dependency "actionpack", ">= 3.2.0", "< 7.2"
|
26
26
|
|
27
|
-
spec.add_development_dependency "railties", ">= 3.2.0", "< 7.
|
27
|
+
spec.add_development_dependency "railties", ">= 3.2.0", "< 7.2"
|
28
28
|
spec.add_development_dependency "rake", "~> 13.0"
|
29
|
-
spec.add_development_dependency "rspec", "~> 3.
|
30
|
-
spec.add_development_dependency "rspec-html-matchers", "~> 0.
|
31
|
-
|
32
|
-
spec.
|
33
|
-
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.12.0"
|
30
|
+
spec.add_development_dependency "rspec-html-matchers", "~> 0.10.0"
|
31
|
+
spec.add_development_dependency "appraisal", "~> 2.5.0"
|
32
|
+
spec.add_development_dependency "simplecov", "~> 0.22.0"
|
33
|
+
# Code style
|
34
|
+
spec.add_development_dependency "standard", "~> 1.29"
|
35
|
+
spec.add_development_dependency "rubocop-rails", "~> 2.20.2"
|
36
|
+
spec.add_development_dependency "rubocop-rake", "~> 0.6.0"
|
37
|
+
spec.add_development_dependency "rubocop-rspec", "~> 2.23.0"
|
38
|
+
# Format RSpec output for CircleCI
|
39
|
+
spec.add_development_dependency "rspec_junit_formatter", "~> 0.6.0"
|
40
|
+
|
41
|
+
spec.cert_chain = ["certs/kpumuk.pem"]
|
42
|
+
spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $PROGRAM_NAME.end_with?("gem")
|
34
43
|
|
35
44
|
spec.metadata = {
|
36
|
-
"bug_tracker_uri"
|
37
|
-
"changelog_uri"
|
38
|
-
"documentation_uri"
|
39
|
-
"homepage_uri"
|
40
|
-
"source_code_uri"
|
41
|
-
"rubygems_mfa_required" => "true"
|
45
|
+
"bug_tracker_uri" => "https://github.com/kpumuk/meta-tags/issues/",
|
46
|
+
"changelog_uri" => "https://github.com/kpumuk/meta-tags/blob/main/CHANGELOG.md",
|
47
|
+
"documentation_uri" => "https://rubydoc.info/github/kpumuk/meta-tags/",
|
48
|
+
"homepage_uri" => "https://github.com/kpumuk/meta-tags/",
|
49
|
+
"source_code_uri" => "https://github.com/kpumuk/meta-tags/",
|
50
|
+
"rubygems_mfa_required" => "true"
|
42
51
|
}
|
43
52
|
end
|
data/sig/lib/_internal/rails.rbs
CHANGED
data/sig/lib/meta_tags.rbs
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|