arkaan 1.2.2 → 1.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.
- checksums.yaml +4 -4
- data/lib/arkaan.rb +1 -0
- data/lib/arkaan/utils/controller_without_filter.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e637cb5e1fa056c3f4f089a1401b042739c67cd
|
4
|
+
data.tar.gz: 6500cf515bebc7ebc61a96efa85e32a3c245e694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e56ea3ee40a4fe14a0ae85c61f504b6814558358200ad0eab1bf13e5dc618f53483e0b7e2c3046f22d8cb62f0ef5daa3120ed65ddac4a43ae3d5e2d798d8a4c5
|
7
|
+
data.tar.gz: 30850da655321af49f4cc6390b15b1d033972514d065fec69d7cf9412f2caeed2a81a95ce20dfaf0f4f4ba1ed32ed151ee7d8b61afc894b9a5d550d3668a1436
|
data/lib/arkaan.rb
CHANGED
@@ -4,6 +4,11 @@ module Arkaan
|
|
4
4
|
# @author Vincent Courtois <courtois.vincenet@outlook.com>
|
5
5
|
class ControllerWithoutFilter < Sinatra::Base
|
6
6
|
register Sinatra::ConfigFile
|
7
|
+
helpers Sinatra::CustomLogger
|
8
|
+
|
9
|
+
configure do
|
10
|
+
set :logger, Logger.new(STDOUT)
|
11
|
+
end
|
7
12
|
|
8
13
|
# Creates a premium route whithin the Sinatra application, and registers it in the database if it does not already exists.
|
9
14
|
# @param verb [String] the HTTP method used to create this route.
|
@@ -129,6 +134,7 @@ module Arkaan
|
|
129
134
|
def custom_error(status, path)
|
130
135
|
route, field, error = path.split('.')
|
131
136
|
docs = settings.errors[route][field][error] rescue ''
|
137
|
+
logger.info("Http error raised | Status #{status} | Error #{path}")
|
132
138
|
halt status, {status: status, field: field, error: error, docs: docs}.to_json
|
133
139
|
end
|
134
140
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arkaan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|