meta-tags 2.18.0 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccc7036c95b58f9e1c33efd68f3b9dc16d64e9f4ad5d06296800a288f9f644da
4
- data.tar.gz: c8fde1a652894101de4f146217b43326e81980c1bd760042a2dacbd194abb0a8
3
+ metadata.gz: 8492bea82b4f8198d1586fbf8455ad77fb86942deb24a176bc2905d680410e73
4
+ data.tar.gz: 2bc51a95760a70183e21edfe6f7b5dc7f443b0eb1d5e4449a2da398f48074f71
5
5
  SHA512:
6
- metadata.gz: 2672417d1d988f072ccc11d12f7d4a536b3e00ee376098972a9d945c11fc6ac6109f8baa0f87e98c33f549860384d41caa47c00496a3199edae6b4d60d88f956
7
- data.tar.gz: 83f2ff75eb5d41ec25b8c26932f718b186fa938f15b8fb5000840989ba5785a317d3337c1d363f3e3473a9c16d18e4b065272321c9a24172a763bfc74b8be2a5
6
+ metadata.gz: 781610100e7ec63c46e2f377cda42bbbec151009ddb45f17f353d6b4f6271b2645e4883b51ea476fbd5180f6fec14764d5ba7c69130f58cdf59ac90ad452add2
7
+ data.tar.gz: ad30e462d9fc9b8fea8dd8244c13447e6a9221201485491960754b213bff085cf24522bb93d909ae1a16c9cf37b4770ce1c54f2427480875a06dde749c028eb0
checksums.yaml.gz.sig CHANGED
Binary file
data/Appraisals ADDED
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "rails-5.1" do
4
+ gem "railties", "5.1.7"
5
+ end
6
+
7
+ appraise "rails-5.2" do
8
+ gem "railties", "5.2.8.1"
9
+ end
10
+
11
+ appraise "rails-6.0" do
12
+ gem "railties", "6.0.6"
13
+ end
14
+
15
+ appraise "rails-6.1" do
16
+ gem "railties", "6.1.7"
17
+ end
18
+
19
+ appraise "rails-7.0" do
20
+ gem "railties", "7.0.4"
21
+ end
22
+
23
+ appraise "rails-7.1" do
24
+ gem "railties", "7.1.0"
25
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.19.0 (October 5, 2023) [☰](https://github.com/kpumuk/meta-tags/compare/v2.18.0...v2.19.0)
4
+
5
+ Changes:
6
+
7
+ - Switched code style from custom rules to Standard ([246](https://github.com/kpumuk/meta-tags/pull/251)).
8
+ - Switched from testing Rails using environment variables to Appraisal gem ([251](https://github.com/kpumuk/meta-tags/pull/247)).
9
+ - Ruby 2.7 is minimum supported version ([257](https://github.com/kpumuk/meta-tags/pull/257/))
10
+ - Added support for Rails 7.1 ([267](https://github.com/kpumuk/meta-tags/pull/267))
11
+
3
12
  ## 2.18.0 (September 15, 2022) [☰](https://github.com/kpumuk/meta-tags/compare/v2.17.0...v2.18.0)
4
13
 
5
14
  Changes:
@@ -10,7 +19,7 @@ Changes:
10
19
 
11
20
  Changes:
12
21
 
13
- - Separate RBS files to _internal directory to avoid exposing RBS ([237](https://github.com/kpumuk/meta-tags/pull/237))
22
+ - Separate RBS files to \_internal directory to avoid exposing RBS ([237](https://github.com/kpumuk/meta-tags/pull/237))
14
23
  - Added Ruby 3.1 to supported versions, Ruby 2.6 is minimum supported version ([235](https://github.com/kpumuk/meta-tags/pull/235/))
15
24
 
16
25
  ## 2.16.0 (September 24, 2021) [☰](https://github.com/kpumuk/meta-tags/compare/v2.15.0...v2.16.0)
data/Gemfile CHANGED
@@ -1,30 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in meta-tags.gemspec
5
+ # Specify gem's dependencies in meta-tags.gemspec
6
6
  gemspec
7
7
 
8
- if ENV['RAILS_VERSION']
9
- # Install specified version of actionpack if requested
10
- gem 'railties', "~> #{ENV['RAILS_VERSION']}"
11
- end
12
-
13
- unless ENV["NO_STEEP"] == '1'
8
+ unless ENV["NO_STEEP"] == "1"
14
9
  # Ruby typings
15
- gem 'steep', '~> 1.0.1', platform: :mri
16
- end
17
-
18
- group :test do
19
- # Lock rubocop to a specific version we use on CI. If you update this,
20
- # don't forget to switch rubocop channel in the .codeclimate.yml
21
- gem 'rubocop', '= 1.31.0'
22
- # Cops for rails apps
23
- gem 'rubocop-rails'
24
- # Apply RSpec rubocop cops
25
- gem 'rubocop-rspec', require: false
26
- # We use this gem on CI to calculate code coverage.
27
- gem 'simplecov', '~> 0.21.2'
28
- # Format RSpec output for CircleCI
29
- gem 'rspec_junit_formatter'
10
+ gem "steep", "~> 1.5.2", platform: :mri
30
11
  end
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![CircleCI](https://circleci.com/gh/kpumuk/meta-tags.svg?style=shield)](https://circleci.com/gh/kpumuk/meta-tags)
4
4
  [![Gem Version](https://badge.fury.io/rb/meta-tags.svg)](https://badge.fury.io/rb/meta-tags)
5
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
5
6
  [![Code Climate](https://codeclimate.com/github/kpumuk/meta-tags/badges/gpa.svg)](https://codeclimate.com/github/kpumuk/meta-tags)
6
7
  [![Test Coverage](https://codeclimate.com/github/kpumuk/meta-tags/badges/coverage.svg)](https://codeclimate.com/github/kpumuk/meta-tags/coverage)
7
8
  [![Gem Downloads](https://img.shields.io/gem/dt/meta-tags.svg)](https://badge.fury.io/rb/meta-tags)
@@ -12,9 +13,9 @@ Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
12
13
  ## Ruby on Rails
13
14
 
14
15
  MetaTags main branch fully supports Ruby on Rails 5.1+, and is tested against all
15
- major Rails releases up to 7.0.
16
+ major Rails releases up to 7.1.
16
17
 
17
- Ruby versions older than 2.6 are no longer officially supported.
18
+ Ruby versions older than 2.7 are no longer officially supported.
18
19
 
19
20
  _Please note_ that we no longer support Ruby versions older than 2.6.0 and
20
21
  Ruby on Rails older than 5.1, because they reached their [End of Life](https://endoflife.date/ruby).
@@ -24,7 +25,7 @@ Ruby on Rails older than 5.1, because they reached their [End of Life](https://e
24
25
  Add the "meta-tags" gem to your `Gemfile`.
25
26
 
26
27
  ```ruby
27
- gem 'meta-tags'
28
+ gem "meta-tags"
28
29
  ```
29
30
 
30
31
  And run `bundle install` command.
@@ -55,14 +56,14 @@ First, add this code to your main layout:
55
56
 
56
57
  ```erb
57
58
  <head>
58
- <%= display_meta_tags site: 'My website' %>
59
+ <%= display_meta_tags site: "My website" %>
59
60
  </head>
60
61
  ```
61
62
 
62
63
  Then, to set the page title, add this to each of your views (see below for other options):
63
64
 
64
65
  ```erb
65
- <h1><%= title 'My page title' %></h1>
66
+ <h1><%= title "My page title" %></h1>
66
67
  ```
67
68
 
68
69
  When views are rendered, the page title will be included in the right spots:
@@ -83,17 +84,19 @@ You can find allowed options for `display_meta_tags` method below.
83
84
  You can define following instance variables:
84
85
 
85
86
  ```ruby
86
- @page_title = 'Member Login'
87
- @page_description = 'Member login page.'
88
- @page_keywords = 'Site, Login, Members'
87
+ @page_title = "Member Login"
88
+ @page_description = "Member login page."
89
+ @page_keywords = "Site, Login, Members"
89
90
  ```
90
91
 
91
92
  Also you could use `set_meta_tags` method to define all meta tags simultaneously:
92
93
 
93
94
  ```ruby
94
- set_meta_tags title: 'Member Login',
95
- description: 'Member login page.',
96
- keywords: 'Site, Login, Members'
95
+ set_meta_tags(
96
+ title: "Member Login",
97
+ description: "Member login page.",
98
+ keywords: "Site, Login, Members"
99
+ )
97
100
  ```
98
101
 
99
102
  You can find allowed options for `set_meta_tags` method below.
@@ -103,9 +106,9 @@ You can find allowed options for `set_meta_tags` method below.
103
106
  To set meta tags you can use following methods:
104
107
 
105
108
  ```erb
106
- <% title 'Member Login' %>
107
- <% description 'Member login page.' %>
108
- <% keywords 'Site, Login, Members' %>
109
+ <% title "Member Login" %>
110
+ <% description "Member login page." %>
111
+ <% keywords "Site, Login, Members" %>
109
112
  <% nofollow %>
110
113
  <% noindex %>
111
114
  <% refresh 3 %>
@@ -114,9 +117,13 @@ To set meta tags you can use following methods:
114
117
  Also there is `set_meta_tags` method exists:
115
118
 
116
119
  ```erb
117
- <% set_meta_tags title: 'Member Login',
118
- description: 'Member login page.',
119
- keywords: 'Site, Login, Members' %>
120
+ <%
121
+ set_meta_tags(
122
+ title: "Member Login",
123
+ description: "Member login page.",
124
+ keywords: "Site, Login, Members"
125
+ )
126
+ %>
120
127
  ```
121
128
 
122
129
  You can pass an object that implements `#to_meta_tags` method and returns a Hash:
@@ -126,7 +133,7 @@ class Document < ApplicationRecord
126
133
  def to_meta_tags
127
134
  {
128
135
  title: title,
129
- description: summary,
136
+ description: summary
130
137
  }
131
138
  end
132
139
  end
@@ -139,13 +146,13 @@ The `title` method returns title itself, so you can use it to show the title
139
146
  somewhere on the page:
140
147
 
141
148
  ```erb
142
- <h1><%= title 'Member Login' %></h1>
149
+ <h1><%= title "Member Login" %></h1>
143
150
  ```
144
151
 
145
152
  If you want to set the title and display another text, use this:
146
153
 
147
154
  ```erb
148
- <h1><%= title 'Member Login', 'Here you can login to the site:' %></h1>
155
+ <h1><%= title "Member Login", "Here you can login to the site:" %></h1>
149
156
  ```
150
157
 
151
158
  ### Allowed options for `display_meta_tags` and `set_meta_tags` methods
@@ -164,11 +171,11 @@ Use these options to customize the title format:
164
171
  | `:suffix` | text between separator and page title |
165
172
  | `:lowercase` | when true, the page name will be lowercase |
166
173
  | `:reverse` | when true, the page and site names will be reversed |
167
- | `:noindex` | add noindex meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
168
- | `:index` | add index meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
169
- | `:nofollow` | add nofollow meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
170
- | `:follow` | add follow meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
171
- | `:noarchive` | add noarchive meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
174
+ | `:noindex` | add noindex meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
175
+ | `:index` | add index meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
176
+ | `:nofollow` | add nofollow meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
177
+ | `:follow` | add follow meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
178
+ | `:noarchive` | add noarchive meta tag; when true, "robots" will be used; accepts a string with a robot name, or an array of strings |
172
179
  | `:canonical` | add canonical link tag |
173
180
  | `:prev` | add prev link tag |
174
181
  | `:next` | add next link tag |
@@ -184,8 +191,8 @@ And here are a few examples to give you ideas.
184
191
  <%= display_meta_tags prefix: false, separator: ":" %>
185
192
  <%= display_meta_tags lowercase: true %>
186
193
  <%= display_meta_tags reverse: true, prefix: false %>
187
- <%= display_meta_tags og: { title: 'The Rock', type: 'video.movie' } %>
188
- <%= display_meta_tags alternate: { 'zh-Hant' => 'http://example.com.tw/base/url' } %>
194
+ <%= display_meta_tags og: { title: "The Rock", type: "video.movie" } %>
195
+ <%= display_meta_tags alternate: { "zh-Hant" => "http://example.com.tw/base/url" } %>
189
196
  ```
190
197
 
191
198
  ### Allowed values
@@ -193,16 +200,16 @@ And here are a few examples to give you ideas.
193
200
  You can specify `:title` as a string or array:
194
201
 
195
202
  ```ruby
196
- set_meta_tags title: ['part1', 'part2'], site: 'site'
203
+ set_meta_tags title: ["part1", "part2"], site: "site"
197
204
  # site | part1 | part2
198
- set_meta_tags title: ['part1', 'part2'], reverse: true, site: 'site'
205
+ set_meta_tags title: ["part1", "part2"], reverse: true, site: "site"
199
206
  # part2 | part1 | site
200
207
  ```
201
208
 
202
209
  Keywords can be passed as string of comma-separated values, or as an array:
203
210
 
204
211
  ```ruby
205
- set_meta_tags keywords: ['tag1', 'tag2']
212
+ set_meta_tags keywords: ["tag1", "tag2"]
206
213
  # tag1, tag2
207
214
  ```
208
215
 
@@ -219,7 +226,7 @@ Say, you have the following in your application layout:
219
226
  ```ruby
220
227
  display_meta_tags og: {
221
228
  title: :title,
222
- site_name: :site,
229
+ site_name: :site
223
230
  }
224
231
  ```
225
232
 
@@ -227,7 +234,7 @@ The value of `og[:title]` is a symbol and therefore references the value of the
227
234
  top level `title` meta tag. With the following in any view:
228
235
 
229
236
  ```ruby
230
- title 'my great view'
237
+ title "my great view"
231
238
  ```
232
239
 
233
240
  You get this open graph meta tag for free:
@@ -261,10 +268,10 @@ code duplication, you can define a helper in `application_helper.rb`:
261
268
  ```ruby
262
269
  def default_meta_tags
263
270
  {
264
- title: 'Member Login',
265
- description: 'Member login page.',
266
- keywords: 'Site, Login, Members',
267
- separator: "&mdash;".html_safe,
271
+ title: "Member Login",
272
+ description: "Member login page.",
273
+ keywords: "Site, Login, Members",
274
+ separator: "&mdash;".html_safe
268
275
  }
269
276
  end
270
277
  ```
@@ -295,11 +302,11 @@ browser are displayed in the title bar. The search engines look at
295
302
  the title bar to determine what the page is all about.
296
303
 
297
304
  ```ruby
298
- set_meta_tags title: 'Member Login'
305
+ set_meta_tags title: "Member Login"
299
306
  # <title>Member Login</title>
300
- set_meta_tags site: 'Site Title', title: 'Member Login'
307
+ set_meta_tags site: "Site Title", title: "Member Login"
301
308
  # <title>Site Title | Member Login</title>
302
- set_meta_tags site: 'Site Title', title: 'Member Login', reverse: true
309
+ set_meta_tags site: "Site Title", title: "Member Login", reverse: true
303
310
  # <title>Member Login | Site Title</title>
304
311
  ```
305
312
 
@@ -352,7 +359,7 @@ include specific pages in their indexes.
352
359
  ```ruby
353
360
  set_meta_tags noindex: true
354
361
  # <meta name="robots" content="noindex">
355
- set_meta_tags noindex: 'googlebot'
362
+ set_meta_tags noindex: "googlebot"
356
363
  # <meta name="googlebot" content="noindex">
357
364
  ```
358
365
 
@@ -365,7 +372,7 @@ Further reading:
365
372
 
366
373
  ### Index
367
374
 
368
- Although it is not required to add 'index' to 'robots' as it is default value for Google, some SEO specialists recommend to add it to website
375
+ Although it is not required to add "index" to "robots" as it is default value for Google, some SEO specialists recommend to add it to website
369
376
 
370
377
  ```ruby
371
378
  set_meta_tags index: true
@@ -382,7 +389,7 @@ still arrives at your undesired page.
382
389
  ```ruby
383
390
  set_meta_tags nofollow: true
384
391
  # <meta name="robots" content="nofollow">
385
- set_meta_tags nofollow: 'googlebot'
392
+ set_meta_tags nofollow: "googlebot"
386
393
  # <meta name="googlebot" content="nofollow">
387
394
  ```
388
395
 
@@ -429,13 +436,13 @@ icon, tab icon or bookmark icon, is a file containing one or more small icons,
429
436
  most commonly 16×16 pixels, associated with a particular website or web page.
430
437
 
431
438
  ```ruby
432
- set_meta_tags icon: '/favicon.ico'
439
+ set_meta_tags icon: "/favicon.ico"
433
440
  # <link rel="icon" href="/favicon.ico" type="image/x-icon">
434
- set_meta_tags icon: '/favicon.png', type: 'image/png'
441
+ set_meta_tags icon: "/favicon.png", type: "image/png"
435
442
  # <link rel="icon" href="/favicon.png" type="image/png">
436
443
  set_meta_tags icon: [
437
- { href: '/images/icons/icon_96.png', sizes: '32x32 96x96', type: 'image/png' },
438
- { href: '/images/icons/icon_itouch_precomp_32.png', rel: 'apple-touch-icon-precomposed', sizes: '32x32', type: 'image/png' },
444
+ {href: "/images/icons/icon_96.png", sizes: "32x32 96x96", type: "image/png"},
445
+ {href: "/images/icons/icon_itouch_precomp_32.png", rel: "apple-touch-icon-precomposed", sizes: "32x32", type: "image/png"}
439
446
  ]
440
447
  # <link rel="icon" href="/images/icons/icon_96.png" type="image/png" sizes="32x32 96x96">
441
448
  # <link rel="apple-touch-icon-precomposed" href="/images/icons/icon_itouch_precomp_32.png" type="image/png" sizes="32x32">
@@ -452,11 +459,11 @@ Alternate link elements tell a search engine when there is content that's
452
459
  translated or targeted to users in a certain region.
453
460
 
454
461
  ```ruby
455
- set_meta_tags alternate: { "fr" => "http://yoursite.fr/alternate/url" }
462
+ set_meta_tags alternate: {"fr" => "http://yoursite.fr/alternate/url"}
456
463
  # <link rel="alternate" href="http://yoursite.fr/alternate/url" hreflang="fr">
457
464
 
458
- set_meta_tags alternate: { "fr" => "http://yoursite.fr/alternate/url",
459
- "de" => "http://yoursite.de/alternate/url" }
465
+ set_meta_tags alternate: {"fr" => "http://yoursite.fr/alternate/url",
466
+ "de" => "http://yoursite.de/alternate/url"}
460
467
  # <link rel="alternate" href="http://yoursite.fr/alternate/url" hreflang="fr">
461
468
  # <link rel="alternate" href="http://yoursite.de/alternate/url" hreflang="de">
462
469
  ```
@@ -465,10 +472,10 @@ If you need more than just multi-lingual links, you can use an alternative synta
465
472
 
466
473
  ```ruby
467
474
  set_meta_tags alternate: [
468
- { href: 'http://example.fr/base/url', hreflang: 'fr' },
469
- { href: 'http://example.com/feed.rss', type: 'application/rss+xml', title: 'RSS' },
470
- { href: 'http://m.example.com/page-1', media: 'only screen and (max-width: 640px)'},
471
- ]
475
+ {href: "http://example.fr/base/url", hreflang: "fr"},
476
+ {href: "http://example.com/feed.rss", type: "application/rss+xml", title: "RSS"},
477
+ {href: "http://m.example.com/page-1", media: "only screen and (max-width: 640px)"}
478
+ ]
472
479
  ```
473
480
 
474
481
  Further reading:
@@ -526,7 +533,7 @@ To link back to normal version, use `canonical`.
526
533
  ### Manifest links
527
534
 
528
535
  ```ruby
529
- set_meta_tags manifest: 'manifest.json'
536
+ set_meta_tags manifest: "manifest.json"
530
537
  # <link rel="manifest" href="manifest.json">
531
538
  ```
532
539
 
@@ -544,7 +551,7 @@ meta refresh to be used as a method of URL redirection.
544
551
  ```ruby
545
552
  set_meta_tags refresh: 5
546
553
  # <meta content="5" http-equiv="refresh">
547
- set_meta_tags refresh: '5;url=http://example.com'
554
+ set_meta_tags refresh: "5;url=http://example.com"
548
555
  # <meta content="5;url=http://example.com" http-equiv="refresh">
549
556
  ```
550
557
 
@@ -560,7 +567,7 @@ Open Search link element to describe a search engine in a standard and accessibl
560
567
  ```ruby
561
568
  set_meta_tags open_search: {
562
569
  title: "Open Search",
563
- href: "/opensearch.xml"
570
+ href: "/opensearch.xml"
564
571
  }
565
572
  # <link href="/opensearch.xml" rel="search" title="Open Search" type="application/opensearchdescription+xml">
566
573
  ```
@@ -591,7 +598,7 @@ Repeated meta tags can be built just using an Array inside a Hash. For example:
591
598
 
592
599
  ```ruby
593
600
  set_meta_tags og: {
594
- image: ["http://example.com/rock.jpg", "http://example.com/rock2.jpg"]
601
+ image: ["http://example.com/rock.jpg", "http://example.com/rock2.jpg"]
595
602
  }
596
603
  # <meta property="og:image" content="http://example.com/rock.jpg">
597
604
  # <meta property="og:image" content="http://example.com/rock2.jpg">
@@ -606,13 +613,13 @@ and in the future. Here's an example for a movie page:
606
613
 
607
614
  ```ruby
608
615
  set_meta_tags og: {
609
- title: 'The Rock',
610
- type: 'video.movie',
611
- url: 'http://www.imdb.com/title/tt0117500/',
612
- image: 'http://ia.media-imdb.com/rock.jpg',
613
- video: {
614
- director: 'http://www.imdb.com/name/nm0000881/',
615
- writer: ['http://www.imdb.com/name/nm0918711/', 'http://www.imdb.com/name/nm0177018/']
616
+ title: "The Rock",
617
+ type: "video.movie",
618
+ url: "http://www.imdb.com/title/tt0117500/",
619
+ image: "http://ia.media-imdb.com/rock.jpg",
620
+ video: {
621
+ director: "http://www.imdb.com/name/nm0000881/",
622
+ writer: ["http://www.imdb.com/name/nm0918711/", "http://www.imdb.com/name/nm0177018/"]
616
623
  }
617
624
  }
618
625
  # <meta property="og:title" content="The Rock">
@@ -628,19 +635,21 @@ Multiple images declared as an **array** (look at the `_` character):
628
635
 
629
636
  ```ruby
630
637
  set_meta_tags og: {
631
- title: 'Two structured image properties',
632
- type: 'website',
633
- url: 'view-source:http://examples.opengraphprotocol.us/image-array.html',
634
- image: [{
635
- _: 'http://examples.opengraphprotocol.us/media/images/75.png',
636
- width: 75,
637
- height: 75,
638
- },
639
- {
640
- _: 'http://examples.opengraphprotocol.us/media/images/50.png',
641
- width: 50,
642
- height: 50,
643
- }]
638
+ title: "Two structured image properties",
639
+ type: "website",
640
+ url: "view-source:http://examples.opengraphprotocol.us/image-array.html",
641
+ image: [
642
+ {
643
+ _: "http://examples.opengraphprotocol.us/media/images/75.png",
644
+ width: 75,
645
+ height: 75
646
+ },
647
+ {
648
+ _: "http://examples.opengraphprotocol.us/media/images/50.png",
649
+ width: 50,
650
+ height: 50
651
+ }
652
+ ]
644
653
  }
645
654
  # <meta property="og:title" content="Two structured image properties">
646
655
  # <meta property="og:type" content="website">
@@ -657,10 +666,10 @@ Article meta tags are supported too:
657
666
 
658
667
  ```ruby
659
668
  set_meta_tags article: {
660
- published_time: '2013-09-17T05:59:00+01:00',
661
- modified_time: '2013-09-16T19:08:47+01:00',
662
- section: 'Article Section',
663
- tag: 'Article Tag',
669
+ published_time: "2013-09-17T05:59:00+01:00",
670
+ modified_time: "2013-09-16T19:08:47+01:00",
671
+ section: "Article Section",
672
+ tag: "Article Tag"
664
673
  }
665
674
  # <meta property="article:published_time" content="2013-09-17T05:59:00+01:00">
666
675
  # <meta property="article:modified_time" content="2013-09-16T19:08:47+01:00">
@@ -693,11 +702,11 @@ When you need to generate a [Twitter Photo card](https://dev.twitter.com/docs/ca
693
702
 
694
703
  ```ruby
695
704
  set_meta_tags twitter: {
696
- card: "photo",
705
+ card: "photo",
697
706
  image: {
698
- _: "http://example.com/1.png",
699
- width: 100,
700
- height: 100,
707
+ _: "http://example.com/1.png",
708
+ width: 100,
709
+ height: 100
701
710
  }
702
711
  }
703
712
  # <meta name="twitter:card" content="photo">
@@ -710,12 +719,12 @@ Special parameter `itemprop` can be used on a "anonymous" tag "\_" to generate "
710
719
 
711
720
  ```ruby
712
721
  set_meta_tags twitter: {
713
- card: "photo",
722
+ card: "photo",
714
723
  image: {
715
- _: "http://example.com/1.png",
716
- width: 100,
717
- height: 100,
718
- itemprop: "image",
724
+ _: "http://example.com/1.png",
725
+ width: 100,
726
+ height: 100,
727
+ itemprop: "image"
719
728
  }
720
729
  }
721
730
  # <meta name="twitter:card" content="photo">
@@ -765,7 +774,7 @@ You can also specify value as an Array, and values will be displayed as a list
765
774
  of `meta` tags:
766
775
 
767
776
  ```ruby
768
- set_meta_tags author: [ "Dmytro Shteflyuk", "John Doe" ]
777
+ set_meta_tags author: ["Dmytro Shteflyuk", "John Doe"]
769
778
  # <meta name="author" content="Dmytro Shteflyuk">
770
779
  # <meta name="author" content="John Doe">
771
780
  ```
data/Rakefile CHANGED
@@ -1,19 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler'
3
+ require "bundler"
4
4
  Bundler::GemHelper.install_tasks
5
5
 
6
- require 'rspec/core/rake_task'
6
+ require "rspec/core/rake_task"
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
 
9
+ desc "Run RSpec tests"
9
10
  task test: :spec
10
11
  task default: :spec
11
12
 
12
- desc 'Rebuild Circle CI configuration based on the build matrix template .circleci/config.yml.erb'
13
+ desc "Rebuild Circle CI configuration based on the build matrix template .circleci/config.yml.erb"
13
14
  task :circleci do
14
- require 'erb'
15
- template_path = File.expand_path('.circleci/config.yml.erb', __dir__)
16
- config_path = File.expand_path('.circleci/config.yml', __dir__)
15
+ require "erb"
16
+ template_path = File.expand_path(".circleci/config.yml.erb", __dir__)
17
+ config_path = File.expand_path(".circleci/config.yml", __dir__)
17
18
  File.write config_path, ERB.new(File.read(template_path)).result
18
19
  end
19
20
 
@@ -26,24 +27,30 @@ module SteepRunner
26
27
  end
27
28
  end
28
29
 
29
- task :steep do
30
- SteepRunner.run("check")
31
- end
30
+ desc "Check type information"
31
+ task steep: "steep:check"
32
32
 
33
33
  namespace :steep do
34
+ desc "Check type information"
35
+ task :check do
36
+ SteepRunner.run("check")
37
+ end
38
+
39
+ desc "Print type statistics"
34
40
  task :stats do
35
41
  SteepRunner.run("stats", "--log-level=fatal")
36
42
  end
37
43
  end
38
44
 
39
45
  namespace :rbs do
46
+ desc "Run RSpec tests with RBS enabled to test type signatures"
40
47
  task :spec do
41
48
  exec(
42
49
  {
43
- 'RBS_TEST_TARGET' => 'MetaTags::*',
44
- 'RUBYOPT' => '-rrbs/test/setup',
50
+ "RBS_TEST_TARGET" => "MetaTags::*",
51
+ "RUBYOPT" => "-rrbs/test/setup"
45
52
  },
46
- 'bundle exec rspec',
53
+ "bundle exec rspec"
47
54
  )
48
55
  end
49
56
  end
data/Steepfile CHANGED
@@ -10,6 +10,4 @@ target :lib do
10
10
  # (because we don't have RBS files for it)
11
11
  ignore "lib/meta_tags/railtie.rb"
12
12
  ignore "lib/generators"
13
-
14
- library "set"
15
13
  end
data/certs/kpumuk.pem CHANGED
@@ -1,20 +1,21 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhrcHVt
3
- dWsvREM9a3B1bXVrL0RDPWluZm8wHhcNMjIwNzA1MjIyODU4WhcNMjMwNzA1MjIy
4
- ODU4WjAjMSEwHwYDVQQDDBhrcHVtdWsvREM9a3B1bXVrL0RDPWluZm8wggEiMA0G
5
- CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8NmK6GXPiE/q7PDbj7nNdw3pa8a6Q
6
- IDxLtc7kW95e1mh0TVgOE8kvGegGtRtjvhXVGTTFtZ+yMD/0DCfTM2oUQYk5oYpO
7
- ZGrCfbNIdZauf4WYsnJtKOTrRoqFMwpL5PlBDKczB2y5lUmQs2HIsjQ0Q21wdKyy
8
- 7tXiZPoCoJ+kH+b4/d4dcNvAXVnWgO2HoLW5oqWfqY5swkAHzwHLU+rlxxuHUqOy
9
- 8/Y4hUSOXVIsxWxl3EapENm+QAfBRZn3L26hEb80CgSAp8m47Cj9DaSd7xoDtrIe
10
- RryRTj5NVZbq9p1/WRc5zxD9QhAEPjRa5ikbd+eWebIDpAKI0hpyC/9bAgMBAAGj
11
- dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBT2uFRXNWDpVdbv
12
- +xBk8DAgJPGBPTAdBgNVHREEFjAUgRJrcHVtdWtAa3B1bXVrLmluZm8wHQYDVR0S
13
- BBYwFIESa3B1bXVrQGtwdW11ay5pbmZvMA0GCSqGSIb3DQEBCwUAA4IBAQB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