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
d4e53411
Commit
d4e53411
authored
May 29, 2013
by
Michele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] Integrating migrator with tests.
parent
ac5f166c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
33 deletions
+33
-33
project.rb
lib/cocoapods/command/project.rb
+0
-0
sandbox_analyzer_spec.rb
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
+3
-3
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+25
-25
project_spec.rb
spec/unit/project_spec.rb
+2
-2
sandbox_spec.rb
spec/unit/sandbox_spec.rb
+3
-3
No files found.
lib/cocoapods/command/project.rb
View file @
d4e53411
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
View file @
d4e53411
...
...
@@ -161,8 +161,8 @@ module Pod
#--------------------------------------#
it
"returns whether the folder containing the Pod with the given name is empty"
do
@analyzer
.
send
(
:folder_exist?
,
'BananaLib'
).
should
.
be
.
false
path
=
temporary_directory
+
'Pods/BananaLib'
@analyzer
.
send
(
:folder_exist?
,
'
\
BananaLib'
).
should
.
be
.
false
path
=
temporary_directory
+
'Pods/
Sources/
BananaLib'
path
.
mkpath
@analyzer
.
send
(
:folder_exist?
,
'BananaLib'
).
should
.
be
.
true
...
...
@@ -170,7 +170,7 @@ module Pod
it
"returns whether the folder containing the Pod with the given name is empty"
do
@analyzer
.
send
(
:folder_empty?
,
'BananaLib'
).
should
.
be
.
true
path
=
temporary_directory
+
'Pods/BananaLib'
path
=
temporary_directory
+
'Pods/
Sources/
BananaLib'
path
.
mkpath
File
.
open
(
path
+
"file"
,
"w"
)
{}
@analyzer
.
send
(
:folder_empty?
,
'BananaLib'
).
should
.
be
.
false
...
...
spec/unit/installer/pod_source_installer_spec.rb
View file @
d4e53411
...
...
@@ -29,7 +29,7 @@ module Pod
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
specific_source
.
should
.
be
.
nil
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
pod_folder
.
should
.
exist
end
...
...
@@ -38,7 +38,7 @@ module Pod
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
specific_source
[
:commit
].
should
==
"0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc"
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
pod_folder
.
should
.
exist
end
...
...
@@ -46,7 +46,7 @@ module Pod
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:branch
=>
'topicbranch'
}
@installer
.
install!
@installer
.
specific_source
[
:commit
].
should
==
"446b22414597f1bb4062a62c4eed7af9627a3f1b"
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
pod_folder
.
should
.
exist
end
...
...
@@ -70,14 +70,14 @@ module Pod
it
"cleans the paths non used by the installation"
do
@installer
.
install!
@installer
.
clean!
unused_file
=
config
.
sandbox
.
root
+
'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file
=
config
.
sandbox
.
root
+
'
Sources/
BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file
.
should
.
not
.
exist
end
it
"preserves important files like the LICENSE and the README"
do
@installer
.
install!
@installer
.
clean!
readme_file
=
config
.
sandbox
.
root
+
'BananaLib/README'
readme_file
=
config
.
sandbox
.
root
+
'
Sources/
BananaLib/README'
readme_file
.
should
.
exist
end
...
...
@@ -120,13 +120,13 @@ module Pod
@installer
.
send
(
:download_source
)
paths
=
@installer
.
send
(
:clean_paths
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)}
paths_without_git
=
relative_paths
.
reject
{
|
p
|
p
.
include?
'Pods/BananaLib/.git'
}
paths_without_git
=
relative_paths
.
reject
{
|
p
|
p
.
include?
'Pods/
Sources/
BananaLib/.git'
}
paths_without_git
.
sort
.
should
==
[
"Pods/BananaLib/BananaLib.podspec"
,
"Pods/BananaLib/libPusher"
,
"Pods/BananaLib/sub-dir"
,
"Pods/BananaLib/sub-dir/sub-dir-2"
,
"Pods/BananaLib/sub-dir/sub-dir-2/somefile.txt"
"Pods/
Sources/
BananaLib/BananaLib.podspec"
,
"Pods/
Sources/
BananaLib/libPusher"
,
"Pods/
Sources/
BananaLib/sub-dir"
,
"Pods/
Sources/
BananaLib/sub-dir/sub-dir-2"
,
"Pods/
Sources/
BananaLib/sub-dir/sub-dir-2/somefile.txt"
]
end
...
...
@@ -135,13 +135,13 @@ module Pod
paths
=
@installer
.
send
(
:used_files
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)}
relative_paths
.
sort
.
should
==
[
"Pods/BananaLib/Classes/Banana.h"
,
"Pods/BananaLib/Classes/Banana.m"
,
"Pods/BananaLib/Classes/BananaLib.pch"
,
"Pods/BananaLib/Classes/BananaPrivate.h"
,
"Pods/BananaLib/LICENSE"
,
"Pods/BananaLib/README"
,
"Pods/BananaLib/Resources/logo-sidebar.png"
"Pods/
Sources/
BananaLib/Classes/Banana.h"
,
"Pods/
Sources/
BananaLib/Classes/Banana.m"
,
"Pods/
Sources/
BananaLib/Classes/BananaLib.pch"
,
"Pods/
Sources/
BananaLib/Classes/BananaPrivate.h"
,
"Pods/
Sources/
BananaLib/LICENSE"
,
"Pods/
Sources/
BananaLib/README"
,
"Pods/
Sources/
BananaLib/Resources/logo-sidebar.png"
]
end
...
...
@@ -159,13 +159,13 @@ module Pod
paths
=
@installer
.
send
(
:used_files
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)}
relative_paths
.
sort
.
should
==
[
"Pods/BananaLib/Classes/Banana.h"
,
"Pods/BananaLib/Classes/Banana.m"
,
"Pods/BananaLib/Classes/BananaLib.pch"
,
"Pods/BananaLib/Classes/BananaPrivate.h"
,
"Pods/BananaLib/LICENSE"
,
"Pods/BananaLib/README"
,
"Pods/BananaLib/Resources/logo-sidebar.png"
"Pods/
Sources/
BananaLib/Classes/Banana.h"
,
"Pods/
Sources/
BananaLib/Classes/Banana.m"
,
"Pods/
Sources/
BananaLib/Classes/BananaLib.pch"
,
"Pods/
Sources/
BananaLib/Classes/BananaPrivate.h"
,
"Pods/
Sources/
BananaLib/LICENSE"
,
"Pods/
Sources/
BananaLib/README"
,
"Pods/
Sources/
BananaLib/Resources/logo-sidebar.png"
]
end
...
...
spec/unit/project_spec.rb
View file @
d4e53411
...
...
@@ -16,8 +16,8 @@ module Pod
end
it
"can return the relative path of a given absolute path"
do
path
=
temporary_directory
+
'Pods/BananaLib/file'
@project
.
relativize
(
path
).
should
==
Pathname
.
new
(
'BananaLib/file'
)
path
=
temporary_directory
+
'Pods/
Sources/
BananaLib/file'
@project
.
relativize
(
path
).
should
==
Pathname
.
new
(
'
Sources/
BananaLib/file'
)
end
it
"can return the relative path of a given absolute path outside its root"
do
...
...
spec/unit/sandbox_spec.rb
View file @
d4e53411
...
...
@@ -37,7 +37,7 @@ module Pod
end
it
"cleans any trace of the Pod with the given name"
do
pod_root
=
@sandbox
.
root
+
'BananaLib'
pod_root
=
@sandbox
.
pod_dir
(
'BananaLib'
)
pod_root
.
mkpath
@sandbox
.
store_podspec
(
'BananaLib'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
specification_path
=
@sandbox
.
specification_path
(
'BananaLib'
)
...
...
@@ -47,7 +47,7 @@ module Pod
end
it
"doesn't remove the root of local Pods while cleaning"
do
pod_root
=
@sandbox
.
root
+
'BananaLib'
pod_root
=
@sandbox
.
pod_dir
(
'BananaLib'
)
@sandbox
.
stubs
(
:local?
).
returns
(
true
)
pod_root
.
mkpath
@sandbox
.
clean_pod
(
'BananaLib'
)
...
...
@@ -73,7 +73,7 @@ module Pod
end
it
"returns the directory where a Pod is stored"
do
@sandbox
.
pod_dir
(
'JSONKit'
).
should
==
temporary_directory
+
'Sandbox/JSONKit'
@sandbox
.
pod_dir
(
'JSONKit'
).
should
==
temporary_directory
+
'Sandbox/
Sources/
JSONKit'
end
it
"returns the directory where a local Pod is stored"
do
...
...
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