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
40298ba7
Commit
40298ba7
authored
May 23, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Config] Use the pwd as installation root if no Podfile can be found
parent
3bdfb723
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
config.rb
lib/cocoapods/config.rb
+2
-1
config_spec.rb
spec/unit/config_spec.rb
+2
-2
No files found.
lib/cocoapods/config.rb
View file @
40298ba7
...
@@ -134,6 +134,7 @@ module Pod
...
@@ -134,6 +134,7 @@ module Pod
current_path
=
current_path
.
parent
current_path
=
current_path
.
parent
end
end
end
end
@installation_root
||=
Pathname
.
pwd
end
end
@installation_root
@installation_root
end
end
...
@@ -181,7 +182,7 @@ module Pod
...
@@ -181,7 +182,7 @@ module Pod
# @return [Nil]
# @return [Nil]
#
#
def
podfile_path
def
podfile_path
@podfile_path
||=
podfile_path_in_dir
(
installation_root
)
if
installation_root
@podfile_path
||=
podfile_path_in_dir
(
installation_root
)
end
end
# Returns the path of the Lockfile.
# Returns the path of the Lockfile.
...
...
spec/unit/config_spec.rb
View file @
40298ba7
...
@@ -59,9 +59,9 @@ module Pod
...
@@ -59,9 +59,9 @@ module Pod
end
end
end
end
it
"it returns
a nil
installation root if no Podfile can be found"
do
it
"it returns
the working directory as the
installation root if no Podfile can be found"
do
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
do
config
.
installation_root
.
should
==
nil
config
.
installation_root
.
should
==
temporary_directory
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