Skip to content

Instantly share code, notes, and snippets.

@segiddins
Created Nov 25, 2014
Embed
What would you like to do?
Generate Molinillo integration spec indices from CocoaPods
require 'cocoapods'
master = Pod::SourcesManager.master.first
pods = {}
# names = master.pods
names = %w(AFAmazonS3Client AFNetworking AFOAuth2Client CargoBay)
names.each do |n|
pods[n] = master.versions(n).map { |v| master.specification(n, v) }.map { |s| {name: s.name, version: s.version, dependencies: Hash[s.dependencies.map { |d| [d.name, d.requirement] }]} }
end
require 'json'
File.open('spec/resolver_integration_specs/index/three_way_conflict.json', 'w') { |f| f.puts JSON.pretty_generate pods }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment