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 |
|---|---|---|---|---|---|---|---|---|
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/testapp/config/initializers/mime_types.rb | testapp/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 | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/testapp/config/initializers/secret_token.rb | testapp/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 | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/testapp/config/environments/test.rb | testapp/config/environments/test.rb | Testapp::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 | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/testapp/config/environments/development.rb | testapp/config/environments/development.rb | Testapp::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 se... | ruby | MIT | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/testapp/config/environments/production.rb | testapp/config/environments/production.rb | Testapp::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... | ruby | MIT | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/lib/markdown-rails.rb | lib/markdown-rails.rb | require 'markdown-rails/version'
require 'markdown-rails/engine'
| ruby | MIT | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/lib/markdown-rails/version.rb | lib/markdown-rails/version.rb | module MarkdownRails
VERSION = "0.2.1"
end
| ruby | MIT | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
joliss/markdown-rails | https://github.com/joliss/markdown-rails/blob/bc43c1c110b66f92481ad3733e0fb6495c846d7b/lib/markdown-rails/engine.rb | lib/markdown-rails/engine.rb | require 'rdiscount'
require 'action_view'
# We cannot use Markdown::Rails because it conflicts with RDiscount's Markdown class
module MarkdownRails
class Handler
def initialize
end
def call(template)
# Return Ruby code that returns the compiled template
MarkdownRails.renderer.call(template.s... | ruby | MIT | bc43c1c110b66f92481ad3733e0fb6495c846d7b | 2026-01-04T17:45:12.101166Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/app/helpers/application_helper.rb | app/helpers/application_helper.rb | module ApplicationHelper
include Twitter::Autolink
end
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/app/controllers/welcome_controller.rb | app/controllers/welcome_controller.rb | class WelcomeController < ApplicationController
end
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/app/controllers/sessions_controller.rb | app/controllers/sessions_controller.rb | class SessionsController < ApplicationController
def create
credentials = request.env['omniauth.auth']['credentials']
session[:access_token] = credentials['token']
session[:access_token_secret] = credentials['secret']
redirect_to show_path, notice: 'Signed in'
end
def show
if session['access_... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/app/controllers/application_controller.rb | app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
private
def client
@client ||= Twitter::REST::Client.new do |config|
config.consumer_key = ENV['CONSUMER_K... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require 'simplecov'
require 'coveralls'
SimpleCov.formatters = [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
SimpleCov.start('rails') do
minimum_coverage(100)
end
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'm... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/test/functional/sessions_controller_test.rb | test/functional/sessions_controller_test.rb | require 'test_helper'
class SessionsControllerTest < ActionController::TestCase
test 'should save access token and secret in session on OAuth callback' do
result = {}
result['omniauth.auth'] = {}
result['omniauth.auth']['credentials'] = {}
result['omniauth.auth']['credentials']['token'] = 'abc'
r... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/test/functional/welcome_controller_test.rb | test/functional/welcome_controller_test.rb | require 'test_helper'
class WelcomeControllerTest < ActionController::TestCase
test 'should get index' do
get :index
assert_response :success
assert_select 'title', 'Sign in with Twitter'
assert_select 'form' do
assert_select '[action=?]', '/auth/twitter'
assert_select '[method=?]', 'get'... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/application.rb | config/application.rb | require File.expand_path('../boot', __FILE__)
require 'action_controller/railtie'
require 'rails/test_unit/railtie'
require 'sprockets/railtie'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module SignInWithTwitter
c... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/environment.rb | config/environment.rb | # Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Rails.application.initialize!
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/routes.rb | config/routes.rb | Rails.application.routes.draw do
root to: 'welcome#index'
get '/auth/twitter/callback', to: 'sessions#create', as: 'callback'
get '/auth/failure', to: 'sessions#error', as: 'failure'
get '/profile', to: 'sessions#show', as: 'show'
delete '/signout', to: 'sessions#destroy', as: 'signout'
end
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/unicorn.rb | config/unicorn.rb | worker_processes 3
timeout 30
preload_app true
before_fork do |_server, _worker|
Signal.trap 'TERM' do
Process.kill 'QUIT', Process.pid
end
end
after_fork do |_server, _worker|
Signal.trap 'TERM' do
end
end
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/boot.rb | config/boot.rb | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/filter_parameter_logging.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_sign-in-with-twitter_session'
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/wrap_parameters.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/omniauth.rb | config/initializers/omniauth.rb | Rails.application.config.middleware.use OmniAuth::Builder do
if ENV['CONSUMER_KEY'].blank? || ENV['CONSUMER_SECRET'].blank?
warn '*' * 80
warn 'WARNING: Missing consumer key or secret. First, register an app with Twitter at'
warn 'https://dev.twitter.com/apps to obtain OAuth credentials. Then, start the s... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/inflections.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/cookies_serializer.rb | config/initializers/cookies_serializer.rb | # Be sure to restart your server when you modify this file.
Rails.application.config.action_dispatch.cookies_serializer = :json
| ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/assets.rb | 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
# Precompile additional ... | ruby | MIT | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/backtrace_silencers.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/initializers/mime_types.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/environments/test.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/environments/development.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
sferik/sign-in-with-twitter | https://github.com/sferik/sign-in-with-twitter/blob/6af428a4a2e7b9832d7b60f84886a5889df66eec/config/environments/production.rb | 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 | 6af428a4a2e7b9832d7b60f84886a5889df66eec | 2026-01-04T17:45:04.780094Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/app/controllers/saml_idp/idp_controller.rb | app/controllers/saml_idp/idp_controller.rb | module SamlIdp
class IdpController < ActionController::Base
include SamlIdp::Controller
unloadable
protect_from_forgery
if Rails.version.to_i < 4
before_filter :validate_saml_request
else
before_action :validate_saml_request
end
def new
render :template => "saml_idp/i... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
$LOAD_PATH.unshift File.dirname(__FILE__)
STDERR.puts("Running Specs under Ruby Version #{RUBY_VERSION}")
require "rails_app/config/environment"
require 'rspec'
require 'capybara/rspec'
require 'capybara/rails'
require 'ruby-saml'
require 'ruby-saml-idp'
Dir[Fi... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/support/saml_request_macros.rb | spec/support/saml_request_macros.rb | module SamlRequestMacros
def make_saml_request(requested_saml_acs_url = "https://foo.example.com/saml/consume")
auth_request = OneLogin::RubySaml::Authrequest.new
auth_url = auth_request.create(saml_settings(saml_acs_url: requested_saml_acs_url))
CGI.unescape(auth_url.split("=").last)
end
def saml_s... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/saml_idp/controller_spec.rb | spec/saml_idp/controller_spec.rb | require 'spec_helper'
require 'timecop'
describe SamlIdp::Controller do
include SamlIdp::Controller
def params
@params ||= {}
end
it "should find the SAML ACS URL" do
requested_saml_acs_url = "https://example.com/saml/consume"
params[:SAMLRequest] = make_saml_request(requested_saml_acs_url)
v... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/acceptance/acceptance_helper.rb | spec/acceptance/acceptance_helper.rb | require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
require 'capybara/rspec'
# Put your acceptance spec helpers inside /spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
RSpec.configure do |config|
config.include Rails.application.routes.url_helpers, :typ... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/acceptance/idp_controller_spec.rb | spec/acceptance/idp_controller_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature 'IdpController' do
scenario 'Login via default signup page' do
saml_request = make_saml_request("http://foo.example.com/saml/consume")
visit "/saml/auth?SAMLRequest=#{CGI.escape(saml_request)}"
fill_in 'Email', :with => "bra... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/app/helpers/application_helper.rb | spec/rails_app/app/helpers/application_helper.rb | module ApplicationHelper
end
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/app/controllers/saml_controller.rb | spec/rails_app/app/controllers/saml_controller.rb | class SamlController < ApplicationController
def consume
response = OneLogin::RubySaml::Response.new(params[:SAMLResponse])
render :text => response.name_id
end
end
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/app/controllers/saml_idp_controller.rb | spec/rails_app/app/controllers/saml_idp_controller.rb | class SamlIdpController < SamlIdp::IdpController
def idp_authenticate(email, password)
{ :email => email }
end
def idp_make_saml_response(user)
encode_SAMLResponse(user[:email])
end
end | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/app/controllers/application_controller.rb | spec/rails_app/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base
protect_from_forgery
end
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/db/seeds.rb | spec/rails_app/db/seeds.rb | # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name =>... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/test/test_helper.rb | spec/rails_app/test/test_helper.rb | ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integrati... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/test/performance/browsing_test.rb | spec/rails_app/test/performance/browsing_test.rb | require 'test_helper'
require 'rails/performance_test_help'
class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
# :output => 'tmp/performance', :formats => [:f... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/application.rb | spec/rails_app/config/application.rb | require File.expand_path('../boot', __FILE__)
require "action_controller/railtie"
require "active_resource/railtie"
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compi... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/environment.rb | spec/rails_app/config/environment.rb | # Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
RailsApp::Application.initialize!
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/routes.rb | spec/rails_app/config/routes.rb | RailsApp::Application.routes.draw do
get '/saml/auth' => 'saml_idp#new'
post '/saml/auth' => 'saml_idp#create'
post '/saml/consume' => 'saml#consume'
end
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/boot.rb | spec/rails_app/config/boot.rb | require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
| ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/session_store.rb | spec/rails_app/config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
RailsApp::Application.config.session_store :cookie_store, :key => '_rails_app_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 "r... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/wrap_parameters.rb | spec/rails_app/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 | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/inflections.rb | spec/rails_app/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 | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/backtrace_silencers.rb | spec/rails_app/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 | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/mime_types.rb | spec/rails_app/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 | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/initializers/secret_token.rb | spec/rails_app/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 | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/environments/test.rb | spec/rails_app/config/environments/test.rb | RailsApp::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 s... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/environments/development.rb | spec/rails_app/config/environments/development.rb | RailsApp::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 s... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/spec/rails_app/config/environments/production.rb | spec/rails_app/config/environments/production.rb | RailsApp::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.actio... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/ruby-saml-idp.rb | lib/ruby-saml-idp.rb | module SamlIdp
require 'saml_idp/configurator'
require 'saml_idp/controller'
require 'saml_idp/default'
require 'saml_idp/version'
require 'saml_idp/engine' if defined?(::Rails) && Rails::VERSION::MAJOR > 2
def self.config=(config)
@config = config
end
def self.config
@config ||= SamlIdp::Conf... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/saml_idp/version.rb | lib/saml_idp/version.rb | module SamlIdp
VERSION = '0.3.5'
end | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/saml_idp/default.rb | lib/saml_idp/default.rb | module SamlIdp
module Default
NAME_ID_FORMAT = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
X509_CERTIFICATE = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURxekNDQXhTZ0F3SUJBZ0lCQVRBTkJna3Foa2lHOXcwQkFRc0ZBRENCaGpFTE1Ba0dBMVVFQmhNQ1FWVXgKRERBS0JnTlZCQWdUQTA1VFZ6RVBNQTBHQTFVRUJ4TUdVM2xrYm1WNU1Rd3dD... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/saml_idp/configurator.rb | lib/saml_idp/configurator.rb | module SamlIdp
class Configurator
attr_accessor :x509_certificate, :secret_key, :algorithm, :expires_in
def initialize(config_file = nil)
self.x509_certificate = Default::X509_CERTIFICATE
self.secret_key = Default::SECRET_KEY
self.algorithm = :sha1
self.expires_in = nil
instance... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/saml_idp/controller.rb | lib/saml_idp/controller.rb | module SamlIdp
module Controller
require 'openssl'
require 'base64'
require 'time'
require 'securerandom'
attr_accessor :x509_certificate, :secret_key, :algorithm, :expires_in
attr_accessor :saml_acs_url
def x509_certificate
return @x509_certificate if defined?(@x509_certificate)
... | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
lawrencepit/ruby-saml-idp | https://github.com/lawrencepit/ruby-saml-idp/blob/c16baa42df45d7a69556c15f9939e38edcc5bac2/lib/saml_idp/engine.rb | lib/saml_idp/engine.rb | module SamlIdp
class Engine < Rails::Engine
end
end | ruby | MIT | c16baa42df45d7a69556c15f9939e38edcc5bac2 | 2026-01-04T17:45:11.326213Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/project_path.rb | features/support/project_path.rb | PROJECT_PATH = File.expand_path("../../..", __FILE__)
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/disable_bundler.rb | features/support/disable_bundler.rb | Before do
unset_bundler_env_vars
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/rails.rb | features/support/rails.rb | module RailsAppHelpers
def create_rails_app_with_kumade
run_simple("rails new rake-tasks -T")
cd('rake-tasks')
append_to_file('Gemfile', "gem 'kumade', :path => '#{PROJECT_PATH}'")
run_bundler
set_up_git_repo
end
def create_rails_app_with_kumade_and_jammit
create_rails_app_with_kumade
... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/env.rb | features/support/env.rb | begin
require 'simplecov'
rescue LoadError
# Probably on 1.8.7, ignore.
end
require 'aruba/cucumber'
require 'kumade'
Before do
@aruba_timeout_seconds = 60
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/jammit.rb | features/support/jammit.rb | module JammitHelpers
def set_up_jammit
assets_yaml = <<-YAML.strip
javascripts:
default:
- public/javascripts/application.js
YAML
write_file('public/javascripts/application.js', 'var foo = 3;')
write_file('config/assets.yml', assets_yaml)
commit_everything_in_repo('add Jamm... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/git.rb | features/support/git.rb | module GitHelpers
def set_up_git_repo
["git init --template=/dev/null", "touch .gitkeep", "git add .", "git commit -am First"].each do |git_command|
run_simple(git_command)
end
end
def commit_everything_in_repo(message = "MY_MESSAGE")
['git add .', "git commit -am '#{message}'"].each do |git_co... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/bundler.rb | features/support/bundler.rb | module BundlerHelpers
def run_bundler
bundle = 'bundle install'
run_simple("#{bundle} --local || #{bundle}")
end
def add_jammit_to_gemfile
append_to_file('Gemfile', "\ngem 'jammit'")
end
def add_kumade_to_gemfile
append_to_file('Gemfile', "\ngem 'kumade', :path => '../../..'")
end
end
Wor... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/support/git_remotes.rb | features/support/git_remotes.rb | module GitRemoteHelpers
@@created_remotes = []
def remove_all_created_remotes
in_current_dir do
@@created_remotes.each do |remote|
run_simple("git remote rm #{remote}")
end
end
@@created_remotes = []
end
def add_heroku_remote_named(remote_name)
run_simple("git remote add #... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/git_steps.rb | features/step_definitions/git_steps.rb | When /^I create a Heroku remote named "([^"]*)"$/ do |remote_name|
add_heroku_remote_named(remote_name)
end
When /^I create a non-Heroku remote named "([^"]*)"$/ do |remote_name|
add_non_heroku_remote_named(remote_name)
end
When /^I set up a git repo$/ do
set_up_git_repo
end
When /^I commit everything in the c... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/bundler_steps.rb | features/step_definitions/bundler_steps.rb | When /^I bundle$/ do
run_bundler
end
When /^I set up the Gemfile with kumade$/ do
add_kumade_to_gemfile
end
When /^I add "jammit" to the Gemfile$/ do
add_jammit_to_gemfile
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/jammit_steps.rb | features/step_definitions/jammit_steps.rb | When /^I set up Jammit$/ do
set_up_jammit
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/kumade_steps.rb | features/step_definitions/kumade_steps.rb | When /^I run kumade$/ do
run_simple("bundle exec kumade", must_be_successful = false)
end
When /^I run kumade with "([^"]+)"$/ do |args|
run_simple("bundle exec kumade #{args}", must_be_successful = false)
end
Given /^a directory set up for kumade$/ do
create_dir('the-kumade-directory')
cd('the-kumade-directo... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/rails_steps.rb | features/step_definitions/rails_steps.rb | Given /^a new Rails application with Kumade$/ do
create_rails_app_with_kumade
end
Given /^a new Rails application with Kumade and Jammit$/ do
create_rails_app_with_kumade_and_jammit
end
When /^I configure my Rails app for Jammit$/ do
run_bundler
set_up_jammit
add_origin_remote
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/features/step_definitions/rake_steps.rb | features/step_definitions/rake_steps.rb | When /^I require the kumade railtie in the Rakefile$/ do
rakefile_content = prep_for_fs_check { IO.readlines("Rakefile") }
new_rakefile_content = rakefile_content.map do |line|
if line.include?('load_tasks')
["require 'kumade/railtie'", line].join("\n")
else
line
end
end.join
overwrite_... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade_spec.rb | spec/kumade_spec.rb | require 'spec_helper'
describe Kumade, ".configuration" do
it "returns a Kumade::Configuration instance" do
Kumade.configuration.should be_a Kumade::Configuration
end
it "caches the configuration" do
Kumade.configuration.should eq Kumade.configuration
end
end
describe Kumade, ".configuration=" do
i... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/spec_helper.rb | spec/spec_helper.rb | begin
require 'simplecov'
rescue LoadError
# Probably on 1.8.7, ignore.
end
require 'rspec'
require 'aruba/api'
require 'bourne'
require 'kumade'
# Since we autoload, these aren't require'd when we require kumade.
require 'rake'
require 'cocaine'
module GitRemoteHelpers
def force_add_heroku_remote(remote_name... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/support/heroku.rb | spec/support/heroku.rb | shared_context "when on Cedar" do
let(:command_line) { mock("Kumade::CommandLine") }
let(:stack_command) { "bundle exec heroku stack --remote staging" }
let(:heroku_output) { ["aspen-mri-1.8.6", "bamboo-mri-1.9.2", "bamboo-ree-1.8.7", "* cedar (beta)"].join("\n") }
before do
Kumade::CommandLine.expects(:n... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/support/environments.rb | spec/support/environments.rb | module EnvironmentHelpers
shared_context "with Heroku environment" do
let(:environment) { 'staging' }
before do
force_add_heroku_remote(environment)
Kumade.configuration.environment = environment
end
after { remove_remote(environment) }
end
shared_context "with Heroku-accounts enviro... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/support/git.rb | spec/support/git.rb | module GitHelpers
def dirty_the_repo
`echo dirty_it_up > .gitkeep`
end
def create_untracked_file_in(directory)
FileUtils.mkdir_p(directory)
FileUtils.touch(File.join(directory, 'i-am-untracked'))
end
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/support/define_constant.rb | spec/support/define_constant.rb | module DefineConstant
def define_constant(path, base = Object, &block)
namespace, class_name = *constant_path(path)
klass = Class.new(base)
namespace.const_set(class_name, klass)
klass.class_eval(&block) if block_given?
@defined_constants << path
klass
end
def clear_generated_constants
... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/support/shared_examples/packager.rb | spec/support/shared_examples/packager.rb | share_examples_for "packager" do
its(:assets_path) { should_not be_nil }
it { should respond_to(:installed?) }
it { should respond_to(:package) }
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/deployer_spec.rb | spec/kumade/deployer_spec.rb | require 'spec_helper'
describe Kumade::Deployer, "#pre_deploy", :with_mock_outputter do
let(:git) { subject.git }
let(:rake_task_runner) { stub("RakeTaskRunner", :invoke => true) }
let(:packager) { stub("packager", :run => true) }
before do
Kumade::Packager.stubs(:new => packager)
... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/packager_list_spec.rb | spec/kumade/packager_list_spec.rb | require 'spec_helper'
describe Kumade::PackagerList, "detecting packages", :with_mock_outputter do
it "returns an array containing the Jammit packager if Jammit is installed" do
Kumade::JammitPackager.stubs(:installed? => true)
Kumade::PackagerList.new.to_a.should == [Kumade::JammitPackager]
end
it "re... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/heroku_spec.rb | spec/kumade/heroku_spec.rb | require 'spec_helper'
describe Kumade::Heroku, "DEPLOY_BRANCH", :with_mock_outputter do
subject { Kumade::Heroku::DEPLOY_BRANCH }
it { should == "deploy" }
end
describe Kumade::Heroku, "#sync", :with_mock_outputter do
let(:environment) { 'staging' }
before do
force_add_heroku_remote(environment)
sub... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/git_spec.rb | spec/kumade/git_spec.rb | require 'spec_helper'
describe Kumade::Git, "#heroku_remote?", :with_mock_outputter do
context "when the environment is a Heroku repository" do
include_context "with Heroku environment"
it { should be_heroku_remote }
end
context "when the environment is a Heroku repository managed with heroku-accounts"... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/configuration_spec.rb | spec/kumade/configuration_spec.rb | require 'spec_helper'
describe Kumade::Configuration, "by default" do
its(:environment) { should == 'staging' }
it { should_not be_pretending }
end
describe Kumade::Configuration, "#outputter" do
it "defaults to a Kumade::Outputter instance" do
subject.outputter.should be_a Kumade::Outputter
end
end
desc... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/cli_spec.rb | spec/kumade/cli_spec.rb | require 'spec_helper'
describe Kumade::CLI, :with_mock_outputter do
let(:out) { StringIO.new }
let(:environment) { 'my-environment' }
let(:deployer) { stub("Deployer", :new => deployer_instance) }
let(:deployer_instance) { stub("DeployerInstance", :deploy => nil) }
before { Kumade::CLI.dep... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/packager_spec.rb | spec/kumade/packager_spec.rb | require 'spec_helper'
describe Kumade::Packager, ".available_packager", :with_mock_outputter do
let(:packager_1) { "1st packager" }
let(:packager_2) { "2nd packager" }
it "returns the first available packager" do
Kumade::PackagerList.stubs(:new => [packager_1, packager_2])
Kumade::Packager.available_pac... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/rake_task_runner_spec.rb | spec/kumade/rake_task_runner_spec.rb | require "spec_helper"
describe Kumade::RakeTaskRunner, :with_mock_outputter do
context "when the task doesn't exist" do
subject { Kumade::RakeTaskRunner.new("bogus:task") }
it "does not notify the user that the task was run successfully" do
subject.invoke
Kumade.configuration.outputter.should ha... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/outputter_spec.rb | spec/kumade/outputter_spec.rb | require 'spec_helper'
describe Kumade::Outputter, "#success" do
before { STDOUT.stubs(:puts) }
it "prints a message to STDOUT" do
subject.success("woo hoo")
STDOUT.should have_received(:puts).with(regexp_matches(/==> woo hoo/))
end
end
describe Kumade::Outputter, "#error" do
before { STDOUT.stubs(:pu... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/command_line_spec.rb | spec/kumade/command_line_spec.rb | require 'spec_helper'
describe Kumade::CommandLine, "#run_or_error", :with_mock_outputter do
subject { Kumade::CommandLine.new("echo") }
context "when pretending" do
let(:command_line) { stub("Cocaine::CommandLine instance", :run => "does-not-matter", :command => 'command') }
before do
Cocaine::Com... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/packagers/noop_packager_spec.rb | spec/kumade/packagers/noop_packager_spec.rb | require "spec_helper"
describe Kumade::NoopPackager do
subject { Kumade::NoopPackager }
it_should_behave_like "packager"
its(:assets_path) { should == "" }
it { should_not be_installed }
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/spec/kumade/packagers/jammit_packager_spec.rb | spec/kumade/packagers/jammit_packager_spec.rb | require "spec_helper"
require "jammit"
describe Kumade::JammitPackager, :with_mock_outputter do
subject { Kumade::JammitPackager }
it_should_behave_like "packager"
it "has the correct asset path" do
subject.assets_path.should == File.join(jammit_public_root, Jammit.package_path)
end
it "knows how to ... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade.rb | lib/kumade.rb | require 'kumade/railtie'
module Kumade
autoload :Git, "kumade/git"
autoload :Deployer, "kumade/deployer"
autoload :CLI, "kumade/cli"
autoload :DeploymentError, "kumade/deployment_error"
autoload :Configuration, "kumade/configuration"
autoload :Heroku, "kumade/herok... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/packager.rb | lib/kumade/packager.rb | module Kumade
class Packager
def initialize(git, packager = Packager.available_packager)
@packager = packager
@git = git
end
def run
if @packager.installed?
precompile_assets
package
end
end
def self.available_packager
Kumade::PackagerList.new.f... | ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
thoughtbot/kumade | https://github.com/thoughtbot/kumade/blob/271510307b7037695988aa4881c7c17445cc9d1d/lib/kumade/version.rb | lib/kumade/version.rb | module Kumade
VERSION = "0.8.2"
end
| ruby | MIT | 271510307b7037695988aa4881c7c17445cc9d1d | 2026-01-04T17:45:11.500917Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.