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
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/boot.rb
test/dummy/config/boot.rb
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile.
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/filter_parameter_logging.rb
test/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password]
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/application_controller_renderer.rb
test/dummy/config/initializers/application_controller_renderer.rb
# Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/wrap_parameters.rb
test/dummy/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/inflections.rb
test/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/cookies_serializer.rb
test/dummy/config/initializers/cookies_serializer.rb
# Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/assets.rb
test/dummy/config/initializers/assets.rb
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules ...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/backtrace_silencers.rb
test/dummy/config/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 to debug a probl...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/initializers/mime_types.rb
test/dummy/config/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
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/environments/test.rb
test/dummy/config/environments/test.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.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 suit...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/environments/development.rb
test/dummy/config/environments/development.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.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 web serv...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/dummy/config/environments/production.rb
test/dummy/config/environments/production.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/test/lib/generators/favicon_generator_test.rb
test/lib/generators/favicon_generator_test.rb
require 'test_helper' require 'generators/favicon_generator' class FaviconGeneratorTest < Rails::Generators::TestCase tests FaviconGenerator destination Rails.root.join('tmp/generators') setup :prepare_destination test "replace URLs by asset_path in XML" do original = <<EOF <?xml version="1.0" encoding="u...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/lib/rails_real_favicon.rb
lib/rails_real_favicon.rb
module RailsRealFavicon end
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/lib/generators/favicon_generator.rb
lib/generators/favicon_generator.rb
require 'net/http' require 'uri' require 'json' require 'open-uri' require 'zip' require 'base64' class FaviconGenerator < Rails::Generators::Base API_KEY = '04641dc33598f5463c2f1ff49dd9e4a617559f4b' PATH_UNIQUE_KEY = '/Dfv87ZbNh2' class_option(:timeout, type: :numeric, aliases: '-t', default: 30) def gener...
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
RealFaviconGenerator/rails_real_favicon
https://github.com/RealFaviconGenerator/rails_real_favicon/blob/05e8895597a4ecf6420a92ea37d4c215de7adfbc/lib/rails_real_favicon/version.rb
lib/rails_real_favicon/version.rb
module RailsRealFavicon VERSION = "0.1.1" end
ruby
MIT
05e8895597a4ecf6420a92ea37d4c215de7adfbc
2026-01-04T17:43:37.290160Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/spec_helper.rb
spec/spec_helper.rb
ENV["RAILS_ENV"] ||= "test" require 'rubygems' require 'redis' require 'redis-namespace' require File.expand_path("../dummy/config/environment.rb", __FILE__) require 'rspec/rails' Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} $redis = Redis::Namespace.new('rollout_ui:test', :redis => Redis....
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/requests/engine/engine_spec.rb
spec/requests/engine/engine_spec.rb
require 'spec_helper' describe "Engine" do describe "GET /rollout" do let(:user) { mock(:user, :id => 5) } before do $rollout.active?(:featureA, user) end it "shows requested rollout features" do visit "/rollout" page.should have_content("featureA") end describe "percent...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/app/helpers/application_helper.rb
spec/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/application.rb
spec/dummy/config/application.rb
require File.expand_path('../boot', __FILE__) require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" Bundler.require require "rollout_ui" require "rollout_ui/engine" module Dummy class Application < Rails::Application # Settings in config/environments/* take prec...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/environment.rb
spec/dummy/config/environment.rb
# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Dummy::Application.initialize!
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/routes.rb
spec/dummy/config/routes.rb
Rails.application.routes.draw do mount RolloutUi::Engine => "/rollout" root :to => proc { |env| [200, {}, "Hello World!"] } end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/boot.rb
spec/dummy/config/boot.rb
require 'rubygems' gemfile = File.expand_path('../../../../Gemfile', __FILE__) if File.exist?(gemfile) ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup end $:.unshift File.expand_path('../../../../lib', __FILE__)
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/rollout.rb
spec/dummy/config/initializers/rollout.rb
$redis = Redis.new $rollout = Rollout.new($redis) RolloutUi.wrap($rollout) $rollout.define_group(:admins) { |user| user.admin? } $rollout.define_group(:beta_testers) { |user| user.beta_testers? }
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/session_store.rb
spec/dummy/config/initializers/session_store.rb
# Be sure to restart your server when you modify this file. Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails ge...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/wrap_parameters.rb
spec/dummy/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters ...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/inflections.rb
spec/dummy/config/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
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/backtrace_silencers.rb
spec/dummy/config/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 to debug a probl...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/mime_types.rb
spec/dummy/config/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
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/initializers/secret_token.rb
spec/dummy/config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies 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 attac...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/environments/test.rb
spec/dummy/config/environments/test.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.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 su...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/environments/development.rb
spec/dummy/config/environments/development.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.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 web ser...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/dummy/config/environments/production.rb
spec/dummy/config/environments/production.rb
Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_c...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/lib/rollout_ui/wrapper_spec.rb
spec/lib/rollout_ui/wrapper_spec.rb
require 'spec_helper' describe RolloutUi::Wrapper do before do @rollout_ui = RolloutUi::Wrapper.new end it "cannot be initialized without an instance of rollout if rollout hasn't been wrapped" do RolloutUi.wrap(nil) lambda { RolloutUi::Wrapper.new }.should raise_error(RolloutUi::Wrapper::NoRolloutI...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/spec/lib/rollout_ui/feature_spec.rb
spec/lib/rollout_ui/feature_spec.rb
require 'spec_helper' describe RolloutUi::Feature do before do # Request a feature to prime RolloutUi::Wrapper rollout instance $rollout.active?(:featureA, mock(:user, :id => 5)) @feature = RolloutUi::Feature.new(:featureA) end describe "#percentage" do it "returns the activated percentage for ...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui.rb
lib/rollout_ui.rb
require 'redis' require 'rollout' require 'rollout_ui/monkey_patch' if defined?(Rails) && Rails::VERSION::STRING.to_f >= 3.1 # Hack so that if the Engine is ever required, it's # able to find it's assets, etc. TODO: find a better way $:.unshift File.expand_path("rollout_ui/engine/lib", File.dirname(__FILE__)) en...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/version.rb
lib/rollout_ui/version.rb
module RolloutUi Version = "0.3.0" end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/feature.rb
lib/rollout_ui/feature.rb
module RolloutUi class Feature User = Struct.new(:id) attr_reader :name def initialize(name) @wrapper = Wrapper.new @name = name.to_sym end def percentage rollout.get(feature_for(name)).percentage.to_s end def groups rollout.get(feature_for(name)).groups end...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/server.rb
lib/rollout_ui/server.rb
require 'sinatra/base' require 'erb' require 'time' if defined? Encoding Encoding.default_external = Encoding::UTF_8 end module RolloutUi User = Struct.new(:id) class Server < Sinatra::Base dir = File.dirname(File.expand_path(__FILE__)) set :views, "#{dir}/server/views" set :static, true if ...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/wrapper.rb
lib/rollout_ui/wrapper.rb
module RolloutUi class Wrapper class NoRolloutInstance < StandardError; end attr_reader :rollout def initialize(rollout = nil) @rollout = rollout || RolloutUi.rollout raise NoRolloutInstance unless @rollout end def groups rollout.instance_variable_get("@groups").keys end ...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/monkey_patch.rb
lib/rollout_ui/monkey_patch.rb
class Rollout alias_method :original_active?, :active? def active?(feature, user=nil) RolloutUi::Wrapper.new(self).add_feature(feature) original_active?(feature, user) end end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/engine/app/helpers/rollout_ui/application_helper.rb
lib/rollout_ui/engine/app/helpers/rollout_ui/application_helper.rb
module RolloutUi module ApplicationHelper end end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/engine/app/controllers/rollout_ui/features_controller.rb
lib/rollout_ui/engine/app/controllers/rollout_ui/features_controller.rb
module RolloutUi class FeaturesController < RolloutUi::ApplicationController before_filter :wrapper, :only => [:index] def index @features = @wrapper.features.map{ |feature| RolloutUi::Feature.new(feature) } end def update @feature = RolloutUi::Feature.new(params[:id]) @feature.pe...
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/engine/app/controllers/rollout_ui/application_controller.rb
lib/rollout_ui/engine/app/controllers/rollout_ui/application_controller.rb
module RolloutUi class ApplicationController < ActionController::Base end end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/engine/lib/rollout_ui/engine.rb
lib/rollout_ui/engine/lib/rollout_ui/engine.rb
module RolloutUi class Engine < Rails::Engine isolate_namespace RolloutUi end end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
jrallison/rollout_ui
https://github.com/jrallison/rollout_ui/blob/eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca/lib/rollout_ui/engine/config/routes.rb
lib/rollout_ui/engine/config/routes.rb
RolloutUi::Engine.routes.draw do resources :features, :only => [:index, :update] root :to => "features#index" end
ruby
MIT
eb0b8b373b4e1ae5b6ef98392ccdecad78c510ca
2026-01-04T17:43:38.399980Z
false
mloughran/signature
https://github.com/mloughran/signature/blob/9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20/spec/signature_spec.rb
spec/signature_spec.rb
require File.expand_path('../spec_helper', __FILE__) describe Signature do before :each do Time.stub!(:now).and_return(Time.at(1234)) @token = Signature::Token.new('key', 'secret') @request = Signature::Request.new('POST', '/some/path', { "query" => "params", "go" => "here" }) end ...
ruby
MIT
9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20
2026-01-04T17:43:39.245841Z
false
mloughran/signature
https://github.com/mloughran/signature/blob/9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'signature' require 'rspec' require 'em-spec/rspec' RSpec.configure do |config| end
ruby
MIT
9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20
2026-01-04T17:43:39.245841Z
false
mloughran/signature
https://github.com/mloughran/signature/blob/9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20/lib/signature.rb
lib/signature.rb
require 'openssl' require 'signature/query_encoder' module Signature class AuthenticationError < RuntimeError; end class Token attr_reader :key, :secret def initialize(key, secret) @key, @secret = key, secret end def sign(request) request.sign(self) end end class Request ...
ruby
MIT
9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20
2026-01-04T17:43:39.245841Z
false
mloughran/signature
https://github.com/mloughran/signature/blob/9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20/lib/signature/version.rb
lib/signature/version.rb
module Signature VERSION = "0.1.8" end
ruby
MIT
9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20
2026-01-04T17:43:39.245841Z
false
mloughran/signature
https://github.com/mloughran/signature/blob/9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20/lib/signature/query_encoder.rb
lib/signature/query_encoder.rb
module Signature # Query string encoding extracted with thanks from em-http-request module QueryEncoder class << self # URL encodes query parameters: # single k=v, or a URL encoded array, if v is an array of values def encode_param(k, v) if v.is_a?(Array) v.map { |e| escape(k...
ruby
MIT
9dd93b4ef0465cdd8f7ca3bde824bc11fbcb2e20
2026-01-04T17:43:39.245841Z
false
dbrady/ssh-config
https://github.com/dbrady/ssh-config/blob/a4079521769138c53c4c8e762082fdba7b9799d5/spec/config_file_spec.rb
spec/config_file_spec.rb
require 'ssh-config' require 'tempfile' describe ConfigFile do examples_dir = File.expand_path('../examples', __FILE__) before(:each) do @file = Tempfile.new('ssh_config') end after(:each) do @file.close @file.unlink end it 'adds an entry to an empty file' do config_file = ConfigFile.ne...
ruby
MIT
a4079521769138c53c4c8e762082fdba7b9799d5
2026-01-04T17:43:47.936496Z
false
dbrady/ssh-config
https://github.com/dbrady/ssh-config/blob/a4079521769138c53c4c8e762082fdba7b9799d5/lib/config_file.rb
lib/config_file.rb
require 'fileutils' class ConfigFile def initialize(file_location = '~/.ssh/config', make_backups = true) @config_file_location = file_location @make_backups = make_backups @header_lines = [] @sections = [] @sections_by_name = {} read_config end def add_section(name) section = Config...
ruby
MIT
a4079521769138c53c4c8e762082fdba7b9799d5
2026-01-04T17:43:47.936496Z
false
dbrady/ssh-config
https://github.com/dbrady/ssh-config/blob/a4079521769138c53c4c8e762082fdba7b9799d5/lib/config_section.rb
lib/config_section.rb
class ConfigSection attr_accessor :name, :aliases, :lines, :settings def initialize(name) all_names = name.split(/\s+/) @name = all_names.shift @aliases = all_names @settings = {} @lines = [] end def [](setting) unless @settings.key? setting if line = lines[setting_index(setting)...
ruby
MIT
a4079521769138c53c4c8e762082fdba7b9799d5
2026-01-04T17:43:47.936496Z
false
dbrady/ssh-config
https://github.com/dbrady/ssh-config/blob/a4079521769138c53c4c8e762082fdba7b9799d5/lib/ssh-config.rb
lib/ssh-config.rb
require File.expand_path(File.join(File.dirname(__FILE__), 'config_file')) require File.expand_path(File.join(File.dirname(__FILE__), 'config_section'))
ruby
MIT
a4079521769138c53c4c8e762082fdba7b9799d5
2026-01-04T17:43:47.936496Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/request_migrations_spec.rb
spec/request_migrations_spec.rb
# frozen_string_literal: true require "spec_helper" require "request_migrations/testing" RSpec.describe ActionController::Base, type: :controller do # TODO(ezekg) Move this to the dummy app? controller do include RequestMigrations::Controller::Migrations rescue_from RequestMigrations::UnsupportedVersionE...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true ENV["RAILS_ENV"] ||= "test" require File.expand_path("../dummy/config/environment", __FILE__) require "rspec/rails" require "request_migrations" RSpec.configure do |config| config.expect_with(:rspec) { _1.syntax = :expect } config.disable_monkey_patching! end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/jobs/application_job.rb
spec/dummy/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/helpers/application_helper.rb
spec/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/models/User.rb
spec/dummy/app/models/User.rb
class User < ApplicationRecord end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/models/application_record.rb
spec/dummy/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base primary_abstract_class end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/mailers/application_mailer.rb
spec/dummy/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/channels/application_cable/channel.rb
spec/dummy/app/channels/application_cable/channel.rb
module ApplicationCable class Channel < ActionCable::Channel::Base end end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/app/channels/application_cable/connection.rb
spec/dummy/app/channels/application_cable/connection.rb
module ApplicationCable class Connection < ActionCable::Connection::Base end end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/application.rb
spec/dummy/config/application.rb
require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) require "request_migrations" module Dummy class Application < Rails::Application config.load_defaults Rails::VERSION::STRI...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/environment.rb
spec/dummy/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/puma.rb
spec/dummy/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/routes.rb
spec/dummy/config/routes.rb
Rails.application.routes.draw do # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Defines the root path route ("/") # root "articles#index" end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/boot.rb
spec/dummy/config/boot.rb
# Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/initializers/content_security_policy.rb
spec/dummy/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy. # See the Securing Rails Applications Guide for more information: # https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/initializers/filter_parameter_logging.rb
spec/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be filtered from the log file. Use this to limit dissemination of # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported # notations and behaviors. Rails.application.config.filter_parameters += [ ...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/initializers/inflections.rb
spec/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/initializers/permissions_policy.rb
spec/dummy/config/initializers/permissions_policy.rb
# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :s...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/environments/test.rb
spec/dummy/config/environments/test.rb
require "active_support/core_ext/integer/time" # 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 test runs. Don't rely on the data the...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/environments/development.rb
spec/dummy/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/spec/dummy/config/environments/production.rb
spec/dummy/config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your applica...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations.rb
lib/request_migrations.rb
# frozen_string_literal: true require "active_support/concern" require "semverse" require "logger" require "request_migrations/gem" require "request_migrations/configuration" require "request_migrations/version" require "request_migrations/migration" require "request_migrations/migrator" require "request_migrations/co...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/version.rb
lib/request_migrations/version.rb
# frozen_string_literal: true module RequestMigrations ## # @private class Version include Comparable attr_reader :format, :value def initialize(version) raise UnsupportedVersionError, "version is unsupported: #{version}" unless version.in?(RequestMigrations.supported_...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/router.rb
lib/request_migrations/router.rb
# frozen_string_literal: true module RequestMigrations module Router module Constraints ## # @private class VersionConstraint def initialize(constraint:) @constraint = Version::Constraint.new(constraint) end def matches?(request) version = Version.co...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/railtie.rb
lib/request_migrations/railtie.rb
module RequestMigrations ## # @private class Railtie < ::Rails::Railtie ActionDispatch::Routing::Mapper.send(:include, Router::Constraints) end end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/configuration.rb
lib/request_migrations/configuration.rb
# frozen_string_literal: true module RequestMigrations class Configuration ## # logger defines the logger used by request_migrations. # # @return [Logger] the logger. class_attribute :logger self.logger = Logger.new("/dev/null") ## # request_version_resolver defines how request_migra...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/controller.rb
lib/request_migrations/controller.rb
# frozen_string_literal: true module RequestMigrations module Controller ## # @private class Migrator < Migrator def initialize(request:, response:, **kwargs) super(**kwargs) @request = request @response = response end def migrate! logger.debug { "Migr...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/migration.rb
lib/request_migrations/migration.rb
# frozen_string_literal: true module RequestMigrations ## # Migration represents a migration for a specific version. # # @example # class CombineNamesForUserMigration < RequestMigrations::Migration # description %(transforms a user's first and last name to a combined name attribute) # # migra...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/gem.rb
lib/request_migrations/gem.rb
# frozen_string_literal: true module RequestMigrations VERSION = "1.1.2" end
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/migrator.rb
lib/request_migrations/migrator.rb
# frozen_string_literal: true module RequestMigrations class Migrator ## # Migrator represents a versioned migration from one version to another. # # @param from [String, Integer, Float] the current version. # @param to [String, Integer, Float] the target version. def initialize(from:, to:) ...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
keygen-sh/request_migrations
https://github.com/keygen-sh/request_migrations/blob/52c136be5f23188899c7f58ab65fc4c8775b810a/lib/request_migrations/testing.rb
lib/request_migrations/testing.rb
# frozen_string_literal: true module RequestMigrations class Testing @@config = RequestMigrations::Configuration.new ## # setup! stores the original config and replaces it with a clone for testing. def self.setup! @@config = RequestMigrations.config RequestMigrations.config = @@config.d...
ruby
MIT
52c136be5f23188899c7f58ab65fc4c8775b810a
2026-01-04T17:43:48.625988Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/services/base_authenticator.rb
app/services/base_authenticator.rb
class BaseAuthenticator class ApiError < StandardError; end def initialize(auth_code) @auth_code = auth_code end def authenticate! user = get_user(access_token) login = find_login(user) if login.present? connect_login_to_account(login, user) else login = create_login_from_acc...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/services/edx_authenticator.rb
app/services/edx_authenticator.rb
require 'httparty' # Handles Edx authentication # # @!visibility private class EdxAuthenticator < BaseAuthenticator PROVIDER = 'edx'.freeze DOMAIN = "http://#{RailsApiAuth.edx_domain}".freeze TOKEN_URL = "#{DOMAIN}/oauth2/access_token".freeze PROFILE_URL = "#{DOMAIN}/api/user/v1/accounts/%{username}...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/services/google_authenticator.rb
app/services/google_authenticator.rb
require 'httparty' # Handles Google authentication # # @!visibility private class GoogleAuthenticator < BaseAuthenticator PROVIDER = 'google'.freeze TOKEN_URL = 'https://www.googleapis.com/oauth2/v3/token'.freeze PROFILE_URL = 'https://www.googleapis.com/plus/v1/people/me/openIdConnect?access_token=%{access_tok...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/services/github_authenticator.rb
app/services/github_authenticator.rb
require 'httparty' # Handles Github authentication # # @!visibility private class GithubAuthenticator < BaseAuthenticator PROVIDER = 'github'.freeze TOKEN_URL = 'https://github.com/login/oauth/access_token'.freeze USER_URL = 'https://api.github.com/user?access_token=%{access_token}'.freeze def initialize(aut...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/services/facebook_authenticator.rb
app/services/facebook_authenticator.rb
require 'httparty' # Handles Facebook authentication # # @!visibility private class FacebookAuthenticator < BaseAuthenticator PROVIDER = 'facebook'.freeze TOKEN_URL = 'https://graph.facebook.com/v2.4/oauth/access_token?client_id=%{client_id}&client_secret=%{client_secret}&code=%{auth_code}&redirect_uri=%{redirect...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/controllers/oauth2_controller.rb
app/controllers/oauth2_controller.rb
require 'login_not_found' # The controller that implements the engine's endpoints. # # @!visibility private class Oauth2Controller < ApplicationController force_ssl if: -> { RailsApiAuth.force_ssl } # rubocop:disable MethodLength def create case params[:grant_type] when 'password' authenticate_wi...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/models/login.rb
app/models/login.rb
# The `Login` __model encapsulates login credentials and the associated Bearer # tokens__. Rails API Auth uses this separate model so that login data and # user/profile data doesn't get mixed up and the Engine remains clearly # separeated from the code of the host application. # # The __`Login` model has `identificatio...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/app/lib/login_not_found.rb
app/lib/login_not_found.rb
# Null Object that is used when no login is found for a Bearer token. # # @!visibility private class LoginNotFound def authenticate(_password) false end def refresh_oauth2_token!; end end
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/db/migrate/20150904110438_add_provider_to_login.rb
db/migrate/20150904110438_add_provider_to_login.rb
require_relative 'rails_api_auth_migration' class AddProviderToLogin < RailsAPIAuthMigration def change add_column :logins, :provider, :string rename_column :logins, :facebook_uid, :uid end end
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/db/migrate/rails_api_auth_migration.rb
db/migrate/rails_api_auth_migration.rb
private def migration_parent_class if Rails.version >= '5.0.0' ActiveRecord::Migration["#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"] else ActiveRecord::Migration end end class RailsAPIAuthMigration < migration_parent_class end
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/db/migrate/20150709221755_create_logins.rb
db/migrate/20150709221755_create_logins.rb
require_relative 'rails_api_auth_migration' class CreateLogins < RailsAPIAuthMigration def change create_table :logins, primary_key_options(:id) do |t| t.string :identification, null: false t.string :password_digest, null: true t.string :oauth2_token, null: false t.string :facebook_u...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false
mainmatter/rails_api_auth
https://github.com/mainmatter/rails_api_auth/blob/c949cef9f207b3ac60c400eb0d5191bf110ebab8/spec/spec_helper.rb
spec/spec_helper.rb
ENV['RAILS_ENV'] ||= 'test' require 'simplecov' SimpleCov.start do unless defined?(JRUBY_VERSION) || defined?(JRuby) minimum_coverage 95 refuse_coverage_drop end end require File.expand_path('dummy/config/environment.rb', __dir__) require 'rspec/rails' require 'factory_girl_rails' require 'faker' Rails.b...
ruby
MIT
c949cef9f207b3ac60c400eb0d5191bf110ebab8
2026-01-04T17:43:51.272302Z
false