Sha256: aec2b7644e773859d1d4459038f7b194de8dff20e0c3886f6e3bb4fd60cb3eaa

Contents?: true

Size: 386 Bytes

Versions: 12

Compression:

Stored size: 386 Bytes

Contents

module LocalPac
  module App
    class FileServeController < ApplicationController

      get '/' do
        redirect to('/proxy.pac')
      end

      get '/:name' do
        content_type :proxy_pac_file

        file = local_storage.find(params[:name].to_s)
        fail Sinatra::NotFound, params[:name].to_s if file.nil?

        file.compressed_content 
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
local_pac-0.9.0 app/controllers/file_serve_controller.rb
local_pac-0.7.0 app/controllers/file_serve_controller.rb
local_pac-0.6.3 app/controllers/file_serve_controller.rb
local_pac-0.6.2 app/controllers/file_serve_controller.rb
local_pac-0.6.1 app/controllers/file_serve_controller.rb
local_pac-0.5.0 app/controllers/file_serve_controller.rb
local_pac-0.4.0 app/controllers/file_serve_controller.rb
local_pac-0.3.0 app/controllers/file_serve_controller.rb
local_pac-0.2.3 app/controllers/file_serve_controller.rb
local_pac-0.2.2 app/controllers/file_serve_controller.rb
local_pac-0.2.1 app/controllers/file_serve_controller.rb
local_pac-0.2.0 app/controllers/file_serve_controller.rb