dredd_hooks 0.1.1 → 0.1.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: a053aa22ae9a5515042f3d258b6a4ad62fda4b5c
4
- data.tar.gz: de2676e3720cf60c5c71f796e6506f30ae323c13
3
+ metadata.gz: a92a3677b212c42894e91f4f52332c12cc5f8dc9
4
+ data.tar.gz: 4eb9542e5187c3e5ced4e6a6e7aa1923c3835a15
5
5
  SHA512:
6
- metadata.gz: 1112b01c62492ac39a2b496a010db74b6171b0dde1822cbd7725dbfd1e3f4d966056e07227f914602eb1df2d418b0639e8af86cb436a64f150c7bc171d61bf73
7
- data.tar.gz: 20413fcb50881c35f4c3fc90d0602e5ce647443f552f0b19e01b4328ce8200f2f01f70dbad3b93160e860820fb9aef2f002471a956a4705cd7ca3941ffbd8f5d
6
+ metadata.gz: 832cbd3102e32808502b2d207054d78042eb8caabfd8520b7b908222d671223f0888365c62a136985cc0e7f4d57dd6edf33cf166df741c5edb89b880849399ed
7
+ data.tar.gz: 6152e36abfc6c65d7df76a4d0b8df3166b0965bcb37e9f375ad2bbe5ff7a2d1c7508fcc34209e3cec4f6640703761c79de86850a0f76538af30993ff2f54d9f1
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.1.2] - 2016-12-30
7
+
8
+ ## Fixed
9
+
10
+ - Do not raise `UnknownHookError` when `NoMethodError` is raised inside of a hook block - @nicolasiensen
11
+
6
12
  ## [0.1.1] - 2016-11-13
7
13
 
8
14
  ### Added
@@ -35,6 +41,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
35
41
  The original [proof of concept][poc] was written by @netmilk.
36
42
 
37
43
 
44
+ [0.1.2]: https://github.com/apiaryio/dredd-hooks-ruby/compare/v0.1.1...v0.1.2
38
45
  [0.1.1]: https://github.com/apiaryio/dredd-hooks-ruby/compare/v0.1.0...v0.1.1
39
46
  [0.1.0]: https://github.com/apiaryio/dredd-hooks-ruby/compare/v0.0.1...v0.1.0
40
47
  [poc]: https://github.com/gonzalo-bulnes/dredd-rack/issues/7#issue-70936733
data/README.md CHANGED
@@ -21,7 +21,7 @@ Add the gem to your `Gemfile`:
21
21
  ```ruby
22
22
  # Gemfile
23
23
 
24
- gem 'dredd_hooks', '0.1.1' # see semver.org
24
+ gem 'dredd_hooks', '0.1.2' # see semver.org
25
25
  ```
26
26
 
27
27
  Usage
@@ -18,9 +18,10 @@ module DreddHooks
18
18
  def handle(event, transaction)
19
19
 
20
20
  events.fetch(event.to_sym, []).each do |hook_name|
21
- begin
22
- transaction = runner.send("run_#{hook_name}_hooks_for_transaction", transaction)
23
- rescue NoMethodError
21
+ method_name = "run_#{hook_name}_hooks_for_transaction"
22
+ if runner.respond_to?(method_name)
23
+ transaction = runner.send(method_name, transaction)
24
+ else
24
25
  raise UnknownHookError.new(hook_name)
25
26
  end
26
27
  end
@@ -30,4 +31,3 @@ module DreddHooks
30
31
  end
31
32
  end
32
33
  end
33
-
@@ -1,3 +1,3 @@
1
1
  module DreddHooks
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dredd_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Kliment
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-13 00:00:00.000000000 Z
12
+ date: 2016-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aruba