Class: SourceHelper
- Inherits:
-
Object
- Object
- SourceHelper
- Includes:
- Singleton
- Defined in:
- lib/cocoapods-whitelist/helpers/source_helper.rb
Overview
In charge of host the Pods names that comes from our private sources
NOTE: The safest way to handle this was to host the complete specification and not only the pods
names as rubydocs specified
(https://www.rubydoc.info/github/CocoaPods/Core/Pod/Source#all_specs-instance_method)
However, the execution time was considerably slower.
Instance Attribute Summary collapse
-
#specs ⇒ Object
Returns the value of attribute specs.
Instance Method Summary collapse
-
#initialize ⇒ SourceHelper
constructor
A new instance of SourceHelper.
- #is_filled ⇒ Object
- #setup(sources, private_sources) ⇒ Object
Constructor Details
#initialize ⇒ SourceHelper
Returns a new instance of SourceHelper.
15 16 17 |
# File 'lib/cocoapods-whitelist/helpers/source_helper.rb', line 15 def initialize() @specs ||= [] end |
Instance Attribute Details
#specs ⇒ Object
Returns the value of attribute specs.
13 14 15 |
# File 'lib/cocoapods-whitelist/helpers/source_helper.rb', line 13 def specs @specs end |
Instance Method Details
#is_filled ⇒ Object
26 27 28 |
# File 'lib/cocoapods-whitelist/helpers/source_helper.rb', line 26 def is_filled return !@specs.empty? end |
#setup(sources, private_sources) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/cocoapods-whitelist/helpers/source_helper.rb', line 19 def setup(sources, private_sources) private_sources = sources.select {|s| private_sources.include? s.url} private_sources.each do |s| @specs.concat s.pods end end |