Class: Itsi::Server::Config::AutoReloadConfig
- Inherits:
-
Option
- Object
- Option
- Itsi::Server::Config::AutoReloadConfig
show all
- Defined in:
- lib/itsi/server/config/options/auto_reload_config.rb
Class Method Summary
collapse
Instance Method Summary
collapse
included, #initialize, load_and_register, #normalize_keys!
Class Method Details
.option_name ⇒ Object
12
13
14
|
# File 'lib/itsi/server/config/options/auto_reload_config.rb', line 12
def self.option_name
:auto_reload_config!
end
|
Instance Method Details
#build! ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/itsi/server/config/options/auto_reload_config.rb', line 16
def build!
location.instance_eval do
return if @auto_reloading
if @included
@included.each do |file|
if ENV["BUNDLE_BIN_PATH"]
watch "#{file}.rb", [%w[bundle exec itsi restart]]
else
watch "#{file}.rb", [%w[itsi restart]]
end
end
end
@auto_reloading = true
if ENV["BUNDLE_BIN_PATH"]
watch "Itsi.rb", [%w[bundle exec itsi restart]]
else
watch "Itsi.rb", [%w[itsi restart]]
end
end
end
|