arkaan 0.6.7 → 0.6.8
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/micro_service.rb +6 -3
- 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: 413579f8cf6a2901147f80da6e1d532ec42f3d63
|
4
|
+
data.tar.gz: da733e94e14ffac2505b91967e57a0c00564ad2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcfd54ab035079c9c89eccdce5ee0fd2bf4235e56e6815359f686d3ba05a70c66438d40ea8ce181863c92ed4b799e8040d77b026810ba9d028daf57afd41de0c
|
7
|
+
data.tar.gz: f48a8b98d12ce895b336e1d10a8b84e46125832fce721f9f4b07cb25c99e8f0788f80739d5dd770da00b24d68a8e4e554959ece2b03c48792b78d3c0776ade68
|
@@ -10,17 +10,19 @@ module Arkaan
|
|
10
10
|
|
11
11
|
attr_reader :name
|
12
12
|
|
13
|
+
attr_reader :test_mode
|
14
|
+
|
13
15
|
# loads the application by requiring the files from the folders they're supposed to be in.
|
14
16
|
# @param name [String] the snake-cased name of the application, for service registration purpose mainly.
|
15
17
|
# @param root [String]
|
16
|
-
def initialize(name:, root:)
|
17
|
-
@root = root
|
18
|
+
def initialize(name:, root:, test_mode: false)
|
19
|
+
@root = test_mode ? File.join(root, '..') : root
|
18
20
|
@name = name
|
19
21
|
end
|
20
22
|
|
21
23
|
# Loads the necessary components for the application by requiring the needed files.
|
22
24
|
# @param test_mode [Boolean] TRUE if the application i supposed to be launched from the spec_helper, FALSE otherwise.
|
23
|
-
def load
|
25
|
+
def load!
|
24
26
|
self.require_mongoid_config(root)
|
25
27
|
self.require_folder(root, 'decorators')
|
26
28
|
self.require_folder(root, 'controllers')
|
@@ -28,6 +30,7 @@ module Arkaan
|
|
28
30
|
self.require_folder(root, 'spec', 'support')
|
29
31
|
self.require_folder(root, 'spec', 'shared')
|
30
32
|
end
|
33
|
+
return self
|
31
34
|
end
|
32
35
|
|
33
36
|
# Creates the service instance if necessary, and returns it.
|