lib/diffend/monitor.rb in diffend-monitor-0.2.28 vs lib/diffend/monitor.rb in diffend-monitor-0.2.30
- old
+ new
@@ -1,30 +1,36 @@
# frozen_string_literal: true
+ENV['DIFFEND_ENV'] ||= 'development'
+
%w[
- build_bundler_definition
+ version
errors
+ build_bundler_definition
+ commands
+ config
config/fetcher
config/file_finder
config/validator
- commands
handle_errors/messages
handle_errors/build_exception_payload
handle_errors/display_to_stdout
handle_errors/report
request_object
request
- voting
+ local_context/diffend
+ local_context/host
+ local_context/packages
+ local_context/platform
+ local_context
+ request_verdict
+ execute
track
].each { |file| require "diffend/#{file}" }
-%w[
- versions/local
- versions/remote
-].each { |file| require "diffend/voting/#{file}" }
+return if ENV['DIFFEND_ENV'].strip.empty?
+return if %w[development test].include?(ENV['DIFFEND_ENV'])
-unless %w[development test].include?(ENV['DIFFEND_ENV'])
- Thread.new do
- track = Diffend::Track.new
- track.start
- end
+Thread.new do
+ track = Diffend::Track.new
+ track.start
end