reviewed_braai 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWFiMGUyYzYwMTNlMjE0MmMxM2U3ZWRjNmFmY2ZjZTI2ZGVlNjEwMg==
5
+ data.tar.gz: !binary |-
6
+ ZTMxNGFkY2RkYjQ5MzE5YTE5YmJiN2I1Yzg2YjNiN2JjNjM1NmVjZA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ Y2I2ZTBmYmI2MWJiODhkZGJhNmI0MzlhMDMyZThjYzIxOTI3MGQ2YjhiNGJk
10
+ NjFlYWY0MGE1NTlhY2I4MzA0NDgyY2ZhNjE2NThjNTY5MDYzYTRlNzkxNDZm
11
+ OWZjZTg4MjU3N2U3MmI1OWE5NDMyNGI0NWJjM2I2NzU4NDBhMGU=
12
+ data.tar.gz: !binary |-
13
+ NDY5NDhmZjFhYzg5YzFiODU3NzljNGZmZWI5N2U2YmU4MGU3MjcxZGVhMGM4
14
+ YWZiNzgyMzM3OGM2ZmNjMDY3NmVlNGZlMjQ3NGFjNGNhMmFlNmNkNmM0NDFj
15
+ OWFmNmJmZjMzMmQxM2NlYWZkYWM3ZmVhYmJjNmFiMGEzZjYyZjQ=
@@ -29,6 +29,13 @@ module ReviewedBraai
29
29
  end
30
30
  end
31
31
 
32
+ class MatchNotFound < TagRenderError
33
+ def initialize(error={})
34
+ error = { error_message: "Braai Tag Match Not Found" }.merge!(error)
35
+ super(error)
36
+ end
37
+ end
38
+
32
39
  class SourceNotFound < TagRenderError
33
40
  def initialize(error={})
34
41
  error = { error_message: "Source Not Found" }.merge!(error)
@@ -1,5 +1,15 @@
1
1
  module ReviewedBraai
2
2
  module Handlers
3
+ class Default < ::Braai::Handlers::Default
4
+ def perform
5
+ if value = super
6
+ value
7
+ else
8
+ raise ::ReviewedBraai::TagRenderError::MatchNotFound.new(key: key)
9
+ end
10
+ end
11
+ end
12
+
3
13
  class DefaultRegion < ReviewedBraai::Handlers::Base
4
14
  def perform
5
15
  return nil unless matches[1] == matches[-1]
@@ -1,10 +1,13 @@
1
1
  module ReviewedBraai
2
2
  module Matchers
3
3
  module Default
4
+ Braai::Template.clear!
5
+ Braai::Template.map(Braai::Matchers::IterationMatcher, Braai::Handlers::Iteration)
6
+ Braai::Template.map(Braai::Matchers::DefaultMatcher, ReviewedBraai::Handlers::Default)
4
7
  Braai::Template.map(Braai::Matchers::RegionMatcher, ReviewedBraai::Handlers::DefaultRegion)
5
8
 
6
9
  Braai::Handlers.rescue_from ReviewedBraai::TagRenderError, ->(handler) do
7
- puts %{handler: #{handler.inspect}}
10
+ # puts %{handler: #{handler.inspect}}
8
11
  "<!-- #{handler.key} -->"
9
12
  end
10
13
  end
@@ -1,3 +1,3 @@
1
1
  module ReviewedBraai
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed_braai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
5
- prerelease:
4
+ version: 0.1.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kevin Incorvia
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-21 00:00:00.000000000 Z
11
+ date: 2013-03-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: braai
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -75,32 +70,25 @@ files:
75
70
  - README.rdoc
76
71
  homepage: http://www.reviewed.com
77
72
  licenses: []
73
+ metadata: {}
78
74
  post_install_message:
79
75
  rdoc_options: []
80
76
  require_paths:
81
77
  - lib
82
78
  required_ruby_version: !ruby/object:Gem::Requirement
83
- none: false
84
79
  requirements:
85
80
  - - ! '>='
86
81
  - !ruby/object:Gem::Version
87
82
  version: '0'
88
- segments:
89
- - 0
90
- hash: -4004920264242755957
91
83
  required_rubygems_version: !ruby/object:Gem::Requirement
92
- none: false
93
84
  requirements:
94
85
  - - ! '>='
95
86
  - !ruby/object:Gem::Version
96
87
  version: '0'
97
- segments:
98
- - 0
99
- hash: -4004920264242755957
100
88
  requirements: []
101
89
  rubyforge_project:
102
- rubygems_version: 1.8.25
90
+ rubygems_version: 2.0.0
103
91
  signing_key:
104
- specification_version: 3
92
+ specification_version: 4
105
93
  summary: Braai matchers for Reviewed.com
106
94
  test_files: []