arkaan 0.8.18 → 0.8.19

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: d798706312c3b3729c6ef04b71e8983bb12b7b07
4
- data.tar.gz: 84119f0138ebc4bb07ae27b61f17a9c9be323733
3
+ metadata.gz: 73448c0c0d62b62c3499a7f999cdae20858925c0
4
+ data.tar.gz: 65b33f52160c5680616e79a428a6abeabaac50f4
5
5
  SHA512:
6
- metadata.gz: f87d3059a16e6740444f55a454029e4c8ff74c3171bd2e06a3fba791784d881136f5b399ac0cffb2475feb205298e58c2328c4fdec26f6f6da73f601d65af460
7
- data.tar.gz: cf96cefcf9e7526fe304ffa76418acb82f900ccba9b0fe04cb646a3d48e1e190faaf43cb2211c83f43fbb26d87abb08815039a5e03d7c495cf5d37eab18f237d
6
+ metadata.gz: 9b5e8e58e32ff54f5b4210d126f5a95b8f255e25ef628cd3c75ed9753efbe5c3400953cd40b4ee4157856bff91ae024a792bfbb1c21109d1969d0d9869078c7f
7
+ data.tar.gz: d4c3e95652ebab22227f4809d506e75b2740907818be652daff89e9cb3f27e6639143a53f0fc2845ac264b682942047d7d5ab77399686eb3a93ecada4ad3ed22
@@ -13,11 +13,9 @@ module Arkaan
13
13
  @application = Arkaan::OAuth::Application.where(key: params['app_key']).first
14
14
 
15
15
  if gateway.nil?
16
- url = 'https://github.com/jdr-tools/arkaan/wiki/Errors#gateway-token-not-found'
17
- halt 404, {status: 404, field: 'token', error: 'unknown', docs: url}.to_json
16
+ custom_error(404, 'common.token.unknown')
18
17
  elsif @application.nil?
19
- url = 'https://github.com/jdr-tools/arkaan/wiki/Errors#application-key-not-found'
20
- halt 404, {status: 404, field: 'app_key', error: 'unknown', docs: url}.to_json
18
+ custom_error(404, 'common.app_key.unknown')
21
19
  end
22
20
  end
23
21
 
@@ -48,8 +46,7 @@ module Arkaan
48
46
  self.public_send(verb, path) do
49
47
  @sinatra_route = parse_current_route
50
48
  if !@application.premium?
51
- url = 'https://github.com/jdr-tools/arkaan/wiki/Errors#application-not-premium'
52
- halt 403, {status: 403, field: 'app_key', error: 'forbidden', docs: url}.to_json
49
+ custom_error(403, 'common.app_key.forbidden')
53
50
  end
54
51
  instance_eval(&block)
55
52
  end
@@ -104,8 +101,6 @@ module Arkaan
104
101
  field = messages.keys.first
105
102
  custom_error(400, "#{route}.#{field}.#{messages[field].first}")
106
103
  end
107
-
108
- load_errors_from __FILE__
109
104
  end
110
105
  end
111
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arkaan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.18
4
+ version: 0.8.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois