Sha256: 065706b5ee3a17df6d443efc021ca117bf2b36f5a887638580bb4d96c2e99f28
Contents?: true
Size: 665 Bytes
Versions: 2
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true 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 = nil if defined?(Rails) app_class = Rails.application.class application = (ActiveSupport.gem_version >= Gem::Version.new('6.0.0.rc2')) ? app_class.module_parent_name : app_class.parent_name end "LHC (#{[version, application].compact.join('; ')}) [https://github.com/local-ch/lhc]" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lhc-10.5.3 | lib/lhc/concerns/lhc/request/user_agent_concern.rb |
lhc-10.5.2 | lib/lhc/concerns/lhc/request/user_agent_concern.rb |