Sha256: df4b09ea8a7705db1ffc43f38fb406b998b16213f831b296bac720f8b33a6e42

Contents?: true

Size: 594 Bytes

Versions: 13

Compression:

Stored size: 594 Bytes

Contents

module RestFtpDaemon
  module ApiHelpers

    def log_request
      if env.nil?
        puts "HTTP_ENV_IS_NIL: #{env.inspect}"
        return
      end

      request_method = env['REQUEST_METHOD']
      request_path   = env['REQUEST_PATH']
      request_uri    = env['REQUEST_URI']
      log_info       "HTTP #{request_method} #{request_uri}", params
    end

    def get_censored_config
      config              = Conf.to_hash
      config[:users]      = Conf[:users].keys if Conf[:users]
      config[:endpoints]  = Conf[:endpoints].keys if Conf[:endpoints]
      config
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.423.2 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.423.1 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.423.0 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.422.0 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.421.1 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.421.0 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.420.2 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.420.1 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.410.5 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.410.4 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.410.2 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.410.1 lib/rest-ftp-daemon/helpers/api.rb
rest-ftp-daemon-0.410.0.pre.1 lib/rest-ftp-daemon/helpers/api.rb