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
b477cdeb
Commit
b477cdeb
authored
Apr 15, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SourcesManager] Provide a deprecation path for access to Pod::SourcesManager
parent
96c6d8ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
sources_manager.rb
lib/cocoapods/sources_manager.rb
+33
-0
No files found.
lib/cocoapods/sources_manager.rb
View file @
b477cdeb
...
@@ -153,4 +153,37 @@ module Pod
...
@@ -153,4 +153,37 @@ module Pod
UI
.
puts
(
message
)
UI
.
puts
(
message
)
end
end
end
end
# @!visibility private
SOURCES_MANAGER_CONSTANT_WARNINGS
=
Set
.
new
# @!visibility private
#
# Warn about deprecated use of `Pod::SourcesManager` and return the config's
# Source::Manager
#
# @return [Pod::Source::Manager]
#
def
self
.
sources_manager_constant
calling_line
=
caller
[
1
]
if
SOURCES_MANAGER_CONSTANT_WARNINGS
.
add?
(
calling_line
)
warn
'Usage of the constant `Pod::SourcesManager` is deprecated, '
\
'use `Pod::Config.instance.sources_manager` instead '
\
"(called from
#{
calling_line
}
)"
end
Config
.
instance
.
sources_manager
end
end
def
Pod
.
const_missing
(
const
)
return
super
unless
const
.
to_sym
==
:SourcesManager
::
Pod
.
sources_manager_constant
end
def
Object
.
const_missing
(
const
)
unless
const
.
to_sym
==
:SourcesManager
&&
ancestors
.
any?
{
|
a
|
a
==
::
Pod
||
a
.
name
.
start_with?
(
'Pod::'
)
}
return
super
end
::
Pod
.
sources_manager_constant
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