meta-rails 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +36 -0
- data/.gitignore +2 -1
- data/.rspec +1 -0
- data/.rubocop.yml +21 -0
- data/CHANGELOG.md +8 -4
- data/Gemfile +4 -2
- data/README.md +11 -11
- data/Rakefile +3 -1
- data/bin/console +2 -2
- data/bin/setup +2 -1
- data/gemfiles/6.0.gemfile +1 -0
- data/gemfiles/6.1.gemfile +1 -0
- data/lib/meta-rails.rb +0 -5
- data/lib/meta/rails/helpers/meta_description_helper.rb +1 -0
- data/lib/meta/rails/helpers/robots_helper.rb +1 -0
- data/lib/meta/rails/helpers/title_helper.rb +1 -1
- data/lib/meta/rails/railtie.rb +2 -0
- data/lib/meta/rails/version.rb +1 -1
- data/meta-rails.gemspec +14 -9
- metadata +31 -16
- data/.travis.yml +0 -13
- data/gemfiles/4.2.gemfile +0 -1
- data/gemfiles/5.0.gemfile +0 -1
- data/gemfiles/5.1.gemfile +0 -1
- data/gemfiles/5.2.gemfile +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc01e4c4154507b6117276775367e66cba7e80073478f43e29dda8d062eba2b1
|
4
|
+
data.tar.gz: 33784877f4a0311ef3172b44118a39fde32871b47dcfcaa330e12e7f8aad7700
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 782e8ab9f79af7140c54c0f64a11178602597b5c9c93297ee5d5ecab01308a00b7c0225d0b5632df0311e9373f095dd229b5aac19f00a21a1cd2fc6a7646364f
|
7
|
+
data.tar.gz: ce7387d5ec9fd202f3004f3022f2f778162525c3ebbdc5fc37c0e7ead4a165fdbe80482ed053d485fc0f87a128a2e6413a670729976dd0236ecbda64248b3274
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
tests:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
strategy:
|
7
|
+
fail-fast: false
|
8
|
+
matrix:
|
9
|
+
include:
|
10
|
+
- rails: '6.0'
|
11
|
+
ruby: 2.5
|
12
|
+
- rails: '6.0'
|
13
|
+
ruby: 2.6
|
14
|
+
- rails: '6.0'
|
15
|
+
ruby: 2.7
|
16
|
+
- rails: '6.1'
|
17
|
+
ruby: 2.5
|
18
|
+
- rails: '6.1'
|
19
|
+
ruby: 2.6
|
20
|
+
- rails: '6.1'
|
21
|
+
ruby: 2.7
|
22
|
+
name: Rails ${{ matrix.rails }} on Ruby ${{ matrix.ruby }}
|
23
|
+
steps:
|
24
|
+
- name: Checkout
|
25
|
+
uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
env:
|
28
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby }}
|
32
|
+
bundler-cache: true
|
33
|
+
- name: Run tests
|
34
|
+
env:
|
35
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
36
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
TargetRubyVersion: 2.5
|
4
|
+
|
5
|
+
Layout/IndentationConsistency:
|
6
|
+
EnforcedStyle: indented_internal_methods
|
7
|
+
|
8
|
+
Layout/LineLength:
|
9
|
+
Max: 100
|
10
|
+
|
11
|
+
Naming/FileName:
|
12
|
+
Exclude: [lib/meta-rails.rb]
|
13
|
+
|
14
|
+
Metrics/BlockLength:
|
15
|
+
IgnoredMethods: [RSpec.describe, describe, context]
|
16
|
+
|
17
|
+
Style/Documentation:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Style/FrozenStringLiteralComment:
|
21
|
+
EnforcedStyle: never
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,18 @@
|
|
1
|
-
|
1
|
+
# [2.0.0](https://github.com/rubysamurai/meta-rails/compare/v1.0.0...v2.0.0) (2020-12-16)
|
2
|
+
|
3
|
+
- Rails versioning: drop support for rails < 6.0
|
4
|
+
|
5
|
+
# [1.0.0](https://github.com/rubysamurai/meta-rails/compare/v0.1.1...v1.0.0) (2018-05-11)
|
2
6
|
|
3
7
|
- New: `meta_description` helper
|
4
8
|
- New: `robots` helper
|
5
9
|
- Changed: `:page_title` renamed to `:identifer` for `title` helper
|
6
|
-
- Rails versioning:
|
10
|
+
- Rails versioning: drop support for rails < 5.0
|
7
11
|
|
8
|
-
|
12
|
+
# [0.1.1](https://github.com/rubysamurai/meta-rails/compare/v0.1.0...v0.1.1) (2015-11-16)
|
9
13
|
|
10
14
|
- Bug Fix: Brand display when page title is omitted
|
11
15
|
|
12
|
-
|
16
|
+
# 0.1.0 (2015-11-16)
|
13
17
|
|
14
18
|
- Initial release
|
data/Gemfile
CHANGED
@@ -2,5 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
if ENV['CI']
|
6
|
+
rails_version = ENV['RAILS_VERSION'] || '6.1'
|
7
|
+
eval_gemfile File.expand_path("../gemfiles/#{rails_version}.gemfile", __FILE__)
|
8
|
+
end
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Meta Rails
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/meta-rails.svg)](https://badge.fury.io/rb/meta-rails)
|
4
|
-
[![
|
4
|
+
[![CI](https://github.com/rubysamurai/meta-rails/workflows/CI/badge.svg)](https://github.com/rubysamurai/meta-rails/actions?query=workflow%3ACI)
|
5
5
|
|
6
6
|
Collection of view helpers to improve search engine optimization of Ruby on Rails application by including appropriate meta tags.
|
7
7
|
|
@@ -17,7 +17,7 @@ Save `Gemfile` and execute `bundle` command to install the gem.
|
|
17
17
|
|
18
18
|
## Title
|
19
19
|
|
20
|
-
Based on [
|
20
|
+
Based on [Google Help](https://support.google.com/webmasters/answer/35624#3) and [Moz](https://moz.com/learn/seo/title-tag) guidelines a proper title consist of *page title*, *brand name*, and *separator* between them.
|
21
21
|
|
22
22
|
#### How to use `title` helper
|
23
23
|
|
@@ -39,18 +39,18 @@ This code will create HTML `<title>` element:
|
|
39
39
|
<title>Sign up | AwesomeRailsApp</title>
|
40
40
|
```
|
41
41
|
|
42
|
-
Format of HTML `<title>` element can be modified by passing
|
42
|
+
Format of HTML `<title>` element can be modified by passing keyword arguments to `title` helper:
|
43
43
|
|
44
|
-
|
44
|
+
Argument | Description | Default
|
45
45
|
-------------|-----------------------------------------------|-----------
|
46
46
|
`:identifier`| Identifier for stored page's title | `:title`
|
47
|
-
`:brand` | Brand name | Rails.application.class.
|
47
|
+
`:brand` | Brand name | Rails.application.class.module_parent_name
|
48
48
|
`:separator` | Character between title and brand | `\|`
|
49
49
|
`:reverse` | Switch position of title and brand | `false`
|
50
50
|
|
51
51
|
## Meta description
|
52
52
|
|
53
|
-
Meta description tag provides a short summary of the page.
|
53
|
+
Meta description tag provides a short summary of the page (refer to [this](https://support.google.com/webmasters/answer/35624?hl=en&ref_topic=6001942#1) and [this](https://moz.com/learn/seo/meta-description) articles for details).
|
54
54
|
|
55
55
|
#### How to use `meta_description` helper
|
56
56
|
|
@@ -72,15 +72,15 @@ This code will create HTML `<meta>` tag:
|
|
72
72
|
<meta name="description" content="Register to manage your account" />
|
73
73
|
```
|
74
74
|
|
75
|
-
|
75
|
+
Keyword arguments can be passed to `meta_description` helper:
|
76
76
|
|
77
|
-
|
77
|
+
Argument | Description | Default
|
78
78
|
-------------|-----------------------------------------------|-----------
|
79
79
|
`:identifier`| Identifier for stored page's meta description | `:meta_description`
|
80
80
|
|
81
81
|
## Robots
|
82
82
|
|
83
|
-
Robots meta tag can control the behavior of search engine crawling and indexing.
|
83
|
+
Robots meta tag can control the behavior of search engine crawling and indexing (refer to [this](https://developers.google.com/search/reference/robots_meta_tag) and [this](https://moz.com/learn/seo/robots-meta-directives) articles for details).
|
84
84
|
|
85
85
|
#### How to use `robots` helper
|
86
86
|
|
@@ -102,9 +102,9 @@ This code will create HTML `<meta>` tag:
|
|
102
102
|
<meta name="robots" content="noindex,nofollow" />
|
103
103
|
```
|
104
104
|
|
105
|
-
|
105
|
+
Keyword arguments can be passed to `robots` helper:
|
106
106
|
|
107
|
-
|
107
|
+
Argument | Description | Default
|
108
108
|
-------------|------------------------------------------------|-----------
|
109
109
|
`:identifier`| Identifier for stored page's robots directives | `:robots`
|
110
110
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -7,8 +7,8 @@ require 'meta-rails'
|
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
9
|
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require
|
10
|
+
# require 'pry'
|
11
11
|
# Pry.start
|
12
12
|
|
13
13
|
require 'irb'
|
14
|
-
IRB.start
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
gem 'railties', '~> 6.0.0'
|
@@ -0,0 +1 @@
|
|
1
|
+
gem 'railties', '~> 6.1.0'
|
data/lib/meta-rails.rb
CHANGED
data/lib/meta/rails/railtie.rb
CHANGED
data/lib/meta/rails/version.rb
CHANGED
data/meta-rails.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require 'meta/rails/version'
|
1
|
+
require_relative 'lib/meta/rails/version'
|
4
2
|
|
5
3
|
Gem::Specification.new do |spec|
|
6
4
|
spec.name = 'meta-rails'
|
@@ -8,19 +6,26 @@ Gem::Specification.new do |spec|
|
|
8
6
|
spec.authors = ['Dmitriy Tarasov']
|
9
7
|
spec.email = ['info@rubysamurai.com']
|
10
8
|
|
11
|
-
spec.summary = 'Meta tags helpers for search engine optimization
|
12
|
-
spec.description =
|
9
|
+
spec.summary = 'Meta tags helpers for search engine optimization of Rails application'
|
10
|
+
spec.description = spec.summary
|
13
11
|
spec.homepage = 'https://github.com/rubysamurai/meta-rails'
|
14
12
|
spec.license = 'MIT'
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
15
14
|
|
16
|
-
spec.
|
17
|
-
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
17
|
+
spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
|
18
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
19
|
+
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
22
|
end
|
23
|
+
|
19
24
|
spec.bindir = 'exe'
|
20
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
26
|
spec.require_paths = ['lib']
|
22
27
|
|
23
|
-
spec.
|
28
|
+
spec.add_runtime_dependency 'railties', '>= 6.0'
|
24
29
|
|
25
|
-
spec.add_development_dependency 'rspec-rails', '>= 3.
|
30
|
+
spec.add_development_dependency 'rspec-rails', '>= 3.9'
|
26
31
|
end
|
metadata
CHANGED
@@ -1,40 +1,54 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Tarasov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '6.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec-rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
33
|
+
version: '3.9'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
27
|
-
description: Meta tags helpers
|
28
|
-
application
|
40
|
+
version: '3.9'
|
41
|
+
description: Meta tags helpers for search engine optimization of Rails application
|
29
42
|
email:
|
30
43
|
- info@rubysamurai.com
|
31
44
|
executables: []
|
32
45
|
extensions: []
|
33
46
|
extra_rdoc_files: []
|
34
47
|
files:
|
48
|
+
- ".github/workflows/ci.yml"
|
35
49
|
- ".gitignore"
|
36
50
|
- ".rspec"
|
37
|
-
- ".
|
51
|
+
- ".rubocop.yml"
|
38
52
|
- CHANGELOG.md
|
39
53
|
- Gemfile
|
40
54
|
- LICENSE.txt
|
@@ -42,10 +56,8 @@ files:
|
|
42
56
|
- Rakefile
|
43
57
|
- bin/console
|
44
58
|
- bin/setup
|
45
|
-
- gemfiles/
|
46
|
-
- gemfiles/
|
47
|
-
- gemfiles/5.1.gemfile
|
48
|
-
- gemfiles/5.2.gemfile
|
59
|
+
- gemfiles/6.0.gemfile
|
60
|
+
- gemfiles/6.1.gemfile
|
49
61
|
- lib/meta-rails.rb
|
50
62
|
- lib/meta/rails/helpers/meta_description_helper.rb
|
51
63
|
- lib/meta/rails/helpers/robots_helper.rb
|
@@ -56,7 +68,11 @@ files:
|
|
56
68
|
homepage: https://github.com/rubysamurai/meta-rails
|
57
69
|
licenses:
|
58
70
|
- MIT
|
59
|
-
metadata:
|
71
|
+
metadata:
|
72
|
+
homepage_uri: https://github.com/rubysamurai/meta-rails
|
73
|
+
source_code_uri: https://github.com/rubysamurai/meta-rails
|
74
|
+
bug_tracker_uri: https://github.com/rubysamurai/meta-rails/issues
|
75
|
+
changelog_uri: https://github.com/rubysamurai/meta-rails/blob/master/CHANGELOG.md
|
60
76
|
post_install_message:
|
61
77
|
rdoc_options: []
|
62
78
|
require_paths:
|
@@ -65,16 +81,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
81
|
requirements:
|
66
82
|
- - ">="
|
67
83
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
84
|
+
version: 2.5.0
|
69
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
86
|
requirements:
|
71
87
|
- - ">="
|
72
88
|
- !ruby/object:Gem::Version
|
73
89
|
version: '0'
|
74
90
|
requirements: []
|
75
|
-
|
76
|
-
rubygems_version: 2.7.6
|
91
|
+
rubygems_version: 3.1.4
|
77
92
|
signing_key:
|
78
93
|
specification_version: 4
|
79
|
-
summary: Meta tags helpers for search engine optimization
|
94
|
+
summary: Meta tags helpers for search engine optimization of Rails application
|
80
95
|
test_files: []
|
data/.travis.yml
DELETED
data/gemfiles/4.2.gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gem 'rails', '~> 4.2.0'
|
data/gemfiles/5.0.gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gem 'rails', '~> 5.0.0'
|
data/gemfiles/5.1.gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gem 'rails', '~> 5.1.0'
|
data/gemfiles/5.2.gemfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
gem 'rails', '~> 5.2.0'
|