arkaan 0.8.13 → 0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan/utils/controller.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a79841bf0726117debd62b451cfd9b427cfb2862
|
4
|
+
data.tar.gz: ecdcd43fbde0731d2fc8a44a9982c5f013d8bcc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 686a70be27d895fecb3c52711b1cca6061d4935bae7ece3bb2448c4803f6fc9e990e12eb8506ec95c596cdb67eba1f6a34bedaff1fe39800f2a96576a38bf458
|
7
|
+
data.tar.gz: bcf7c23ad40cf2b0a11ad77b862dfe3417b96a887109cd06200e1d49323b8135cbce192fbe7c9bcca3a33dcc204cfeda050589b6e2da40681650d075e886ad4e
|
@@ -58,6 +58,12 @@ module Arkaan
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
# Loads the errors configuration file from the config folder.
|
62
|
+
# @param file [String] send __FILE__
|
63
|
+
def self.load_errors_from(file)
|
64
|
+
config_file File.join(File.dirname(file), '..', 'config', 'errors.yml')
|
65
|
+
end
|
66
|
+
|
61
67
|
# Checks the presence of several fields given as parameters and halts the execution if it's not present.
|
62
68
|
# @param fields [Array<String>] an array of fields names to search in the parameters
|
63
69
|
def check_presence(*fields)
|
@@ -85,12 +91,6 @@ module Arkaan
|
|
85
91
|
return Arkaan::Monitoring::Route.where(verb: splitted.first.downcase, path: splitted.last).first
|
86
92
|
end
|
87
93
|
|
88
|
-
# Loads the errors configuration file from the config folder.
|
89
|
-
# @param file [String] send __FILE__
|
90
|
-
def load_errors_from(file)
|
91
|
-
config_file File.join(File.dirname(file), '..', 'config', 'errors.yml')
|
92
|
-
end
|
93
|
-
|
94
94
|
# Halts the application and creates the returned body from the parameters and the errors config file.
|
95
95
|
# @param status [Integer] the HTTP status to halt the application with.
|
96
96
|
# @param field [String] the value of the :value key in the returned JSON body, corresponding to the field in error.
|