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
856eb5e6
Commit
856eb5e6
authored
Apr 11, 2013
by
Taras Kalapun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --all to podfile-info. Added testing spec.
parent
286762ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
podfile_info.rb
lib/cocoapods/command/podfile_info.rb
+6
-3
podfile_info_spec.rb
spec/functional/command/podfile_info_spec.rb
+32
-0
No files found.
lib/cocoapods/command/podfile_info.rb
View file @
856eb5e6
...
@@ -13,7 +13,7 @@ module Pod
...
@@ -13,7 +13,7 @@ module Pod
def
self
.
options
def
self
.
options
[
[
#
["--all", "Show information about all Pods with dependencies that are used in a project"],
[
"--all"
,
"Show information about all Pods with dependencies that are used in a project"
],
[
"--md"
,
"Output information in Markdown format"
]
[
"--md"
,
"Output information in Markdown format"
]
].
concat
(
super
)
].
concat
(
super
)
end
end
...
@@ -32,8 +32,11 @@ module Pod
...
@@ -32,8 +32,11 @@ module Pod
UI
.
puts
"Using lockfile"
if
config
.
verbose?
UI
.
puts
"Using lockfile"
if
config
.
verbose?
verify_lockfile_exists!
verify_lockfile_exists!
lockfile
=
config
.
lockfile
lockfile
=
config
.
lockfile
# pods = (@info_all) ? lockfile.dependencies : lockfile.pod_names
pods
=
lockfile
.
pod_names
pods
=
lockfile
.
pod_names
if
@info_all
deps
=
lockfile
.
dependencies
.
map
{
|
d
|
d
.
name
}
pods
=
(
deps
+
pods
).
uniq
end
elsif
@podfile_path
elsif
@podfile_path
podfile
=
Pod
::
Podfile
.
from_file
(
@podfile_path
)
podfile
=
Pod
::
Podfile
.
from_file
(
@podfile_path
)
pods
=
pods_from_podfile
(
podfile
)
pods
=
pods_from_podfile
(
podfile
)
...
@@ -43,7 +46,7 @@ module Pod
...
@@ -43,7 +46,7 @@ module Pod
pods
=
pods_from_podfile
(
podfile
)
pods
=
pods_from_podfile
(
podfile
)
end
end
UI
.
puts
"
\n
Pods used:
\n
"
.
yellow
unless
(
config
.
silent
||
@info_in_md
)
UI
.
puts
"
\n
Pods used:
\n
"
.
yellow
unless
@info_in_md
pods_info
(
pods
,
@info_in_md
)
pods_info
(
pods
,
@info_in_md
)
end
end
...
...
spec/functional/command/podfile_info_spec.rb
0 → 100644
View file @
856eb5e6
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
PodfileInfo
do
extend
SpecHelper
::
TemporaryRepos
before
do
@test_source
=
Source
.
new
(
fixture
(
'spec-repos/test_repo'
))
Source
::
Aggregate
.
any_instance
.
stubs
(
:all
).
returns
([
@test_source
])
SourcesManager
.
updated_search_index
=
nil
end
it
"tells the user pods info from Podfile"
do
file
=
temporary_directory
+
'Podfile'
text
=
<<-
PODFILE
platform :ios
pod 'BananaLib'
pod 'JSONKit'
PODFILE
File
.
open
(
file
,
'w'
)
{
|
f
|
f
.
write
(
text
)
}
Dir
.
chdir
(
temporary_directory
)
do
output
=
run_command
(
'podfile-info'
)
output
.
should
.
include?
'- BananaLib - Chunky bananas!'
output
.
should
.
include?
'- JSONKit - A Very High Performance Objective-C JSON Library.'
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