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
6854a011
Commit
6854a011
authored
Apr 01, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bye bye config.rootspec.
parent
9afec2a3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
30 deletions
+6
-30
install.rb
lib/cocoapods/command/install.rb
+1
-1
config.rb
lib/cocoapods/config.rb
+5
-5
integration_spec.rb
spec/integration_spec.rb
+0
-20
installer_spec.rb
spec/unit/installer_spec.rb
+0
-2
resolver_spec.rb
spec/unit/resolver_spec.rb
+0
-2
No files found.
lib/cocoapods/command/install.rb
View file @
6854a011
...
@@ -35,7 +35,7 @@ module Pod
...
@@ -35,7 +35,7 @@ module Pod
end
end
def
run
def
run
unless
podfile
=
config
.
rootspec
unless
podfile
=
config
.
podfile
raise
Informative
,
"No `Podfile' found in the current working directory."
raise
Informative
,
"No `Podfile' found in the current working directory."
end
end
if
@projpath
&&
!
File
.
exist?
(
@projpath
)
if
@projpath
&&
!
File
.
exist?
(
@projpath
)
...
...
lib/cocoapods/config.rb
View file @
6854a011
...
@@ -10,7 +10,7 @@ module Pod
...
@@ -10,7 +10,7 @@ module Pod
@instance
=
instance
@instance
=
instance
end
end
attr_accessor
:repos_dir
,
:project_root
,
:project_pods_root
,
:
rootspec
,
:
clean
,
:verbose
,
:silent
,
:doc
,
:doc_install
,
:force_doc
attr_accessor
:repos_dir
,
:project_root
,
:project_pods_root
,
:clean
,
:verbose
,
:silent
,
:doc
,
:doc_install
,
:force_doc
alias_method
:clean?
,
:clean
alias_method
:clean?
,
:clean
alias_method
:verbose?
,
:verbose
alias_method
:verbose?
,
:verbose
alias_method
:silent?
,
:silent
alias_method
:silent?
,
:silent
...
@@ -45,8 +45,8 @@ module Pod
...
@@ -45,8 +45,8 @@ module Pod
end
end
# Returns the spec at the pat returned from `project_podfile`.
# Returns the spec at the pat returned from `project_podfile`.
def
rootspec
def
podfile
@
rootspec
||=
begin
@
podfile
||=
begin
Podfile
.
from_file
(
project_podfile
)
if
project_podfile
.
exist?
Podfile
.
from_file
(
project_podfile
)
if
project_podfile
.
exist?
end
end
end
end
...
@@ -55,14 +55,14 @@ module Pod
...
@@ -55,14 +55,14 @@ module Pod
require
'colored'
require
'colored'
caller
.
find
{
|
line
|
line
=~
/^(.+.podspec):\d*/
}
caller
.
find
{
|
line
|
line
=~
/^(.+.podspec):\d*/
}
puts
"[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.
#{
" Called from:
#{
$1
}
"
if
$1
}
"
.
red
puts
"[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.
#{
" Called from:
#{
$1
}
"
if
$1
}
"
.
red
rootspec
.
target_definitions
[
:default
].
platform
==
:ios
if
rootspec
podfile
.
target_definitions
[
:default
].
platform
==
:ios
if
podfile
end
end
def
osx?
def
osx?
require
'colored'
require
'colored'
caller
.
find
{
|
line
|
line
=~
/^(.+.podspec):\d*/
}
caller
.
find
{
|
line
|
line
=~
/^(.+.podspec):\d*/
}
puts
"[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.
#{
" Called from:
#{
$1
}
"
if
$1
}
"
.
red
puts
"[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.
#{
" Called from:
#{
$1
}
"
if
$1
}
"
.
red
rootspec
.
target_definitions
[
:default
].
platform
==
:osx
if
rootspec
podfile
.
target_definitions
[
:default
].
platform
==
:osx
if
podfile
end
end
module
Mixin
module
Mixin
...
...
spec/integration_spec.rb
View file @
6854a011
...
@@ -201,7 +201,6 @@ else
...
@@ -201,7 +201,6 @@ else
it
"runs the optional post_install callback defined in the Podfile _before_ the project is saved to disk"
do
it
"runs the optional post_install callback defined in the Podfile _before_ the project is saved to disk"
do
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'SSZipArchive'
dependency
'SSZipArchive'
...
@@ -223,9 +222,6 @@ else
...
@@ -223,9 +222,6 @@ else
# TODO add a simple source file which uses the compiled lib to check that it really really works
# TODO add a simple source file which uses the compiled lib to check that it really really works
it
"activates required pods and create a working static library xcode project"
do
it
"activates required pods and create a working static library xcode project"
do
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'Reachability'
,
'> 2.0.5'
if
platform
==
:ios
dependency
'Reachability'
,
'> 2.0.5'
if
platform
==
:ios
dependency
'ASIWebPageRequest'
,
'>= 1.8.1'
dependency
'ASIWebPageRequest'
,
'>= 1.8.1'
...
@@ -270,9 +266,6 @@ else
...
@@ -270,9 +266,6 @@ else
if
platform
==
:ios
if
platform
==
:ios
it
"does not activate pods that are only part of other pods"
do
it
"does not activate pods that are only part of other pods"
do
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'Reachability'
,
'2.0.4'
# only 2.0.4 is part of ASIHTTPRequest’s source.
dependency
'Reachability'
,
'2.0.4'
# only 2.0.4 is part of ASIHTTPRequest’s source.
end
end
...
@@ -290,9 +283,6 @@ else
...
@@ -290,9 +283,6 @@ else
it
"adds resources to the xcode copy script"
do
it
"adds resources to the xcode copy script"
do
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'SSZipArchive'
dependency
'SSZipArchive'
end
end
...
@@ -310,9 +300,6 @@ else
...
@@ -310,9 +300,6 @@ else
# TODO we need to do more cleaning and/or add a --prune task
# TODO we need to do more cleaning and/or add a --prune task
it
"overwrites an existing project.pbxproj file"
do
it
"overwrites an existing project.pbxproj file"
do
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'JSONKit'
dependency
'JSONKit'
end
end
...
@@ -320,9 +307,6 @@ else
...
@@ -320,9 +307,6 @@ else
installer
.
install!
installer
.
install!
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'SSZipArchive'
dependency
'SSZipArchive'
end
end
...
@@ -335,8 +319,6 @@ else
...
@@ -335,8 +319,6 @@ else
it
"creates a project with multiple targets"
do
it
"creates a project with multiple targets"
do
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
target
(
:debug
)
{
dependency
'SSZipArchive'
}
target
(
:debug
)
{
dependency
'SSZipArchive'
}
target
(
:test
,
:exclusive
=>
true
)
{
dependency
'JSONKit'
}
target
(
:test
,
:exclusive
=>
true
)
{
dependency
'JSONKit'
}
...
@@ -409,8 +391,6 @@ else
...
@@ -409,8 +391,6 @@ else
it
"should prevent duplication cleaning headers symlinks with multiple targets"
do
it
"should prevent duplication cleaning headers symlinks with multiple targets"
do
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
target
(
:debug
)
{
dependency
'SSZipArchive'
}
target
(
:debug
)
{
dependency
'SSZipArchive'
}
target
(
:test
,
:exclusive
=>
true
)
{
dependency
'JSONKit'
}
target
(
:test
,
:exclusive
=>
true
)
{
dependency
'JSONKit'
}
...
...
spec/unit/installer_spec.rb
View file @
6854a011
...
@@ -35,7 +35,6 @@ describe "Pod::Installer" do
...
@@ -35,7 +35,6 @@ describe "Pod::Installer" do
platform
:osx
platform
:osx
dependency
'ASIHTTPRequest'
dependency
'ASIHTTPRequest'
end
end
config
.
rootspec
=
podfile
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
=
Pod
::
Installer
.
new
(
podfile
)
pods
=
installer
.
activated_specifications
.
map
do
|
spec
|
pods
=
installer
.
activated_specifications
.
map
do
|
spec
|
Pod
::
LocalPod
.
new
(
spec
,
installer
.
sandbox
,
podfile
.
target_definitions
[
:default
].
platform
)
Pod
::
LocalPod
.
new
(
spec
,
installer
.
sandbox
,
podfile
.
target_definitions
[
:default
].
platform
)
...
@@ -52,7 +51,6 @@ describe "Pod::Installer" do
...
@@ -52,7 +51,6 @@ describe "Pod::Installer" do
dependency
'JSONKit'
dependency
'JSONKit'
end
end
end
end
config
.
rootspec
=
podfile
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
=
Pod
::
Installer
.
new
(
podfile
)
installer
.
target_installers
.
map
(
&
:target_definition
).
map
(
&
:name
).
should
==
[
:not_empty
]
installer
.
target_installers
.
map
(
&
:target_definition
).
map
(
&
:name
).
should
==
[
:not_empty
]
end
end
...
...
spec/unit/resolver_spec.rb
View file @
6854a011
...
@@ -10,7 +10,6 @@ describe "Pod::Resolver" do
...
@@ -10,7 +10,6 @@ describe "Pod::Resolver" do
platform
:ios
platform
:ios
dependency
'ASIWebPageRequest'
dependency
'ASIWebPageRequest'
end
end
config
.
rootspec
=
@podfile
@resolver
=
Pod
::
Resolver
.
new
(
@podfile
,
stub
(
'sandbox'
))
@resolver
=
Pod
::
Resolver
.
new
(
@podfile
,
stub
(
'sandbox'
))
end
end
...
@@ -66,7 +65,6 @@ describe "Pod::Resolver" do
...
@@ -66,7 +65,6 @@ describe "Pod::Resolver" do
dependency
'RestKit/Network'
dependency
'RestKit/Network'
dependency
'RestKit/ObjectMapping'
dependency
'RestKit/ObjectMapping'
end
end
config
.
rootspec
=
@podfile
resolver
=
Pod
::
Resolver
.
new
(
@podfile
,
stub
(
'sandbox'
))
resolver
=
Pod
::
Resolver
.
new
(
@podfile
,
stub
(
'sandbox'
))
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:name
).
sort
.
should
==
%w{
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:name
).
sort
.
should
==
%w{
LibComponentLogging-Core
LibComponentLogging-Core
...
...
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