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
7ee1cbad
Commit
7ee1cbad
authored
Nov 19, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the master spec repo after running `pod setup' and the repo already exists. Closes #67.
parent
c7092107
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
setup.rb
lib/cocoapods/command/setup.rb
+7
-3
command_spec.rb
spec/functional/command_spec.rb
+0
-10
No files found.
lib/cocoapods/command/setup.rb
View file @
7ee1cbad
...
@@ -11,8 +11,7 @@ module Pod
...
@@ -11,8 +11,7 @@ module Pod
https://github.com/CocoaPods/Specs
https://github.com/CocoaPods/Specs
If the clone already exists, it will ensure that it points to the correct
If the clone already exists, it will ensure that it is up-to-date.}
remote.}
end
end
def
initialize
(
argv
)
def
initialize
(
argv
)
...
@@ -28,12 +27,17 @@ module Pod
...
@@ -28,12 +27,17 @@ module Pod
end
end
def
update_master_repo_remote_command
def
update_master_repo_remote_command
@command
||=
Repo
.
new
(
ARGV
.
new
([
'set-url'
,
'master'
,
master_repo_url
]))
Repo
.
new
(
ARGV
.
new
([
'set-url'
,
'master'
,
master_repo_url
]))
end
def
update_master_repo_command
Repo
.
new
(
ARGV
.
new
([
'update'
,
'master'
]))
end
end
def
run
def
run
if
(
config
.
repos_dir
+
'master'
).
exist?
if
(
config
.
repos_dir
+
'master'
).
exist?
update_master_repo_remote_command
.
run
update_master_repo_remote_command
.
run
update_master_repo_command
.
run
else
else
add_master_repo_command
.
run
add_master_repo_command
.
run
end
end
...
...
spec/functional/command_spec.rb
View file @
7ee1cbad
...
@@ -11,16 +11,6 @@ describe "Pod::Command" do
...
@@ -11,16 +11,6 @@ describe "Pod::Command" do
git_config
(
'master'
,
'remote.origin.url'
).
should
==
fixture
(
'spec-repos/master'
).
to_s
git_config
(
'master'
,
'remote.origin.url'
).
should
==
fixture
(
'spec-repos/master'
).
to_s
end
end
it
"updates an existing `master' clone to point to the correct remote (migration for version 0.2.0 -> 0.3.0)"
do
dir
=
temporary_directory
+
'cocoapods'
dir
.
mkpath
FileUtils
.
cp_r
(
fixture
(
'spec-repos/master'
).
to_s
,
dir
.
to_s
)
command
=
Pod
::
Command
.
parse
(
'setup'
,
'--silent'
)
def
command
.
master_repo_url
;
'git://some-other-remote'
;
end
command
.
run
git_config
(
'master'
,
'remote.origin.url'
).
should
==
'git://some-other-remote'
end
it
"adds a spec-repo"
do
it
"adds a spec-repo"
do
add_repo
(
'private'
,
fixture
(
'spec-repos/master'
))
add_repo
(
'private'
,
fixture
(
'spec-repos/master'
))
git_config
(
'private'
,
'remote.origin.url'
).
should
==
fixture
(
'spec-repos/master'
).
to_s
git_config
(
'private'
,
'remote.origin.url'
).
should
==
fixture
(
'spec-repos/master'
).
to_s
...
...
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