<commit_before>require 'rubygems'


module Confetti


class deployment

	include  Bento::System

def initialize(prmProdDropFolder)
		$prodDropFolder=prmProdDropFolder
end
#-----------------------------------------------------------------------------
#             target local referential
#-----------------------------------------------------------------------------
#g=Git.open(".")
#-----------------------------------------------------------------------------
#             add a db migration script
#-----------------------------------------------------------------------------
#g.add('confetti\\lib\\dbmigration1.rb')
def addNewFiles(filesList)
	array = filesList.split(/,/)
	array.size.times do |i|
	  System.command ("git add " + array[i])
	end 
end
#-----------------------------------------------------------------------------
#             commit and push changes
#-----------------------------------------------------------------------------
def commitAndPush(tag,message)
	begin
	System.command("git tag" + tag)
	System.command("git commit -m " + message)
	rescue
	puts("nothing to commit") 
	end
	System.command("git push origin :" + tag )
end
#-----------------------------------------------------------------------------
#           create a file to isolate production db
#-----------------------------------------------------------------------------
def lockDBProd
File.new($prodDropFolder + "\\dblock.cft", "w")
end

#-----------------------------------------------------------------------------
#           create the batch file that imports source 
#           code from github to production. Execution of batch
#-----------------------------------------------------------------------------

def deployProd(tag)
System.command("git clone https://github.com/rafie/confetti1" + $prodDropFolder +"\\confetti1")
System.command("git clone https://github.com/rafie/confetti1-import" + $prodDropFolder +"\\confetti1")
System.command("git clone https://github.com/rafie/classico1-bento" + $prodDropFolder +"\\confetti1")
System.command("git clone https://github.com/rafie/classico1-ruby" + $prodDropFolder +"\\confetti1")<commit_msg>modify deploy.db<commit_after>require 'rubygems'


module Confetti


class deployment

	include  Bento::System

def initialize(prmProdDropFolder)
		$prodDropFolder=prmProdDropFolder
end
#-----------------------------------------------------------------------------
#             target local referential
#-----------------------------------------------------------------------------
#g=Git.open(".")
#-----------------------------------------------------------------------------
#             add a db migration script
#-----------------------------------------------------------------------------
#g.add('confetti\\lib\\dbmigration1.rb')
def addNewFiles(filesList)
	array = filesList.split(/,/)
	array.size.times do |i|
	  System.command ("git add " + array[i])
	end 
end
#-----------------------------------------------------------------------------
#             commit and push changes
#-----------------------------------------------------------------------------
def commitAndPush(tag,message)
	begin
	System.command("git tag" + tag)
	System.command("git commit -m " + message)
	rescue
	puts("nothing to commit") 
	end
	System.command("git push origin :" + tag )
end
#-----------------------------------------------------------------------------
#           create a file to isolate production db
#-----------------------------------------------------------------------------
def lockDBProd
File.new($prodDropFolder + "\\dblock.cft", "w")
end

#-----------------------------------------------------------------------------
#           create the batch file that imports source 
#           code from github to production. Execution of batch
#-----------------------------------------------------------------------------

def deployProd(tag)
System.command("git clone https://github.com/rafie/confetti1" + $prodDropFolder +"\\confetti1")
System.command("git clone https://github.com/rafie/confetti1-import" + $prodDropFolder +"\\confetti1-import")
System.command("git clone https://github.com/rafie/classico1-bento" + $prodDropFolder +"\\classico1-bento")
System.command("git clone https://github.com/rafie/classico1-ruby" + $prodDropFolder +"\\classico1-ruby")
{'fraction_non_alphanumeric': 0.4439805149617258, 'fraction_numerical': 0.0041753653444676405, 'mean_word_length': 1.0282220131702728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3789495', 'n_tokens_mistral': 967, 'n_tokens_neox': 941, 'n_words': 218}