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
f486920b
Commit
f486920b
authored
Oct 15, 2013
by
Marin Usalj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bad merge
parent
fd6c3d71
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
46 deletions
+12
-46
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+1
-1
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+11
-11
project_spec.rb
spec/unit/project_spec.rb
+0
-34
No files found.
lib/cocoapods/installer/pod_source_installer.rb
View file @
f486920b
...
@@ -146,7 +146,7 @@ module Pod
...
@@ -146,7 +146,7 @@ module Pod
# source.
# source.
#
#
def
downloader
def
downloader
@downloader
||=
Config
.
instance
.
downloader
(
root
,
root_spec
.
source
.
dup
)
@downloader
||=
Config
.
downloader
(
root
,
root_spec
.
source
.
dup
)
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
spec/unit/installer/pod_source_installer_spec.rb
View file @
f486920b
...
@@ -7,7 +7,7 @@ module Pod
...
@@ -7,7 +7,7 @@ module Pod
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
specs_by_platform
=
{
:ios
=>
[
@spec
]
}
specs_by_platform
=
{
:ios
=>
[
@spec
]
}
@installer
=
Installer
::
PodSourceInstaller
.
new
(
config
.
sandbox
,
specs_by_platform
)
@installer
=
Installer
::
PodSourceInstaller
.
new
(
environment
.
sandbox
,
specs_by_platform
)
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
...
@@ -29,16 +29,16 @@ module Pod
...
@@ -29,16 +29,16 @@ module Pod
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
install!
@installer
.
specific_source
.
should
.
be
.
nil
@installer
.
specific_source
.
should
.
be
.
nil
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
environment
.
sandbox
.
root
+
'BananaLib'
pod_folder
.
should
.
exist
pod_folder
.
should
.
exist
end
end
it
"downloads the head source if specified source"
do
it
"downloads the head source if specified source"
do
config
.
sandbox
.
store_head_pod
(
'BananaLib'
)
environment
.
sandbox
.
store_head_pod
(
'BananaLib'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
install!
@installer
.
specific_source
[
:commit
].
should
==
"0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc"
@installer
.
specific_source
[
:commit
].
should
==
"0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc"
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
environment
.
sandbox
.
root
+
'BananaLib'
pod_folder
.
should
.
exist
pod_folder
.
should
.
exist
end
end
...
@@ -46,12 +46,12 @@ module Pod
...
@@ -46,12 +46,12 @@ module Pod
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:branch
=>
'topicbranch'
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:branch
=>
'topicbranch'
}
@installer
.
install!
@installer
.
install!
@installer
.
specific_source
[
:commit
].
should
==
"446b22414597f1bb4062a62c4eed7af9627a3f1b"
@installer
.
specific_source
[
:commit
].
should
==
"446b22414597f1bb4062a62c4eed7af9627a3f1b"
pod_folder
=
config
.
sandbox
.
root
+
'BananaLib'
pod_folder
=
environment
.
sandbox
.
root
+
'BananaLib'
pod_folder
.
should
.
exist
pod_folder
.
should
.
exist
end
end
it
"stores the checkout options in the sandbox"
do
it
"stores the checkout options in the sandbox"
do
config
.
sandbox
.
store_head_pod
(
'BananaLib'
)
environment
.
sandbox
.
store_head_pod
(
'BananaLib'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
install!
sources
=
@installer
.
sandbox
.
checkout_sources
sources
=
@installer
.
sandbox
.
checkout_sources
...
@@ -92,14 +92,14 @@ module Pod
...
@@ -92,14 +92,14 @@ module Pod
it
"cleans the paths non used by the installation"
do
it
"cleans the paths non used by the installation"
do
@installer
.
install!
@installer
.
install!
@installer
.
clean!
@installer
.
clean!
unused_file
=
config
.
sandbox
.
root
+
'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file
=
environment
.
sandbox
.
root
+
'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file
.
should
.
not
.
exist
unused_file
.
should
.
not
.
exist
end
end
it
"preserves important files like the LICENSE and the README"
do
it
"preserves important files like the LICENSE and the README"
do
@installer
.
install!
@installer
.
install!
@installer
.
clean!
@installer
.
clean!
readme_file
=
config
.
sandbox
.
root
+
'BananaLib/README'
readme_file
=
environment
.
sandbox
.
root
+
'BananaLib/README'
readme_file
.
should
.
exist
readme_file
.
should
.
exist
end
end
...
@@ -117,13 +117,13 @@ module Pod
...
@@ -117,13 +117,13 @@ module Pod
end
end
it
"doesn't downloads the source if the pod has a local source"
do
it
"doesn't downloads the source if the pod has a local source"
do
config
.
sandbox
.
store_local_path
(
'BananaLib'
,
'Some Path'
)
environment
.
sandbox
.
store_local_path
(
'BananaLib'
,
'Some Path'
)
@installer
.
expects
(
:download_source
).
never
@installer
.
expects
(
:download_source
).
never
@installer
.
install!
@installer
.
install!
end
end
it
"doesn't clean the installation if the pod has a local source"
do
it
"doesn't clean the installation if the pod has a local source"
do
config
.
sandbox
.
store_local_path
(
'BananaLib'
,
'Some Path'
)
environment
.
sandbox
.
store_local_path
(
'BananaLib'
,
'Some Path'
)
@installer
.
expects
(
:clean_installation
).
never
@installer
.
expects
(
:clean_installation
).
never
@installer
.
install!
@installer
.
install!
end
end
...
@@ -176,7 +176,7 @@ module Pod
...
@@ -176,7 +176,7 @@ module Pod
ios_spec
=
spec
.
dup
ios_spec
=
spec
.
dup
osx_spec
=
spec
.
dup
osx_spec
=
spec
.
dup
specs_by_platform
=
{
:ios
=>
[
ios_spec
],
:osx
=>
[
osx_spec
]
}
specs_by_platform
=
{
:ios
=>
[
ios_spec
],
:osx
=>
[
osx_spec
]
}
@installer
=
Installer
::
PodSourceInstaller
.
new
(
config
.
sandbox
,
specs_by_platform
)
@installer
=
Installer
::
PodSourceInstaller
.
new
(
environment
.
sandbox
,
specs_by_platform
)
@installer
.
send
(
:download_source
)
@installer
.
send
(
:download_source
)
paths
=
@installer
.
send
(
:used_files
)
paths
=
@installer
.
send
(
:used_files
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)}
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)}
...
...
spec/unit/project_spec.rb
View file @
f486920b
...
@@ -190,15 +190,9 @@ module Pod
...
@@ -190,15 +190,9 @@ module Pod
describe
"#reference_for_path"
do
describe
"#reference_for_path"
do
before
do
before
do
<<<<<<<
HEAD
@project
.
add_pod_group
(
'BananaLib'
,
environment
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@project
.
add_pod_group
(
'BananaLib'
,
environment
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@file
=
environment
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
"file.m"
@file
=
environment
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
"file.m"
@group
=
@project
.
group_for_spec
(
'BananaLib'
,
:source_files
)
=======
@project
.
add_pod_group
(
'BananaLib'
,
config
.
sandbox
.
pod_dir
(
'BananaLib'
),
false
)
@file
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
+
"file.m"
@group
=
@project
.
group_for_spec
(
'BananaLib'
)
@group
=
@project
.
group_for_spec
(
'BananaLib'
)
>>>>>>>
master
@project
.
add_file_reference
(
@file
,
@group
)
@project
.
add_file_reference
(
@file
,
@group
)
end
end
...
@@ -234,34 +228,6 @@ module Pod
...
@@ -234,34 +228,6 @@ module Pod
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
<<<<<<<
HEAD
describe
"Private helpers"
do
describe
"#spec_group"
do
before
do
@project
.
add_pod_group
(
'JSONKit'
,
environment
.
sandbox
.
pod_dir
(
'JSONKit'
))
end
it
"returns the Pod group for root specifications"
do
group
=
@project
.
send
(
:spec_group
,
'JSONKit'
)
group
.
hierarchy_path
.
should
==
'/Pods/JSONKit'
end
it
"returns the group for subspecs"
do
group
=
@project
.
send
(
:spec_group
,
'JSONKit/Parsing'
)
group
.
hierarchy_path
.
should
==
'/Pods/JSONKit/Subspecs/Parsing'
end
end
end
#-------------------------------------------------------------------------#
=======
>>>>>>>
master
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