diligence 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af04bb95da66aee518f216fd95033f86185c32246b794e3b25e07aeb44462ab2
4
- data.tar.gz: 39b8888a8101c1f49eb31ab02dd521a94cac630f4863de057a901e1d07264a91
3
+ metadata.gz: 1ed4cc3b25ecae544fa5e40ed881cfec7277ecf383b2f9c3325b100ed1764433
4
+ data.tar.gz: 80e3036f9ade073c96d0ff715f3cf94c5b4b5965d1dac75b71295a1b5d74f952
5
5
  SHA512:
6
- metadata.gz: 878f87d4ec90f30669578e766f95c56991cb04de5c94a551806d5761402bd001dbe92578a2dc9935d25751bde60e80121de576976c2d1ee006b57895d90eb77b
7
- data.tar.gz: c7e4ddc583cd7ff8220323a153dccba4cfa99eea9706abf3de7e5b8f12652d7f29d4a55f454421fd7ac7ab12b3d4c743a92fb836a264a212aed225043152aab6
6
+ metadata.gz: b5a376060b667c0a80c45e77526f7178fad97a3cb14d2504af48125a8ed6586aa623c6c16f2a6058d93662846369fe901b12f2351f6777c6985e97ef0e85946c
7
+ data.tar.gz: af3c114add89608cb8d7f9262671a9d4e9cfd6a1ef664a303155543e98318f611612f524fe65b1887c69cd6ea555591742350b8fe72d0f837826634836737e86
@@ -1,9 +1,10 @@
1
1
  module Diligence
2
2
  class Application
3
- def initialize
3
+ def initialize(root_path)
4
+ @root_path = root_path
5
+
4
6
  @loader = Zeitwerk::Loader.new
5
- @loader.push_dir(File.expand_path('../../app', __dir__))
6
- @loader.push_dir(File.expand_path('..', __dir__))
7
+ @loader.push_dir(File.join(@root_path, 'app'))
7
8
  @loader.enable_reloading
8
9
  @loader.setup
9
10
 
@@ -33,7 +34,7 @@ module Diligence
33
34
  private
34
35
 
35
36
  def load_routes
36
- routes_path = File.expand_path('../../config/routes.rb', __dir__)
37
+ routes_path = File.join(@root_path, 'config', 'routes.rb')
37
38
  router = eval(File.read(routes_path))
38
39
  puts "Loaded #{router.routes.size} route(s)"
39
40
  router
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Diligence
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diligence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Levenkov