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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cca4156d3e447dabe92f0f1222262b71beaa0ee
4
- data.tar.gz: d652b1db49cb1783835bb86e84ab57aad2d5e778
3
+ metadata.gz: 413579f8cf6a2901147f80da6e1d532ec42f3d63
4
+ data.tar.gz: da733e94e14ffac2505b91967e57a0c00564ad2a
5
5
  SHA512:
6
- metadata.gz: 6640ff41c07fa61ddf132544893b6448081888ee2ef127a58f6f12e9bd514e9b28ca5aff0202093acb3259df48be0c651b38793efaf05f67f3c42cd8779646fc
7
- data.tar.gz: 257974c75454e4ba30df304ff3152de46e2e362eb8579a61d68b7970c4ba850e78683ebee11df0225bb9c023aadc9835453ee7cd61da0e1f34998e458e90e926
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(test_mode: false)
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.
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.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois