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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94f9e526dfd7aa11a9d103f9b1d39d93c724ab1c
4
- data.tar.gz: 606bcf3b0d470038dfaaed5142459ec9c8f2e0f4
3
+ metadata.gz: 7e637cb5e1fa056c3f4f089a1401b042739c67cd
4
+ data.tar.gz: 6500cf515bebc7ebc61a96efa85e32a3c245e694
5
5
  SHA512:
6
- metadata.gz: 0dcb37e5a1c65e6613e4596d0c19487387628b01494b0957dc81017a24407748244b2449719e2d93ad067f4a6a4441054874d872e4faf693fac2ffa0fc370f50
7
- data.tar.gz: b1ccc26cd9d60a8e76267f0d47f95a2b49d26abd2eeaf0bc76fe59f31ee7ce97cd5d225f87e0b571d1f44de3c4ef23e3c5559bb500643c36ae0afb4acdc42458
6
+ metadata.gz: e56ea3ee40a4fe14a0ae85c61f504b6814558358200ad0eab1bf13e5dc618f53483e0b7e2c3046f22d8cb62f0ef5daa3120ed65ddac4a43ae3d5e2d798d8a4c5
7
+ data.tar.gz: 30850da655321af49f4cc6390b15b1d033972514d065fec69d7cf9412f2caeed2a81a95ce20dfaf0f4f4ba1ed32ed151ee7d8b61afc894b9a5d550d3668a1436
@@ -6,6 +6,7 @@ require 'sinatra/config_file'
6
6
  require 'platform-api'
7
7
  require 'draper'
8
8
  require 'faraday'
9
+ require 'sinatra/custom_logger'
9
10
 
10
11
  # Main module of the application, holding all the subsequent classes.
11
12
  # @author Vincent Courtois <courtois.vincent@outlook.com>
@@ -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.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-09-30 00:00:00.000000000 Z
11
+ date: 2018-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec