Skip to content

Instantly share code, notes, and snippets.

@segiddins
Created November 25, 2014 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save segiddins/0d6b66835535325ecf0e to your computer and use it in GitHub Desktop.
Save segiddins/0d6b66835535325ecf0e to your computer and use it in GitHub Desktop.
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