Commit f2ee638f authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3453 from andreamazz/config-skip-new

[Config] Add environment variable COCOAPODS_SKIP_NEW_VERSION
parents fb851236 207c066d
......@@ -6,6 +6,13 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
## Master
##### Enhancements
* Add environment variable `COCOAPODS_SKIP_UPDATE_MESSAGE` to disable new
version message.
[Andrea Mazzini](https://github.com/andreamazz)
[#3364](https://github.com/CocoaPods/CocoaPods/issues/3364)
##### Bug Fixes
* Don't crash when the downloader can't find an appropriate podspec in a `git`
......
......@@ -19,7 +19,7 @@ module Pod
:clean => true,
:integrate_targets => true,
:new_version_message => true,
:new_version_message => ENV['COCOAPODS_SKIP_UPDATE_MESSAGE'].nil?,
:cache_root => Pathname.new(Dir.home) + 'Library/Caches/CocoaPods',
}
......
......@@ -268,6 +268,13 @@ module Pod
UI.output.should.match /CocoaPods 999.0 is available/
end
it 'skips the update message if the user disabled the notification' do
config.new_version_message = false
SourcesManager.stubs(:version_information).returns('last' => '999.0')
SourcesManager.check_version_information(temporary_directory)
UI.output.should.not.match /CocoaPods 999.0 is available/
end
it 'raises while asked to version information of a source if it is not compatible' do
SourcesManager.stubs(:version_information).returns('min' => '999.0')
e = lambda { SourcesManager.check_version_information(temporary_directory) }.should.raise Informative
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment