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
b364b059
Commit
b364b059
authored
Sep 25, 2014
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pod init] Set `source` directive to use `master` repo URL.
parent
d90c9545
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
init.rb
lib/cocoapods/command/init.rb
+1
-1
setup.rb
lib/cocoapods/command/setup.rb
+4
-4
setup_spec.rb
spec/functional/command/setup_spec.rb
+3
-3
No files found.
lib/cocoapods/command/init.rb
View file @
b364b059
...
...
@@ -59,7 +59,7 @@ module Pod
# Uncomment this line to define a global platform for your project
# platform :ios, "6.0"
source '
master
'
source '
#{
Command
::
Setup
.
read_only_url
}
'
PLATFORM
project
.
targets
.
each
do
|
target
|
...
...
lib/cocoapods/command/setup.rb
View file @
b364b059
...
...
@@ -116,18 +116,18 @@ module Pod
# be enabled.
#
def
url
push?
?
read_write_url
:
read_only_url
push?
?
self
.
class
.
read_write_url
:
self
.
class
.
read_only_url
end
# @return [String] the read only url of the master repo.
#
def
read_only_url
def
self
.
read_only_url
'https://github.com/CocoaPods/Specs.git'
end
# @return [String] the read-write url of the master repo.
#
def
read_write_url
def
self
.
read_write_url
'git@github.com:CocoaPods/Specs.git'
end
...
...
@@ -146,7 +146,7 @@ module Pod
return
false
unless
master_repo_dir
.
exist?
Dir
.
chdir
(
master_repo_dir
)
do
url
=
git
(
'config --get remote.origin.url'
)
url
.
chomp
==
read_write_url
url
.
chomp
==
self
.
class
.
read_write_url
end
end
...
...
spec/functional/command/setup_spec.rb
View file @
b364b059
...
...
@@ -23,7 +23,7 @@ module Pod
before
do
set_up_test_repo
Command
::
Setup
.
any_instance
.
stubs
(
:read_only_url
).
returns
(
test_repo_path
.
to_s
)
Command
::
Setup
.
stubs
(
:read_only_url
).
returns
(
test_repo_path
.
to_s
)
config
.
repos_dir
=
SpecHelper
.
temporary_directory
end
...
...
@@ -44,7 +44,7 @@ module Pod
`echo 'touch' > touch && git add touch && git commit -m 'updated'`
end
# Need to use file:// to test local use of --depth=1
Command
::
Setup
.
any_instance
.
stubs
(
:read_only_url
).
returns
(
"file://
#{
test_repo_path
}
"
)
Command
::
Setup
.
stubs
(
:read_only_url
).
returns
(
"file://
#{
test_repo_path
}
"
)
run_command
(
'setup'
)
Dir
.
chdir
(
config
.
repos_dir
+
'master'
)
do
`git log --pretty=oneline`
.
strip
.
split
(
"
\n
"
).
size
.
should
==
1
...
...
@@ -66,7 +66,7 @@ module Pod
`echo 'touch' > touch && git add touch && git commit -m 'updated'`
end
# Need to use file:// to test local use of --depth=1
Command
::
Setup
.
any_instance
.
stubs
(
:read_write_url
).
returns
(
"file://
#{
test_repo_path
}
"
)
Command
::
Setup
.
stubs
(
:read_write_url
).
returns
(
"file://
#{
test_repo_path
}
"
)
cmd
=
run_command
(
'setup'
,
'--push'
)
Dir
.
chdir
(
config
.
repos_dir
+
'master'
)
do
`git log --pretty=oneline`
.
strip
.
split
(
"
\n
"
).
size
.
should
>
1
...
...
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