arkaan 0.8.13 → 0.8.14

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: 322dc038e57c83ed444731f3ce872764dcf2d2b6
4
- data.tar.gz: 81359044b199b30db67afbfcd4182a9352daf126
3
+ metadata.gz: a79841bf0726117debd62b451cfd9b427cfb2862
4
+ data.tar.gz: ecdcd43fbde0731d2fc8a44a9982c5f013d8bcc3
5
5
  SHA512:
6
- metadata.gz: 318e55d0c138f9af923633d0487365b0e362df2df0fc37f1dfb727f432ac0a30cc32e06967c5d7b767f9eef5007d7a573ea4c9612c5f9df8e55f0e46e63179cc
7
- data.tar.gz: 90af48c1eba840737fed44e9885b2a3fd003e3b955cfd2b15665c38971129b8255676049d0718d5fc4459db1025fcf82f00a7eade04f438a86b67df263f49cde
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.
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.13
4
+ version: 0.8.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois