scrivito_seo_page_extender 1.2.5 → 1.3.1

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: d0aee51d59178315c44ee2ce09ce98bfdbf48315
4
- data.tar.gz: 6513bbcfbb57be6953f2d554b3edbd7d708001aa
3
+ metadata.gz: fd346ac5fe379a8ec5cd0d29f486e38e9dc69577
4
+ data.tar.gz: d5b28b0bdfbecf4c30edfb690e3508a7af02b433
5
5
  SHA512:
6
- metadata.gz: 8d76d6abc74ca397d8e87a23dd237cc6169bc32dd9cb9a8f36359e52d58d2b375ca4ea862cdc297233f7b341a6dc17754227d74ea12cbbccb61f6ec4d1eafda3
7
- data.tar.gz: 65f6c6bcea887c5932371a288dfff684f836033896edf7a1a47755a3305d53b3183077b857c322697fd85690e2b9064123ed6b3effcc17d17f5e5a7de4bfbbbd
6
+ metadata.gz: 1ca05442caa5d1cc783f96b19c7983e66d3d47d28d471f4412acb270a666bfc1ba954830028b645586a430d99b120f57397402b2f935ba2cf4b945b4c883a893
7
+ data.tar.gz: aa900274e25b19ea3183430111ec92e5be6dd3cd5f482bc7cc8a3c17b817f139ae3fb9ed6aeaeb50b3eabda8fbeab4e855e6677113ade40224117581bca784c7
data/README.md CHANGED
@@ -157,15 +157,14 @@ ScrivitoSeoPageExtender.configure do |config|
157
157
  end
158
158
  ```
159
159
 
160
- You can overwrite the default attribute mapping depending on your app in the obj.rb with:
160
+ You can overwrite the default attribute mapping depending on your app in the obj.rb or define it on any obj class for diffenrent data sets:
161
161
 
162
162
  ```ruby
163
- def self.seo_attribute_mapping(obj)
163
+ def seo_attribute_mapping(obj)
164
164
  {
165
- og_title: obj.my_app_title,
166
- og_description: obj.my_app_description
167
- og_image: Obj.where(:title, :equals, 'Logo').first
168
- ...
165
+ og_title: obj.my_title,
166
+ og_description: obj.my_description,
167
+ og_image: obj.my_image
169
168
  }
170
169
  end
171
170
  ```
@@ -76,7 +76,8 @@ module SeoPageExtenderHelper
76
76
  end
77
77
 
78
78
  def seo_attribute_mapping(obj)
79
- return Obj.seo_attribute_mapping(obj) if Obj.respond_to?('seo_attribute_mapping')
79
+ return obj.seo_attribute_mapping(obj) if obj.respond_to?('seo_attribute_mapping')
80
+ return Obj.seo_attribute_mapping(obj) if Obj.respond_to?('seo_attribute_mapping') # deprecated
80
81
  {
81
82
  og_title: obj.send(:title).presence,
82
83
  og_description: obj.send(:meta_description).presence,
@@ -1,3 +1,3 @@
1
1
  module ScrivitoSeoPageExtender
2
- VERSION = "1.2.5"
2
+ VERSION = "1.3.1"
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: 1.2.5
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-09 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scrivito_sdk