Sha256: e7f20a90b7478c4264bbe7eee887dabe226d9ced2af2903951e392c45762585a

Contents?: true

Size: 1.65 KB

Versions: 17

Compression:

Stored size: 1.65 KB

Contents

# frozen_string_literal: true

require 'concurrent/executor/fixed_thread_pool'
require 'concurrent/timer_task'
require 'cancancan'
require 'ar_lazy_preload'
require 'js_regex'
require 'fugit'
require 'csv'
require 'active_record/filter'
require 'audited'
require 'uri'
require 'net/http'
require 'net/https'

module Motor
  PATH = Pathname.new(__dir__)

  module_function

  def reload!
    Kernel.silence_warnings do
      Dir[PATH.join('./motor/**/*.rb')].each do |f|
        next if f.ends_with?('alerts/scheduler.rb')
        next if f.ends_with?('alerts/scheduled_alerts_cache.rb')
        next if f.ends_with?('configs/load_from_cache.rb')
        next if f.ends_with?('configs/sync_from_file.rb')
        next if f.ends_with?('resources/custom_sql_columns_cache.rb')

        load f
      end
    end

    true
  end

  def server?
    defined?(::Rails::Server) ||
      defined?(::Thin::Server) ||
      defined?(::PhusionPassenger) ||
      (defined?(::Puma) && File.basename($PROGRAM_NAME) == 'puma') ||
      defined?(::Unicorn::HttpServer) ||
      defined?(::Mongrel::HttpServer) ||
      defined?(JRuby::Rack::VERSION) ||
      defined?(::Trinidad::Server)
  end

  def development?
    ENV['MOTOR_DEVELOPMENT'].present?
  end
end

require 'motor/version'
require 'motor/admin'
require 'motor/assets'
require 'motor/active_record_utils'
require 'motor/cancan_utils'
require 'motor/build_schema'
require 'motor/api_query'
require 'motor/tags'
require 'motor/configs'
require 'motor/queries'
require 'motor/dashboards'
require 'motor/forms'
require 'motor/alerts'
require 'motor/resources'
require 'motor/hash_serializer'
require 'motor/net_http_utils'
require 'motor/railtie'

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
motor-admin-0.2.1 lib/motor.rb
motor-admin-0.2.0 lib/motor.rb
motor-admin-0.1.104 lib/motor.rb
motor-admin-0.1.103 lib/motor.rb
motor-admin-0.1.102 lib/motor.rb
motor-admin-0.1.101 lib/motor.rb
motor-admin-0.1.100 lib/motor.rb
motor-admin-0.1.99 lib/motor.rb
motor-admin-0.1.98 lib/motor.rb
motor-admin-0.1.97 lib/motor.rb
motor-admin-0.1.96 lib/motor.rb
motor-admin-0.1.93 lib/motor.rb
motor-admin-0.1.92 lib/motor.rb
motor-admin-0.1.91 lib/motor.rb
motor-admin-0.1.90 lib/motor.rb
motor-admin-0.1.89 lib/motor.rb
motor-admin-0.1.88 lib/motor.rb