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
5c2723c3
Commit
5c2723c3
authored
Dec 26, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installation] Update for new Podfile#installation_method signature
parent
a928351a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
Gemfile.lock
Gemfile.lock
+1
-1
installation_options.rb
lib/cocoapods/installer/installation_options.rb
+19
-4
No files found.
Gemfile.lock
View file @
5c2723c3
...
@@ -7,7 +7,7 @@ GIT
...
@@ -7,7 +7,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Core.git
remote: https://github.com/CocoaPods/Core.git
revision: 93
db7951de84e96562f5b47882f6307983155bf8
revision: 93
0de7aeb3f50eccf6d65b4d479daa3f5a956f87
branch: seg-podfile-refactor
branch: seg-podfile-refactor
specs:
specs:
cocoapods-core (0.39.0)
cocoapods-core (0.39.0)
...
...
lib/cocoapods/installer/installation_options.rb
View file @
5c2723c3
...
@@ -4,17 +4,32 @@ module Pod
...
@@ -4,17 +4,32 @@ module Pod
class
Installer
class
Installer
class
InstallationOptions
class
InstallationOptions
def
self
.
from_podfile
(
podfile
)
def
self
.
from_podfile
(
podfile
)
name
=
podfile
.
installation_method
[
'name'
]
name
,
options
=
podfile
.
installation_method
unless
name
.
downcase
==
'cocoapods'
unless
name
.
downcase
==
'cocoapods'
raise
Informative
"
currently need to specify a cocoapods install, you chose
#{
name
}
"
raise
Informative
"
Currently need to specify a `cocoapods` install, you chose `
#{
name
}
`.
"
end
end
options
=
podfile
.
installation_method
[
'options'
]
new
(
options
)
new
(
options
)
end
end
# Defines a new installation option.
#
# @param [#to_s] name the name of the option.
#
# @param default the default value for the option.
#
# @param [Boolean] boolean whether the option has a boolean value.
#
# @return [void]
#
# @!macro [attach] option
#
# @note this option defaults to $2.
#
# @return the $1 $0 for installation.
#
def
self
.
option
(
name
,
default
,
boolean:
true
)
def
self
.
option
(
name
,
default
,
boolean:
true
)
name
=
name
.
to_s
name
=
name
.
to_s
raise
ArgumentError
,
"The
#{
name
}
option is already defined"
if
defaults
.
key?
(
name
)
raise
ArgumentError
,
"The
`
#{
name
}
`
option is already defined"
if
defaults
.
key?
(
name
)
defaults
[
name
]
=
default
defaults
[
name
]
=
default
attr_accessor
name
attr_accessor
name
alias_method
"
#{
name
}
?"
,
name
if
boolean
alias_method
"
#{
name
}
?"
,
name
if
boolean
...
...
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