Module: Jets::Core
- Extended by:
- Memoist
- Included in:
- Jets
- Defined in:
- lib/jets/core.rb,
lib/jets/core/booter.rb
Defined Under Namespace
Modules: Config
Classes: Booter
Instance Method Summary
collapse
Instance Method Details
#aws ⇒ Object
delegate :aws, :autoloaders, :config, to: :application
#boot ⇒ Object
Load project and app config files
#bootstrap ⇒ Object
25
26
27
|
# File 'lib/jets/core.rb', line 25
def bootstrap
Config::Bootstrap.instance
end
|
#build_root ⇒ Object
50
51
52
53
|
# File 'lib/jets/core.rb', line 50
def build_root
root = ENV["JETS_BUILD_ROOT"] || "/tmp/jets"
"#{root}/#{Jets.project.namespace}".freeze
end
|
#deprecator ⇒ Object
60
61
62
|
# File 'lib/jets/core.rb', line 60
def deprecator @deprecator ||= ActiveSupport::Deprecation.new
end
|
#env ⇒ Object
11
12
13
14
|
# File 'lib/jets/core.rb', line 11
def env
env = ENV["JETS_ENV"] || "dev"
ActiveSupport::StringInquirer.new(env)
end
|
#error ⇒ Object
Returns the ActiveSupport::ErrorReporter of the current Jets project, otherwise it returns nil
if there is no project.
Jets.error.handle(IOError) do
end
Jets.error.report(error)
84
85
86
87
|
# File 'lib/jets/core.rb', line 84
def error
application && application.executor.error_reporter
end
|
17
18
19
|
# File 'lib/jets/core.rb', line 17
def
ENV["JETS_EXTRA"] unless ENV["JETS_EXTRA"].blank?
end
|
#logger ⇒ Object
46
47
48
|
# File 'lib/jets/core.rb', line 46
def logger
@logger ||= Jets.bootstrap.config.logger
end
|
#project ⇒ Object
21
22
23
|
# File 'lib/jets/core.rb', line 21
def project
Config::Project.instance
end
|
#report_exception(exception) ⇒ Object
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/jets/core.rb', line 64
def report_exception(exception)
if exception.respond_to?(:with_exception_reported?) && exception.with_exception_reported?
return
end
Jets.application.turbines.each do |turbine|
turbine.on_exception_blocks.each do |block|
block.call(exception)
end
end
end
|
#root ⇒ Object
4
5
6
7
8
|
# File 'lib/jets/core.rb', line 4
def root
root = ENV["JETS_ROOT"].to_s
root = Dir.pwd if root == ""
Pathname.new(root)
end
|
#shim ⇒ Object
29
30
31
|
# File 'lib/jets/core.rb', line 29
def shim
Jets::Shim
end
|