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/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
require 'test_helper' class <%= controller_class_name %>ControllerTest < ActionController::TestCase # Replace this with your real tests. test "the truth" do assert true 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/railties/lib/rails_generator/generators/components/resource/templates/helper_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper_test.rb
require 'test_helper' class <%= controller_class_name %>HelperTest < ActionView::TestCase 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/railties/lib/rails_generator/generators/components/resource/templates/controller.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/controller.rb
class <%= controller_class_name %>Controller < ApplicationController 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/railties/lib/rails_generator/generators/components/resource/templates/helper.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/resource/templates/helper.rb
module <%= controller_class_name %>Helper 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/railties/lib/rails_generator/generators/components/model/model_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/model/model_generator.rb
class ModelGenerator < Rails::Generator::NamedBase default_options :skip_timestamps => false, :skip_migration => false, :skip_fixture => false def manifest record do |m| # Check for class naming collisions. m.class_collisions class_name, "#{class_name}Test" # Model, test, and fixture directo...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
require 'test_helper' class <%= class_name %>Test < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true 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/railties/lib/rails_generator/generators/components/model/templates/migration.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
class <%= migration_name %> < ActiveRecord::Migration def self.up create_table :<%= table_name %> do |t| <% for attribute in attributes -%> t.<%= attribute.type %> :<%= attribute.name %> <% end -%> <% unless options[:skip_timestamps] %> t.timestamps <% end -%> end end def self.down drop_t...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/model/templates/model.rb
class <%= class_name %> < ActiveRecord::Base <% attributes.select(&:reference?).each do |attribute| -%> belongs_to :<%= attribute.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/railties/lib/rails_generator/generators/components/observer/observer_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/observer/observer_generator.rb
class ObserverGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions "#{class_name}Observer", "#{class_name}ObserverTest" # Observer, and test directories. m.directory File.join('app/models', class_path) m.directory...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
require 'test_helper' class <%= class_name %>ObserverTest < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true 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/railties/lib/rails_generator/generators/components/observer/templates/observer.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/observer/templates/observer.rb
class <%= class_name %>Observer < ActiveRecord::Observer 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/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/integration_test_generator.rb
class IntegrationTestGenerator < Rails::Generator::NamedBase default_options :skip_migration => false def manifest record do |m| # Check for class naming collisions. m.class_collisions class_name, "#{class_name}Test" # integration test directory m.directory File.join('test/integration'...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
require 'test_helper' class <%= class_name %>Test < ActionController::IntegrationTest fixtures :all # Replace this with your real tests. test "the truth" do assert true 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/railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/performance_test_generator.rb
class PerformanceTestGenerator < Rails::Generator::NamedBase default_options :skip_migration => false def manifest record do |m| # Check for class naming collisions. m.class_collisions class_name, "#{class_name}Test" # performance test directory m.directory File.join('test/performance'...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/performance_test/templates/performance_test.rb
require 'test_helper' require 'performance_test_help' class <%= class_name %>Test < ActionController::PerformanceTest # Replace this with your real tests. def test_homepage get '/' 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/railties/lib/rails_generator/generators/components/helper/helper_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/helper/helper_generator.rb
class HelperGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions class_path, "#{class_name}Helper", "#{class_name}HelperTest" # Helper and helper test directories. m.directory File.join('app/helpers', class_path) ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper_test.rb
require 'test_helper' class <%= class_name %>HelperTest < ActionView::TestCase 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/railties/lib/rails_generator/generators/components/helper/templates/helper.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/helper/templates/helper.rb
module <%= class_name %>Helper 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/railties/lib/rails_generator/generators/components/metal/metal_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/metal/metal_generator.rb
class MetalGenerator < Rails::Generator::NamedBase def manifest record do |m| m.directory 'app/metal' m.template 'metal.rb', File.join('app/metal', "#{file_name}.rb") end 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/railties/lib/rails_generator/generators/components/metal/templates/metal.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/metal/templates/metal.rb
# Allow the metal piece to run in isolation require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) class <%= class_name %> def self.call(env) if env["PATH_INFO"] =~ /^\/<%= file_name %>/ [200, {"Content-Type" => "text/html"}, ["Hello, World!"]] else [404, {"Content-T...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb
class MigrationGenerator < Rails::Generator::NamedBase def manifest record do |m| m.migration_template 'migration.rb', 'db/migrate', :assigns => get_local_assigns end end private def get_local_assigns returning(assigns = {}) do if class_name.underscore =~ /^(add|remove)_.*_...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
class <%= class_name.underscore.camelize %> < ActiveRecord::Migration def self.up<% attributes.each do |attribute| %> <%= migration_action %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'add' %>, :<%= attribute.type %><% end -%> <%- end %> end def self.down<% attributes.rever...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/session_migration_generator.rb
class SessionMigrationGenerator < Rails::Generator::NamedBase def initialize(runtime_args, runtime_options = {}) runtime_args << 'add_session_table' if runtime_args.empty? super end def manifest record do |m| m.migration_template 'migration.rb', 'db/migrate', :assigns => { :session_tabl...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/session_migration/templates/migration.rb
class <%= class_name %> < ActiveRecord::Migration def self.up create_table :<%= session_table_name %> do |t| t.string :session_id, :null => false t.text :data t.timestamps end add_index :<%= session_table_name %>, :session_id add_index :<%= session_table_name %>, :updated_at 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/railties/lib/rails_generator/generators/applications/app/app_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/app_generator.rb
require 'rbconfig' require File.dirname(__FILE__) + '/template_runner' require 'digest/md5' require 'active_support/secure_random' class AppGenerator < Rails::Generator::Base DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']) DATABASES = %w( mysql oracle postgresql ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb
provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/template_runner.rb
require File.dirname(__FILE__) + '/scm/scm' require File.dirname(__FILE__) + '/scm/git' require File.dirname(__FILE__) + '/scm/svn' require 'open-uri' require 'fileutils' module Rails class TemplateRunner attr_reader :root attr_writer :logger def initialize(template, root = '') # :nodoc: @root = ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/scm.rb
provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/scm.rb
module Rails class Scm private def self.hash_to_parameters(hash) hash.collect { |key, value| "--#{key} #{(value.kind_of?(String) ? value : "")}"}.join(" ") end 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/railties/lib/rails_generator/generators/applications/app/scm/svn.rb
provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/svn.rb
module Rails class Svn < Scm def self.checkout(repos, branch = nil) `svn checkout #{repos}/#{branch || "trunk"}` end 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/railties/lib/rails_generator/generators/applications/app/scm/git.rb
provider/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/git.rb
STDOUT.sync = true module Rails class Git < Scm def self.clone(repos, branch=nil) system "git clone #{repos}" if branch system "cd #{repos.split('/').last}/" system "git checkout #{branch}" end end def self.run(command) system "git #{command}" end 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/railties/configs/seeds.rb
provider/vendor/rails/railties/configs/seeds.rb
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Major.create(: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/railties/configs/routes.rb
provider/vendor/rails/railties/configs/routes.rb
ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/configs/initializers/session_store.rb
provider/vendor/rails/railties/configs/initializers/session_store.rb
# Be sure to restart your server when you modify this file. # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Act...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/configs/initializers/new_rails_defaults.rb
provider/vendor/rails/railties/configs/initializers/new_rails_defaults.rb
# Be sure to restart your server when you modify this file. # These settings change the behavior of Rails 2 apps and will be defaults # for Rails 3. You can remove this initializer when Rails 3 is released. if defined?(ActiveRecord) # Include Active Record class name as root for JSON serialized output. ActiveReco...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/configs/initializers/inflections.rb
provider/vendor/rails/railties/configs/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person',...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/configs/initializers/backtrace_silencers.rb
provider/vendor/rails/railties/configs/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying do debug a probl...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/configs/initializers/mime_types.rb
provider/vendor/rails/railties/configs/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/guides/rails_guides.rb
provider/vendor/rails/railties/guides/rails_guides.rb
pwd = File.dirname(__FILE__) $: << pwd begin as_lib = File.join(pwd, "../../activesupport/lib") ap_lib = File.join(pwd, "../../actionpack/lib") $: << as_lib if File.directory?(as_lib) $: << ap_lib if File.directory?(ap_lib) require "action_controller" require "action_view" rescue LoadError require '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/railties/guides/rails_guides/textile_extensions.rb
provider/vendor/rails/railties/guides/rails_guides/textile_extensions.rb
module RailsGuides module TextileExtensions def notestuff(body) body.gsub!(/^(IMPORTANT|CAUTION|WARNING|NOTE|INFO)(?:\.|\:)(.*)$/) do |m| css_class = $1.downcase css_class = 'warning' if ['caution', 'important'].include?(css_class) result = "<div class='#{css_class}'><p>" 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/railties/guides/rails_guides/helpers.rb
provider/vendor/rails/railties/guides/rails_guides/helpers.rb
module RailsGuides module Helpers def guide(name, url, options = {}, &block) link = content_tag(:a, :href => url) { name } result = content_tag(:dt, link) if ticket = options[:ticket] result << content_tag(:dd, lh(ticket), :class => 'ticket') end result << content_tag(:dd, ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/guides/rails_guides/indexer.rb
provider/vendor/rails/railties/guides/rails_guides/indexer.rb
module RailsGuides class Indexer attr_reader :body, :result, :level_hash def initialize(body) @body = body @result = @body.dup end def index @level_hash = process(body) end private def process(string, current_level= 3, counters = [1]) s = StringScanner.new(strin...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/guides/rails_guides/generator.rb
provider/vendor/rails/railties/guides/rails_guides/generator.rb
require 'set' module RailsGuides class Generator attr_reader :output, :view_path, :view, :guides_dir def initialize(output = nil) @guides_dir = File.join(File.dirname(__FILE__), '..') @output = output || File.join(@guides_dir, "output") unless ENV["ONLY"] FileUtils.rm_r(@output) ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/environments/test.rb
provider/vendor/rails/railties/environments/test.rb
# Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/environments/development.rb
provider/vendor/rails/railties/environments/development.rb
# Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.ca...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/environments/environment.rb
provider/vendor/rails/railties/environments/environment.rb
# Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present <%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration requir...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/environments/production.rb
provider/vendor/rails/railties/environments/production.rb
# Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.action_controller.consider_all_reque...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/environments/boot.rb
provider/vendor/rails/railties/environments/boot.rb
# Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/install.rb
provider/vendor/rails/actionpack/install.rb
require 'rbconfig' require 'find' require 'ftools' include Config # this was adapted from rdoc's install.rb by way of Log4r $sitedir = CONFIG["sitelibdir"] unless $sitedir version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] $libdir = File.join(CONFIG["libdir"], "ruby", version) $sitedir = $:.find {|x| x =~ /site...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/active_record_unit.rb
provider/vendor/rails/actionpack/test/active_record_unit.rb
require 'abstract_unit' # Define the essentials class ActiveRecordTestConnector cattr_accessor :able_to_connect cattr_accessor :connected # Set our defaults self.connected = false self.able_to_connect = true end # Try to grab AR if defined?(ActiveRecord) && defined?(Fixtures) $stderr.puts '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/actionpack/test/testing_sandbox.rb
provider/vendor/rails/actionpack/test/testing_sandbox.rb
module TestingSandbox # Temporarily replaces KCODE for the block def with_kcode(kcode) if RUBY_VERSION < '1.9' old_kcode, $KCODE = $KCODE, kcode begin yield ensure $KCODE = old_kcode end else yield end 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/actionpack/test/abstract_unit.rb
provider/vendor/rails/actionpack/test/abstract_unit.rb
$:.unshift(File.dirname(__FILE__) + '/../lib') $:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib') $:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') $:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers') require 'rubygems' require 'yaml' require 'stringio' require 'test/unit' gem 'mocha...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/adv_attr_test.rb
provider/vendor/rails/actionpack/test/adv_attr_test.rb
require File.dirname(__FILE__) + '/abstract_unit' require 'action_mailer/adv_attr_accessor' class AdvAttrTest < Test::Unit::TestCase class Person include ActionMailer::AdvAttrAccessor adv_attr_accessor :name end def test_adv_attr bob = Person.new assert_nil bob.name bob.name 'Bob' assert...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/integration_test.rb
provider/vendor/rails/actionpack/test/controller/integration_test.rb
require 'abstract_unit' class SessionTest < Test::Unit::TestCase StubApp = lambda { |env| [200, {"Content-Type" => "text/html", "Content-Length" => "13"}, ["Hello, World!"]] } def setup @session = ActionController::Integration::Session.new(StubApp) end def test_https_bang_works_and_sets_truth_by_de...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/addresses_render_test.rb
provider/vendor/rails/actionpack/test/controller/addresses_render_test.rb
require 'abstract_unit' class Address def Address.count(conditions = nil, join = nil) nil end def Address.find_all(arg1, arg2, arg3, arg4) [] end def self.find(*args) [] end end class AddressesTestController < ActionController::Base def self.controller_name; "addresses"; end def self.con...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/cookie_test.rb
provider/vendor/rails/actionpack/test/controller/cookie_test.rb
require 'abstract_unit' class CookieTest < ActionController::TestCase class TestController < ActionController::Base def authenticate cookies["user_name"] = "david" end def set_with_with_escapable_characters cookies["that & guy"] = "foo & bar => baz" end def authenticate_for_fourteen...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/rack_test.rb
provider/vendor/rails/actionpack/test/controller/rack_test.rb
require 'abstract_unit' class BaseRackTest < ActiveSupport::TestCase def setup @env = { "HTTP_MAX_FORWARDS" => "10", "SERVER_NAME" => "glu.ttono.us", "FCGI_ROLE" => "RESPONDER", "AUTH_TYPE" => "Basic", "HTTP_X_FORWARDED_HOST" => "glu.ttono.us", "HTTP_ACCEPT_CHARSET" => "UTF-8"...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb
provider/vendor/rails/actionpack/test/controller/http_basic_authentication_test.rb
require 'abstract_unit' class HttpBasicAuthenticationTest < ActionController::TestCase class DummyController < ActionController::Base before_filter :authenticate, :only => :index before_filter :authenticate_with_request, :only => :display before_filter :authenticate_long_credentials, :only => :show ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/middleware_stack_test.rb
provider/vendor/rails/actionpack/test/controller/middleware_stack_test.rb
require 'abstract_unit' class MiddlewareStackTest < ActiveSupport::TestCase class FooMiddleware; end class BarMiddleware; end class BazMiddleware; end def setup @stack = ActionController::MiddlewareStack.new @stack.use FooMiddleware @stack.use BarMiddleware end test "use should push middlewar...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/send_file_test.rb
provider/vendor/rails/actionpack/test/controller/send_file_test.rb
# encoding: utf-8 require 'abstract_unit' module TestFileUtils def file_name() File.basename(__FILE__) end def file_path() File.expand_path(__FILE__) end def file_data() @data ||= File.open(file_path, 'rb') { |f| f.read } end end class SendFileController < ActionController::Base include TestFileUtils layout...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/verification_test.rb
provider/vendor/rails/actionpack/test/controller/verification_test.rb
require 'abstract_unit' class VerificationTest < ActionController::TestCase class TestController < ActionController::Base verify :only => :guarded_one, :params => "one", :add_flash => { :error => 'unguarded' }, :redirect_to => { :action => "unguarded" } verify :only => :guarded_two, :p...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/filter_params_test.rb
provider/vendor/rails/actionpack/test/controller/filter_params_test.rb
require 'abstract_unit' class FilterParamController < ActionController::Base end class FilterParamTest < Test::Unit::TestCase def setup @controller = FilterParamController.new end def test_filter_parameters assert FilterParamController.respond_to?(:filter_parameter_logging) assert !@controller.resp...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/layout_test.rb
provider/vendor/rails/actionpack/test/controller/layout_test.rb
require 'abstract_unit' # The view_paths array must be set on Base and not LayoutTest so that LayoutTest's inherited # method has access to the view_paths array when looking for a layout to automatically assign. old_load_paths = ActionController::Base.view_paths ActionView::Template::register_template_handler :mab, ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb
provider/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb
require 'abstract_unit' # a controller class to facilitate the tests class ActionPackAssertionsController < ActionController::Base # this does absolutely nothing def nothing() head :ok end # a standard template def hello_world() render :template => "test/hello_world"; end # a standard template def hello...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/redirect_test.rb
provider/vendor/rails/actionpack/test/controller/redirect_test.rb
require 'abstract_unit' class WorkshopsController < ActionController::Base end class Workshop attr_accessor :id, :new_record def initialize(id, new_record) @id, @new_record = id, new_record end def new_record? @new_record end def to_s id.to_s end end class RedirectController < ActionCont...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/record_identifier_test.rb
provider/vendor/rails/actionpack/test/controller/record_identifier_test.rb
require 'abstract_unit' class Comment attr_reader :id def save; @id = 1 end def new_record?; @id.nil? end def name @id.nil? ? 'new comment' : "comment ##{@id}" end end class Comment::Nested < Comment; end class Test::Unit::TestCase protected def comments_url 'http://www.example.com/comments...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/rescue_test.rb
provider/vendor/rails/actionpack/test/controller/rescue_test.rb
require 'abstract_unit' class RescueController < ActionController::Base class NotAuthorized < StandardError end class NotAuthorizedToRescueAsString < StandardError end class RecordInvalid < StandardError end class RecordInvalidToRescueAsString < StandardError end class NotAllowed < StandardError ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/caching_test.rb
provider/vendor/rails/actionpack/test/controller/caching_test.rb
require 'fileutils' require 'abstract_unit' require 'active_record_unit' CACHE_DIR = 'test_cache' # Don't change '/../temp/' cavalierly or you might hose something you don't want hosed FILE_STORE_PATH = File.join(File.dirname(__FILE__), '/../temp/', CACHE_DIR) ActionController::Base.page_cache_directory = FILE_STORE_P...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/benchmark_test.rb
provider/vendor/rails/actionpack/test/controller/benchmark_test.rb
require 'abstract_unit' # Provide some static controllers. class BenchmarkedController < ActionController::Base def public_action render :nothing => true end def rescue_action(e) raise e end end class BenchmarkTest < ActionController::TestCase tests BenchmarkedController class MockLogger def...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/webservice_test.rb
provider/vendor/rails/actionpack/test/controller/webservice_test.rb
require 'abstract_unit' class WebServiceTest < ActionController::IntegrationTest class TestController < ActionController::Base def assign_parameters if params[:full] render :text => dump_params_keys else render :text => (params.keys - ['controller', 'action']).sort.join(", ") 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/actionpack/test/controller/logging_test.rb
provider/vendor/rails/actionpack/test/controller/logging_test.rb
require 'abstract_unit' class LoggingController < ActionController::Base def show render :nothing => true end end class LoggingTest < ActionController::TestCase tests LoggingController class MockLogger attr_reader :logged def method_missing(method, *args) @logged ||= [] @logged <...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/test_test.rb
provider/vendor/rails/actionpack/test/controller/test_test.rb
require 'abstract_unit' require 'controller/fake_controllers' class TestTest < ActionController::TestCase class TestController < ActionController::Base def no_op render :text => 'dummy' end def set_flash flash["test"] = ">#{flash["test"]}<" render :text => 'ignore me' end def ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/capture_test.rb
provider/vendor/rails/actionpack/test/controller/capture_test.rb
require 'abstract_unit' class CaptureController < ActionController::Base def self.controller_name; "test"; end def self.controller_path; "test"; end def content_for render :layout => "talk_from_action" end def content_for_with_parameter render :layout => "talk_from_action" end def content_for_...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/flash_test.rb
provider/vendor/rails/actionpack/test/controller/flash_test.rb
require 'abstract_unit' class FlashTest < ActionController::TestCase class TestController < ActionController::Base def set_flash flash["that"] = "hello" render :inline => "hello" end def set_flash_now flash.now["that"] = "hello" flash.now["foo"] ||= "bar" flash.now["foo"] |...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/resources_test.rb
provider/vendor/rails/actionpack/test/controller/resources_test.rb
require 'abstract_unit' class ResourcesController < ActionController::Base def index() render :nothing => true end alias_method :show, :index def rescue_action(e) raise e end end class ThreadsController < ResourcesController; end class MessagesController < ResourcesController; end class CommentsController < Re...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/fake_controllers.rb
provider/vendor/rails/actionpack/test/controller/fake_controllers.rb
class << Object; alias_method :const_available?, :const_defined?; end class ContentController < Class.new(ActionController::Base) end class NotAController end module Admin class << self; alias_method :const_available?, :const_defined?; end class UserController < Class.new(ActionController::Base); end class New...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/url_rewriter_test.rb
provider/vendor/rails/actionpack/test/controller/url_rewriter_test.rb
require 'abstract_unit' ActionController::UrlRewriter class UrlRewriterTests < ActionController::TestCase def setup @request = ActionController::TestRequest.new @params = {} @rewriter = ActionController::UrlRewriter.new(@request, @params) end def test_port assert_equal('http://test.host:1271/c/...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb
provider/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb
require 'abstract_unit' require 'digest/sha1' ActionController::Routing::Routes.draw do |map| map.connect ':controller/:action/:id' end # common controller actions module RequestForgeryProtectionActions def index render :inline => "<%= form_tag('/') {} %>" end def show_button render :inline => "<%=...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/fake_models.rb
provider/vendor/rails/actionpack/test/controller/fake_models.rb
class Customer < Struct.new(:name, :id) def to_param id.to_s end end class BadCustomer < Customer end class GoodCustomer < Customer end module Quiz class Question < Struct.new(:name, :id) def to_param id.to_s end 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/actionpack/test/controller/http_digest_authentication_test.rb
provider/vendor/rails/actionpack/test/controller/http_digest_authentication_test.rb
require 'abstract_unit' class HttpDigestAuthenticationTest < ActionController::TestCase class DummyDigestController < ActionController::Base before_filter :authenticate, :only => :index before_filter :authenticate_with_request, :only => :display USERS = { 'lifo' => 'world', 'pretty' => 'please', ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/mime_responds_test.rb
provider/vendor/rails/actionpack/test/controller/mime_responds_test.rb
require 'abstract_unit' class RespondToController < ActionController::Base layout :set_layout def html_xml_or_rss respond_to do |type| type.html { render :text => "HTML" } type.xml { render :text => "XML" } type.rss { render :text => "RSS" } type.all { render :text => "No...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/routing_test.rb
provider/vendor/rails/actionpack/test/controller/routing_test.rb
require 'abstract_unit' require 'controller/fake_controllers' require 'action_controller/routing/route_set' class MilestonesController < ActionController::Base def index() head :ok end alias_method :show, :index def rescue_action(e) raise e end end RunTimeTests = ARGV.include? 'time' ROUTING = ActionController:...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/selector_test.rb
provider/vendor/rails/actionpack/test/controller/selector_test.rb
#-- # Copyright (c) 2006 Assaf Arkin (http://labnotes.org) # Under MIT and/or CC By license. #++ require 'abstract_unit' require 'controller/fake_controllers' class SelectorTest < Test::Unit::TestCase # # Basic selector: element, id, class, attributes. # def test_element parse(%Q{<div id="1"></div><p></p...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/filters_test.rb
provider/vendor/rails/actionpack/test/controller/filters_test.rb
require 'abstract_unit' # FIXME: crashes Ruby 1.9 class FilterTest < Test::Unit::TestCase class TestController < ActionController::Base before_filter :ensure_login after_filter :clean_up def show render :inline => "ran action" end private def ensure_login @ran_filter ||= []...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/request_test.rb
provider/vendor/rails/actionpack/test/controller/request_test.rb
require 'abstract_unit' class RequestTest < ActiveSupport::TestCase def setup ActionController::Base.relative_url_root = nil end def teardown ActionController::Base.relative_url_root = nil end def test_remote_ip request = stub_request 'REMOTE_ADDR' => '1.2.3.4' assert_equal '1.2.3.4', reque...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/dispatcher_test.rb
provider/vendor/rails/actionpack/test/controller/dispatcher_test.rb
require 'abstract_unit' class DispatcherTest < Test::Unit::TestCase Dispatcher = ActionController::Dispatcher Reloader = ActionController::Reloader def setup ENV['REQUEST_METHOD'] = 'GET' reset_dispatcher Dispatcher.stubs(:require_dependency) end def teardown ENV.delete 'REQUEST_METHOD' ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/helper_test.rb
provider/vendor/rails/actionpack/test/controller/helper_test.rb
require 'abstract_unit' ActionController::Base.helpers_dir = File.dirname(__FILE__) + '/../fixtures/helpers' class TestController < ActionController::Base attr_accessor :delegate_attr def delegate_method() end def rescue_action(e) raise end end module Fun class GamesController < ActionController::Base de...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/render_test.rb
provider/vendor/rails/actionpack/test/controller/render_test.rb
require 'abstract_unit' require 'controller/fake_models' module Fun class GamesController < ActionController::Base def hello_world end end end class MockLogger attr_reader :logged def initialize @logged = [] end def method_missing(method, *args) @logged << args.first end end class Tes...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/header_test.rb
provider/vendor/rails/actionpack/test/controller/header_test.rb
require 'abstract_unit' class HeaderTest < Test::Unit::TestCase def setup @headers = ActionController::Http::Headers.new("HTTP_CONTENT_TYPE"=>"text/plain") end def test_content_type_works assert_equal "text/plain", @headers["Content-Type"] assert_equal "text/plain", @headers["content-type"] as...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb
provider/vendor/rails/actionpack/test/controller/polymorphic_routes_test.rb
require 'abstract_unit' class Article attr_reader :id def save; @id = 1 end def new_record?; @id.nil? end def name model = self.class.name.downcase @id.nil? ? "new #{model}" : "#{model} ##{@id}" end end class Response < Article def post_id; 1 end end class Tag < Article def response_id; 1 end 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/actionpack/test/controller/content_type_test.rb
provider/vendor/rails/actionpack/test/controller/content_type_test.rb
require 'abstract_unit' class ContentTypeController < ActionController::Base def render_content_type_from_body response.content_type = Mime::RSS render :text => "hello world!" end def render_defaults render :text => "hello world!" end def render_content_type_from_render render :text => "hel...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/reloader_test.rb
provider/vendor/rails/actionpack/test/controller/reloader_test.rb
require 'abstract_unit' class ReloaderTests < ActiveSupport::TestCase Reloader = ActionController::Reloader Dispatcher = ActionController::Dispatcher class MyBody < Array def initialize(&block) @on_close = block end def foo "foo" end def bar "bar" end def close...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/assert_select_test.rb
provider/vendor/rails/actionpack/test/controller/assert_select_test.rb
#-- # Copyright (c) 2006 Assaf Arkin (http://labnotes.org) # Under MIT and/or CC By license. #++ require 'abstract_unit' require 'controller/fake_controllers' unless defined?(ActionMailer) begin $:.unshift("#{File.dirname(__FILE__)}/../../../actionmailer/lib") require 'action_mailer' rescue LoadError => ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/view_paths_test.rb
provider/vendor/rails/actionpack/test/controller/view_paths_test.rb
require 'abstract_unit' class ViewLoadPathsTest < ActionController::TestCase class TestController < ActionController::Base def self.controller_path() "test" end def rescue_action(e) raise end before_filter :add_view_path, :only => :hello_world_at_request_time def hello_world() end def hello_wor...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/mime_type_test.rb
provider/vendor/rails/actionpack/test/controller/mime_type_test.rb
require 'abstract_unit' class MimeTypeTest < Test::Unit::TestCase Mime::Type.register "image/png", :png Mime::Type.register "application/pdf", :pdf def test_parse_single Mime::LOOKUP.keys.each do |mime_type| assert_equal [Mime::Type.lookup(mime_type)], Mime::Type.parse(mime_type) end end def ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/translation_test.rb
provider/vendor/rails/actionpack/test/controller/translation_test.rb
require 'abstract_unit' # class TranslatingController < ActionController::Base # end class TranslationControllerTest < Test::Unit::TestCase def setup @controller = ActionController::Base.new end def test_action_controller_base_responds_to_translate assert @controller.respond_to?(:translate) 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/actionpack/test/controller/base_test.rb
provider/vendor/rails/actionpack/test/controller/base_test.rb
require 'abstract_unit' require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late # Provide some controller to run the tests on. module Submodule class ContainedEmptyController < ActionController::Base end class ContainedNonEmptyController < ActionCon...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/failsafe_test.rb
provider/vendor/rails/actionpack/test/controller/failsafe_test.rb
require 'abstract_unit' require 'stringio' require 'logger' class FailsafeTest < ActionController::TestCase FIXTURE_PUBLIC = "#{File.dirname(__FILE__)}/../fixtures/failsafe".freeze def setup @old_error_file_path = ActionController::Failsafe.error_file_path ActionController::Failsafe.error_file_path = FI...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb
provider/vendor/rails/actionpack/test/controller/html-scanner/text_node_test.rb
require 'abstract_unit' class TextNodeTest < Test::Unit::TestCase def setup @node = HTML::Text.new(nil, 0, 0, "hello, howdy, aloha, annyeong") end def test_to_s assert_equal "hello, howdy, aloha, annyeong", @node.to_s end def test_find_string assert_equal @node, @node.find("hello, howdy, al...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb
provider/vendor/rails/actionpack/test/controller/html-scanner/tokenizer_test.rb
require 'abstract_unit' class TokenizerTest < Test::Unit::TestCase def test_blank tokenize "" assert_end end def test_space tokenize " " assert_next " " assert_end end def test_tag_simple_open tokenize "<tag>" assert_next "<tag>" assert_end end def test_tag_simple_self...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb
provider/vendor/rails/actionpack/test/controller/html-scanner/document_test.rb
require 'abstract_unit' class DocumentTest < Test::Unit::TestCase def test_handle_doctype doc = nil assert_nothing_raised do doc = HTML::Document.new <<-HTML.strip <!DOCTYPE "blah" "blah" "blah"> <html> </html> HTML end assert_equal 3, doc.root.children.length ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb
provider/vendor/rails/actionpack/test/controller/html-scanner/tag_node_test.rb
require 'abstract_unit' class TagNodeTest < Test::Unit::TestCase def test_open_without_attributes node = tag("<tag>") assert_equal "tag", node.name assert_equal Hash.new, node.attributes assert_nil node.closing end def test_open_with_attributes node = tag("<TAG1 foo=hey_ho x:bar=\"blah bla...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false