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
5b5abd6c
Commit
5b5abd6c
authored
Sep 16, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ begin of integration spec
parent
064b1e08
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
4 deletions
+86
-4
.gitmodules
.gitmodules
+9
-0
config.rb
lib/cocoa_pods/config.rb
+2
-2
installer.rb
lib/cocoa_pods/installer.rb
+2
-0
source.rb
lib/cocoa_pods/source.rb
+1
-1
ASIHTTPRequest
spec/fixtures/integration/ASIHTTPRequest
+1
-0
JSONKit
spec/fixtures/integration/JSONKit
+1
-0
SSZipArchive
spec/fixtures/integration/SSZipArchive
+1
-0
integration_spec.rb
spec/integration_spec.rb
+68
-0
temporary_directory.rb
spec/spec_helper/temporary_directory.rb
+1
-1
No files found.
.gitmodules
0 → 100644
View file @
5b5abd6c
[submodule "spec/fixtures/integration/ASIHTTPRequest"]
path = spec/fixtures/integration/ASIHTTPRequest
url = https://github.com/pokeb/asi-http-request.git
[submodule "spec/fixtures/integration/SSZipArchive"]
path = spec/fixtures/integration/SSZipArchive
url = https://github.com/samsoffes/ssziparchive.git
[submodule "spec/fixtures/integration/JSONKit"]
path = spec/fixtures/integration/JSONKit
url = https://github.com/johnezang/JSONKit.git
lib/cocoa_pods/config.rb
View file @
5b5abd6c
...
@@ -10,7 +10,7 @@ module Pod
...
@@ -10,7 +10,7 @@ module Pod
@instance
=
instance
@instance
=
instance
end
end
attr_accessor
:repos_dir
,
:clean
,
:verbose
,
:silent
attr_accessor
:repos_dir
,
:
project_pods_root
,
:
clean
,
:verbose
,
:silent
alias_method
:clean?
,
:clean
alias_method
:clean?
,
:clean
alias_method
:verbose?
,
:verbose
alias_method
:verbose?
,
:verbose
alias_method
:silent?
,
:silent
alias_method
:silent?
,
:silent
...
@@ -27,7 +27,7 @@ module Pod
...
@@ -27,7 +27,7 @@ module Pod
end
end
def
project_pods_root
def
project_pods_root
project_root
+
'Pods'
@project_pods_root
||=
project_root
+
'Pods'
end
end
def
project_podfile
def
project_podfile
...
...
lib/cocoa_pods/installer.rb
View file @
5b5abd6c
...
@@ -2,6 +2,8 @@ module Pod
...
@@ -2,6 +2,8 @@ module Pod
# TODO the static library needs an extra xcconfig which sets the values from issue #1.
# TODO the static library needs an extra xcconfig which sets the values from issue #1.
# Or we could edit the project.pbxproj file, but that seems like more work...
# Or we could edit the project.pbxproj file, but that seems like more work...
class
Installer
class
Installer
include
Config
::
Mixin
def
initialize
(
top_level_specification
,
pods_root
)
def
initialize
(
top_level_specification
,
pods_root
)
@top_level_specification
,
@pods_root
=
top_level_specification
,
pods_root
@top_level_specification
,
@pods_root
=
top_level_specification
,
pods_root
end
end
...
...
lib/cocoa_pods/source.rb
View file @
5b5abd6c
module
Pod
module
Pod
class
Source
class
Source
def
self
.
all
def
self
.
all
@sources
||=
Config
.
instance
.
repos_dir
.
children
.
map
{
|
repo
|
new
(
repo
)
}
@sources
||=
Config
.
instance
.
repos_dir
.
children
.
select
(
&
:directory?
).
map
{
|
repo
|
new
(
repo
)
}
end
end
def
self
.
search
(
dependency
)
def
self
.
search
(
dependency
)
...
...
ASIHTTPRequest
@
90e5fbce
Subproject commit 90e5fbce17d66e5341f105c1eb26133a01686838
JSONKit
@
c2146ffe
Subproject commit c2146ffeb10d92bfa1537d2033a3235825d1b261
SSZipArchive
@
65a8282c
Subproject commit 65a8282c0b5a6f84bc6266d73bbe7475ef75659d
spec/integration_spec.rb
0 → 100644
View file @
5b5abd6c
require
File
.
expand_path
(
'../spec_helper'
,
__FILE__
)
module
SpecHelper
class
Installer
<
Pod
::
Installer
# Here we override the `source' of the pod specifications to point to the integration fixtures.
def
dependent_specification_sets
@dependent_specification_sets
||=
super
@dependent_specification_sets
.
each
do
|
set
|
def
set
.
specification
spec
=
super
unless
spec
.
part_of_other_pod?
source
=
spec
.
read
(
:source
)
source
[
:git
]
=
SpecHelper
.
fixture
(
"integration/
#{
spec
.
read
(
:name
)
}
"
).
to_s
spec
.
source
(
source
)
end
spec
end
end
@dependent_specification_sets
end
end
end
unless
SpecHelper
.
fixture
(
'integration/ASIHTTPRequest'
).
exist?
puts
"[!] You must init/update the git submodules for the integration spec to work, skipping."
else
describe
"A full (integration spec) installation"
do
extend
SpecHelper
::
TemporaryDirectory
before
do
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
config
.
project_pods_root
=
SpecHelper
.
temporary_directory
+
'Pods'
config
.
repos_dir
=
fixture
(
'spec-repos'
)
end
after
do
config
.
project_pods_root
=
nil
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
it
"should work"
do
spec
=
Pod
::
Spec
.
new
do
dependency
'ASIWebPageRequest'
,
'< 1.8.1'
dependency
'JSONKit'
,
'>= 1.0'
dependency
'SSZipArchive'
,
'< 2'
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
,
SpecHelper
.
temporary_directory
)
installer
.
install!
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIWebPageRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'JSONKit.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'SSZipArchive.podspec'
).
should
.
exist
end
it
"does not activate pods that are only part of other pods"
do
spec
=
Pod
::
Spec
.
new
do
dependency
'Reachability'
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
,
SpecHelper
.
temporary_directory
)
installer
.
install!
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
not
.
exist
end
end
end
spec/spec_helper/temporary_directory.rb
View file @
5b5abd6c
...
@@ -16,7 +16,7 @@ module SpecHelper
...
@@ -16,7 +16,7 @@ module SpecHelper
end
end
def
teardown_temporary_directory
def
teardown_temporary_directory
temporary_directory
.
rmtree
temporary_directory
.
rmtree
if
temporary_directory
.
exist?
end
end
def
self
.
extended
(
base
)
def
self
.
extended
(
base
)
...
...
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