showcase 0.2.0.beta.1 → 0.2.0.beta.2

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: f4aca093a1d07f54759affb83a82874a4258fe27
4
- data.tar.gz: 67868f88d0beb8c795dd29c6a8dc50204c723fab
3
+ metadata.gz: 0253c1910b10e27e923304bcc5bd1395bdafc39c
4
+ data.tar.gz: b8b43388b449c766905202aafa1f92260e10e369
5
5
  SHA512:
6
- metadata.gz: 6dcff3933067fde24764b43989f370c5fd36807626336d7e05690f8a61f78c3eb2afaba9e0274b8c064166db0b13a18aec896b27fe58a5cce5ef15d2c134c43f
7
- data.tar.gz: dcbca1fc34cf5b1d66c32fd766ff0c311379a144bd74b3d5b1bd2a611caedf50f4753ad10d6129f67410976311bb119f41cfa1f0226acfa7f98e7e61a6662231
6
+ metadata.gz: f2dae46e5e237003646b8b439d8a8757aebe87d234a6d3e202c7ad5967705b9775043dee73be6483b2ee7904f6b58936e627fd8f870ecaeb0f520f6287c5243a
7
+ data.tar.gz: 201d8408f682c934779956fb7db947aa83910afd4732aa769a7acb55caba019d166a81fd68504af2bce4913e3e663e4c9ab0510f6e298bc9a78201df6963d338
@@ -12,10 +12,13 @@ module Showcase
12
12
  def seo(name = nil, options = {}, &block)
13
13
  define_method? [name, :seo_tags] do |options = {}|
14
14
  meta = Helpers::ConfigObject.new(self, &block).to_hash
15
+ meta.merge!(options.symbolize_keys) if options
16
+
15
17
  builder = Helpers::SeoMetaBuilder.new(view_context)
16
18
  parts = %w(title description canonical_url image_url canonical_url).map(&:to_sym)
19
+
17
20
  parts.map do |tag|
18
- builder.send(tag, meta[tag], options) if meta[tag]
21
+ builder.send(tag, meta[tag], meta.except(*parts)) if meta[tag]
19
22
  end.compact.join.html_safe
20
23
  end
21
24
  end
@@ -1,4 +1,4 @@
1
1
  module Showcase
2
- VERSION = "0.2.0.beta.1"
2
+ VERSION = "0.2.0.beta.2"
3
3
  end
4
4
 
@@ -15,12 +15,14 @@ module Showcase::Traits
15
15
  seo do |c|
16
16
  c.title = 'foo'
17
17
  c.description 'bar'
18
+ c.title_suffix = ' - qux'
18
19
  end
19
20
  end
20
21
  }
21
22
 
22
23
  describe '#seo' do
23
- let(:options) { double('options') }
24
+ let(:options) { { title_suffix: ' - qux' } }
25
+
24
26
  before do
25
27
  Showcase::Helpers::SeoMetaBuilder.stub(:new).with(view).and_return(builder)
26
28
  builder.stub(:title).with('foo', options).and_return('<title>')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showcase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta.1
4
+ version: 0.2.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Verna