Sha256: 345385bc5d5f7f1c44634eb77a32d6579b111ccbe447524fb4ab211715f88cc2

Contents?: true

Size: 456 Bytes

Versions: 5

Compression:

Stored size: 456 Bytes

Contents

require 'active_support'
require 'lhc/version'

module LHC
  class Request
    module UserAgentConcern
      extend ActiveSupport::Concern

      included do
        Typhoeus::Config.user_agent = begin
          version = LHC::VERSION
          application = defined?(Rails) ? Rails.application.class.parent_name : nil
          "LHC (#{[version, application].compact.join('; ')}) [https://github.com/local-ch/lhc]"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lhc-10.1.2 lib/lhc/concerns/lhc/request/user_agent_concern.rb
lhc-10.1.1 lib/lhc/concerns/lhc/request/user_agent_concern.rb
lhc-10.1.0 lib/lhc/concerns/lhc/request/user_agent_concern.rb
lhc-10.0.2 lib/lhc/concerns/lhc/request/user_agent_concern.rb
lhc-10.0.1 lib/lhc/concerns/lhc/request/user_agent_concern.rb