Sha256: 2a3463e77f5368102a748bae8b14093da03930ef0d90f2da2f139b4b4b157fe2

Contents?: true

Size: 854 Bytes

Versions: 17

Compression:

Stored size: 854 Bytes

Contents

# Load gem files
# load_path_libs = File.expand_path(File.join(File.dirname(__FILE__), "lib"))
load_path_libs = File.expand_path "lib", File.dirname(__FILE__)
$LOAD_PATH.unshift(load_path_libs) unless $LOAD_PATH.include?(load_path_libs)
require "rest-ftp-daemon"

# Rack authent
unless Conf[:adminpwd].nil?
  use Rack::Auth::Basic, "Restricted Area" do |username, password|
    [username, password] == ["admin", Conf[:adminpwd]]
  end
end

# Serve static assets
use Rack::Static, root: "#{Conf.app_libs}/static/", urls: [
  "/css/",
  "/js/",
  "/fonts/",
  "/images/",
  "/swagger/",
  MOUNT_SWAGGER_UI,
  ]

# Rack reloader and mini-profiler
unless Conf.app_env == "production"
  # use Rack::Reloader, 1
  # use Rack::MiniProfiler
end

# Initialize workers
RestFtpDaemon::WorkerPool.instance.start_em_all

# Launch the API
run RestFtpDaemon::API::Root

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.424.3 config.ru
rest-ftp-daemon-0.424.2 config.ru
rest-ftp-daemon-0.424.0 config.ru
rest-ftp-daemon-0.423.3 config.ru
rest-ftp-daemon-0.423.2 config.ru
rest-ftp-daemon-0.423.1 config.ru
rest-ftp-daemon-0.423.0 config.ru
rest-ftp-daemon-0.422.0 config.ru
rest-ftp-daemon-0.421.1 config.ru
rest-ftp-daemon-0.421.0 config.ru
rest-ftp-daemon-0.420.2 config.ru
rest-ftp-daemon-0.420.1 config.ru
rest-ftp-daemon-0.410.5 config.ru
rest-ftp-daemon-0.410.4 config.ru
rest-ftp-daemon-0.410.2 config.ru
rest-ftp-daemon-0.410.1 config.ru
rest-ftp-daemon-0.410.0.pre.1 config.ru