Sutto-perennial 0.2.1 → 0.2.2
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.
- data/lib/perennial/manifest.rb +3 -2
- data/lib/perennial/settings.rb +2 -2
- data/lib/perennial.rb +1 -1
- data/templates/boot.erb +2 -2
- metadata +1 -1
data/lib/perennial/manifest.rb
CHANGED
@@ -17,9 +17,10 @@ module Perennial
|
|
17
17
|
def manifest(&blk)
|
18
18
|
Manifest.namespace = self
|
19
19
|
Manifest.app_name = self.name.to_s.underscore
|
20
|
-
parent_folder = __DIR__(
|
20
|
+
parent_folder = File.expand_path(File.dirname(__DIR__(0)))
|
21
21
|
Settings.library_root = parent_folder
|
22
|
-
|
22
|
+
libary_folder = parent_folder / 'lib'/ Manifest.app_name
|
23
|
+
attempt_require((libary_folder / 'core_ext'), (libary_folder / 'exceptions'))
|
23
24
|
unless blk.nil?
|
24
25
|
args = []
|
25
26
|
args << Manifest if blk.arity != 0
|
data/lib/perennial/settings.rb
CHANGED
@@ -20,7 +20,7 @@ module Perennial
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def root=(path)
|
23
|
-
@@root = path.to_str
|
23
|
+
@@root = File.expand_path(path.to_str)
|
24
24
|
end
|
25
25
|
|
26
26
|
def root
|
@@ -28,7 +28,7 @@ module Perennial
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def library_root=(path)
|
31
|
-
@@library_root = path.to_str
|
31
|
+
@@library_root = File.expand_path(path.to_str)
|
32
32
|
end
|
33
33
|
|
34
34
|
def library_root
|
data/lib/perennial.rb
CHANGED
data/templates/boot.erb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require <%= @
|
2
|
-
<%= @application_module %>::Settings.root = Pathname.new(__FILE__).join("..").expand_path
|
1
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', <%= @application_path.to_s.inspect %>)
|
2
|
+
<%= @application_module %>::Settings.root = Pathname.new(__FILE__).dirname.join("..").expand_path
|