Sha256: ca2b0156f1b4705a2a3c419ae2271ac42ca1878542ed7d6bff10054edf41d93a
Contents?: true
Size: 661 Bytes
Versions: 33
Compression:
Stored size: 661 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')) ? 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
33 entries across 33 versions & 1 rubygems