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
a3c2efd9
Commit
a3c2efd9
authored
Feb 02, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Installer::PodSourceInstaller
parent
99bef96d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
164 additions
and
0 deletions
+164
-0
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+0
-0
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+164
-0
No files found.
lib/cocoapods/installer/pod_source_installer.rb
0 → 100644
View file @
a3c2efd9
This diff is collapsed.
Click to expand it.
spec/unit/installer/pod_source_installer_spec.rb
0 → 100644
View file @
a3c2efd9
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
# module BaconFocusedMode; end
module
Pod
describe
Installer
::
PodSourceInstaller
do
describe
"In General"
do
# TODO: describe defaults
end
#-------------------------------------------------------------------------#
describe
"Installation"
do
before
do
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
)
}
specs_by_platform
=
{
:ios
=>
[
@spec
]
}
@installer
=
Installer
::
PodSourceInstaller
.
new
(
config
.
sandbox
,
specs_by_platform
)
end
describe
"Download"
do
it
"downloads the source"
do
@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
.
should
.
exist
end
it
"downloads the head source if specified source"
do
@spec
.
version
.
head
=
true
@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
.
should
.
exist
end
it
"returns the checkout options of the downloader if any"
do
@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
.
should
.
exist
end
end
#--------------------------------------#
describe
"Documentation"
do
it
"generates the documentation if needed"
do
@installer
.
generate_docs
=
true
@installer
.
documentation_generator
.
expects
(
:generate
)
@installer
.
install!
end
it
"doesn't generates the documentation if it is already installed"
do
@installer
.
generate_docs
=
true
@installer
.
documentation_generator
.
stubs
(
:already_installed?
).
returns
(
true
)
@installer
.
documentation_generator
.
expects
(
:generate
).
never
@installer
.
install!
end
it
"doesn't generates the documentation if disabled in the config"
do
@installer
.
generate_docs
=
false
@installer
.
documentation_generator
.
expects
(
:generate
).
never
@installer
.
install!
end
end
#--------------------------------------#
describe
"Cleaning"
do
it
"cleans the paths non used by the installation"
do
@installer
.
clean
=
true
@installer
.
install!
unused_file
=
config
.
sandbox
.
root
+
'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
.
clean
=
true
@installer
.
install!
readme_file
=
config
.
sandbox
.
root
+
'BananaLib/README'
readme_file
.
should
.
exist
end
it
"doesn't performs any cleaning if instructed to do so"
do
@installer
.
clean
=
false
@installer
.
install!
unused_file
=
config
.
sandbox
.
root
+
'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file
.
should
.
exist
end
end
#--------------------------------------#
describe
"Headers"
do
it
"links the headers used to build the Pod library"
do
@installer
.
install!
headers_root
=
config
.
sandbox
.
build_headers
.
root
public_header
=
headers_root
+
'BananaLib/Banana.h'
private_header
=
headers_root
+
'BananaLib/BananaPrivate.h'
public_header
.
should
.
exist
private_header
.
should
.
exist
end
it
"links the public headers"
do
@installer
.
install!
headers_root
=
config
.
sandbox
.
public_headers
.
root
public_header
=
headers_root
+
'BananaLib/Banana.h'
private_header
=
headers_root
+
'BananaLib/BananaPrivate.h'
public_header
.
should
.
exist
private_header
.
should
.
not
.
exist
end
end
end
#-------------------------------------------------------------------------#
describe
"Private Helpers"
do
#--------------------------------------#
describe
"#clean_paths"
do
end
#--------------------------------------#
describe
"#used_files"
do
end
#--------------------------------------#
describe
"#header_mappings"
do
xit
"can handle the mappings headers of subspecs"
do
end
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