Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
f7766cc3
Commit
f7766cc3
authored
Oct 21, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1493 from Kapin/master
Add pod repo remove [name] command
parents
29697f42
5e5e96ff
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
1 deletion
+40
-1
CHANGELOG.md
CHANGELOG.md
+5
-0
repo.rb
lib/cocoapods/command/repo.rb
+27
-0
repo_spec.rb
spec/functional/command/repo_spec.rb
+7
-0
command_spec.rb
spec/unit/command_spec.rb
+1
-1
No files found.
CHANGELOG.md
View file @
f7766cc3
...
@@ -16,6 +16,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -16,6 +16,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
Ulrik Damm
](
https://github.com/ulrikdamm
)
[
Ulrik Damm
](
https://github.com/ulrikdamm
)
[
#1427
](
https://github.com/CocoaPods/CocoaPods/pull/1427
)
[
#1427
](
https://github.com/CocoaPods/CocoaPods/pull/1427
)
*
`pod repo`
now support a
`remove ['repo_name']`
command.
[
Joshua Kalpin
](
https://github.com/Kapin
)
[
#1493
](
https://github.com/CocoaPods/CocoaPods/issues/1493
)
[
#1484
](
https://github.com/CocoaPods/CocoaPods/issues/1484
)
###### Bug Fixes
###### Bug Fixes
*
The architecture is now set in the build settings of the user build
*
The architecture is now set in the build settings of the user build
...
...
lib/cocoapods/command/repo.rb
View file @
f7766cc3
...
@@ -133,6 +133,33 @@ module Pod
...
@@ -133,6 +133,33 @@ module Pod
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
class
Remove
<
Repo
self
.
summary
=
'Remove a spec repo'
self
.
description
=
<<-
DESC
Deletes the remote named `NAME` from the local spec-repos directory at `~/.cocoapods/repos/.`
DESC
self
.
arguments
=
'NAME'
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
super
end
def
validate!
super
help!
'Deleting a repo needs a `NAME`.'
unless
@name
help!
"repo
#{
@name
}
does not exist"
unless
File
.
directory?
(
dir
)
end
def
run
UI
.
section
(
"Removing spec repo `
#{
@name
}
`"
)
do
FileUtils
.
rm_rf
(
dir
)
end
end
end
extend
Executable
extend
Executable
executable
:git
executable
:git
...
...
spec/functional/command/repo_spec.rb
View file @
f7766cc3
...
@@ -54,6 +54,13 @@ module Pod
...
@@ -54,6 +54,13 @@ module Pod
run_command
(
'repo'
,
'update'
,
'repo2'
)
run_command
(
'repo'
,
'update'
,
'repo2'
)
(
repo2
+
'README'
).
read
.
should
.
include
'Updated'
(
repo2
+
'README'
).
read
.
should
.
include
'Updated'
end
end
it
"removes a spec-repo"
do
upstream
=
SpecHelper
.
temporary_directory
+
'upstream'
FileUtils
.
cp_r
(
test_repo_path
,
upstream
)
lambda
{
run_command
(
'repo'
,
'remove'
,
upstream
)
}.
should
.
not
.
raise
File
.
directory?
(
test_repo_path
+
upstream
).
should
.
be
.
false?
end
end
end
end
end
end
end
spec/unit/command_spec.rb
View file @
f7766cc3
...
@@ -12,11 +12,11 @@ module Pod
...
@@ -12,11 +12,11 @@ module Pod
Command
.
parse
(
%w{ repo add }
).
should
.
be
.
instance_of
Command
::
Repo
::
Add
Command
.
parse
(
%w{ repo add }
).
should
.
be
.
instance_of
Command
::
Repo
::
Add
Command
.
parse
(
%w{ repo lint }
).
should
.
be
.
instance_of
Command
::
Repo
::
Lint
Command
.
parse
(
%w{ repo lint }
).
should
.
be
.
instance_of
Command
::
Repo
::
Lint
Command
.
parse
(
%w{ repo update }
).
should
.
be
.
instance_of
Command
::
Repo
::
Update
Command
.
parse
(
%w{ repo update }
).
should
.
be
.
instance_of
Command
::
Repo
::
Update
Command
.
parse
(
%w{ repo remove }
).
should
.
be
.
instance_of
Command
::
Repo
::
Remove
Command
.
parse
(
%w{ search }
).
should
.
be
.
instance_of
Command
::
Search
Command
.
parse
(
%w{ search }
).
should
.
be
.
instance_of
Command
::
Search
Command
.
parse
(
%w{ setup }
).
should
.
be
.
instance_of
Command
::
Setup
Command
.
parse
(
%w{ setup }
).
should
.
be
.
instance_of
Command
::
Setup
Command
.
parse
(
%w{ spec create }
).
should
.
be
.
instance_of
Command
::
Spec
::
Create
Command
.
parse
(
%w{ spec create }
).
should
.
be
.
instance_of
Command
::
Spec
::
Create
Command
.
parse
(
%w{ spec lint }
).
should
.
be
.
instance_of
Command
::
Spec
::
Lint
Command
.
parse
(
%w{ spec lint }
).
should
.
be
.
instance_of
Command
::
Spec
::
Lint
Command
.
parse
(
%w{ repo update }
).
should
.
be
.
instance_of
Command
::
Repo
::
Update
Command
.
parse
(
%w{ init }
).
should
.
be
.
instance_of
Command
::
Init
Command
.
parse
(
%w{ init }
).
should
.
be
.
instance_of
Command
::
Init
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment