fi_seo 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/LICENSE.txt +1 -1
- data/README.md +26 -9
- data/fi_seo.gemspec +6 -6
- data/lib/acts_as_seoable/version.rb +1 -1
- data/lib/fi_seo.rb +1 -1
- data/lib/generators/acts_as_seoable/migrate/migrate_generator.rb +20 -2
- data/lib/generators/acts_as_seoable/migrate/templates/{migration.rb → migration.erb} +1 -1
- metadata +12 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dafe48f7fa03b31b7de1446395510a5699c8842a9635ad72c465dc115e89dd0a
|
4
|
+
data.tar.gz: 192b67cb704a702be128d618cf36705c16284dd3c103ba073f9cf7df0db1eaa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4712349ec325ab202855b96aa2cbd479067de2bf61b5778047bfa299f5b2ac1c48037e373d1eb6f3f1e836e82a283444ea0d98ea8d2d95cadd932eef5b4384a
|
7
|
+
data.tar.gz: 7195f54ef2f2a67f4abf05813fb82653d13765f1f46dd8ac0d808bf7dd8a0f03437464c526219fd46f7e1a36fcef20cc5d7bc7bd3ed11d0ca222085ff381a43c
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fi_seo (0.1.
|
5
|
-
activerecord (
|
4
|
+
fi_seo (0.1.4)
|
5
|
+
activerecord (>= 5.0, < 6.1)
|
6
6
|
meta-tags (~> 2.13)
|
7
7
|
xml-sitemap (~> 1.3, >= 1.3.3)
|
8
8
|
|
@@ -82,7 +82,7 @@ PLATFORMS
|
|
82
82
|
ruby
|
83
83
|
|
84
84
|
DEPENDENCIES
|
85
|
-
activerecord (
|
85
|
+
activerecord (>= 5.0, < 6.1)
|
86
86
|
fi_seo!
|
87
87
|
meta-tags (~> 2.13)
|
88
88
|
rake (~> 12.0)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# FiSeo
|
2
2
|
|
3
|
-
This gem provides a easier solution to search engine optimization(SEO) in a
|
3
|
+
This gem provides a easier solution to search engine optimization(SEO) in a rails project. This will give you the seo capabilities to your static pages and dynamic pages alike with few lines of code.
|
4
4
|
Also site maps are essential to the SEO of your web application. So this gem gives that capabilities with a feature to integrate google analytics.
|
5
5
|
|
6
6
|
This gem currently integrate with the Active Admin for management of the gem. Dynamic pages and other settings also include with the integration.
|
@@ -33,7 +33,7 @@ And then execute:
|
|
33
33
|
|
34
34
|
After updating your bundle, run the migration as follows:
|
35
35
|
|
36
|
-
$ acts_as_seoable:migrate
|
36
|
+
$ rails g acts_as_seoable:migrate
|
37
37
|
$ rails db:migrate
|
38
38
|
|
39
39
|
## Usage
|
@@ -125,7 +125,7 @@ If the model has attributes for that you need to use for the seoable attributes
|
|
125
125
|
acts_as_seoable :title_seoable, :description, :keywords
|
126
126
|
|
127
127
|
def title_seoable
|
128
|
-
"#{self.name}#{self.id}"
|
128
|
+
"#{self.name}#{self.id}"
|
129
129
|
end
|
130
130
|
```
|
131
131
|
when you create a new record from this model the gem will create a corresponding seoable record as well. Above values will be set as default values.
|
@@ -171,6 +171,23 @@ def twitter_tags
|
|
171
171
|
end
|
172
172
|
```
|
173
173
|
|
174
|
+
For adding dynamic tags to frontend please add meta tags as follows:
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
# some_controller.rb
|
178
|
+
|
179
|
+
def show
|
180
|
+
@user = User.find(params[:id])
|
181
|
+
set_meta_tags @user
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
For adding dynamic meta tags for existing records please run following:
|
186
|
+
|
187
|
+
```ruby
|
188
|
+
Model.find_each(&:save)
|
189
|
+
```
|
190
|
+
|
174
191
|
### Sitemap
|
175
192
|
|
176
193
|
For sitemap you need to configure as follows:
|
@@ -206,20 +223,20 @@ There are few initializers and generators for this gem to help you to configure
|
|
206
223
|
|
207
224
|
Before using the gem you need to migrate the tables for gem to databalse. To get the migration run the following code:
|
208
225
|
```bash
|
209
|
-
$ acts_as_seoable:migrate
|
226
|
+
$ rails g acts_as_seoable:migrate
|
210
227
|
```
|
211
228
|
#### Gem Initializer
|
212
229
|
This initializer will give ability to set few social configuration and website name for seo and few other things.
|
213
230
|
Run the following code for to create initializer:
|
214
231
|
```bash
|
215
|
-
$ acts_as_seoable:install
|
232
|
+
$ rails g acts_as_seoable:install
|
216
233
|
```
|
217
234
|
#### Active Admin Page
|
218
235
|
*Only if you are using active admin*
|
219
236
|
|
220
237
|
To add SEO data to active admin you need to run following code. This will generate a admin page:
|
221
238
|
```bash
|
222
|
-
$ acts_as_seoable:admin
|
239
|
+
$ rails g acts_as_seoable:admin
|
223
240
|
```
|
224
241
|
|
225
242
|
#### Active Admin View Helper
|
@@ -227,7 +244,7 @@ $ acts_as_seoable:admin
|
|
227
244
|
|
228
245
|
To add active admin view helper you need to run following code. This will generate a **arb** file to add dynamic pages show and edit action:
|
229
246
|
```bash
|
230
|
-
$ acts_as_seoable:admin_view_helper
|
247
|
+
$ rails g acts_as_seoable:admin_view_helper
|
231
248
|
```
|
232
249
|
|
233
250
|
### Active Admin
|
@@ -297,7 +314,7 @@ Got a bug and you're not sure? You're sure you have a bug, but don't know what t
|
|
297
314
|
|
298
315
|
## Contributing
|
299
316
|
|
300
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
317
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Fidenz/fi_seo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Fidenz/fi_seo/blob/master/CODE_OF_CONDUCT.md).
|
301
318
|
|
302
319
|
|
303
320
|
## License
|
@@ -306,4 +323,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
306
323
|
|
307
324
|
## Code of Conduct
|
308
325
|
|
309
|
-
Everyone interacting in the FiSeo project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
326
|
+
Everyone interacting in the FiSeo project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Fidenz/fi_seo/blob/master/CODE_OF_CONDUCT.md).
|
data/fi_seo.gemspec
CHANGED
@@ -3,13 +3,13 @@ require_relative 'lib/acts_as_seoable/version'
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'fi_seo'
|
5
5
|
spec.version = FiSeo::VERSION
|
6
|
-
spec.authors = ['
|
7
|
-
spec.email = ['info@fidenz.com'
|
6
|
+
spec.authors = ['Fidenz']
|
7
|
+
spec.email = ['info@fidenz.com']
|
8
8
|
|
9
9
|
spec.summary = 'Flexible SEO solution for rails projects'
|
10
|
-
spec.description = 'This gem provides a easier solution to search engine optimization(SEO) in a
|
10
|
+
spec.description = 'This gem provides a easier solution to search engine optimization(SEO) in a rails project. This will give you the seo capabilities to your static pages and dynamic pages alike with few lines of code.
|
11
11
|
Also site maps are essential to the SEO of your web application. So this gem gives that capabilities with a feature to integrate google analytics.'
|
12
|
-
spec.homepage = 'https://github.com/
|
12
|
+
spec.homepage = 'https://github.com/Fidenz/fi_seo'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
15
15
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_runtime_dependency 'activerecord', '
|
27
|
-
spec.add_runtime_dependency
|
26
|
+
spec.add_runtime_dependency 'activerecord', '>= 5.0', '< 6.1'
|
27
|
+
spec.add_runtime_dependency 'meta-tags', '~> 2.13'
|
28
28
|
spec.add_runtime_dependency 'xml-sitemap', '~> 1.3', '>= 1.3.3'
|
29
29
|
end
|
data/lib/fi_seo.rb
CHANGED
@@ -159,7 +159,7 @@ module FiSeo
|
|
159
159
|
self.create_dynamic_seo_record
|
160
160
|
else
|
161
161
|
DynamicSeo.where(seoable_type: self.class.to_s).where(seoable_id: self.id)
|
162
|
-
.update_all(title: self.
|
162
|
+
.update_all(title: self.dynamic_seo.title, description: self.dynamic_seo.description, keywords: self.dynamic_seo.keywords)
|
163
163
|
end
|
164
164
|
end
|
165
165
|
end
|
@@ -14,8 +14,26 @@ module ActsAsSeoable
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def copy_migrations
|
17
|
-
migration_template 'migration.
|
18
|
-
'db/migrate/create_seo_tables.rb'
|
17
|
+
migration_template 'migration.erb',
|
18
|
+
'db/migrate/create_seo_tables.rb', migration_version: migration_version
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def migration_version
|
24
|
+
if rails5?
|
25
|
+
'[4.2]'
|
26
|
+
elsif rails6?
|
27
|
+
'[6.0]'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def rails5?
|
32
|
+
Rails.version.start_with? '5'
|
33
|
+
end
|
34
|
+
|
35
|
+
def rails6?
|
36
|
+
Rails.version.start_with? '6'
|
19
37
|
end
|
20
38
|
end
|
21
39
|
end
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fi_seo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Fidenz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.0'
|
20
|
-
- - "
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '5.0'
|
30
|
-
- - "
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: meta-tags
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -65,12 +65,10 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 1.3.3
|
67
67
|
description: |-
|
68
|
-
This gem provides a easier solution to search engine optimization(SEO) in a
|
68
|
+
This gem provides a easier solution to search engine optimization(SEO) in a rails project. This will give you the seo capabilities to your static pages and dynamic pages alike with few lines of code.
|
69
69
|
Also site maps are essential to the SEO of your web application. So this gem gives that capabilities with a feature to integrate google analytics.
|
70
70
|
email:
|
71
71
|
- info@fidenz.com
|
72
|
-
- tech@fidenz.com
|
73
|
-
- banura.r@fidenz.com
|
74
72
|
executables: []
|
75
73
|
extensions: []
|
76
74
|
extra_rdoc_files: []
|
@@ -109,12 +107,12 @@ files:
|
|
109
107
|
- lib/generators/acts_as_seoable/install/install_generator.rb
|
110
108
|
- lib/generators/acts_as_seoable/install/templates/initializer.rb
|
111
109
|
- lib/generators/acts_as_seoable/migrate/migrate_generator.rb
|
112
|
-
- lib/generators/acts_as_seoable/migrate/templates/migration.
|
110
|
+
- lib/generators/acts_as_seoable/migrate/templates/migration.erb
|
113
111
|
- screenshots/dynamic-pages-seoable.png
|
114
112
|
- screenshots/static-pages-seoable-details.png
|
115
113
|
- screenshots/static-pages-seoable-frontend.png
|
116
114
|
- screenshots/static-pages-seoable.png
|
117
|
-
homepage: https://github.com/
|
115
|
+
homepage: https://github.com/Fidenz/fi_seo
|
118
116
|
licenses:
|
119
117
|
- MIT
|
120
118
|
metadata: {}
|