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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d1ccbb336260d4af58b0017b72986acc31909df
4
- data.tar.gz: fc35d23099864dca292495477ca2ce6f2fa67235
3
+ metadata.gz: 6e38385fedf74590633143e0307b351bf8177249
4
+ data.tar.gz: 8f0662691b5ff5d1cb3c33636278666cf5a7c84c
5
5
  SHA512:
6
- metadata.gz: 15a7ad578fd6fe0b7937373927f6b732d28f5b194fc7e6dd86d4477e7f1b861446ad736b0ff1e7073d601d35e418d46b488bfed66a64b74248326ab4d3e86a26
7
- data.tar.gz: b3505deb666b8283dc37776992d48556910d6e6fbdb610b4424298f9abfb8860c015cf233cf33d3a452f7cf0524e3fed3112d60e6c8600d42a94acb61194ed78
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(/[^a-z0-9\s]/i, '') }
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| !stop_words_fallback.include? 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 stop_words_fallback
47
- "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(",")
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 content="<%= canonical_link(@obj) %>" name="canonical"/>
1
+ <meta href="<%= canonical_link(@obj) %>" rel="canonical"/>
@@ -43,5 +43,5 @@
43
43
  <% end %>
44
44
 
45
45
  <div class="alert alert-info">
46
- More informations about open graph and the attributes can be <a href="http://ogp.me/" target="_blank">found here</a>.
46
+ <a href="http://ogp.me/" target="_blank">More about Open Graph</a>.
47
47
  </div>
@@ -163,5 +163,5 @@
163
163
  </div>
164
164
 
165
165
  <div class="alert alert-info">
166
- More informations about twitter cards and the attributes can be <a href="https://dev.twitter.com/cards/getting-started" target="_blank">found here</a>.
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'>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoSeoPageExtender
2
- VERSION = "0.0.6"
2
+ VERSION = "0.70.0"
3
3
  end
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.6
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-07-29 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler