<commit_before>begin 
  require 'active_record'
rescue
  gem 'active_record'
  require 'active_record'
end

require 'red_hill_consulting/core'
require 'red_hill_consulting/core/active_record'
require 'red_hill_consulting/core/active_record/base'
require 'red_hill_consulting/core/active_record/schema'
require 'red_hill_consulting/core/active_record/schema_dumper'
require 'red_hill_consulting/core/active_record/connection_adapters/abstract_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/foreign_key_definition'
require 'red_hill_consulting/core/active_record/connection_adapters/column'
require 'red_hill_consulting/core/active_record/connection_adapters/index_definition'
require 'red_hill_consulting/core/active_record/connection_adapters/mysql_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/mysql_column'
require 'red_hill_consulting/core/active_record/connection_adapters/postgresql_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/schema_statements'
require 'red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/table_definition'

ActiveRecord::Base.send(:include, RedHillConsulting::Core::ActiveRecord::Base)
ActiveRecord::Schema.send(:include, RedHillConsulting::Core::ActiveRecord::Schema)
ActiveRecord::SchemaDumper.send(:include, RedHillConsulting::Core::ActiveRecord::SchemaDumper)
ActiveRecord::ConnectionAdapters::IndexDefinition.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::IndexDefinition)
ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::TableDefinition)
ActiveRecord::ConnectionAdapters::Column.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Column)
ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::AbstractAdapter)
ActiveRecord::ConnectionAdapters::SchemaStatements.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::SchemaStatements)

begin
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::PostgresqlAdapter)
rescue
end

begin
  ActiveRecord::ConnectionAdapters::MysqlColumn.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::MysqlColumn)
  ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::MysqlAdapter)
  if ActiveRecord::Base.connection.send(:version)[0] < 5
    #include MySql4Adapter
    ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Mysql4Adapter)
  else
    #include MySql5Adapter
    ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Mysql5Adapter)
  end
rescue   
end

begin
  ActiveRecord::ConnectionAdapters::SQLite3Adapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Sqlite3Adapter)
rescue
<commit_msg>added missing 'end'<commit_after>begin 
  require 'active_record'
rescue
  gem 'active_record'
  require 'active_record'
end

require 'red_hill_consulting/core'
require 'red_hill_consulting/core/active_record'
require 'red_hill_consulting/core/active_record/base'
require 'red_hill_consulting/core/active_record/schema'
require 'red_hill_consulting/core/active_record/schema_dumper'
require 'red_hill_consulting/core/active_record/connection_adapters/abstract_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/foreign_key_definition'
require 'red_hill_consulting/core/active_record/connection_adapters/column'
require 'red_hill_consulting/core/active_record/connection_adapters/index_definition'
require 'red_hill_consulting/core/active_record/connection_adapters/mysql_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/mysql_column'
require 'red_hill_consulting/core/active_record/connection_adapters/postgresql_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/schema_statements'
require 'red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter'
require 'red_hill_consulting/core/active_record/connection_adapters/table_definition'

ActiveRecord::Base.send(:include, RedHillConsulting::Core::ActiveRecord::Base)
ActiveRecord::Schema.send(:include, RedHillConsulting::Core::ActiveRecord::Schema)
ActiveRecord::SchemaDumper.send(:include, RedHillConsulting::Core::ActiveRecord::SchemaDumper)
ActiveRecord::ConnectionAdapters::IndexDefinition.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::IndexDefinition)
ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::TableDefinition)
ActiveRecord::ConnectionAdapters::Column.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Column)
ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::AbstractAdapter)
ActiveRecord::ConnectionAdapters::SchemaStatements.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::SchemaStatements)

begin
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::PostgresqlAdapter)
rescue
end

begin
  ActiveRecord::ConnectionAdapters::MysqlColumn.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::MysqlColumn)
  ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::MysqlAdapter)
  if ActiveRecord::Base.connection.send(:version)[0] < 5
    #include MySql4Adapter
    ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Mysql4Adapter)
  else
    #include MySql5Adapter
    ActiveRecord::ConnectionAdapters::MysqlAdapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Mysql5Adapter)
  end
rescue   
end

begin
  ActiveRecord::ConnectionAdapters::SQLite3Adapter.send(:include, RedHillConsulting::Core::ActiveRecord::ConnectionAdapters::Sqlite3Adapter)
rescue
end

{'fraction_non_alphanumeric': 0.10322177040975915, 'fraction_numerical': 0.0028151391929934315, 'mean_word_length': 14.9875, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1522317', 'n_tokens_mistral': 1959, 'n_tokens_neox': 1858, 'n_words': 171}