Sutto-perennial 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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__(1)
20
+ parent_folder = File.expand_path(File.dirname(__DIR__(0)))
21
21
  Settings.library_root = parent_folder
22
- attempt_require parent_folder / 'core_ext', parent_folder / 'exceptions'
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
@@ -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
@@ -8,7 +8,7 @@ require 'perennial/exceptions'
8
8
 
9
9
  module Perennial
10
10
 
11
- VERSION = "0.2.1"
11
+ VERSION = "0.2.2"
12
12
 
13
13
  has_libary :dispatchable, :hookable, :loader, :logger,
14
14
  :loggable, :manifest, :settings, :argument_parser,
data/templates/boot.erb CHANGED
@@ -1,2 +1,2 @@
1
- require <%= @application_name.to_s.inspect %>
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Sutto-perennial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darcy Laycock