Guest User

Untitled

a guest
Jul 15th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. #! /usr/bin/env ruby
  2. #
  3. # @author Nelo Onyiah
  4.  
  5. $LOAD_PATH.unshift( File.dirname( __FILE__ ) + "/../lib" )
  6.  
  7. require "rubygems"
  8. require "csv"
  9. require "data_reconcile_helpers"
  10.  
  11. include DataReconcileHelpers
  12.  
  13. #
  14. # Find ES Cells that are in HTGT but not in IDCC and write the shortfall to file
  15. CSV.open( "/Users/io1/Desktop/shortfall.csv", "w", :col_sep => "\n" ) do |writer|
  16. [ :eucomm, :komp_csd ].each do |project_name|
  17. htgt_products = fetch_distributable_es_cells_from_htgt( project_name )
  18. idcc_products = fetch_distributable_es_cells_from_idcc( project_name ).keys
  19. shortfall = [ htgt_products - idcc_products ].flatten.uniq
  20. writer << shortfall
  21. puts "There is a shortfall of #{ shortfall.size } for the #{ project_name } project"
  22. end
  23. end
Add Comment
Please, Sign In to add comment