lib/lecter.rb in lecter-0.1.6 vs lib/lecter.rb in lecter-0.2.0

- old
+ new

@@ -1,15 +1,19 @@ -require 'lecter/version' -require 'lecter/engine' +# frozen_string_literal: true + +require 'lecter/engine' if defined?(Rails::Engine) +require 'lecter/formatter_payload' +require 'lecter/html_generator' +require 'lecter/html_row' require 'lecter/rack' +require 'lecter/railtie' if defined?(Rails::Railtie) +require 'lecter/requester' +require 'lecter/version' +require 'lecter/trace_point' +require 'lecter/formatter_headers' -module Lecter - # autoload :Rack, 'lecter/rack' +require 'rest-client' - if defined? Rails::Railtie - class LecterRailtie < Rails::Railtie - initializer 'lecter.configure_rails_initialization' do |app| - app.middleware.use Lecter::Rack - end - end - end +module Lecter + AVAILABLE_METHODS = %w[GET POST PUT PATCH DELETE].freeze + DEFAULT_METHOD = 'GET' end