reviewed_braai 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module ReviewedBraai
5
5
  def initialize(source, options={})
6
6
  @data = source.data || {}
7
7
  @data['name'] ||= source.name
8
- @data['caption'] ||= source.caption
8
+ @data['caption'] ||= (source.caption || '')
9
9
 
10
10
  @type = source.type
11
11
  if @type == 'file'
@@ -1,4 +1,5 @@
1
1
  require 'reviewed_braai/handlers/base'
2
+ require 'reviewed_braai/handlers/default'
2
3
  require 'reviewed_braai/handlers/articles'
3
4
  require 'reviewed_braai/handlers/products'
4
5
  require 'reviewed_braai/handlers/attachments'
@@ -0,0 +1,10 @@
1
+ module ReviewedBraai
2
+ module Handlers
3
+ class Default < ReviewedBraai::Handlers::Base
4
+ def perform
5
+ attr = template.attributes[matches.last]
6
+ attr ? attr.to_s : "<!-- #{matches.last} -->"
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,4 @@
1
+ require 'reviewed_braai/matchers/default'
1
2
  require 'reviewed_braai/matchers/product'
2
3
  require 'reviewed_braai/matchers/attachment'
3
4
  require 'reviewed_braai/matchers/article'
@@ -0,0 +1,8 @@
1
+ module ReviewedBraai
2
+ module Matchers
3
+ module Default
4
+ # Overwrite default catch-all route (respects template variables)
5
+ Braai::Template.map(/({{\s*([\w]+)\s*}})/i, ReviewedBraai::Handlers::Default)
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module ReviewedBraai
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed_braai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-05 00:00:00.000000000 Z
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: braai
@@ -56,10 +56,12 @@ files:
56
56
  - lib/reviewed_braai/handlers/articles.rb
57
57
  - lib/reviewed_braai/handlers/attachments.rb
58
58
  - lib/reviewed_braai/handlers/base.rb
59
+ - lib/reviewed_braai/handlers/default.rb
59
60
  - lib/reviewed_braai/handlers/products.rb
60
61
  - lib/reviewed_braai/helpers.rb
61
62
  - lib/reviewed_braai/matchers/article.rb
62
63
  - lib/reviewed_braai/matchers/attachment.rb
64
+ - lib/reviewed_braai/matchers/default.rb
63
65
  - lib/reviewed_braai/matchers/product.rb
64
66
  - lib/reviewed_braai/matchers.rb
65
67
  - lib/reviewed_braai/templates/brightcove_video.html