Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env ruby
- #
- # @author Nelo Onyiah
- $LOAD_PATH.unshift( File.dirname( __FILE__ ) + "/../lib" )
- require "rubygems"
- require "csv"
- require "data_reconcile_helpers"
- include DataReconcileHelpers
- #
- # Find ES Cells that are in HTGT but not in IDCC and write the shortfall to file
- CSV.open( "/Users/io1/Desktop/shortfall.csv", "w", :col_sep => "\n" ) do |writer|
- [ :eucomm, :komp_csd ].each do |project_name|
- htgt_products = fetch_distributable_es_cells_from_htgt( project_name )
- idcc_products = fetch_distributable_es_cells_from_idcc( project_name ).keys
- shortfall = [ htgt_products - idcc_products ].flatten.uniq
- writer << shortfall
- puts "There is a shortfall of #{ shortfall.size } for the #{ project_name } project"
- end
- end
Add Comment
Please, Sign In to add comment