From 66ee297a5b17e9b3aac13f8aa1cea78555ac6c82 Mon Sep 17 00:00:00 2001 From: Sean Reinhardt Date: Sat, 11 Apr 2020 14:47:27 -0700 Subject: [PATCH] [Http] fixed User-Agent format (removed semicolon). Fixed Changelog entry --- CHANGELOG.md | 2 +- lib/cocoapods-downloader/base.rb | 2 +- spec/base_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37da1f5..5bb7afb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ##### Enhancements -* Add User-Agent to `cURL` requests when downloading source via the `:http` download strategy, unless one was provided by the `:headers` option. +* Add User-Agent to `cURL` requests when downloading source via the `:http` download strategy, unless one was provided by the `:headers` option. [Sean Reinhardt](https://github.com/seanreinhardtapps) [#9619](https://github.com/CocoaPods/CocoaPods/issues/9619) diff --git a/lib/cocoapods-downloader/base.rb b/lib/cocoapods-downloader/base.rb index 8f9aba3..91b198d 100644 --- a/lib/cocoapods-downloader/base.rb +++ b/lib/cocoapods-downloader/base.rb @@ -129,7 +129,7 @@ def checkout_options # @return [String] the User-Agent string. # def self.user_agent_string(base_module = Pod) - pods_version = base_module.const_defined?("VERSION") ? "CocoaPods/#{base_module::VERSION};" : '' + pods_version = base_module.const_defined?("VERSION") ? "CocoaPods/#{base_module::VERSION} " : '' "#{pods_version}cocoapods-downloader/#{Pod::Downloader::VERSION}" end diff --git a/spec/base_spec.rb b/spec/base_spec.rb index de34ec8..f2128b9 100644 --- a/spec/base_spec.rb +++ b/spec/base_spec.rb @@ -27,7 +27,7 @@ module TestModuleNoVersion module TestModuleWithVersion VERSION = 'a.b.c'.freeze end - Base.user_agent_string(TestModuleWithVersion).should == "CocoaPods/#{TestModuleWithVersion::VERSION};cocoapods-downloader/#{Pod::Downloader::VERSION}" + Base.user_agent_string(TestModuleWithVersion).should == "CocoaPods/#{TestModuleWithVersion::VERSION} cocoapods-downloader/#{Pod::Downloader::VERSION}" end end end