Method: Pod::Source#all_specs

Defined in:
lib/cocoapods-core/source.rb

#all_specsArray<Specification>

Returns all the specifications contained by the source.

Returns:

  • (Array<Specification>)

    all the specifications contained by the source.


219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/cocoapods-core/source.rb', line 219

def all_specs
  glob = specs_dir.join('*/' * .prefix_lengths.size, '*', '*', '*.podspec{.json,}')
  specs = Pathname.glob(glob).map do |path|
    begin
      Specification.from_file(path)
    rescue
      CoreUI.warn "Skipping `#{path.relative_path_from(repo)}` because the " \
                  'podspec contains errors.'
      next
    end
  end
  specs.compact
end