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 @@ ...@@ -11,6 +11,9 @@
* The developer frameworks are automatically added if `SenTestingKit` is * The developer frameworks are automatically added if `SenTestingKit` is
detected. There is no need to specify them in specifications anymore. detected. There is no need to specify them in specifications anymore.
[#771](https://github.com/CocoaPods/CocoaPods/issues/771) [#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 ###### Bug fixes
......
...@@ -323,7 +323,7 @@ namespace :examples do ...@@ -323,7 +323,7 @@ namespace :examples do
puts "Building example: #{example}" puts "Building example: #{example}"
Dir.chdir(example.to_s) do Dir.chdir(example.to_s) do
execute_command "rm -rf Pods DerivedData" 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}'" command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios') if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing. # Specifically build against the simulator SDK so we don't have to deal with code signing.
......
...@@ -9,11 +9,11 @@ module Pod ...@@ -9,11 +9,11 @@ module Pod
DESC DESC
def self.options 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 end
def initialize(argv) 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 super
end end
......
...@@ -8,10 +8,10 @@ module Pod ...@@ -8,10 +8,10 @@ module Pod
module Options module Options
def options def options
[ [
["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"], ["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"],
["--no-doc", "Skip documentation generation with appledoc"], ["--no-doc", "Skip documentation generation with appledoc"],
["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"], ["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
["--no-repo-update", "Skip running `pod repo update` before install"], ["--no-repo-update", "Skip running `pod repo update` before install"],
].concat(super) ].concat(super)
end end
end end
...@@ -24,7 +24,7 @@ module Pod ...@@ -24,7 +24,7 @@ module Pod
config.clean = argv.flag?('clean', config.clean) config.clean = argv.flag?('clean', config.clean)
config.generate_docs = argv.flag?('doc', config.generate_docs) config.generate_docs = argv.flag?('doc', config.generate_docs)
config.integrate_targets = argv.flag?('integrate', config.integrate_targets) 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 super
end end
......
...@@ -5,7 +5,7 @@ module Pod ...@@ -5,7 +5,7 @@ module Pod
extend SpecHelper::TemporaryRepos extend SpecHelper::TemporaryRepos
it "tells the user that no Podfile was found in the current working dir" do 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." exception.message.should.include "No `Podfile' found in the current working directory."
end end
...@@ -13,7 +13,7 @@ module Pod ...@@ -13,7 +13,7 @@ module Pod
file = temporary_directory + 'Podfile' file = temporary_directory + 'Podfile'
File.open(file, 'w') {|f| f.write('platform :ios') } File.open(file, 'w') {|f| f.write('platform :ios') }
Dir.chdir(temporary_directory) do 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" exception.message.should.include "No `Podfile.lock' found in the current working directory"
end end
end end
......
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
module Pod 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 describe Command::Install do
it "tells the user that no Podfile or podspec was found in the current working dir" 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." exception.message.should.include "No `Podfile' found in the current working directory."
end end
end end
#--------------------------------------------------------------------------------# #---------------------------------------------------------------------------#
describe Command::Update do describe Command::Update do
extend SpecHelper::TemporaryRepos extend SpecHelper::TemporaryRepos
it "tells the user that no Podfile was found in the current working dir" do 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." exception.message.should.include "No `Podfile' found in the current working directory."
end end
...@@ -23,11 +36,14 @@ module Pod ...@@ -23,11 +36,14 @@ module Pod
file = temporary_directory + 'Podfile' file = temporary_directory + 'Podfile'
File.open(file, 'w') {|f| f.write('platform :ios') } File.open(file, 'w') {|f| f.write('platform :ios') }
Dir.chdir(temporary_directory) do 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" exception.message.should.include "No `Podfile.lock' found in the current working directory"
end end
end end
end end
#---------------------------------------------------------------------------#
end end
...@@ -306,57 +306,57 @@ describe "Integration take 2" do ...@@ -306,57 +306,57 @@ describe "Integration take 2" do
# Test subspecs inheritance # Test subspecs inheritance
describe "Integrates a project with CocoaPods" do 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 end
describe "Adds a Pod to an existing installation" do 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 end
describe "Removes a Pod from an existing installation" do 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 end
describe "Creates an installation with multiple target definitions" do 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 end
describe "Installs a Pod with different subspecs activated across different targets" do 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 end
describe "Installs a Pod with a local source" do 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 end
describe "Installs a Pod with an external source" do 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 end
describe "Installs a Pod given the podspec" do 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 end
describe "Performs an installation using a custom workspace" do 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 end
# @todo add tests for all the hooks API # @todo add tests for all the hooks API
# #
describe "Runs the Podfile callbacks" do 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 end
# @todo add tests for all the hooks API # @todo add tests for all the hooks API
# #
describe "Runs the specification callbacks" do 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 end
# @todo requires CocoaPods 0.17 # @todo requires CocoaPods 0.17
# #
# describe "Generates the documentation of Pod during installation" do # 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
end end
...@@ -366,7 +366,7 @@ describe "Integration take 2" do ...@@ -366,7 +366,7 @@ describe "Integration take 2" do
describe "Pod update" do describe "Pod update" do
describe "Updates an existing installation" do describe "Updates an existing installation" do
check "update --no-update --no-doc", "update" check "update --no-repo-update --no-doc", "update"
end end
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