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
4a709b87
Commit
4a709b87
authored
Apr 01, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make building a iOS lib work again.
parent
7ee5b4b1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
22 deletions
+74
-22
.gitmodules
.gitmodules
+3
-0
Gemfile.lock
Gemfile.lock
+1
-1
TODO
TODO
+2
-0
installer.rb
lib/cocoapods/installer.rb
+5
-4
local_pod.rb
lib/cocoapods/local_pod.rb
+6
-2
resolver.rb
lib/cocoapods/resolver.rb
+2
-0
Reachability
spec/fixtures/integration/Reachability
+1
-0
integration_spec.rb
spec/integration_spec.rb
+52
-14
spec_helper.rb
spec/spec_helper.rb
+2
-1
No files found.
.gitmodules
View file @
4a709b87
...
@@ -13,3 +13,6 @@
...
@@ -13,3 +13,6 @@
[submodule "spec/fixtures/spec-repos/master"]
[submodule "spec/fixtures/spec-repos/master"]
path = spec/fixtures/spec-repos/master
path = spec/fixtures/spec-repos/master
url = https://github.com/CocoaPods/Specs.git
url = https://github.com/CocoaPods/Specs.git
[submodule "spec/fixtures/integration/Reachability"]
path = spec/fixtures/integration/Reachability
url = https://github.com/tonymillion/Reachability.git
Gemfile.lock
View file @
4a709b87
GIT
GIT
remote: git://github.com/CocoaPods/Xcodeproj.git
remote: git://github.com/CocoaPods/Xcodeproj.git
revision:
b3db4601c47bf78cb5e6fa8ada5bcb4cda18e05f
revision:
c7a2acb7f49005823a37cea0089e558ff4a13af7
specs:
specs:
xcodeproj (0.1.0)
xcodeproj (0.1.0)
...
...
TODO
View file @
4a709b87
* For now, remove ability to set things like link_with and platform through the target options.
* Resolve all dependencies together and write out all dependencies to Podfile.lock together.
* Resolve all dependencies together and write out all dependencies to Podfile.lock together.
* Add integration spec with multiple platforms.
* Add integration spec with multiple platforms.
* Validate platforms for each target definition.
* Validate platforms for each target definition.
* Validate that there are dependencies in a Podfile.
* Validate that there are dependencies in a Podfile.
* Validate that the dependencies in the targets don't conflict. E.g. two different versions of the same pod.
* Validate that the dependencies in the targets don't conflict. E.g. two different versions of the same pod.
* Move Podfile.lock generator from Installer into its own file.
lib/cocoapods/installer.rb
View file @
4a709b87
require
'colored'
module
Pod
module
Pod
class
Installer
class
Installer
autoload
:TargetInstaller
,
'cocoapods/installer/target_installer'
autoload
:TargetInstaller
,
'cocoapods/installer/target_installer'
...
@@ -47,7 +49,7 @@ module Pod
...
@@ -47,7 +49,7 @@ module Pod
unless
should_install
=
!
pod
.
exists?
&&
!
pod
.
specification
.
local?
unless
should_install
=
!
pod
.
exists?
&&
!
pod
.
specification
.
local?
puts
marker
+
"Using
#{
pod
}
"
unless
config
.
silent?
puts
marker
+
"Using
#{
pod
}
"
unless
config
.
silent?
else
else
puts
marker
+
"Installing
#{
spec
}
"
.
green
unless
config
.
silent?
puts
marker
+
"Installing
#{
pod
.
specification
}
"
.
green
unless
config
.
silent?
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
.
download
downloader
.
download
...
@@ -111,9 +113,8 @@ module Pod
...
@@ -111,9 +113,8 @@ module Pod
file
.
puts
"PODS:"
file
.
puts
"PODS:"
pods
.
map
do
|
pod
|
pods
.
map
do
|
pod
|
# TODO this should list _all_ the pods, so merge the platforms
# TODO this should list _all_ the pods, so merge the platforms
dependencies
=
pod
.
specification
.
dependencies
[
@podfile
.
target_definitions
[
:default
].
platform
.
to_sym
]
[
pod
.
specification
.
to_s
,
pod
.
dependencies
.
map
(
&
:to_s
).
sort
]
[
pod
.
specification
.
to_s
,
dependencies
.
map
(
&
:to_s
).
sort
]
end
.
uniq
.
sort_by
(
&
:first
).
each
do
|
name
,
deps
|
end
.
sort_by
(
&
:first
).
each
do
|
name
,
deps
|
if
deps
.
empty?
if
deps
.
empty?
file
.
puts
" -
#{
name
}
"
file
.
puts
" -
#{
name
}
"
else
else
...
...
lib/cocoapods/local_pod.rb
View file @
4a709b87
...
@@ -77,13 +77,17 @@ module Pod
...
@@ -77,13 +77,17 @@ module Pod
def
add_to_target
(
target
)
def
add_to_target
(
target
)
implementation_files
.
each
do
|
file
|
implementation_files
.
each
do
|
file
|
target
.
add_source_file
(
file
,
nil
,
specification
.
compiler_flags
[
@platform
.
to_sym
].
strip
)
target
.
add_source_file
(
file
,
nil
,
specification
.
compiler_flags
[
@platform
.
name
].
strip
)
end
end
end
end
def
requires_arc?
def
requires_arc?
specification
.
requires_arc
specification
.
requires_arc
end
end
def
dependencies
specification
.
dependencies
[
@platform
.
name
]
end
private
private
...
@@ -107,7 +111,7 @@ module Pod
...
@@ -107,7 +111,7 @@ module Pod
end
end
def
expanded_paths
(
platforms_with_patterns
,
options
=
{})
def
expanded_paths
(
platforms_with_patterns
,
options
=
{})
patterns
=
platforms_with_patterns
.
is_a?
(
Hash
)
?
(
platforms_with_patterns
[
@platform
.
to_sym
]
||
[])
:
platforms_with_patterns
patterns
=
platforms_with_patterns
.
is_a?
(
Hash
)
?
platforms_with_patterns
[
@platform
.
name
]
:
platforms_with_patterns
patterns
.
map
do
|
pattern
|
patterns
.
map
do
|
pattern
|
pattern
=
root
+
pattern
pattern
=
root
+
pattern
...
...
lib/cocoapods/resolver.rb
View file @
4a709b87
require
'colored'
module
Pod
module
Pod
class
Resolver
class
Resolver
include
Config
::
Mixin
include
Config
::
Mixin
...
...
Reachability
@
c8a3e521
Subproject commit c8a3e521ee57ce2e6fa73c55a3e2f0042cc2033a
spec/integration_spec.rb
View file @
4a709b87
...
@@ -6,20 +6,16 @@ require 'yaml'
...
@@ -6,20 +6,16 @@ require 'yaml'
module
SpecHelper
module
SpecHelper
class
Installer
<
Pod
::
Installer
class
Installer
<
Pod
::
Installer
# Here we override the `source' of the pod specifications to point to the integration fixtures.
# Here we override the `source' of the pod specifications to point to the integration fixtures.
def
dependent_specification_sets
def
dependency_specifications
@dependent_specification_sets
||=
super
@dependency_specifications
||=
super
@dependent_specification_sets
.
each
do
|
set
|
@dependency_specifications
.
each
do
|
spec
|
def
set
.
specification
unless
spec
.
part_of_other_pod?
spec
=
super
source
=
spec
.
source
unless
spec
.
part_of_other_pod?
source
[
:git
]
=
SpecHelper
.
fixture
(
"integration/
#{
spec
.
name
}
"
).
to_s
source
=
spec
.
source
spec
.
source
=
source
source
[
:git
]
=
SpecHelper
.
fixture
(
"integration/
#{
spec
.
name
}
"
).
to_s
spec
.
source
=
source
end
spec
end
end
end
end
@dependen
t_specification_set
s
@dependen
cy_specification
s
end
end
end
end
end
end
...
@@ -33,7 +29,11 @@ else
...
@@ -33,7 +29,11 @@ else
def
create_config!
def
create_config!
Pod
::
Config
.
instance
=
nil
Pod
::
Config
.
instance
=
nil
config
.
silent
=
true
if
ENV
[
'VERBOSE_SPECS'
]
config
.
verbose
=
true
else
config
.
silent
=
true
end
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
project_root
=
temporary_directory
config
.
project_root
=
temporary_directory
config
.
doc_install
=
false
config
.
doc_install
=
false
...
@@ -134,7 +134,45 @@ else
...
@@ -134,7 +134,45 @@ else
change_log
.
should
.
not
.
include
'1.3'
change_log
.
should
.
not
.
include
'1.3'
end
end
if
!
`which appledoc`
.
strip
.
empty?
it
"creates targets for different targets"
do
podfile
=
Pod
::
Podfile
.
new
do
self
.
platform
:ios
dependency
'JSONKit'
,
'1.4'
target
:ios_target
do
# This brings in Reachability on iOS
dependency
'ASIHTTPRequest'
end
target
:osx_target
do
self
.
platform
:osx
dependency
'ASIHTTPRequest'
end
end
installer
=
SpecHelper
::
Installer
.
new
(
podfile
)
installer
.
install!
YAML
.
load
(
installer
.
lock_file
.
read
).
should
==
{
"PODS"
=>
[{
"ASIHTTPRequest (1.8.1)"
=>
[
"Reachability"
]
},
"JSONKit (1.4)"
,
"Reachability (3.0.0)"
],
"DEPENDENCIES"
=>
[
"ASIHTTPRequest"
,
"JSONKit (= 1.4)"
]
}
with_xcodebuild_available
do
Dir
.
chdir
(
config
.
project_pods_root
)
do
puts
"
\n
[!] Compiling iOS static library..."
target_definition
=
podfile
.
target_definitions
[
:ios_target
]
should_successfully_perform
"xcodebuild -target '
#{
target_definition
.
label
}
'"
lib_path
=
config
.
project_pods_root
+
'build/Release-iphoneos'
+
target_definition
.
lib_name
`lipo -info '
#{
lib_path
}
'`
.
should
.
include
'architecture: armv7'
puts
"
\n
[!] Compiling OS X static library..."
target_definition
=
podfile
.
target_definitions
[
:osx_target
]
should_successfully_perform
"xcodebuild -target '
#{
target_definition
.
label
}
'"
exec
'ls'
end
end
end
if
Pod
::
Generator
::
Documentation
.
appledoc_installed?
it
"generates documentation of all pods by default"
do
it
"generates documentation of all pods by default"
do
create_config!
create_config!
...
...
spec/spec_helper.rb
View file @
4a709b87
...
@@ -30,8 +30,9 @@ module Bacon
...
@@ -30,8 +30,9 @@ module Bacon
Pod
::
Command
::
ARGV
.
new
(
argv
)
Pod
::
Command
::
ARGV
.
new
(
argv
)
end
end
require
'colored'
def
xit
(
description
,
*
args
)
def
xit
(
description
,
*
args
)
puts
"
\e
[34m -
#{
description
}
[DISABLED]
\e
[0m"
puts
"
-
#{
description
}
[DISABLED]"
.
blue
ErrorLog
<<
"[DISABLED]
#{
self
.
name
}
#{
description
}
\n\n
"
ErrorLog
<<
"[DISABLED]
#{
self
.
name
}
#{
description
}
\n\n
"
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