<commit_before># gem "rsim-activerecord-oracle_enhanced-adapter"
gem "activerecord-oracle_enhanced-adapter", ">=1.2.0"
# uses local copy of oracle_enhanced adapter
# $:.unshift("../../oracle-enhanced/lib")
# require 'active_record/connection_adapters/oracle_enhanced_adapter'

print "Using Oracle\n"
require_dependency 'models/course'
require 'logger'

# ActiveRecord::Base.logger = Logger.new STDOUT
# ActiveRecord::Base.logger.level = Logger::WARN
ActiveRecord::Base.logger = Logger.new("debug.log")

# Set these to your database connection strings
db = ENV['ARUNIT_DB_NAME'] = 'XE'

ActiveRecord::Base.configurations = {
  'arunit' => {
    :adapter  => 'oracle_enhanced',
    :database => db,
    :host => "arunit", # used just by JRuby to construct JDBC connect string
    :username => 'arunit',
    :password => '<PASSWORD>',
    :emulate_oracle_adapter => true
  },
  'arunit2' => {
    :adapter  => 'oracle_enhanced',
    :database => db,
    :host => "arunit", # used just by JRuby to construct JDBC connect string
    :username => 'arunit2',
    :password => '<PASSWORD>',
    :emulate_oracle_adapter => true
  }
}

ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'

# for assert_queries test helper
ActiveRecord::Base.connection.class.class_eval do
  IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from all_tab_columns/im]

  def select_with_query_record(sql, name = nil, return_column_names = false)
    $queries_executed ||= []
    $queries_executed << sql unless IGNORED_SELECT_SQL.any? { |r| sql =~ r }
    select_without_query_record(sql, name, return_column_names)<commit_msg>changed default connection to localhost orcl database<commit_after># gem "rsim-activerecord-oracle_enhanced-adapter"
gem "activerecord-oracle_enhanced-adapter", ">=1.2.0"
# uses local copy of oracle_enhanced adapter
# $:.unshift("../../oracle-enhanced/lib")
# require 'active_record/connection_adapters/oracle_enhanced_adapter'

print "Using Oracle\n"
require_dependency 'models/course'
require 'logger'

# ActiveRecord::Base.logger = Logger.new STDOUT
# ActiveRecord::Base.logger.level = Logger::WARN
ActiveRecord::Base.logger = Logger.new("debug.log")

# Set these to your database connection strings
db = ENV['ARUNIT_DB_NAME'] = 'orcl'

ActiveRecord::Base.configurations = {
  'arunit' => {
    :adapter  => 'oracle_enhanced',
    :database => db,
    :host => "localhost", # used just by JRuby to construct JDBC connect string
    :username => 'arunit',
    :password => '<PASSWORD>',
    :emulate_oracle_adapter => true
  },
  'arunit2' => {
    :adapter  => 'oracle_enhanced',
    :database => db,
    :host => "localhost", # used just by JRuby to construct JDBC connect string
    :username => 'arunit2',
    :password => '<PASSWORD>',
    :emulate_oracle_adapter => true
  }
}

ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'

# for assert_queries test helper
ActiveRecord::Base.connection.class.class_eval do
  IGNORED_SELECT_SQL = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/, /^\s*select .* from all_tab_columns/im]

  def select_with_query_record(sql, name = nil, return_column_names = false)
    $queries_executed ||= []
    $queries_executed << sql unless IGNORED_SELECT_SQL.any? { |r| sql =~ r }
    select_without_query_record(sql, name, return_column_names)
{'fraction_non_alphanumeric': 0.13831018518518517, 'fraction_numerical': 0.003472222222222222, 'mean_word_length': 4.790619765494137, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 37, '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': '5104402', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1112, 'n_words': 251}