diff --git a/lib/cocoapods/command/repo/push.rb b/lib/cocoapods/command/repo/push.rb index 92bdde48bb..3101ab4fb2 100644 --- a/lib/cocoapods/command/repo/push.rb +++ b/lib/cocoapods/command/repo/push.rb @@ -25,7 +25,6 @@ def self.options ['--allow-warnings', 'Allows pushing even if there are warnings'], ['--use-libraries', 'Linter uses static libraries to install the spec'], ['--use-modular-headers', 'Lint uses modular headers during installation'], - ['--use-static-frameworks', 'Lint uses static frameworks during installation'], ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \ '(defaults to all available repos). Multiple sources must be comma-delimited'], ['--local-only', 'Does not perform the step of pushing REPO to its remote'], @@ -50,7 +49,6 @@ def initialize(argv) @podspec = argv.shift_argument @use_frameworks = !argv.flag?('use-libraries') @use_modular_headers = argv.flag?('use-modular-headers', false) - @use_static_frameworks = argv.flag?('use-static-frameworks', false) @private = argv.flag?('private', true) @message = argv.option('commit-message') @commit_message = argv.flag?('commit-message', false) @@ -139,7 +137,6 @@ def validate_podspec_files validator.allow_warnings = @allow_warnings validator.use_frameworks = @use_frameworks validator.use_modular_headers = @use_modular_headers - validator.use_static_frameworks = @use_static_frameworks validator.ignore_public_only_results = @private validator.swift_version = @swift_version validator.skip_import_validation = @skip_import_validation diff --git a/spec/functional/command/repo/push_spec.rb b/spec/functional/command/repo/push_spec.rb index a6f71d50e0..5f0642414c 100644 --- a/spec/functional/command/repo/push_spec.rb +++ b/spec/functional/command/repo/push_spec.rb @@ -204,10 +204,10 @@ module Pod end it 'validates specs as frameworks by default' do - Validator.any_instance.expects(:podfile_from_spec).with(:ios, '8.0', true, [], false, false).times(3).returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, true, [], false, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, true, [], false, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, true, [], false, false).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:ios, '8.0', true, [], false, nil).times(3).returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, true, [], false, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, true, [], false, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, true, [], false, nil).twice.returns(stub('Podfile')) cmd = command('repo', 'push', 'master') # Git push will throw an exception here since this is a local custom git repo. All we care is the validator @@ -218,10 +218,10 @@ module Pod end it 'validates specs as libraries if requested' do - Validator.any_instance.expects(:podfile_from_spec).with(:ios, nil, false, [], false, false).times(3).returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, false, [], false, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, false, [], false, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, false, [], false, false).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:ios, nil, false, [], false, nil).times(3).returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, false, [], false, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, false, [], false, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, false, [], false, nil).twice.returns(stub('Podfile')) cmd = command('repo', 'push', 'master', '--use-libraries') # Git push will throw an exception here since this is a local custom git repo. All we care is the validator @@ -232,10 +232,10 @@ module Pod end it 'validates specs with modular headers if requested' do - Validator.any_instance.expects(:podfile_from_spec).with(:ios, nil, false, [], true, false).times(3).returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, false, [], true, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, false, [], true, false).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, false, [], true, false).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:ios, nil, false, [], true, nil).times(3).returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, false, [], true, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, false, [], true, nil).twice.returns(stub('Podfile')) + Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, false, [], true, nil).twice.returns(stub('Podfile')) cmd = command('repo', 'push', 'master', '--use-libraries', '--use-modular-headers') # Git push will throw an exception here since this is a local custom git repo. All we care is the validator @@ -245,20 +245,6 @@ module Pod end.should.raise Informative end - it 'validates specs with static frameworks if requested' do - Validator.any_instance.expects(:podfile_from_spec).with(:ios, '8.0', true, [], false, true).times(3).returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:osx, nil, true, [], false, true).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:watchos, nil, true, [], false, true).twice.returns(stub('Podfile')) - Validator.any_instance.expects(:podfile_from_spec).with(:tvos, nil, true, [], false, true).twice.returns(stub('Podfile')) - - cmd = command('repo', 'push', 'master', '--use-static-frameworks') - # Git push will throw an exception here since this is a local custom git repo. All we care is the validator - # tests so the exception is swallowed. - lambda do - Dir.chdir(temporary_directory) { cmd.run } - end.should.raise Informative - end - it 'raises error and exit code when push fails' do cmd = command('repo', 'push', 'master') Pod::TrunkSource.any_instance.stubs(:refresh_metadata)