scrivito_seo_page_extender 0.0.6 → 0.70.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helper/seo_page_extender_helper.rb +8 -4
- data/app/views/seo_page_extender/_canonical_link.html.erb +1 -1
- data/app/views/seo_page_extender/_open_graph_details.html.erb +1 -1
- data/app/views/seo_page_extender/_twitter_cards_details.html.erb +1 -1
- data/app/views/seo_page_extender/_word_density.html.erb +1 -1
- data/lib/scrivito_seo_page_extender/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e38385fedf74590633143e0307b351bf8177249
|
4
|
+
data.tar.gz: 8f0662691b5ff5d1cb3c33636278666cf5a7c84c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 326a7bd896e96715c92472d1b9bedb441709741b444df5f928187e727fea8813bd5480d6863a2fbcad1c60ece2132c37cfad605595fcc54d5f106f96518fab5e
|
7
|
+
data.tar.gz: 0d42299d39c27c06f86f24b324edd01242d95a6df82ec77d6105b1cbf0cee7bb7c75374c01afb6f94270bc00cbb0bc4881d61ea9de0b4b1e830e1565c48b1f2c
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module SeoPageExtenderHelper
|
2
2
|
def words_density(obj, attribute)
|
3
|
-
words = get_words_from_page(obj, attribute).map { |e| e.downcase.gsub(/[^
|
3
|
+
words = get_words_from_page(obj, attribute).map { |e| e.downcase.gsub(/[^[:word:]\s]/, '') }
|
4
4
|
without_stop_words = remove_stop_words(words)
|
5
5
|
return {
|
6
6
|
count: without_stop_words.count,
|
@@ -28,7 +28,7 @@ module SeoPageExtenderHelper
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def remove_stop_words(density)
|
31
|
-
density.select {|e| !
|
31
|
+
density.select {|e| !stop_words_list.include? e}
|
32
32
|
end
|
33
33
|
|
34
34
|
def density_with_one_word(words)
|
@@ -43,7 +43,11 @@ module SeoPageExtenderHelper
|
|
43
43
|
return calulate_count_of_all_words(two_words).sort_by {|word,count| count}.reverse
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
|
46
|
+
def stop_words_list
|
47
|
+
if Obj.respond_to? 'stop_word_list'
|
48
|
+
Obj.stop_word_list
|
49
|
+
else
|
50
|
+
"a,able,about,across,after,all,almost,also,am,among,an,and,any,are,as,at,be,because,been,but,by,can,cannot,could,dear,did,do,does,either,else,ever,every,for,from,get,got,had,has,have,he,her,hers,him,his,how,however,i,if,in,into,is,it,its,just,least,let,like,likely,may,me,might,most,must,my,neither,no,nor,not,of,off,often,on,only,or,other,our,own,rather,said,say,says,she,should,since,so,some,than,that,the,their,them,then,there,these,they,this,tis,to,too,twas,us,wants,was,we,were,what,when,where,which,while,who,whom,why,will,with,would,yet,you,your".split(",")
|
51
|
+
end
|
48
52
|
end
|
49
53
|
end
|
@@ -1 +1 @@
|
|
1
|
-
<meta
|
1
|
+
<meta href="<%= canonical_link(@obj) %>" rel="canonical"/>
|
@@ -163,5 +163,5 @@
|
|
163
163
|
</div>
|
164
164
|
|
165
165
|
<div class="alert alert-info">
|
166
|
-
|
166
|
+
<a href="https://dev.twitter.com/cards/getting-started" target="_blank">More about Twitter cards</a>.
|
167
167
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% words = words_density(obj, attribute) %>
|
2
2
|
<h4>
|
3
|
-
<%= words[:count] %>good words on this page (words not in stop word list)
|
3
|
+
<%= words[:count] %> good words on this page (words not in stop word list)
|
4
4
|
</h4>
|
5
5
|
<ul class='tab-list'>
|
6
6
|
<li class='active' data-panel-target='#one-word'>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_seo_page_extender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.70.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|