Commit 411a2604 authored by Fabio Pelosin's avatar Fabio Pelosin

[Command] Rename no-update to no-repo-update

Closes #913
parent 99adf867
......@@ -11,6 +11,9 @@
* The developer frameworks are automatically added if `SenTestingKit` is
detected. There is no need to specify them in specifications anymore.
[#771](https://github.com/CocoaPods/CocoaPods/issues/771)
* The `--no-update` argument of the `install`, `update`, `outdated` subcommands
has been renamed to `--no-repo-update`.
[#913](https://github.com/CocoaPods/CocoaPods/issues/913)
###### Bug fixes
......
......@@ -323,7 +323,7 @@ namespace :examples do
puts "Building example: #{example}"
Dir.chdir(example.to_s) do
execute_command "rm -rf Pods DerivedData"
execute_command "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-update"
execute_command "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-repo-update"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing.
......
......@@ -9,11 +9,11 @@ module Pod
DESC
def self.options
[["--no-update", "Skip running `pod repo update` before install"]].concat(super)
[["--no-repo-update", "Skip running `pod repo update` before install"]].concat(super)
end
def initialize(argv)
config.skip_repo_update = argv.flag?('update', config.skip_repo_update)
config.skip_repo_update = argv.flag?('repo-update', config.skip_repo_update)
super
end
......
......@@ -24,7 +24,7 @@ module Pod
config.clean = argv.flag?('clean', config.clean)
config.generate_docs = argv.flag?('doc', config.generate_docs)
config.integrate_targets = argv.flag?('integrate', config.integrate_targets)
config.skip_repo_update = !argv.flag?('update', !config.skip_repo_update)
config.skip_repo_update = !argv.flag?('repo-update', !config.skip_repo_update)
super
end
......
......@@ -5,7 +5,7 @@ module Pod
extend SpecHelper::TemporaryRepos
it "tells the user that no Podfile was found in the current working dir" do
exception = lambda { run_command('outdated', '--no-update') }.should.raise Informative
exception = lambda { run_command('outdated', '--no-repo-update') }.should.raise Informative
exception.message.should.include "No `Podfile' found in the current working directory."
end
......@@ -13,7 +13,7 @@ module Pod
file = temporary_directory + 'Podfile'
File.open(file, 'w') {|f| f.write('platform :ios') }
Dir.chdir(temporary_directory) do
exception = lambda { run_command('outdated', '--no-update') }.should.raise Informative
exception = lambda { run_command('outdated', '--no-repo-update') }.should.raise Informative
exception.message.should.include "No `Podfile.lock' found in the current working directory"
end
end
......
require File.expand_path('../../../spec_helper', __FILE__)
module Pod
describe Command::Project do
it "tells the user that no Podfile or podspec was found in the current working dir" do
Command::Install.new(CLAide::ARGV.new(['--no-repo-update']))
config.skip_repo_update.should.be.true
end
end
#---------------------------------------------------------------------------#
describe Command::Install do
it "tells the user that no Podfile or podspec was found in the current working dir" do
exception = lambda { run_command('install', '--no-update') }.should.raise Informative
exception = lambda { run_command('install', '--no-repo-update') }.should.raise Informative
exception.message.should.include "No `Podfile' found in the current working directory."
end
end
#--------------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
describe Command::Update do
extend SpecHelper::TemporaryRepos
it "tells the user that no Podfile was found in the current working dir" do
exception = lambda { run_command('update','--no-update') }.should.raise Informative
exception = lambda { run_command('update','--no-repo-update') }.should.raise Informative
exception.message.should.include "No `Podfile' found in the current working directory."
end
......@@ -23,11 +36,14 @@ module Pod
file = temporary_directory + 'Podfile'
File.open(file, 'w') {|f| f.write('platform :ios') }
Dir.chdir(temporary_directory) do
exception = lambda { run_command('update','--no-update') }.should.raise Informative
exception = lambda { run_command('update','--no-repo-update') }.should.raise Informative
exception.message.should.include "No `Podfile.lock' found in the current working directory"
end
end
end
#---------------------------------------------------------------------------#
end
......@@ -306,57 +306,57 @@ describe "Integration take 2" do
# Test subspecs inheritance
describe "Integrates a project with CocoaPods" do
check "install --no-update --no-doc", "install_new"
check "install --no-repo-update --no-doc", "install_new"
end
describe "Adds a Pod to an existing installation" do
check "install --no-update --no-doc", "install_add_pod"
check "install --no-repo-update --no-doc", "install_add_pod"
end
describe "Removes a Pod from an existing installation" do
check "install --no-update --no-doc", "install_remove_pod"
check "install --no-repo-update --no-doc", "install_remove_pod"
end
describe "Creates an installation with multiple target definitions" do
check "install --no-update --no-doc", "install_multiple_targets"
check "install --no-repo-update --no-doc", "install_multiple_targets"
end
describe "Installs a Pod with different subspecs activated across different targets" do
check "install --no-update --no-doc", "install_subspecs"
check "install --no-repo-update --no-doc", "install_subspecs"
end
describe "Installs a Pod with a local source" do
check "install --no-update --no-doc", "install_local_source"
check "install --no-repo-update --no-doc", "install_local_source"
end
describe "Installs a Pod with an external source" do
check "install --no-update --no-doc", "install_external_source"
check "install --no-repo-update --no-doc", "install_external_source"
end
describe "Installs a Pod given the podspec" do
check "install --no-update --no-doc", "install_podspec"
check "install --no-repo-update --no-doc", "install_podspec"
end
describe "Performs an installation using a custom workspace" do
check "install --no-update --no-doc", "install_custom_workspace"
check "install --no-repo-update --no-doc", "install_custom_workspace"
end
# @todo add tests for all the hooks API
#
describe "Runs the Podfile callbacks" do
check "install --no-update --no-doc", "install_podfile_callbacks"
check "install --no-repo-update --no-doc", "install_podfile_callbacks"
end
# @todo add tests for all the hooks API
#
describe "Runs the specification callbacks" do
check "install --no-update --no-doc", "install_spec_callbacks"
check "install --no-repo-update --no-doc", "install_spec_callbacks"
end
# @todo requires CocoaPods 0.17
#
# describe "Generates the documentation of Pod during installation" do
# check "install --no-update --no-doc", "install_docs"
# check "install --no-repo-update --no-doc", "install_docs"
# end
end
......@@ -366,7 +366,7 @@ describe "Integration take 2" do
describe "Pod update" do
describe "Updates an existing installation" do
check "update --no-update --no-doc", "update"
check "update --no-repo-update --no-doc", "update"
end
end
......
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