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
e5996e10
Commit
e5996e10
authored
Sep 09, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests and rubocop issue
parent
3f68c358
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
push.rb
lib/cocoapods/command/repo/push.rb
+1
-1
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+6
-6
No files found.
lib/cocoapods/command/repo/push.rb
View file @
e5996e10
...
@@ -218,7 +218,7 @@ module Pod
...
@@ -218,7 +218,7 @@ module Pod
# @return result of calling the git! with args in repo_dir
# @return result of calling the git! with args in repo_dir
#
#
def
repo_git
(
*
args
)
def
repo_git
(
*
args
)
git!
([
"-C"
,
repo_dir
]
+
args
)
git!
([
'-C'
,
repo_dir
]
+
args
)
end
end
# @return [Pathname] The directory of the repository.
# @return [Pathname] The directory of the repository.
...
...
spec/unit/sources_manager_spec.rb
View file @
e5996e10
...
@@ -91,7 +91,7 @@ module Pod
...
@@ -91,7 +91,7 @@ module Pod
set_up_test_repo_for_update
set_up_test_repo_for_update
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
end
end
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
end
end
...
@@ -108,10 +108,10 @@ module Pod
...
@@ -108,10 +108,10 @@ module Pod
test_repo_path
.
join
(
'.git'
,
'shallow'
).
open
(
'w'
)
{
|
f
|
f
<<
'a'
*
40
}
test_repo_path
.
join
(
'.git'
,
'shallow'
).
open
(
'w'
)
{
|
f
|
f
<<
'a'
*
40
}
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
@sources_manager
.
expects
(
:update_search_index_if_needed_in_background
).
with
({}).
returns
(
nil
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
fetch --unshallow)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
fetch --unshallow)
.
join
(
' '
)
end
end
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
end
end
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
@sources_manager
.
update
(
test_repo_path
.
basename
.
to_s
,
true
)
...
@@ -121,13 +121,13 @@ module Pod
...
@@ -121,13 +121,13 @@ module Pod
it
'prints a warning if the update failed'
do
it
'prints a warning if the update failed'
do
set_up_test_repo_for_update
set_up_test_repo_for_update
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
rev-parse HEAD)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
rev-parse HEAD)
.
join
(
' '
)
end
.
returns
(
'aabbccd'
)
end
.
returns
(
'aabbccd'
)
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
Source
.
any_instance
.
stubs
(
:git
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
diff --name-only aabbccd..HEAD)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
diff --name-only aabbccd..HEAD)
.
join
(
' '
)
end
.
returns
(
''
)
end
.
returns
(
''
)
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
MasterSource
.
any_instance
.
expects
(
:git!
).
with
do
|
options
|
options
.
join
(
' '
)
.
should
.
equal
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
options
.
join
(
' '
)
==
%W(-C
#{
test_repo_path
}
pull --ff-only)
.
join
(
' '
)
end
.
raises
(
<<-
EOS
)
end
.
raises
(
<<-
EOS
)
fatal: '/dev/null' does not appear to be a git repository
fatal: '/dev/null' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: Could not read from remote repository.
...
...
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