<commit_before>package com.rho;

import java.io.InputStream;

import com.rho.RhoEmptyLogger;
import com.rho.RhoLogger;
import com.xruby.runtime.lang.*;
import com.xruby.runtime.builtin.*;
import java.io.IOException;
import com.rho.db.DBAdapter;
import com.rho.sync.SyncThread;
import com.rho.Properties;
//import net.rim.device.api.system.CodeModuleManager;
import com.rho.location.GeoLocation;

public class RhoRuby {

	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
		new RhoLogger("RhoRuby");
	
	public static final RubyID serveID = RubyID.intern("serve_hash");
	public static final RubyID serveIndexID = RubyID.intern("serve_index_hash");
	public static final RubyID raiseRhoError = RubyID.intern("raise_rhoerror");
//	public static final RubyID getStartPath = RubyID.intern("get_start_path");
//	public static final RubyID getOptionsPath = RubyID.intern("get_options_path");
	
	static RubyValue receiver;
	static RubyProgram mainObj;
	
	public static final int ERR_NONE = 0;
	public static final int ERR_NETWORK = 1;
	public static final int ERR_REMOTESERVER = 2;
	public static final int ERR_RUNTIME = 3;
	
	public static void RhoRubyStart(String szAppPath){
		String[] args = new String[0];

		IRhoRubyHelper helper = null;
        try{

			RubyRuntime.init(args);
	
	        DBAdapter.initMethods(RubyRuntime.DatabaseClass);
	        SyncThread.initMethods(RubyRuntime.SyncEngineClass);
	        GeoLocation.initMethods(RubyRuntime.GeoLocationClass);
	        
	        helper = RhoClassFactory.createRhoRubyHelper();
	        helper.initRubyExtensions();
        }catch(Throwable exc){
        	LOG.ERROR("Cannot init ruby", exc);
        }
        
        try{
        	//Class mainRuby = Class.forName("xruby.ServeME.main");<commit_msg>Partially fix issue #858 - Geolocation does not work on Android Ruby call fixed. Custom tags - not yet. Work in progress<commit_after>package com.rho;

import java.io.InputStream;

import com.rho.RhoEmptyLogger;
import com.rho.RhoLogger;
import com.xruby.runtime.lang.*;
import com.xruby.runtime.builtin.*;
import java.io.IOException;
import com.rho.db.DBAdapter;
import com.rho.sync.SyncThread;
import com.rho.Properties;
//import net.rim.device.api.system.CodeModuleManager;
import com.rho.location.GeoLocation;

public class RhoRuby {

	private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() : 
		new RhoLogger("RhoRuby");
	
	public static final RubyID serveID = RubyID.intern("serve_hash");
	public static final RubyID serveIndexID = RubyID.intern("serve_index_hash");
	public static final RubyID raiseRhoError = RubyID.intern("raise_rhoerror");
//	public static final RubyID getStartPath = RubyID.intern("get_start_path");
//	public static final RubyID getOptionsPath = RubyID.intern("get_options_path");
	
	static RubyValue receiver;
	static RubyProgram mainObj;
	
	public static final int ERR_NONE = 0;
	public static final int ERR_NETWORK = 1;
	public static final int ERR_REMOTESERVER = 2;
	public static final int ERR_RUNTIME = 3;
	
	public static void RhoRubyStart(String szAppPath){
		String[] args = new String[0];

		IRhoRubyHelper helper = null;
        try{

			RubyRuntime.init(args);
	
	        DBAdapter.initMethods(RubyRuntime.DatabaseClass);
	        SyncThread.initMethods(RubyRuntime.SyncEngineClass);
	        GeoLocation.initMethods(RubyRuntime.GeoLocationClass);
	        
	        GeoLocation.start();
	        
	        helper = RhoClassFactory.createRhoRubyHelper();
	        helper.initRubyExtensions();
        }catch(Throwable exc){
        	LOG.ERROR("Cannot init ruby", exc);
        }
        
        try{
        	//Class mainRuby = Class.forName("xruby.ServeME.main");
{'fraction_non_alphanumeric': 0.09750201450443191, 'fraction_numerical': 0.0034918076819769003, 'mean_word_length': 3.893561103810775, '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': '3741894', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1091, 'n_words': 273}