wd_sinatra 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Weasel Diesel Sinatra Changelog
2
2
 
3
+ ## 0.2.3
4
+
5
+ * Fixed the example of the `params_exception_handler` hook added in the
6
+ generated `hooks.rb` file.
7
+
8
+ ## 0.2.2
9
+
10
+ * Added a `params_exception_handler` hook to customize the rescue of an
11
+ exception being raised in the params processing phase.
12
+
3
13
  ## 0.2.1
4
14
 
5
15
  * fixed the content type on the param verification error message
@@ -1,5 +1,5 @@
1
1
  module WD
2
2
  module Sinatra
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -36,9 +36,9 @@ module WDSinatraHooks
36
36
  # exception message sent back as a json.
37
37
  #
38
38
  # @param [Exception] exception The exception that was rescued.
39
- # def pre_dispatch_hook(exception)
39
+ # def params_exception_handler(exception)
40
40
  # # example implementation:
41
- # # halt 400, {'Content-Type' => 'application/json'}, {:error => e.message}.to_json
41
+ # # halt 400, {'Content-Type' => 'application/json'}, {:error => exception.message}.to_json
42
42
  # end
43
43
 
44
44
  # This hook gets called after the params are being verified.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wd_sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: