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
87d76497
Commit
87d76497
authored
Feb 20, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Command] Added inter process communication command.
parent
9bee5b81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
16 deletions
+126
-16
CHANGELOG.md
CHANGELOG.md
+6
-16
command.rb
lib/cocoapods/command.rb
+1
-0
inter_process_communication.rb
lib/cocoapods/command/inter_process_communication.rb
+79
-0
inter_process_communication_spec.rb
spec/functional/command/inter_process_communication_spec.rb
+40
-0
No files found.
CHANGELOG.md
View file @
87d76497
...
@@ -3,22 +3,6 @@
...
@@ -3,22 +3,6 @@
•
[
Core
](
https://github.com/CocoaPods/Core/master
)
•
[
Core
](
https://github.com/CocoaPods/Core/master
)
•
[
Xcodeproj
](
https://github.com/CocoaPods/Xcodeproj/compare/0.4.0...master
)
•
[
Xcodeproj
](
https://github.com/CocoaPods/Xcodeproj/compare/0.4.0...master
)
###### TODO
-
LocalPod should return a has for the resources.
-
FileList is not working.
-
Bad bug with Specification default values being corroded exponentially in subsequent calls.
-
Drop script for resources.?
-
Add support for
`prefix_header_file`
in subspecs
-
Add support for
`prefix_header_contents`
in subspecs
-
Add Rake FileList warning.
-
Release: Enable CocoaPods Core-warnings
-
Subspecs now do not inherit the files patterns from the parent spec.
-
The workspace is written only if needed greatly reducing the occasions in
which Xcode asks to revert.
-
Specification hooks are only called when the specification is installed.
-
The Lockfile is sorted reducing the SCM noise.
###### Specification DSL
###### Specification DSL
-
[
__Breaking__
]
Deprecated
`header_mappings`
hook.
-
[
__Breaking__
]
Deprecated
`header_mappings`
hook.
...
@@ -36,6 +20,11 @@
...
@@ -36,6 +20,11 @@
###### Enhancements
###### Enhancements
-
Subspecs now do not inherit the files patterns from the parent spec.
-
The workspace is written only if needed greatly reducing the occasions in
which Xcode asks to revert.
-
Specification hooks are only called when the specification is installed.
-
The Lockfile is sorted reducing the SCM noise.
-
Simplified installation: no specific version of ruby gems is required anymore.
-
Simplified installation: no specific version of ruby gems is required anymore.
-
Released preview
[
documentation
](
docs.cocoapods.org
)
.
-
Released preview
[
documentation
](
docs.cocoapods.org
)
.
-
CocoaPods now has support for working in teams and not committing the Pods folder.
-
CocoaPods now has support for working in teams and not committing the Pods folder.
...
@@ -47,6 +36,7 @@
...
@@ -47,6 +36,7 @@
-
The
`--no-clean`
option of the
`pod spec lint`
command now displays the Pods project for inspection.
-
The
`--no-clean`
option of the
`pod spec lint`
command now displays the Pods project for inspection.
-
It is now possible to specify default values for the configuration in
`~/.cocoapods/config.yaml`
(
[
example
](
)).
-
It is now possible to specify default values for the configuration in
`~/.cocoapods/config.yaml`
(
[
example
](
)).
-
CocoaPods now checks the checksums of the installed specifications and reinstalls them if needed.
-
CocoaPods now checks the checksums of the installed specifications and reinstalls them if needed.
-
Added new command
`pod ipc`
to provide support for inter process communication.
###### Bug fixes
###### Bug fixes
...
...
lib/cocoapods/command.rb
View file @
87d76497
...
@@ -99,3 +99,4 @@ require 'cocoapods/command/repo'
...
@@ -99,3 +99,4 @@ require 'cocoapods/command/repo'
require
'cocoapods/command/search'
require
'cocoapods/command/search'
require
'cocoapods/command/setup'
require
'cocoapods/command/setup'
require
'cocoapods/command/spec'
require
'cocoapods/command/spec'
require
'cocoapods/command/inter_process_communication'
lib/cocoapods/command/inter_process_communication.rb
0 → 100644
View file @
87d76497
module
Pod
class
Command
class
IPC
<
Command
self
.
abstract_command
=
true
self
.
summary
=
'Inter process communication'
#-----------------------------------------------------------------------#
class
Spec
<
IPC
self
.
summary
=
'Converts a podspec to YAML.'
self
.
description
=
'Converts a podspec to YAML and prints it to STDOUT.'
self
.
arguments
=
'PATH'
def
initialize
(
argv
)
@path
=
argv
.
shift_argument
super
end
def
run
if
@path
.
nil?
raise
Informative
,
"Path not given."
elsif
!
File
.
exists?
(
@path
)
raise
Informative
,
"The given path doesn't exists `
#{
@path
}
` not given."
end
spec
=
Specification
.
from_file
(
@path
)
UI
.
puts
spec
.
to_yaml
end
end
#-----------------------------------------------------------------------#
class
List
<
IPC
self
.
summary
=
'Lists the specifications know to CocoaPods.'
self
.
description
=
<<-
DESC
Prints to STDOUT a YAML dictionary where the keys are the name of the
specifications and the values are a dictionary with the following
keys.
- defined_in_file
- version
- authors
- summary
- description
- platforms
DESC
def
run
sets
=
SourcesManager
.
all_sets
result
=
{}
sets
.
each
do
|
set
|
begin
spec
=
set
.
specification
result
[
spec
.
name
]
=
{
'defined_in_file'
=>
spec
.
defined_in_file
.
to_s
,
'version'
=>
spec
.
version
,
'authors'
=>
spec
.
authors
,
'summary'
=>
spec
.
summary
,
'description'
=>
spec
.
description
,
'platforms'
=>
spec
.
available_platforms
.
map
{
|
p
|
p
.
name
.
to_s
},
}
rescue
DSLError
next
end
end
UI
.
puts
result
.
to_yaml
end
end
#-----------------------------------------------------------------------#
end
end
end
spec/functional/command/inter_process_communication_spec.rb
0 → 100644
View file @
87d76497
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
Command
::
IPC
do
describe
Command
::
IPC
::
Spec
do
it
"converts a podspec to yaml and prints it to STDOUT"
do
out
=
run_command
(
'ipc'
,
'spec'
,
fixture
(
'banana-lib/BananaLib.podspec'
))
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/name: BananaLib/
out
.
should
.
match
/version: .1\.0./
out
.
should
.
match
/description: Full of chunky bananas./
end
end
#-------------------------------------------------------------------------#
describe
Command
::
IPC
::
List
do
it
"converts a podspec to yaml and prints it to STDOUT"
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
set
=
Specification
.
new
(
'BananaLib'
)
set
.
stubs
(
:specification
).
returns
(
spec
)
SourcesManager
.
stubs
(
:all_sets
).
returns
([
set
])
out
=
run_command
(
'ipc'
,
'list'
)
out
.
should
.
include
(
'---'
)
out
.
should
.
match
/BananaLib:/
out
.
should
.
match
/version: .1\.0./
out
.
should
.
match
/description: Full of chunky bananas./
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