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/activesupport/lib/active_support/core_ext/date_time/calculations.rb
provider/vendor/rails/activesupport/lib/active_support/core_ext/date_time/calculations.rb
require 'rational' module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module DateTime #:nodoc: # Enables the use of time calculations within DateTime itself module Calculations def self.included(base) #:nodoc: base.extend ClassMethods base.class_eval do ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb
provider/vendor/rails/activesupport/lib/active_support/core_ext/numeric/time.rb
module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Numeric #:nodoc: # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. # # These methods use Time#advance for precise date calculations when using from_now, ago, etc. # as well as 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/activesupport/lib/active_support/core_ext/numeric/conversions.rb
provider/vendor/rails/activesupport/lib/active_support/core_ext/numeric/conversions.rb
module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Numeric #:nodoc: module Conversions # Assumes self represents an offset from UTC in seconds (as returned from Time#utc_offset) # and turns this into an +HH:MM formatted string. Example: # # -21_600.to_utc_o...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb
provider/vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb
module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module Numeric #:nodoc: # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes module Bytes KILOBYTE = 1024 MEGABYTE = KILOBYTE * 1024 GIGABYTE = MEGABYTE * 1024 TERABYTE = GIGA...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/testing/declarative.rb
provider/vendor/rails/activesupport/lib/active_support/testing/declarative.rb
module ActiveSupport module Testing module Declarative # test "verify something" do # ... # end def test(name, &block) test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym defined = instance_method(test_name) rescue false raise "#{test_name} is already defined in #{s...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb
provider/vendor/rails/activesupport/lib/active_support/testing/deprecation.rb
require "active_support/core_ext/module" module ActiveSupport module Testing module Deprecation #:nodoc: def assert_deprecated(match = nil, &block) result, warnings = collect_deprecations(&block) assert !warnings.empty?, "Expected a deprecation warning within the block but received none" ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/testing/performance.rb
provider/vendor/rails/activesupport/lib/active_support/testing/performance.rb
require 'rubygems' gem 'ruby-prof', '>= 0.6.1' require 'ruby-prof' require 'fileutils' require 'rails/version' module ActiveSupport module Testing module Performance DEFAULTS = if benchmark = ARGV.include?('--benchmark') # HAX for rake test { :benchmark => true, :runs => 4, ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/testing/assertions.rb
provider/vendor/rails/activesupport/lib/active_support/testing/assertions.rb
module ActiveSupport module Testing module Assertions # Test numeric difference between the return value of an expression as a result of what is evaluated # in the yielded block. # # assert_difference 'Article.count' do # post :create, :article => {...} # 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/activesupport/lib/active_support/testing/default.rb
provider/vendor/rails/activesupport/lib/active_support/testing/default.rb
module ActiveSupport module Testing module Default #:nodoc: # Placeholder so test/unit ignores test cases without any tests. def default_test end 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/activesupport/lib/active_support/testing/setup_and_teardown.rb
provider/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb
require 'active_support/callbacks' module ActiveSupport module Testing module SetupAndTeardown def self.included(base) base.class_eval do include ActiveSupport::Callbacks define_callbacks :setup, :teardown if defined?(MiniTest::Assertions) && TestCase < MiniTest::Asse...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb
provider/vendor/rails/activesupport/lib/active_support/xml_mini/libxml.rb
require 'libxml' # = XmlMini LibXML implementation module ActiveSupport module XmlMini_LibXML #:nodoc: extend self # Parse an XML Document string into a simple hash using libxml. # string:: # XML Document string to parse def parse(string) LibXML::XML.default_keep_blanks = false if...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb
provider/vendor/rails/activesupport/lib/active_support/xml_mini/nokogiri.rb
require 'nokogiri' # = XmlMini Nokogiri implementation module ActiveSupport module XmlMini_Nokogiri #:nodoc: extend self # Parse an XML Document string into a simple hash using libxml / nokogiri. # string:: # XML Document string to parse def parse(string) if string.blank? {} ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/xml_mini/rexml.rb
provider/vendor/rails/activesupport/lib/active_support/xml_mini/rexml.rb
# = XmlMini ReXML implementation module ActiveSupport module XmlMini_REXML #:nodoc: extend self CONTENT_KEY = '__content__'.freeze # Parse an XML Document string into a simple hash # # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, # and uses the defaults from ActiveSupport ...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activesupport/lib/active_support/xml_mini/jdom.rb
provider/vendor/rails/activesupport/lib/active_support/xml_mini/jdom.rb
raise "JRuby is required to use the JDOM backend for XmlMini" unless RUBY_PLATFORM =~ /java/ require 'jruby' include Java import javax.xml.parsers.DocumentBuilder unless defined? DocumentBuilder import javax.xml.parsers.DocumentBuilderFactory unless defined? DocumentBuilderFactory import java.io.StringReader unless 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/activesupport/lib/active_support/values/time_zone.rb
provider/vendor/rails/activesupport/lib/active_support/values/time_zone.rb
# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following: # # * Limit the set of zones provided by TZInfo to a meaningful subset of 142 zones. # * Retrieve and display zones with a friendlier name (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). # *...
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/dispatches/dispatch.rb
provider/vendor/rails/railties/dispatches/dispatch.rb
#!/usr/bin/env ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaire...
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/helpers/test_helper.rb
provider/vendor/rails/railties/helpers/test_helper.rb
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' class ActiveSupport::TestCase # Transactional fixtures accelerate your tests by wrapping each test method # in a transaction that's rolled back on completion. This ensures that the # test da...
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/helpers/application_helper.rb
provider/vendor/rails/railties/helpers/application_helper.rb
# Methods added to this helper will be available to all templates in the application. module ApplicationHelper 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/helpers/application_controller.rb
provider/vendor/rails/railties/helpers/application_controller.rb
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time protect_from_forgery # See ActionController::RequestForgeryPr...
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/helpers/performance_test.rb
provider/vendor/rails/railties/helpers/performance_test.rb
require 'test_helper' require 'performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionController::PerformanceTest 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/builtin/rails_info/rails_info_controller.rb
provider/vendor/rails/railties/builtin/rails_info/rails_info_controller.rb
# Alias to ensure old public.html still works. RailsInfoController = Rails::InfoController
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/builtin/rails_info/rails/info.rb
provider/vendor/rails/railties/builtin/rails_info/rails/info.rb
module Rails module Info mattr_accessor :properties class << (@@properties = []) def names map &:first end def value_for(property_name) if property = assoc(property_name) property.last end end end class << self #:nodoc: def property(nam...
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/builtin/rails_info/rails/info_controller.rb
provider/vendor/rails/railties/builtin/rails_info/rails/info_controller.rb
class Rails::InfoController < ActionController::Base def properties if consider_all_requests_local || local_request? render :inline => Rails::Info.to_html else render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => 500 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/builtin/rails_info/rails/info_helper.rb
provider/vendor/rails/railties/builtin/rails_info/rails/info_helper.rb
module Rails::InfoHelper 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/console_app.rb
provider/vendor/rails/railties/lib/console_app.rb
require 'active_support/test_case' require 'action_controller' # work around the at_exit hook in test/unit, which kills IRB Test::Unit.run = true if Test::Unit.respond_to?(:run=) # reference the global "app" instance, created on demand. To recreate the # instance, pass a non-false value as the parameter. def app(crea...
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/railties_path.rb
provider/vendor/rails/railties/lib/railties_path.rb
RAILTIES_PATH = File.join(File.dirname(__FILE__), '..')
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/initializer.rb
provider/vendor/rails/railties/lib/initializer.rb
require 'logger' require 'set' require 'pathname' $LOAD_PATH.unshift File.dirname(__FILE__) require 'railties_path' require 'rails/version' require 'rails/plugin/locator' require 'rails/plugin/loader' require 'rails/gem_dependency' require 'rails/rack' RAILS_ENV = (ENV['RAILS_ENV'] || 'development').dup unless defin...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
true
ThoughtWorksStudios/oauth2_provider
https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/railties/lib/code_statistics.rb
provider/vendor/rails/railties/lib/code_statistics.rb
class CodeStatistics #:nodoc: TEST_TYPES = %w(Units Functionals Unit\ tests Functional\ tests Integration\ tests) def initialize(*pairs) @pairs = pairs @statistics = calculate_statistics @total = calculate_total if pairs.length > 1 end def to_s print_header @pairs.each { |pair| ...
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/test_help.rb
provider/vendor/rails/railties/lib/test_help.rb
# Make double-sure the RAILS_ENV is set to test, # so fixtures are loaded to the right database silence_warnings { RAILS_ENV = "test" } require 'test/unit' require 'action_controller/test_case' require 'action_view/test_case' require 'action_controller/integration' require 'action_mailer/test_case' if defined?(ActionM...
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/console_sandbox.rb
provider/vendor/rails/railties/lib/console_sandbox.rb
ActiveRecord::Base.connection.increment_open_transactions ActiveRecord::Base.connection.begin_db_transaction at_exit do ActiveRecord::Base.connection.rollback_db_transaction ActiveRecord::Base.connection.decrement_open_transactions 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/fcgi_handler.rb
provider/vendor/rails/railties/lib/fcgi_handler.rb
require 'fcgi' require 'logger' require 'dispatcher' require 'rbconfig' class RailsFCGIHandler SIGNALS = { 'HUP' => :reload, 'INT' => :exit_now, 'TERM' => :exit_now, 'USR1' => :exit, 'USR2' => :restart } GLOBAL_SIGNALS = SIGNALS.keys - %w(USR1) attr_reader :when_ready 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/railties/lib/rails_generator.rb
provider/vendor/rails/railties/lib/rails_generator.rb
#-- # Copyright (c) 2004 Jeremy Kemper # # 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, merge, publish, #...
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/rubyprof_ext.rb
provider/vendor/rails/railties/lib/rubyprof_ext.rb
require 'prof' module Prof #:nodoc: # Adapted from Shugo Maeda's unprof.rb def self.print_profile(results, io = $stderr) total = results.detect { |i| i.method_class.nil? && i.method_id == :"#toplevel" }.total_time total = 0.001 if total < 0.001 io.puts " %% cumulative 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/railties/lib/dispatcher.rb
provider/vendor/rails/railties/lib/dispatcher.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/railties/lib/commands.rb
provider/vendor/rails/railties/lib/commands.rb
commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path| File.basename(file_path).split(".").first } if commands.include?(ARGV.first) require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}" else puts <<-USAGE The 'run' provides a unified access point for all the default Rails' commands. ...
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/source_annotation_extractor.rb
provider/vendor/rails/railties/lib/source_annotation_extractor.rb
# Implements the logic behind the rake tasks for annotations like # # rake notes # rake notes:optimize # # and friends. See <tt>rake -T notes</tt> and <tt>railties/lib/tasks/annotations.rake</tt>. # # Annotation objects are triplets <tt>:line</tt>, <tt>:tag</tt>, <tt>:text</tt> that # represent the line where the 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/railties/lib/ruby_version_check.rb
provider/vendor/rails/railties/lib/ruby_version_check.rb
min_release = "1.8.2 (2004-12-25)" ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" if ruby_release =~ /1\.8\.3/ abort <<-end_message Rails does not work with Ruby version 1.8.3. Please upgrade to version 1.8.4 or downgrade to 1.8.2. end_message elsif ruby_release < min_release abort <<-end_mess...
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/console_with_helpers.rb
provider/vendor/rails/railties/lib/console_with_helpers.rb
def helper @helper ||= ApplicationController.helpers end @controller = ApplicationController.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/railties/lib/webrick_server.rb
provider/vendor/rails/railties/lib/webrick_server.rb
# Donated by Florian Gross require 'webrick' require 'cgi' require 'stringio' require 'dispatcher' include WEBrick class CGI #:nodoc: def stdinput @stdin || $stdin end def env_table @env_table || ENV end def initialize(type = "query", table = nil, stdin = nil) @env_table, @stdin = table, ...
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/performance_test_help.rb
provider/vendor/rails/railties/lib/performance_test_help.rb
require 'action_controller/performance_test' ActionController::Base.perform_caching = true ActiveSupport::Dependencies.mechanism = :require Rails.logger.level = ActiveSupport::BufferedLogger::INFO
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/tasks/rails.rb
provider/vendor/rails/railties/lib/tasks/rails.rb
$VERBOSE = nil # Load Rails rakefile extensions Dir["#{File.dirname(__FILE__)}/*.rake"].each { |ext| load ext } # Load any custom rakefile extensions Dir["#{RAILS_ROOT}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext } Dir["#{RAILS_ROOT}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
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/vendor_gem_source_index.rb
provider/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb
require 'rubygems' require 'yaml' module Rails class VendorGemSourceIndex # VendorGemSourceIndex acts as a proxy for the Gem source index, allowing # gems to be loaded from vendor/gems. Rather than the standard gem repository format, # vendor/gems contains unpacked gems, with YAML specifications in .spe...
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/version.rb
provider/vendor/rails/railties/lib/rails/version.rb
module Rails 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/railties/lib/rails/rack.rb
provider/vendor/rails/railties/lib/rails/rack.rb
module Rails module Rack autoload :Debugger, "rails/rack/debugger" autoload :LogTailer, "rails/rack/log_tailer" autoload :Metal, "rails/rack/metal" autoload :Static, "rails/rack/static" 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/plugin.rb
provider/vendor/rails/railties/lib/rails/plugin.rb
module Rails # The Plugin class should be an object which provides the following methods: # # * +name+ - Used during initialisation to order the plugin (based on name and # the contents of <tt>config.plugins</tt>). # * +valid?+ - Returns true if this plugin can be loaded. # * +loa...
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/gem_dependency.rb
provider/vendor/rails/railties/lib/rails/gem_dependency.rb
require 'rails/vendor_gem_source_index' module Gem def self.source_index=(index) @@source_index = index end end module Rails class GemDependency < Gem::Dependency attr_accessor :lib, :source, :dep def self.unpacked_path @unpacked_path ||= File.join(RAILS_ROOT, 'vendor', 'gems') 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/gem_builder.rb
provider/vendor/rails/railties/lib/rails/gem_builder.rb
require 'rubygems' require 'rubygems/installer' module Rails # this class hijacks the functionality of Gem::Installer by overloading its # initializer to only provide the information needed by # Gem::Installer#build_extensions (which happens to be what we have) class GemBuilder < Gem::Installer def 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/railties/lib/rails/backtrace_cleaner.rb
provider/vendor/rails/railties/lib/rails/backtrace_cleaner.rb
module Rails class BacktraceCleaner < ActiveSupport::BacktraceCleaner ERB_METHOD_SIG = /:in `_run_erb_.*/ RAILS_GEMS = %w( actionpack activerecord actionmailer activesupport activeresource rails ) VENDOR_DIRS = %w( vendor/rails ) SERVER_DIRS = %w( lib/mongrel bin/mongrel l...
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/plugin/loader.rb
provider/vendor/rails/railties/lib/rails/plugin/loader.rb
require "rails/plugin" module Rails class Plugin class Loader attr_reader :initializer # Creates a new Plugin::Loader instance, associated with the given # Rails::Initializer. This default implementation automatically locates # all plugins, and adds all plugin load paths, when it is crea...
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/plugin/locator.rb
provider/vendor/rails/railties/lib/rails/plugin/locator.rb
module Rails class Plugin # The Plugin::Locator class should be subclasses to provide custom plugin-finding # abilities to Rails (i.e. loading plugins from Gems, etc). Each subclass should implement # the <tt>located_plugins</tt> method, which return an array of Plugin objects that have been found. ...
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/rack/log_tailer.rb
provider/vendor/rails/railties/lib/rails/rack/log_tailer.rb
module Rails module Rack class LogTailer EnvironmentLog = "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log" def initialize(app, log = nil) @app = app path = Pathname.new(log || EnvironmentLog).cleanpath @cursor = ::File.size(path) @last_checked = Time.now.to_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/railties/lib/rails/rack/debugger.rb
provider/vendor/rails/railties/lib/rails/rack/debugger.rb
module Rails module Rack class Debugger def initialize(app) @app = app require_library_or_gem 'ruby-debug' ::Debugger.start ::Debugger.settings[:autoeval] = true if ::Debugger.respond_to?(:settings) puts "=> Debugger enabled" rescue Exception puts "You ...
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/rack/static.rb
provider/vendor/rails/railties/lib/rails/rack/static.rb
require 'rack/utils' module Rails module Rack class Static FILE_METHODS = %w(GET HEAD).freeze def initialize(app) @app = app @file_server = ::Rack::File.new(File.join(RAILS_ROOT, "public")) end def call(env) path = env['PATH_INFO'].chomp('/') metho...
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/rack/metal.rb
provider/vendor/rails/railties/lib/rails/rack/metal.rb
require 'active_support/ordered_hash' module Rails module Rack class Metal NotFoundResponse = [404, {}, []].freeze NotFound = lambda { NotFoundResponse } cattr_accessor :metal_paths self.metal_paths = ["#{Rails.root}/app/metal"] cattr_accessor :requested_metals def self.meta...
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/commands/dbconsole.rb
provider/vendor/rails/railties/lib/commands/dbconsole.rb
require 'erb' require 'yaml' require 'optparse' include_password = false options = {} OptionParser.new do |opt| opt.banner = "Usage: dbconsole [options] [environment]" opt.on("-p", "--include-password", "Automatically provide the password from database.yml") do |v| include_password = true end opt.on("--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/railties/lib/commands/update.rb
provider/vendor/rails/railties/lib/commands/update.rb
require "#{RAILS_ROOT}/config/environment" require 'rails_generator' require 'rails_generator/scripts/update' Rails::Generator::Scripts::Update.new.run(ARGV)
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/commands/generate.rb
provider/vendor/rails/railties/lib/commands/generate.rb
require "#{RAILS_ROOT}/config/environment" require 'rails_generator' require 'rails_generator/scripts/generate' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) Rails::Generator::Scripts::Generate.new.run(ARGV)
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/commands/about.rb
provider/vendor/rails/railties/lib/commands/about.rb
require "#{RAILS_ROOT}/config/environment" require 'rails/info' puts Rails::Info
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/commands/plugin.rb
provider/vendor/rails/railties/lib/commands/plugin.rb
# Rails Plugin Manager. # # Listing available plugins: # # $ ./script/plugin list # continuous_builder http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder # asset_timestamping http://svn.aviditybytes.com/rails/plugins/asset_timestamping # enumerations_mixin http://s...
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/commands/console.rb
provider/vendor/rails/railties/lib/commands/console.rb
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' require 'optparse' options = { :sandbox => false, :irb => irb } OptionParser.new do |opt| opt.banner = "Usage: console [environment] [options]" opt.on('-s', '--sandbox', 'Rollback database modifications on exit.') { |v| options[:sandbox] = v } opt.on(...
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/commands/runner.rb
provider/vendor/rails/railties/lib/commands/runner.rb
require 'optparse' options = { :environment => (ENV['RAILS_ENV'] || "development").dup } code_or_file = nil ARGV.clone.options do |opts| script_name = File.basename($0) opts.banner = "Usage: #{$0} [options] ('Some.ruby(code)' or a filename)" opts.separator "" opts.on("-e", "--environment=name", String, ...
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/commands/destroy.rb
provider/vendor/rails/railties/lib/commands/destroy.rb
require "#{RAILS_ROOT}/config/environment" require 'rails_generator' require 'rails_generator/scripts/destroy' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) Rails::Generator::Scripts::Destroy.new.run(ARGV)
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/commands/server.rb
provider/vendor/rails/railties/lib/commands/server.rb
require 'active_support' require 'action_controller' require 'fileutils' require 'optparse' # TODO: Push Thin adapter upstream so we don't need worry about requiring it begin require_library_or_gem 'thin' rescue Exception # Thin not available end options = { :Port => 3000, :Host => "0.0.0.0", ...
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/commands/performance/profiler.rb
provider/vendor/rails/railties/lib/commands/performance/profiler.rb
if ARGV.empty? $stderr.puts "Usage: ./script/performance/profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]" exit(1) end # Keep the expensive require out of the profile. $stderr.puts 'Loading Rails...' require RAILS_ROOT + '/config/environment' # Define a method to profile. if ARGV[1] and ARGV...
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/commands/performance/benchmarker.rb
provider/vendor/rails/railties/lib/commands/performance/benchmarker.rb
if ARGV.empty? puts "Usage: ./script/performance/benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..." exit 1 end begin N = Integer(ARGV.first) ARGV.shift rescue ArgumentError N = 1 end require RAILS_ROOT + '/config/environment' require 'benchmark' include Benchmark # Don't include...
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/manifest.rb
provider/vendor/rails/railties/lib/rails_generator/manifest.rb
module Rails module Generator # Manifest captures the actions a generator performs. Instantiate # a manifest with an optional target object, hammer it with actions, # then replay or rewind on the object of your choice. # # Example: # manifest = Manifest.new { |m| # m.make_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/secret_key_generator.rb
provider/vendor/rails/railties/lib/rails_generator/secret_key_generator.rb
require 'active_support/deprecation' module Rails # A class for creating random secret keys. This class will do its best to create a # random secret key that's as secure as possible, using whatever methods are # available on the current platform. For example: # # generator = Rails::SecretKeyGenerator("some...
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/options.rb
provider/vendor/rails/railties/lib/rails_generator/options.rb
require 'optparse' module Rails module Generator module Options def self.included(base) base.extend(ClassMethods) class << base if respond_to?(:inherited) alias_method :inherited_without_options, :inherited end alias_method :inherited, :inherited_wi...
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/simple_logger.rb
provider/vendor/rails/railties/lib/rails_generator/simple_logger.rb
module Rails module Generator class SimpleLogger # :nodoc: attr_reader :out attr_accessor :quiet def initialize(out = $stdout) @out = out @quiet = false @level = 0 end def log(status, message, &block) @out.print("%12s %s%s\n" % [status, ' ' * @leve...
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/scripts.rb
provider/vendor/rails/railties/lib/rails_generator/scripts.rb
require File.dirname(__FILE__) + '/options' module Rails module Generator module Scripts # Generator scripts handle command-line invocation. Each script # responds to an invoke! class method which handles option parsing # and generator invocation. class Base include Options ...
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/spec.rb
provider/vendor/rails/railties/lib/rails_generator/spec.rb
module Rails module Generator # A spec knows where a generator was found and how to instantiate it. # Metadata include the generator's name, its base path, and the source # which yielded it (PathSource, GemPathSource, etc.) class Spec attr_reader :name, :path, :source def initialize(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/lib/rails_generator/base.rb
provider/vendor/rails/railties/lib/rails_generator/base.rb
require File.dirname(__FILE__) + '/options' require File.dirname(__FILE__) + '/manifest' require File.dirname(__FILE__) + '/spec' require File.dirname(__FILE__) + '/generated_attribute' module Rails # Rails::Generator is a code generation platform tailored for the Rails # web application framework. Generators are...
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/generated_attribute.rb
provider/vendor/rails/railties/lib/rails_generator/generated_attribute.rb
require 'optparse' module Rails module Generator class GeneratedAttribute attr_accessor :name, :type, :column def initialize(name, type) @name, @type = name, type.to_sym @column = ActiveRecord::ConnectionAdapters::Column.new(name, nil, @type) end def field_type @...
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/commands.rb
provider/vendor/rails/railties/lib/rails_generator/commands.rb
require 'delegate' require 'optparse' require 'fileutils' require 'tempfile' require 'erb' module Rails module Generator module Commands # Here's a convenient way to get a handle on generator commands. # Command.instance('destroy', my_generator) instantiates a Destroy # delegate of my_generator...
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/lookup.rb
provider/vendor/rails/railties/lib/rails_generator/lookup.rb
require 'pathname' require File.dirname(__FILE__) + '/spec' class Object class << self # Lookup missing generators using const_missing. This allows any # generator to reference another without having to know its location: # RubyGems, ~/.rails/generators, and RAILS_ROOT/generators. def lookup_missin...
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/scripts/update.rb
provider/vendor/rails/railties/lib/rails_generator/scripts/update.rb
require File.dirname(__FILE__) + '/../scripts' module Rails::Generator::Scripts class Update < Base mandatory_options :command => :update protected def banner "Usage: #{$0} [options] scaffold" 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/scripts/generate.rb
provider/vendor/rails/railties/lib/rails_generator/scripts/generate.rb
require File.dirname(__FILE__) + '/../scripts' module Rails::Generator::Scripts class Generate < Base mandatory_options :command => :create 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/scripts/destroy.rb
provider/vendor/rails/railties/lib/rails_generator/scripts/destroy.rb
require File.dirname(__FILE__) + '/../scripts' module Rails::Generator::Scripts class Destroy < Base mandatory_options :command => :destroy protected def usage_message usage = "\nInstalled Generators\n" Rails::Generator::Base.sources.each do |source| label = source.label.to_s.capital...
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/controller/controller_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/controller/controller_generator.rb
class ControllerGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper", "#{class_name}HelperTest" # Controller, helper, views, and test directories...
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/controller/templates/functional_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb
require 'test_helper' class <%= 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/controller/templates/helper_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/controller/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/controller/templates/controller.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/controller/templates/controller.rb
class <%= class_name %>Controller < ApplicationController <% for action in actions -%> def <%= action %> 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/controller/templates/helper.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/controller/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/plugin/plugin_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
class PluginGenerator < Rails::Generator::NamedBase attr_reader :plugin_path def initialize(runtime_args, runtime_options = {}) @with_generator = runtime_args.delete("--with-generator") super @plugin_path = "vendor/plugins/#{file_name}" end def manifest record do |m| # Check for class 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/railties/lib/rails_generator/generators/components/plugin/templates/unit_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/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/plugin/templates/uninstall.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/uninstall.rb
# Uninstall hook code here
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/plugin/templates/plugin.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/plugin.rb
# <%= class_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/lib/rails_generator/generators/components/plugin/templates/test_helper.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/test_helper.rb
require 'rubygems' require 'active_support' require 'active_support/test_case'
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/plugin/templates/generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/generator.rb
class <%= class_name %>Generator < Rails::Generator::NamedBase def manifest record do |m| # m.directory "lib" # m.template 'README', "README" 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/plugin/templates/install.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/install.rb
# Install hook code here
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/plugin/templates/init.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/init.rb
# Include hook code here
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/scaffold/scaffold_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
class ScaffoldGenerator < Rails::Generator::NamedBase default_options :skip_timestamps => false, :skip_migration => false, :force_plural => false attr_reader :controller_name, :controller_class_path, :controller_file_path, :controller_class_nesting, ...
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/scaffold/templates/functional_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
require 'test_helper' class <%= controller_class_name %>ControllerTest < ActionController::TestCase test "should get index" do get :index assert_response :success assert_not_nil assigns(:<%= table_name %>) end test "should get new" do get :new assert_response :success end test "should 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/railties/lib/rails_generator/generators/components/scaffold/templates/helper_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/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/scaffold/templates/controller.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
class <%= controller_class_name %>Controller < ApplicationController # GET /<%= table_name %> # GET /<%= table_name %>.xml def index @<%= table_name %> = <%= class_name %>.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @<%= table_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/scaffold/templates/helper.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/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/mailer/mailer_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/mailer/mailer_generator.rb
class MailerGenerator < Rails::Generator::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions class_name, "#{class_name}Test" # Mailer, view, test, and fixture directories. m.directory File.join('app/models', class_path) m.directory File.join...
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/mailer/templates/mailer.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/mailer.rb
class <%= class_name %> < ActionMailer::Base <% for action in actions -%> def <%= action %>(sent_at = Time.now) subject '<%= class_name %>#<%= action %>' recipients '' from '' sent_on sent_at body :greeting => 'Hi,' 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/mailer/templates/unit_test.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
require 'test_helper' class <%= class_name %>Test < ActionMailer::TestCase <% for action in actions -%> test "<%= action %>" do @expected.subject = '<%= class_name %>#<%= action %>' @expected.body = read_fixture('<%= action %>') @expected.date = Time.now assert_equal @expected.encoded, <%= cla...
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/resource_generator.rb
provider/vendor/rails/railties/lib/rails_generator/generators/components/resource/resource_generator.rb
class ResourceGenerator < Rails::Generator::NamedBase default_options :skip_timestamps => false, :skip_migration => false attr_reader :controller_name, :controller_class_path, :controller_file_path, :controller_class_nesting, :controller_class_nesti...
ruby
MIT
d54702f194edd05389968cf8947465860abccc5d
2026-01-04T17:46:04.645080Z
false