<commit_before>package quotidian

import com.google.appengine.api.datastore.dev.LocalDatastoreService
import com.google.appengine.tools.development.ApiProxyLocalImpl
import com.google.apphosting.api.ApiProxy
import java.io.File
import org.specs.Specification

class DatastoreSpecification extends Specification {
	val proxy = new ApiProxyLocalImpl(new File(".")){ }
	proxy.setProperty(LocalDatastoreService.NO_STORAGE_PROPERTY,true.toString)
	val service = proxy.getService("datastore_v3").asInstanceOf[LocalDatastoreService]
	def datastoreSetup:Unit = {
		ApiProxy.setEnvironmentForCurrentThread(new GaeEnvironment())
		ApiProxy.setDelegate(proxy)
	}
	def datastoreTeardown:Unit = {
		ApiProxy.setDelegate(null)
		ApiProxy.setEnvironmentForCurrentThread(null)
	}
	def datastoreCleanup:Unit = service.clearProfiles
	doBeforeSpec { datastoreSetup }
	doAfterSpec { datastoreTeardown }<commit_msg>changed the location of ApiProxy files to inside the target directory<commit_after>package quotidian

import com.google.appengine.api.datastore.dev.LocalDatastoreService
import com.google.appengine.tools.development.ApiProxyLocalImpl
import com.google.apphosting.api.ApiProxy
import java.io.File
import org.specs.Specification

class DatastoreSpecification extends Specification {
	val proxy = new ApiProxyLocalImpl(new File("./target/")){ }
	proxy.setProperty(LocalDatastoreService.NO_STORAGE_PROPERTY,true.toString)
	val service = proxy.getService("datastore_v3").asInstanceOf[LocalDatastoreService]
	def datastoreSetup:Unit = {
		ApiProxy.setEnvironmentForCurrentThread(new GaeEnvironment())
		ApiProxy.setDelegate(proxy)
	}
	def datastoreTeardown:Unit = {
		ApiProxy.setDelegate(null)
		ApiProxy.setEnvironmentForCurrentThread(null)
	}
	def datastoreCleanup:Unit = service.clearProfiles
	doBeforeSpec { datastoreSetup }
	doAfterSpec { datastoreTeardown }
{'fraction_non_alphanumeric': 0.08423326133909287, 'fraction_numerical': 0.0010799136069114472, 'mean_word_length': 7.309417040358745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '822650', 'n_tokens_mistral': 591, 'n_tokens_neox': 581, 'n_words': 92}