Skip to content

Instantly share code, notes, and snippets.

@aj0strow
Created December 16, 2014 21:22
Show Gist options
  • Save aj0strow/c815a580c620319f296d to your computer and use it in GitHub Desktop.
Save aj0strow/c815a580c620319f296d to your computer and use it in GitHub Desktop.
diff heroku env
require 'set'
one = ARGV.shift
two = ARGV.shift
xs, ys = [ one, two ].map do |app_name|
text = `heroku config -a #{app_name}`
Set.new(text.scan(/^(\w+):/))
end
ks = xs + ys
xs, ys = ks - ys, ks - xs
puts
puts "== #{one}"
puts xs.to_a
puts
puts "== #{two}"
puts ys.to_a
puts
__END__
$ heroku apps | grep app_name | xargs ruby diff.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment