repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/subject.rb
provider/vendor/rails/activerecord/test/models/subject.rb
# used for OracleSynonymTest, see test/synonym_test_oci.rb # class Subject < ActiveRecord::Base end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/price_estimate.rb
provider/vendor/rails/activerecord/test/models/price_estimate.rb
class PriceEstimate < ActiveRecord::Base belongs_to :estimate_of, :polymorphic => true end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/contact.rb
provider/vendor/rails/activerecord/test/models/contact.rb
class Contact < ActiveRecord::Base # mock out self.columns so no pesky db is needed for these tests def self.column(name, sql_type = nil, options = {}) @columns ||= [] @columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, options[:default], sql_type.to_s, options[:null]) end column :name,...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/keyboard.rb
provider/vendor/rails/activerecord/test/models/keyboard.rb
class Keyboard < ActiveRecord::Base set_primary_key 'key_number' end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/job.rb
provider/vendor/rails/activerecord/test/models/job.rb
class Job < ActiveRecord::Base has_many :references has_many :people, :through => :references belongs_to :ideal_reference, :class_name => 'Reference' end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/person.rb
provider/vendor/rails/activerecord/test/models/person.rb
class Person < ActiveRecord::Base has_many :readers has_many :posts, :through => :readers has_many :posts_with_no_comments, :through => :readers, :source => :post, :include => :comments, :conditions => 'comments.id is null' has_many :references has_many :jobs, :through => :references has_one :favourite_ref...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/reply.rb
provider/vendor/rails/activerecord/test/models/reply.rb
require 'models/topic' class Reply < Topic named_scope :base belongs_to :topic, :foreign_key => "parent_id", :counter_cache => true belongs_to :topic_with_primary_key, :class_name => "Topic", :primary_key => "title", :foreign_key => "parent_title", :counter_cache => "replies_count" has_many :replies, :class_n...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/course.rb
provider/vendor/rails/activerecord/test/models/course.rb
class Course < ActiveRecord::Base has_many :entrants end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/club.rb
provider/vendor/rails/activerecord/test/models/club.rb
class Club < ActiveRecord::Base has_many :memberships has_many :members, :through => :memberships has_many :current_memberships has_one :sponsor has_one :sponsored_member, :through => :sponsor, :source => :sponsorable, :source_type => "Member" private def private_method "I'm sorry sir, this is a *pr...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/guid.rb
provider/vendor/rails/activerecord/test/models/guid.rb
class Guid < ActiveRecord::Base end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/developer.rb
provider/vendor/rails/activerecord/test/models/developer.rb
module DeveloperProjectsAssociationExtension def find_most_recent find(:first, :order => "id DESC") end end module DeveloperProjectsAssociationExtension2 def find_least_recent find(:first, :order => "id ASC") end end class Developer < ActiveRecord::Base has_and_belongs_to_many :projects do def f...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/company.rb
provider/vendor/rails/activerecord/test/models/company.rb
class AbstractCompany < ActiveRecord::Base self.abstract_class = true end class Company < AbstractCompany attr_protected :rating set_sequence_name :companies_nonstd_seq validates_presence_of :name has_one :dummy_account, :foreign_key => "firm_id", :class_name => "Account" has_many :contracts has_many :...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/models/warehouse_thing.rb
provider/vendor/rails/activerecord/test/models/warehouse_thing.rb
class WarehouseThing < ActiveRecord::Base set_table_name "warehouse-things" validates_uniqueness_of :value end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/valid/3_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb
provider/vendor/rails/activerecord/test/migrations/valid/2_we_need_reminders.rb
class WeNeedReminders < ActiveRecord::Migration def self.up create_table("reminders") do |t| t.column :content, :text t.column :remind_at, :datetime end end def self.down drop_table "reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb
provider/vendor/rails/activerecord/test/migrations/valid/1_people_have_last_names.rb
class PeopleHaveLastNames < ActiveRecord::Migration def self.up add_column "people", "last_name", :string end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/missing/4_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb
provider/vendor/rails/activerecord/test/migrations/missing/3_we_need_reminders.rb
class WeNeedReminders < ActiveRecord::Migration def self.up create_table("reminders") do |t| t.column :content, :text t.column :remind_at, :datetime end end def self.down drop_table "reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb
provider/vendor/rails/activerecord/test/migrations/missing/1_people_have_last_names.rb
class PeopleHaveLastNames < ActiveRecord::Migration def self.up add_column "people", "last_name", :string end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb
provider/vendor/rails/activerecord/test/migrations/missing/1000_people_have_middle_names.rb
class PeopleHaveMiddleNames < ActiveRecord::Migration def self.up add_column "people", "middle_name", :string end def self.down remove_column "people", "middle_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb
provider/vendor/rails/activerecord/test/migrations/broken/100_migration_that_raises_exception.rb
class MigrationThatRaisesException < ActiveRecord::Migration def self.up add_column "people", "last_name", :string raise 'Something broke' end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb
provider/vendor/rails/activerecord/test/migrations/duplicate_names/20080507053028_chunky.rb
class Chunky < ActiveRecord::Migration def self.up end def self.down end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb
provider/vendor/rails/activerecord/test/migrations/duplicate_names/20080507052938_chunky.rb
class Chunky < ActiveRecord::Migration def self.up end def self.down end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate/3_foo.rb
provider/vendor/rails/activerecord/test/migrations/duplicate/3_foo.rb
class Foo < ActiveRecord::Migration def self.up end def self.down end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate/3_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/duplicate/3_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb
provider/vendor/rails/activerecord/test/migrations/duplicate/2_we_need_reminders.rb
class WeNeedReminders < ActiveRecord::Migration def self.up create_table("reminders") do |t| t.column :content, :text t.column :remind_at, :datetime end end def self.down drop_table "reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb
provider/vendor/rails/activerecord/test/migrations/duplicate/1_people_have_last_names.rb
class PeopleHaveLastNames < ActiveRecord::Migration def self.up add_column "people", "last_name", :string end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_1/3_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb
class IRaiseOnDown < ActiveRecord::Migration def self.up end def self.down raise end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/3_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_3/1_people_have_last_names.rb
class PeopleHaveLastNames < ActiveRecord::Migration def self.up add_column "people", "last_name", :string end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_2/3_innocent_jointable.rb
class InnocentJointable < ActiveRecord::Migration def self.up create_table("people_reminders", :id => false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end end def self.down drop_table "people_reminders" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb
provider/vendor/rails/activerecord/test/migrations/interleaved/pass_2/1_people_have_last_names.rb
class PeopleHaveLastNames < ActiveRecord::Migration def self.up add_column "people", "last_name", :string end def self.down remove_column "people", "last_name" end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb
provider/vendor/rails/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb
class GiveMeBigNumbers < ActiveRecord::Migration def self.up create_table :big_numbers do |table| table.column :bank_balance, :decimal, :precision => 10, :scale => 2 table.column :big_bank_balance, :decimal, :precision => 15, :scale => 2 table.column :world_population, :decimal, :precision => 10...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
provider/vendor/rails/activerecord/test/schema/sqlite_specific_schema.rb
ActiveRecord::Schema.define do # For sqlite 3.1.0+, make a table with a autoincrement column if supports_autoincrement? create_table :table_with_autoincrement, :force => true do |t| t.column :name, :string end end execute "DROP TABLE fk_test_has_fk" rescue nil execute "DROP TABLE fk_test_has_pk...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb
provider/vendor/rails/activerecord/test/schema/postgresql_specific_schema.rb
ActiveRecord::Schema.define do %w(postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings postgresql_oids postgresql_xml_data_type defaults geometrics).each do |table_name| execute "DROP TABLE IF EXISTS #{quote_table_name table_name}" e...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb
provider/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb
ActiveRecord::Schema.define do create_table :binary_fields, :force => true, :options => 'CHARACTER SET latin1' do |t| t.binary :tiny_blob, :limit => 255 t.binary :normal_blob, :limit => 65535 t.binary :medium_blob, :limit => 16777215 t.binary :long_blob, :limit => 2147483647 t.text :tiny_tex...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/schema/schema2.rb
provider/vendor/rails/activerecord/test/schema/schema2.rb
ActiveRecord::Schema.define do Course.connection.create_table :courses, :force => true do |t| t.column :name, :string, :null => false end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/schema/schema.rb
provider/vendor/rails/activerecord/test/schema/schema.rb
ActiveRecord::Schema.define do def except(adapter_names_to_exclude) unless [adapter_names_to_exclude].flatten.include?(adapter_name) yield end end #put adapter specific setup here case adapter_name # For Firebird, set the sequence values 10000 when create_table is called; # this prevents...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/examples/performance.rb
provider/vendor/rails/activerecord/examples/performance.rb
#!/usr/bin/env ruby -KU TIMES = (ENV['N'] || 10000).to_i require 'rubygems' gem 'addressable', '~>2.0' gem 'faker', '~>0.3.1' gem 'rbench', '~>0.2.3' require 'addressable/uri' require 'faker' require 'rbench' __DIR__ = File.dirname(__FILE__) $:.unshift "#{__DIR__}/../lib" require 'active_record' conn ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record.rb
provider/vendor/rails/activerecord/lib/active_record.rb
#-- # Copyright (c) 2004-2009 David Heinemeier Hansson # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/activerecord.rb
provider/vendor/rails/activerecord/lib/activerecord.rb
require 'active_record'
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb
provider/vendor/rails/activerecord/lib/active_record/dynamic_finder_match.rb
module ActiveRecord class DynamicFinderMatch def self.match(method) df_match = self.new(method) df_match.finder ? df_match : nil end def initialize(method) @finder = :first case method.to_s when /^find_(all_by|last_by|by)_([_a-zA-Z]\w*)$/ @finder = :last if $1 == 'la...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/test_case.rb
provider/vendor/rails/activerecord/lib/active_record/test_case.rb
require "active_support/test_case" module ActiveRecord class TestCase < ActiveSupport::TestCase #:nodoc: def assert_date_from_db(expected, actual, message = nil) # SybaseAdapter doesn't have a separate column type just for dates, # so the time is in the string and incorrectly formatted if curre...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/fixtures.rb
provider/vendor/rails/activerecord/lib/active_record/fixtures.rb
require 'erb' require 'yaml' require 'csv' require 'zlib' require 'active_support/dependencies' require 'active_support/test_case' if RUBY_VERSION < '1.9' module YAML #:nodoc: class Omap #:nodoc: def keys; map { |k, v| k } end def values; map { |k, v| v } end end end end if defined? ActiveRe...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/version.rb
provider/vendor/rails/activerecord/lib/active_record/version.rb
module ActiveRecord module VERSION #:nodoc: MAJOR = 2 MINOR = 3 TINY = 4 STRING = [MAJOR, MINOR, TINY].join('.') end end
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/nested_attributes.rb
provider/vendor/rails/activerecord/lib/active_record/nested_attributes.rb
module ActiveRecord module NestedAttributes #:nodoc: def self.included(base) base.extend(ClassMethods) base.class_inheritable_accessor :reject_new_nested_attributes_procs, :instance_writer => false base.reject_new_nested_attributes_procs = {} end # == Nested Attributes # # Neste...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/serialization.rb
provider/vendor/rails/activerecord/lib/active_record/serialization.rb
require 'active_support/json' module ActiveRecord #:nodoc: module Serialization class Serializer #:nodoc: attr_reader :options def initialize(record, options = nil) @record = record @options = options ? options.dup : {} end # To replicate the behavior in ActiveRecord#att...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/batches.rb
provider/vendor/rails/activerecord/lib/active_record/batches.rb
module ActiveRecord module Batches # :nodoc: def self.included(base) base.extend(ClassMethods) end # When processing large numbers of records, it's often a good idea to do # so in batches to prevent memory ballooning. module ClassMethods # Yields each record that was found by the find...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/session_store.rb
provider/vendor/rails/activerecord/lib/active_record/session_store.rb
module ActiveRecord # A session store backed by an Active Record class. A default class is # provided, but any object duck-typing to an Active Record Session class # with text +session_id+ and +data+ attributes is sufficient. # # The default assumes a +sessions+ tables with columns: # +id+ (numeric prima...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/observer.rb
provider/vendor/rails/activerecord/lib/active_record/observer.rb
require 'singleton' require 'set' module ActiveRecord module Observing # :nodoc: def self.included(base) base.extend ClassMethods end module ClassMethods # Activates the observers assigned. Examples: # # # Calls PersonObserver.instance # ActiveRecord::Base.observers = :...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/attribute_methods.rb
provider/vendor/rails/activerecord/lib/active_record/attribute_methods.rb
module ActiveRecord module AttributeMethods #:nodoc: DEFAULT_SUFFIXES = %w(= ? _before_type_cast) ATTRIBUTE_TYPES_CACHED_BY_DEFAULT = [:datetime, :timestamp, :time, :date] def self.included(base) base.extend ClassMethods base.attribute_method_suffix(*DEFAULT_SUFFIXES) base.cattr_accesso...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/callbacks.rb
provider/vendor/rails/activerecord/lib/active_record/callbacks.rb
require 'observer' module ActiveRecord # Callbacks are hooks into the lifecycle of an Active Record object that allow you to trigger logic # before or after an alteration of the object state. This can be used to make sure that associated and # dependent objects are deleted when +destroy+ is called (by overwritin...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/autosave_association.rb
provider/vendor/rails/activerecord/lib/active_record/autosave_association.rb
module ActiveRecord # AutosaveAssociation is a module that takes care of automatically saving # your associations when the parent is saved. In addition to saving, it # also destroys any associations that were marked for destruction. # (See mark_for_destruction and marked_for_destruction?) # # Saving of the ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/validations.rb
provider/vendor/rails/activerecord/lib/active_record/validations.rb
module ActiveRecord # Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the # +record+ method to retrieve the record which did not validate. # begin # complex_operation_that_calls_save!_internally # rescue ActiveRecord::RecordInvalid => invalid # puts invalid.record....
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/aggregations.rb
provider/vendor/rails/activerecord/lib/active_record/aggregations.rb
module ActiveRecord module Aggregations # :nodoc: def self.included(base) base.extend(ClassMethods) end def clear_aggregation_cache #:nodoc: self.class.reflect_on_all_aggregations.to_a.each do |assoc| instance_variable_set "@#{assoc.name}", nil end unless self.new_record? en...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/reflection.rb
provider/vendor/rails/activerecord/lib/active_record/reflection.rb
module ActiveRecord module Reflection # :nodoc: def self.included(base) base.extend(ClassMethods) end # Reflection allows you to interrogate Active Record classes and objects about their associations and aggregations. # This information can, for example, be used in a form builder that took an A...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/base.rb
provider/vendor/rails/activerecord/lib/active_record/base.rb
require 'yaml' require 'set' module ActiveRecord #:nodoc: # Generic Active Record exception class. class ActiveRecordError < StandardError end # Raised when the single-table inheritance mechanism fails to locate the subclass # (for example due to improper usage of column that +inheritance_column+ points to)...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/schema_dumper.rb
provider/vendor/rails/activerecord/lib/active_record/schema_dumper.rb
require 'stringio' require 'bigdecimal' module ActiveRecord # This class is used to dump the database schema for some connection to some # output format (i.e., ActiveRecord::Schema). class SchemaDumper #:nodoc: private_class_method :new ## # :singleton-method: # A list of tables which should...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/calculations.rb
provider/vendor/rails/activerecord/lib/active_record/calculations.rb
module ActiveRecord module Calculations #:nodoc: CALCULATIONS_OPTIONS = [:conditions, :joins, :order, :select, :group, :having, :distinct, :limit, :offset, :include, :from] def self.included(base) base.extend(ClassMethods) end module ClassMethods # Count operates using three different app...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb
provider/vendor/rails/activerecord/lib/active_record/dynamic_scope_match.rb
module ActiveRecord class DynamicScopeMatch def self.match(method) ds_match = self.new(method) ds_match.scope ? ds_match : nil end def initialize(method) @scope = true case method.to_s when /^scoped_by_([_a-zA-Z]\w*)$/ names = $1 else @scope = nil ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations.rb
provider/vendor/rails/activerecord/lib/active_record/associations.rb
module ActiveRecord class HasManyThroughAssociationNotFoundError < ActiveRecordError #:nodoc: def initialize(owner_class_name, reflection) super("Could not find the association #{reflection.options[:through].inspect} in model #{owner_class_name}") end end class HasManyThroughAssociationPolymorphicE...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/association_preload.rb
provider/vendor/rails/activerecord/lib/active_record/association_preload.rb
module ActiveRecord # See ActiveRecord::AssociationPreload::ClassMethods for documentation. module AssociationPreload #:nodoc: def self.included(base) base.extend(ClassMethods) end # Implements the details of eager loading of ActiveRecord associations. # Application developers should not use ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/migration.rb
provider/vendor/rails/activerecord/lib/active_record/migration.rb
module ActiveRecord class IrreversibleMigration < ActiveRecordError#:nodoc: end class DuplicateMigrationVersionError < ActiveRecordError#:nodoc: def initialize(version) super("Multiple migrations have the version number #{version}") end end class DuplicateMigrationNameError < ActiveRecordError...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/transactions.rb
provider/vendor/rails/activerecord/lib/active_record/transactions.rb
require 'thread' module ActiveRecord # See ActiveRecord::Transactions::ClassMethods for documentation. module Transactions class TransactionError < ActiveRecordError # :nodoc: end def self.included(base) base.extend(ClassMethods) base.class_eval do [:destroy, :save, :save!].each d...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb
provider/vendor/rails/activerecord/lib/active_record/i18n_interpolation_deprecation.rb
# Deprecates the use of the former message interpolation syntax in activerecord # as in "must have %d characters". The new syntax uses explicit variable names # as in "{{value}} must have {{count}} characters". require 'i18n/backend/simple' module I18n module Backend class Simple DEPRECATED_INTERPOLATORS =...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/schema.rb
provider/vendor/rails/activerecord/lib/active_record/schema.rb
module ActiveRecord # Allows programmers to programmatically define a schema in a portable # DSL. This means you can define tables, indexes, etc. without using SQL # directly, so your applications can more easily support multiple # databases. # # Usage: # # ActiveRecord::Schema.define do # creat...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/named_scope.rb
provider/vendor/rails/activerecord/lib/active_record/named_scope.rb
module ActiveRecord module NamedScope # All subclasses of ActiveRecord::Base have one named scope: # * <tt>scoped</tt> - which allows for the creation of anonymous \scopes, on the fly: <tt>Shirt.scoped(:conditions => {:color => 'red'}).scoped(:include => :washing_instructions)</tt> # # These anonymous...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/timestamp.rb
provider/vendor/rails/activerecord/lib/active_record/timestamp.rb
module ActiveRecord # Active Record automatically timestamps create and update operations if the table has fields # named created_at/created_on or updated_at/updated_on. # # Timestamping can be turned off by setting # <tt>ActiveRecord::Base.record_timestamps = false</tt> # # Timestamps are in the local ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/dirty.rb
provider/vendor/rails/activerecord/lib/active_record/dirty.rb
module ActiveRecord # Track unsaved attribute changes. # # A newly instantiated object is unchanged: # person = Person.find_by_name('uncle bob') # person.changed? # => false # # Change the name: # person.name = 'Bob' # person.changed? # => true # person.name_changed? # => true...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/query_cache.rb
provider/vendor/rails/activerecord/lib/active_record/query_cache.rb
module ActiveRecord class QueryCache module ClassMethods # Enable the query cache within the block if Active Record is configured. def cache(&block) if ActiveRecord::Base.configurations.blank? yield else connection.cache(&block) end end # Disabl...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb
provider/vendor/rails/activerecord/lib/active_record/serializers/xml_serializer.rb
module ActiveRecord #:nodoc: module Serialization # Builds an XML document to represent the model. Some configuration is # available through +options+. However more complicated cases should # override ActiveRecord::Base#to_xml. # # By default the generated XML document will include the processing ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb
provider/vendor/rails/activerecord/lib/active_record/serializers/json_serializer.rb
require 'active_support/json' require 'active_support/core_ext/module/model_naming' module ActiveRecord #:nodoc: module Serialization def self.included(base) base.cattr_accessor :include_root_in_json, :instance_writer => false end # Returns a JSON string representing the model. Some configuration ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
require 'active_record/connection_adapters/sqlite_adapter' module ActiveRecord class Base # sqlite3 adapter reuses sqlite_connection. def self.sqlite3_connection(config) # :nodoc: parse_sqlite_config!(config) unless self.class.const_defined?(:SQLite3) require_library_or_gem(config[:adapt...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
require 'active_record/connection_adapters/abstract_adapter' require 'set' module MysqlCompat #:nodoc: # add all_hashes method to standard mysql-c bindings or pure ruby version def self.define_all_hashes_method! raise 'Mysql not loaded' unless defined?(::Mysql) target = defined?(Mysql::Result) ? Mysql::Re...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
require 'active_record/connection_adapters/abstract_adapter' begin require_library_or_gem 'pg' rescue LoadError => e begin require_library_or_gem 'postgres' class PGresult alias_method :nfields, :num_fields unless self.method_defined?(:nfields) alias_method :ntuples, :num_tuples unless self.met...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
# encoding: binary require 'active_record/connection_adapters/abstract_adapter' module ActiveRecord class Base class << self # Establishes a connection to the database that's used by all Active Record objects def sqlite_connection(config) # :nodoc: parse_sqlite_config!(config) unless...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
require 'benchmark' require 'date' require 'bigdecimal' require 'bigdecimal/util' # TODO: Autoload these files require 'active_record/connection_adapters/abstract/schema_definitions' require 'active_record/connection_adapters/abstract/schema_statements' require 'active_record/connection_adapters/abstract/database_stat...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
module ActiveRecord module ConnectionAdapters # :nodoc: module DatabaseStatements # Returns an array of record hashes with the column names as keys and # column values as values. def select_all(sql, name = nil) select(sql, name) end # Returns a record hash with the column na...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
module ActiveRecord module ConnectionAdapters # :nodoc: module SchemaStatements # Returns a Hash of mappings from the abstract data types to the native # database types. See TableDefinition#column for details on the recognized # abstract data types. def native_database_types {} ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
require 'monitor' require 'set' module ActiveRecord # Raised when a connection could not be obtained within the connection # acquisition timeout period. class ConnectionTimeoutError < ConnectionNotEstablished end module ConnectionAdapters # Connection pool base class for managing ActiveRecord database ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
require 'date' require 'set' require 'bigdecimal' require 'bigdecimal/util' module ActiveRecord module ConnectionAdapters #:nodoc: # An abstract definition of a column in a table. class Column TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE'].to_set FALSE_VALUES = [false, 0, '0', 'f', 'F', '...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
module ActiveRecord module ConnectionAdapters # :nodoc: module Quoting # Quotes the column value to help prevent # {SQL injection attacks}[http://en.wikipedia.org/wiki/SQL_injection]. def quote(value, column = nil) # records are quoted as their primary key return value.quoted_id ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
module ActiveRecord class Base class ConnectionSpecification #:nodoc: attr_reader :config, :adapter_method def initialize (config, adapter_method) @config, @adapter_method = config, adapter_method end end ## # :singleton-method: # The connection handler cattr_accesso...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
provider/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
module ActiveRecord module ConnectionAdapters # :nodoc: module QueryCache class << self def included(base) base.class_eval do alias_method_chain :columns, :query_cache alias_method_chain :select_all, :query_cache end dirties_query_cache base, :i...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb
provider/vendor/rails/activerecord/lib/active_record/locking/pessimistic.rb
# Copyright (c) 2006 Shugo Maeda <shugo@ruby-lang.org> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, m...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb
provider/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb
module ActiveRecord module Locking # == What is Optimistic Locking # # Optimistic locking allows multiple users to access the same record for edits, and assumes a minimum of # conflicts with the data. It does this by checking whether another process has made changes to a record since # it was ope...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/has_one_association.rb
module ActiveRecord module Associations class HasOneAssociation < BelongsToAssociation #:nodoc: def initialize(owner, reflection) super construct_sql end def create(attrs = {}, replace_existing = true) new_record(replace_existing) do |reflection| reflection.cre...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb
module ActiveRecord module Associations class HasManyThroughAssociation < HasManyAssociation #:nodoc: def initialize(owner, reflection) reflection.check_validity! super end alias_method :new, :build def create!(attrs = nil) transaction do self << (object...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb
module ActiveRecord module Associations # This is the proxy that handles a has many association. # # If the association has a <tt>:through</tt> option further specialization # is provided by its child HasManyThroughAssociation. class HasManyAssociation < AssociationCollection #:nodoc: protec...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb
module ActiveRecord module Associations class BelongsToAssociation < AssociationProxy #:nodoc: def create(attributes = {}) replace(@reflection.create_association(attributes)) end def build(attributes = {}) replace(@reflection.build_association(attributes)) end def r...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb
provider/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb
module ActiveRecord module Associations # This is the root class of all association proxies: # # AssociationProxy # BelongsToAssociation # HasOneAssociation # BelongsToPolymorphicAssociation # AssociationCollection # HasAndBelongsToManyAssociation # ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb
provider/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb
require 'set' module ActiveRecord module Associations # AssociationCollection is an abstract class that provides common stuff to # ease the implementation of association proxies that represent # collections. See the class hierarchy in AssociationProxy. # # You need to be careful with assumptions ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/has_one_through_association.rb
module ActiveRecord module Associations class HasOneThroughAssociation < HasManyThroughAssociation def create_through_record(new_value) #nodoc: klass = @reflection.through_reflection.klass current_object = @owner.send(@reflection.through_reflection.name) if current_object ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
module ActiveRecord module Associations class HasAndBelongsToManyAssociation < AssociationCollection #:nodoc: def initialize(owner, reflection) super @primary_key_list = {} end def create(attributes = {}) create_record(attributes) { |record| insert_record(record) } ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
provider/vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb
module ActiveRecord module Associations class BelongsToPolymorphicAssociation < AssociationProxy #:nodoc: def replace(record) if record.nil? @target = @owner[@reflection.primary_key_name] = @owner[@reflection.options[:foreign_type]] = nil else @target = (AssociationProxy ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activeresource/test/format_test.rb
provider/vendor/rails/activeresource/test/format_test.rb
require 'abstract_unit' require "fixtures/person" require "fixtures/street_address" class FormatTest < Test::Unit::TestCase def setup @matz = { :id => 1, :name => 'Matz' } @david = { :id => 2, :name => 'David' } @programmers = [ @matz, @david ] end def test_http_format_header_name header_name ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activeresource/test/setter_trap.rb
provider/vendor/rails/activeresource/test/setter_trap.rb
class SetterTrap < ActiveSupport::BasicObject class << self def rollback_sets(obj) trapped = new(obj) yield(trapped).tap { trapped.rollback_sets } end end def initialize(obj) @cache = {} @obj = obj end def respond_to?(method) @obj.respond_to?(method) end def method_missi...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activeresource/test/base_errors_test.rb
provider/vendor/rails/activeresource/test/base_errors_test.rb
require 'abstract_unit' require "fixtures/person" class BaseErrorsTest < Test::Unit::TestCase def setup ActiveResource::HttpMock.respond_to do |mock| mock.post "/people.xml", {}, %q(<?xml version="1.0" encoding="UTF-8"?><errors><error>Age can't be blank</error><error>Name can't be blank</error><error>Name ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activeresource/test/connection_test.rb
provider/vendor/rails/activeresource/test/connection_test.rb
require 'abstract_unit' class ConnectionTest < Test::Unit::TestCase ResponseCodeStub = Struct.new(:code) def setup @conn = ActiveResource::Connection.new('http://localhost') @matz = { :id => 1, :name => 'Matz' } @david = { :id => 2, :name => 'David' } @people = [ @matz, @david ].to_xml(:root => '...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false