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 |
|---|---|---|---|---|---|---|---|---|
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/helpers.rb | lib/janky/helpers.rb | module Janky
module Helpers
def self.registered(app)
app.enable :raise_errors
app.disable :show_exceptions
app.helpers self
end
def find_repo(name)
unless repo = Repository.find_by_name(name)
halt(404, "Unknown repository: #{name.inspect}")
end
repo
end
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/app.rb | lib/janky/app.rb | module Janky
class App < Sinatra::Base
register Mustache::Sinatra
register Helpers
set :app_file, __FILE__
enable :static
set :mustache, {
:namespace => Janky,
:views => File.join(root, "views"),
:templates => File.join(root, "templates")
}
before do
if or... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/exception.rb | lib/janky/exception.rb | module Janky
module Exception
def self.setup(notifier)
@notifier = notifier
end
def self.report(exception, context={})
@notifier.report(exception, context)
end
def self.push(context)
@notifier.push(context)
end
def self.reset!
@notifier.reset!
end
def se... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier.rb | lib/janky/notifier.rb | module Janky
module Notifier
# Setup the notifier.
#
# notifiers - One or more notifiers implementation to notify with.
#
# Returns nothing.
def self.setup(notifiers)
@adapter = Multi.new(Array(notifiers))
end
# Called whenever a build is queued
#
# build - the Build rec... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/hubot.rb | lib/janky/hubot.rb | module Janky
# Web API taylored for Hubot's needs. Supports setting up and disabling
# repositories, querying the status of branch or a repository and triggering
# builds.
#
# The client side implementation is at
# <https://github.com/github/hubot-scripts/blob/master/src/scripts/janky.coffee>
class Hubot ... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service.rb | lib/janky/chat_service.rb | module Janky
module ChatService
Room = Struct.new(:id, :name)
# Setup the adapter used to notify chat rooms of build status.
#
# name - Service name as a string.
# settings - Service-specific setting hash.
# default - Name of the default chat room as a String.
#
# Returns nothing... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/tasks.rb | lib/janky/tasks.rb | require "rake"
require "rake/tasklib"
module Janky
module Tasks
extend Rake::DSL
namespace :db do
desc "Run the migration(s)"
task :migrate do
path = db_dir.join("migrate").to_s
ActiveRecord::Migration.verbose = true
ActiveRecord::Migrator.migrate(path)
Rake::Tas... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder.rb | lib/janky/builder.rb | module Janky
# Triggers Jenkins builds and handles callbacks.
#
# The HTTP requests flow goes like this:
#
# 1. Send a Build request to the Jenkins server over HTTP. The resulting
# build URL is stored in Build#url.
#
# 2. Once Jenkins picks up the build and starts running it, it sends a callback
#... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/branch.rb | lib/janky/branch.rb | module Janky
class Branch < ActiveRecord::Base
belongs_to :repository
has_many :builds, :dependent => :destroy
# Is this branch green?
#
# Returns a Boolean.
def green?
if current_build
current_build.green?
end
end
# Is this branch red?
#
# Returns a Boole... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/commit.rb | lib/janky/commit.rb | module Janky
class Commit < ActiveRecord::Base
belongs_to :repository
has_many :builds
def last_build
builds.last
end
def build!(user, room_id = nil, compare = nil)
compare = repository.github_url("compare/#{sha1}^...#{sha1}")
room_id = room_id.to_s
if room_id.empty? || ... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/build_request.rb | lib/janky/build_request.rb | module Janky
class BuildRequest
def self.handle(repo_uri, branch_name, pusher, commit, compare, room_id)
repos = Repository.where(uri: repo_uri)
repos.each do |repo|
begin
new(repo, branch_name, pusher, commit, compare, room_id).handle
rescue Janky::Error => boom
Ex... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier/github_status.rb | lib/janky/notifier/github_status.rb | module Janky
module Notifier
# Create GitHub Status updates for builds.
#
# Note that Statuses are immutable - so we create one for
# "pending" status when a build starts, then create a new status for
# "success" or "failure" when the build is complete.
class GithubStatus
# Initialize wi... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier/multi.rb | lib/janky/notifier/multi.rb | module Janky
module Notifier
# Dispatches notifications to multiple notifiers.
class Multi
def initialize(notifiers)
@notifiers = notifiers
end
def queued(build)
@notifiers.each do |notifier|
notifier.queued(build) if notifier.respond_to?(:queued)
end
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier/chat_service.rb | lib/janky/notifier/chat_service.rb | module Janky
module Notifier
class ChatService
def self.completed(build)
status = build.green? ? "was successful" : "failed"
color = build.green? ? "green" : "red"
message = "Build #%s (%s) of %s/%s %s (%ss) %s" % [
build.number,
build.short_sha1,
build... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier/mock.rb | lib/janky/notifier/mock.rb | module Janky
module Notifier
# Mock notifier implementation used in testing environments.
class Mock
def initialize
@notifications = []
end
attr_reader :notifications
def queued(build)
end
def reset!
@notifications.clear
end
def started(build... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/notifier/failure_service.rb | lib/janky/notifier/failure_service.rb | module Janky
module Notifier
class FailureService < ChatService
def self.completed(build)
return unless need_failure_notification?(build)
::Janky::ChatService.speak(message(build), failure_room, {:color => color(build)})
end
def self.failure_room
ENV["JANKY_CHAT_FAILURE_... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/http.rb | lib/janky/builder/http.rb | module Janky
module Builder
class HTTP
def initialize(username, password)
@username = username
@password = password
end
def run(params, create_url)
http = Net::HTTP.new(create_url.host, create_url.port)
if create_url.scheme == "https"
http.use_ssl =... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/runner.rb | lib/janky/builder/runner.rb | module Janky
module Builder
class Runner
def initialize(base_url, build, adapter)
@base_url = base_url
@build = build
@adapter = adapter
end
def run
context_push
@adapter.run(json_params, create_url)
end
def output
context_push
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/receiver.rb | lib/janky/builder/receiver.rb | module Janky
module Builder
class Receiver
def self.call(env)
request = Rack::Request.new(env)
default_base_url = Builder[:default].url
payload = Payload.parse(request.body, default_base_url)
if payload.started?
Build.start(payload.id, payload.url)
elsif pa... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/client.rb | lib/janky/builder/client.rb | module Janky
module Builder
class Client
def initialize(url, callback_url)
@url = URI(url)
@callback_url = URI(callback_url)
end
# The String absolute URL of the Jenkins server.
attr_reader :url
# The String absoulte URL callback of this Janky host.
a... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/mock.rb | lib/janky/builder/mock.rb | module Janky
module Builder
class Mock
def initialize(green, app)
@green = green
@app = app
@builds = []
end
def run(params, create_url)
params = Yajl.load(params)["parameter"]
param = params.detect{ |p| p["name"] == "JANKY_ID" }
bu... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/builder/payload.rb | lib/janky/builder/payload.rb | module Janky
module Builder
class Payload
def self.parse(json, base_url)
parsed = Yajl.load(json)
build = parsed["build"]
full_url = build["full_url"]
path = build["url"]
build_url = full_url || "#{base_url}#{path}"
new(
build["phase"],
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service/hipchat.rb | lib/janky/chat_service/hipchat.rb | require "hipchat"
module Janky
module ChatService
class HipChat
def initialize(settings)
token = settings["JANKY_CHAT_HIPCHAT_TOKEN"]
if token.nil? || token.empty?
raise Error, "JANKY_CHAT_HIPCHAT_TOKEN setting is required"
end
@client = ::HipChat::Client.new(toke... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service/slack.rb | lib/janky/chat_service/slack.rb | require "slack"
module Janky
module ChatService
class Slack
def initialize(settings)
team = settings["JANKY_CHAT_SLACK_TEAM"]
if team.nil? || team.empty?
raise Error, "JANKY_CHAT_SLACK_TEAM setting is required"
end
token = settings["JANKY_CHAT_SLACK_TOKEN"]
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service/campfire.rb | lib/janky/chat_service/campfire.rb | module Janky
module ChatService
class Campfire
def initialize(settings)
account = settings["JANKY_CHAT_CAMPFIRE_ACCOUNT"]
if account.nil? || account.empty?
raise Error, "JANKY_CHAT_CAMPFIRE_ACCOUNT setting is required"
end
token = settings["JANKY_CHAT_CAMPFIRE_TOKE... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service/hubot.rb | lib/janky/chat_service/hubot.rb | module Janky
module ChatService
class Hubot
def initialize(settings)
@available_rooms = settings["JANKY_CHAT_HUBOT_ROOMS"]
@default_room = settings["JANKY_CHAT_HUBOT_DEFAULT_ROOM"]
url = settings["JANKY_CHAT_HUBOT_URL"]
if url.nil? || url.empty?
raise Error, "JANKY_... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/chat_service/mock.rb | lib/janky/chat_service/mock.rb | module Janky
module ChatService
# Mock chat implementation used in testing environments.
class Mock
def initialize
@rooms = {}
end
attr_writer :rooms
def speak(room_name, message)
if !@rooms.values.include?(room_name)
raise Error, "Unknown room #{room_name.i... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/api.rb | lib/janky/github/api.rb | module Janky
module GitHub
class API
def initialize(url, user, password)
@url = url
@user = user
@password = password
end
def create(nwo, secret, url)
request = Net::HTTP::Post.new(build_path("repos/#{nwo}/hooks"))
payload = build_payload(url, secret)
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/receiver.rb | lib/janky/github/receiver.rb | module Janky
module GitHub
# Rack app handling GitHub Post-Receive [1] requests.
#
# The JSON payload is parsed into a GitHub::Payload. We then find the
# associated Repository record based on the Payload's repository git URL
# and create the associated records: Branch, Commit and Build.
#
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/payload_parser.rb | lib/janky/github/payload_parser.rb | module Janky
module GitHub
class PayloadParser
def initialize(json)
@payload = Yajl.load(json)
end
def pusher
@payload["pusher"]["name"]
end
def head
@payload["after"]
end
def compare
@payload["compare"]
end
def commits
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/mock.rb | lib/janky/github/mock.rb | module Janky
module GitHub
class Mock
Response = Struct.new(:code, :body)
def initialize(user, password)
@repos = {}
@branch_shas = {}
end
def make_private(nwo)
@repos[nwo] = :private
end
def make_public(nwo)
@repos[nwo] = :public
end
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/payload.rb | lib/janky/github/payload.rb | module Janky
module GitHub
class Payload
def self.parse(json)
parsed = PayloadParser.new(json)
new(parsed.uri, parsed.branch, parsed.head, parsed.pusher,
parsed.commits,
parsed.compare)
end
def initialize(uri, branch, head, pusher, commits, compare)
... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github/commit.rb | lib/janky/github/commit.rb | module Janky
module GitHub
class Commit
def initialize(sha1, url, message, author, time)
@sha1 = sha1
@url = url
@message = message
@author = author
@time = time
end
attr_reader :sha1, :url, :message, :author
def committed_at
@ti... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/views/index.rb | lib/janky/views/index.rb | # encoding: UTF-8
module Janky
module Views
class Index < Layout
def jobs
@builds.collect do |build|
{
:console_path => "/#{build.number}/output",
:compare_url => build.compare,
:repo_path => "/#{build.repo_name}",
:branch_path ... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/views/console.rb | lib/janky/views/console.rb | module Janky
module Views
class Console < Layout
def repo_name
@build.repo_name
end
def repo_path
"#{root}/#{repo_name}"
end
def branch_name
@build.branch_name
end
def branch_path
"#{repo_path}/#{branch_name}"
end
def commit... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/views/layout.rb | lib/janky/views/layout.rb | # encoding: UTF-8
module Janky
module Views
class Layout < Mustache
def title
ENV["JANKY_PAGE_TITLE"] || "Janky Hubot"
end
def page_class
nil
end
def root
@request.env['SCRIPT_NAME']
end
end
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/schema.rb | lib/janky/database/schema.rb | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384649_github_team_id.rb | lib/janky/database/migrate/1317384649_github_team_id.rb | class GithubTeamId < ActiveRecord::Migration
def self.up
add_column :repositories, :github_team_id, :integer, :null => true
end
def self.down
remove_column :repositories, :github_team_id
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1312198807_repo_enabled.rb | lib/janky/database/migrate/1312198807_repo_enabled.rb | class RepoEnabled < ActiveRecord::Migration
def self.up
add_column :repositories, :enabled, :boolean, :null => false, :default => true
add_index :repositories, :enabled
end
def self.down
remove_column :repositories, :enabled
remove_index :repositories, :enabled
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384619_add_build_room_id.rb | lib/janky/database/migrate/1317384619_add_build_room_id.rb | class AddBuildRoomId < ActiveRecord::Migration
def self.up
add_column :builds, :room_id, :integer, :null => true
end
def self.down
remove_column :builds, :room_id
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1400144784_change_room_id_to_string.rb | lib/janky/database/migrate/1400144784_change_room_id_to_string.rb | class ChangeRoomIdToString < ActiveRecord::Migration
def change
change_column :repositories, :room_id, :string
change_column :builds, :room_id, :string
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1313867551_add_build_output_column.rb | lib/janky/database/migrate/1313867551_add_build_output_column.rb | class AddBuildOutputColumn < ActiveRecord::Migration
def self.up
add_column :builds, :output, :text, :null => true, :default => nil
end
def self.down
remove_column :builds, :output
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384654_add_build_queued_at.rb | lib/janky/database/migrate/1317384654_add_build_queued_at.rb | class AddBuildQueuedAt < ActiveRecord::Migration
def self.up
add_column :builds, :queued_at, :datetime, :null => true
Janky::Build.started.each do |b|
b.update_attributes!(:queued_at => b.created_at)
end
end
def self.down
remove_column :builds, :queued_at
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384655_add_template.rb | lib/janky/database/migrate/1317384655_add_template.rb | class AddTemplate < ActiveRecord::Migration
def self.up
add_column :repositories, :job_template, :string, :null => true
end
def self.down
remove_column :repositories, :job_template
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1312117285_non_unique_repo_uri.rb | lib/janky/database/migrate/1312117285_non_unique_repo_uri.rb | class NonUniqueRepoUri < ActiveRecord::Migration
def self.up
remove_index :repositories, :uri
add_index :repositories, :uri
end
def self.down
add_index :repositories, :uri, :unique => true
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1313871652_add_commit_url_column.rb | lib/janky/database/migrate/1313871652_add_commit_url_column.rb | class AddCommitUrlColumn < ActiveRecord::Migration
def self.up
add_column :commits, :url, :string, :null => false
end
def self.down
remove_column :commits, :url
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384650_add_build_indexes.rb | lib/janky/database/migrate/1317384650_add_build_indexes.rb | class AddBuildIndexes < ActiveRecord::Migration
def self.up
add_index :builds, :commit_id
add_index :builds, :branch_id
end
def self.down
remove_index :builds, :commit_id
remove_index :builds, :branch_id
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1398262033_add_context.rb | lib/janky/database/migrate/1398262033_add_context.rb | class AddContext < ActiveRecord::Migration
def self.up
add_column :repositories, :context, :string, :null => true
end
def self.down
remove_column :repositories, :context
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384629_drop_default_room_id.rb | lib/janky/database/migrate/1317384629_drop_default_room_id.rb | class DropDefaultRoomId < ActiveRecord::Migration
def self.up
change_column :repositories, :room_id, :integer, :default => nil, :null => true
end
def self.down
change_column :repositories, :room_id, :integer, :default => 376289, :null => false
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384652_change_commit_message_to_text.rb | lib/janky/database/migrate/1317384652_change_commit_message_to_text.rb | class ChangeCommitMessageToText < ActiveRecord::Migration
def change
change_column :commits, :message, :text, :null => false
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384653_add_build_pusher.rb | lib/janky/database/migrate/1317384653_add_build_pusher.rb | class AddBuildPusher < ActiveRecord::Migration
def self.up
add_column :builds, :user, :string, :null => true
end
def self.down
remove_column :builds, :user
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1312115512_init.rb | lib/janky/database/migrate/1312115512_init.rb | class Init < ActiveRecord::Migration
def self.up
create_table :repositories, :force => true do |t|
t.string :name, :null => false
t.string :uri, :null => false
t.integer :room_id, :null => false
t.timestamps
end
add_index :repositories, :name, :unique => true
add_index :reposi... | ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384651_add_more_build_indexes.rb | lib/janky/database/migrate/1317384651_add_more_build_indexes.rb | class AddMoreBuildIndexes < ActiveRecord::Migration
def self.up
add_index :builds, :started_at
add_index :builds, :completed_at
add_index :builds, :green
end
def self.down
remove_index :builds, :started_at
remove_index :builds, :completed_at
remove_index :builds, :green
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
github/janky | https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/database/migrate/1317384618_add_repo_hook_url.rb | lib/janky/database/migrate/1317384618_add_repo_hook_url.rb | class AddRepoHookUrl < ActiveRecord::Migration
def self.up
add_column :repositories, :hook_url, :string, :null => true
end
def self.down
remove_column :repositories, :hook_url
end
end
| ruby | MIT | e2e76cc4c3b1421688b9a4feb77ffc5df761562e | 2026-01-04T15:53:08.554244Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/bundler_test.rb | test/bundler_test.rb | # frozen_string_literal: true
require "test_helper"
class BundlerTest < Minitest::Test
def test_bundler_with_bundle_bin_path_env
without_required_env_keys do
ENV["BUNDLE_BIN_PATH"] = "foo"
assert_predicate(Bootsnap, :bundler?)
end
end
def test_bundler_with_bundle_gemfile_env
without_req... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/compile_cache_key_format_test.rb | test/compile_cache_key_format_test.rb | # frozen_string_literal: true
require "test_helper"
require "tempfile"
require "tmpdir"
require "fileutils"
class CompileCacheKeyFormatTest < Minitest::Test
FILE = File.expand_path(__FILE__)
include CompileCacheISeqHelper
include TmpdirHelper
R = {
version: 0...4,
ruby_platform: 4...8,
compile_op... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/test_helper.rb | test/test_helper.rb | # frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
if Warning.respond_to?(:[]=)
Warning[:deprecated] = true
end
require "bundler/setup"
require "bootsnap"
require "bootsnap/compile_cache/yaml"
require "tmpdir"
require "fileutils"
require "minitest/autorun"
require "mocha/minite... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/helper_test.rb | test/helper_test.rb | # frozen_string_literal: true
require "test_helper"
class HelperTest < Minitest::Test
include CompileCacheISeqHelper
include TmpdirHelper
def test_validate_cache_path
path = Help.set_file("a.rb", "a = a = 3", 100)
cp = Help.cache_path("#{@tmp_dir}-iseq", path)
load(path)
assert_equal(true, File... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/compile_cache_handler_errors_test.rb | test/compile_cache_handler_errors_test.rb | # frozen_string_literal: true
require "test_helper"
class CompileCacheHandlerErrorsTest < Minitest::Test
include CompileCacheISeqHelper
include TmpdirHelper
# now test three failure modes of each handler method:
# 1. unexpected type
# 2. invalid instance of expected type
# 3. exception
def test_... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/cli_test.rb | test/cli_test.rb | # frozen_string_literal: true
require "test_helper"
require "bootsnap/cli"
module Bootsnap
class CLITest < Minitest::Test
include TmpdirHelper
def setup
super
@cache_dir = File.expand_path("tmp/cache/bootsnap/compile-cache")
end
def test_precompile_single_file
skip_unless_iseq
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/worker_pool_test.rb | test/worker_pool_test.rb | # frozen_string_literal: true
require "test_helper"
require "bootsnap/cli"
module Bootsnap
class WorkerPoolTestTest < Minitest::Test
def test_dispatch
@pool = CLI::WorkerPool.create(size: 2, jobs: {touch: ->(path) { File.write(path, Process.pid.to_s) }})
@pool.spawn
Dir.mktmpdir("bootsnap-tes... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/compile_cache_test.rb | test/compile_cache_test.rb | # frozen_string_literal: true
require "test_helper"
class CompileCacheTest < Minitest::Test
include CompileCacheISeqHelper
include TmpdirHelper
def teardown
super
Bootsnap::CompileCache::Native.readonly = false
Bootsnap::CompileCache::Native.revalidation = false
Bootsnap.instrumentation = nil
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/setup_test.rb | test/setup_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
class SetupTest < Minitest::Test
def setup
@_old_env = ENV.to_h
@tmp_dir = Dir.mktmpdir("bootsnap-test")
ENV["BOOTSNAP_CACHE_DIR"] = @tmp_dir
end
def teardown
ENV.replace(@_old_env)
end
def test_default... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/change_observer_test.rb | test/load_path_cache/change_observer_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
module LoadPathCache
class ChangeObserverTest < Minitest::Test
include LoadPathCacheHelper
def setup
super
@observer = Object.new
@observer.instance_variable_set(:@mutex, Mutex.new)
@arr = []
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/loaded_features_index_test.rb | test/load_path_cache/loaded_features_index_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
module LoadPathCache
class LoadedFeaturesIndexTest < Minitest::Test
include LoadPathCacheHelper
def setup
super
@index = LoadedFeaturesIndex.new
# not really necessary but let's just make it a clean slate
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/store_test.rb | test/load_path_cache/store_test.rb | # frozen_string_literal: true
require "test_helper"
require "tmpdir"
require "fileutils"
module Bootsnap
module LoadPathCache
class StoreTest < Minitest::Test
include LoadPathCacheHelper
def setup
super
@dir = Dir.mktmpdir
@path = "#{@dir}/store"
@store = Store.new(@... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/path_test.rb | test/load_path_cache/path_test.rb | # frozen_string_literal: true
require "test_helper"
require "bootsnap/load_path_cache"
module Bootsnap
module LoadPathCache
class PathTest < Minitest::Test
include LoadPathCacheHelper
def setup
super
@cache = Object.new
end
def test_stability
require "time"
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/path_scanner_test.rb | test/load_path_cache/path_scanner_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
module LoadPathCache
class PathScannerTest < Minitest::Test
include LoadPathCacheHelper
DLEXT = RbConfig::CONFIG["DLEXT"]
OTHER_DLEXT = DLEXT == "bundle" ? "so" : "bundle"
def test_scans_requirables_and_dirs
Di... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/cache_test.rb | test/load_path_cache/cache_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
module LoadPathCache
class CacheTest < Minitest::Test
include LoadPathCacheHelper
def setup
super
@dir1 = File.realpath(Dir.mktmpdir)
@dir2 = File.realpath(Dir.mktmpdir)
FileUtils.touch("#{@dir1}/a.r... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/load_path_cache/core_ext/kernel_require_test.rb | test/load_path_cache/core_ext/kernel_require_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
class KernelRequireTest < Minitest::Test
include LoadPathCacheHelper
def test_uses_the_same_duck_type_as_require
skip("Need a working Process.fork to test in isolation") unless Process.respond_to?(:fork)
begin
assert_ni... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/integration/kernel_test.rb | test/integration/kernel_test.rb | # frozen_string_literal: true
require "test_helper"
module Bootsnap
class KernelTest < Minitest::Test
include LoadPathCacheHelper
include TmpdirHelper
def test_require_symlinked_file_twice
skip("https://github.com/oracle/truffleruby/issues/3138") if truffleruby?
setup_symlinked_files
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/minimal_support/bootsnap_setup.rb | test/minimal_support/bootsnap_setup.rb | # frozen_string_literal: true
require "bundler/setup"
require "bootsnap/setup"
| ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/compile_cache/yaml_test.rb | test/compile_cache/yaml_test.rb | # frozen_string_literal: true
require "test_helper"
class CompileCacheYAMLTest < Minitest::Test
include TmpdirHelper
module FakeYaml
Fallback = Class.new(StandardError)
class << self
def load_file(_path, symbolize_names: false, freeze: false, fallback: nil)
raise Fallback
end
d... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/test/compile_cache/iseq_cache_test.rb | test/compile_cache/iseq_cache_test.rb | # frozen_string_literal: true
require "test_helper"
class CompileCacheISeqTest < Minitest::Test
include CompileCacheISeqHelper
include TmpdirHelper
def test_ruby_bug_18250
Help.set_file("a.rb", "def foo(*); ->{ super }; end; def foo(**); ->{ super }; end", 100)
Bootsnap::CompileCache::ISeq.fetch("a.rb"... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/ext/bootsnap/extconf.rb | ext/bootsnap/extconf.rb | # frozen_string_literal: true
require "mkmf"
if %w[ruby truffleruby].include?(RUBY_ENGINE)
have_func "fdatasync", "unistd.h"
have_func "fstatat", "sys/stat.h"
unless RUBY_PLATFORM.match?(/mswin|mingw|cygwin/)
append_cppflags ["-D_GNU_SOURCE"] # Needed of O_NOATIME
end
append_cflags ["-O3", "-std=c99"]... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap.rb | lib/bootsnap.rb | # frozen_string_literal: true
require_relative "bootsnap/version"
require_relative "bootsnap/bundler"
require_relative "bootsnap/compile_cache"
require_relative "bootsnap/load_path_cache"
module Bootsnap
InvalidConfiguration = Class.new(StandardError)
class << self
attr_reader :logger
def log_stats!
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/version.rb | lib/bootsnap/version.rb | # frozen_string_literal: true
module Bootsnap
VERSION = "1.20.1"
end
| ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/setup.rb | lib/bootsnap/setup.rb | # frozen_string_literal: true
require_relative "../bootsnap"
Bootsnap.default_setup
| ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache.rb | lib/bootsnap/load_path_cache.rb | # frozen_string_literal: true
module Bootsnap
module LoadPathCache
FALLBACK_SCAN = BasicObject.new
DOT_RB = ".rb"
DOT_SO = ".so"
SLASH = "/"
DL_EXTENSIONS = ::RbConfig::CONFIG
.values_at("DLEXT", "DLEXT2")
.reject { |ext| !ext || ext.empty? }
.map { |ext| ".#{ext}" }
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/explicit_require.rb | lib/bootsnap/explicit_require.rb | # frozen_string_literal: true
module Bootsnap
module ExplicitRequire
ARCHDIR = RbConfig::CONFIG["archdir"]
RUBYLIBDIR = RbConfig::CONFIG["rubylibdir"]
DLEXT = RbConfig::CONFIG["DLEXT"]
def self.from_self(feature)
require_relative("../#{feature}")
end
def self.from_rubylibdir(f... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/cli.rb | lib/bootsnap/cli.rb | # frozen_string_literal: true
require "bootsnap"
require "bootsnap/cli/worker_pool"
require "optparse"
require "fileutils"
module Bootsnap
class CLI
unless Regexp.method_defined?(:match?)
module RegexpMatchBackport
refine Regexp do
def match?(string)
!!match(string)
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/compile_cache.rb | lib/bootsnap/compile_cache.rb | # frozen_string_literal: true
module Bootsnap
module CompileCache
UNCOMPILABLE = BasicObject.new
def UNCOMPILABLE.inspect
"<Bootsnap::UNCOMPILABLE>"
end
Error = Class.new(StandardError)
def self.setup(cache_dir:, iseq:, yaml:, json: (json_unset = true), readonly: false, revalidation: fals... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/bundler.rb | lib/bootsnap/bundler.rb | # frozen_string_literal: true
module Bootsnap
extend self
def bundler?
return false unless defined?(::Bundler)
# Bundler environment variable
%w(BUNDLE_BIN_PATH BUNDLE_GEMFILE).each do |current|
return true if ENV.key?(current)
end
false
end
end
| ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/path.rb | lib/bootsnap/load_path_cache/path.rb | # frozen_string_literal: true
require_relative "path_scanner"
module Bootsnap
module LoadPathCache
class Path
# A path is considered 'stable' if it is part of a Gem.path or the ruby
# distribution. When adding or removing files in these paths, the cache
# must be cleared before the change will... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/loaded_features_index.rb | lib/bootsnap/load_path_cache/loaded_features_index.rb | # frozen_string_literal: true
module Bootsnap
module LoadPathCache
# LoadedFeaturesIndex partially mirrors an internal structure in ruby that
# we can't easily obtain an interface to.
#
# This works around an issue where, without bootsnap, *ruby* knows that it
# has already required a file by its... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/store.rb | lib/bootsnap/load_path_cache/store.rb | # frozen_string_literal: true
require_relative "../explicit_require"
Bootsnap::ExplicitRequire.with_gems("msgpack") { require "msgpack" }
module Bootsnap
module LoadPathCache
class Store
VERSION_KEY = "__bootsnap_ruby_version__"
CURRENT_VERSION = "#{VERSION}-#{RUBY_REVISION}-#{RUBY_PLATFORM}".freez... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/path_scanner.rb | lib/bootsnap/load_path_cache/path_scanner.rb | # frozen_string_literal: true
require_relative "../explicit_require"
module Bootsnap
module LoadPathCache
module PathScanner
REQUIRABLE_EXTENSIONS = [DOT_RB] + DL_EXTENSIONS
BUNDLE_PATH = if Bootsnap.bundler?
(Bundler.bundle_path.cleanpath.to_s << LoadPathCache::SLASH).freeze
else
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/change_observer.rb | lib/bootsnap/load_path_cache/change_observer.rb | # frozen_string_literal: true
module Bootsnap
module LoadPathCache
module ChangeObserver
module ArrayMixin
# For each method that adds items to one end or another of the array
# (<<, push, unshift, concat), override that method to also notify the
# observer of the change.
de... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/cache.rb | lib/bootsnap/load_path_cache/cache.rb | # frozen_string_literal: true
require_relative "../explicit_require"
module Bootsnap
module LoadPathCache
class Cache
AGE_THRESHOLD = 30 # seconds
def initialize(store, path_obj, development_mode: false)
@development_mode = development_mode
@store = store
@mutex = Mutex.new
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb | lib/bootsnap/load_path_cache/core_ext/loaded_features.rb | # frozen_string_literal: true
class << $LOADED_FEATURES
alias_method(:delete_without_bootsnap, :delete)
def delete(key)
Bootsnap::LoadPathCache.loaded_features_index.purge(key)
delete_without_bootsnap(key)
end
alias_method(:reject_without_bootsnap!, :reject!)
def reject!(&block)
backup = dup
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb | lib/bootsnap/load_path_cache/core_ext/kernel_require.rb | # frozen_string_literal: true
module Kernel
alias_method :require_without_bootsnap, :require
alias_method :require, :require # Avoid method redefinition warnings
def require(path) # rubocop:disable Lint/DuplicateMethods
return require_without_bootsnap(path) unless Bootsnap::LoadPathCache.enabled?
stri... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/cli/worker_pool.rb | lib/bootsnap/cli/worker_pool.rb | # frozen_string_literal: true
require "etc"
require "rbconfig"
require "io/wait" unless IO.method_defined?(:wait_readable)
module Bootsnap
class CLI
class WorkerPool
class << self
def create(size:, jobs:)
size ||= default_size
if size > 0 && Process.respond_to?(:fork)
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/compile_cache/iseq.rb | lib/bootsnap/compile_cache/iseq.rb | # frozen_string_literal: true
require "bootsnap/bootsnap"
require "zlib"
module Bootsnap
module CompileCache
module ISeq
class << self
attr_reader(:cache_dir)
def cache_dir=(cache_dir)
@cache_dir = cache_dir.end_with?("/") ? "#{cache_dir}iseq" : "#{cache_dir}-iseq"
end
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
rails/bootsnap | https://github.com/rails/bootsnap/blob/417dd84ee30bbe172c6af84c876f73843ebcd413/lib/bootsnap/compile_cache/yaml.rb | lib/bootsnap/compile_cache/yaml.rb | # frozen_string_literal: true
require "bootsnap/bootsnap"
module Bootsnap
module CompileCache
module YAML
Uncompilable = Class.new(StandardError)
UnsupportedTags = Class.new(Uncompilable)
SUPPORTED_INTERNAL_ENCODINGS = [
nil, # UTF-8
Encoding::UTF_8,
Encoding::ASCII,
... | ruby | MIT | 417dd84ee30bbe172c6af84c876f73843ebcd413 | 2026-01-04T15:53:11.250542Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@5.6-debug-zts.rb | Formula/php@5.6-debug-zts.rb | class PhpAT56DebugZts < Formula
desc "General-purpose scripting language"
homepage "https://secure.php.net/"
url "https://github.com/shivammathur/php-src-backports/archive/6cfe49e294414185452ec89bad39b1bd42cc72c9.tar.gz"
version "5.6.40"
sha256 "c7aea2d4742a6daadfa333dce1e6707bd648b2ed54e36238674db026e27d43cf... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@7.2-zts.rb | Formula/php@7.2-zts.rb | class PhpAT72Zts < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
url "https://github.com/shivammathur/php-src-backports/archive/383aaa666ea5d825183dde9e676690f62f21ad88.tar.gz"
version "7.2.34"
sha256 "3b48ab3d2f57cc29e793846446024f7e1219641647bf1d678a5effe460358d4d"
lice... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@7.3-debug-zts.rb | Formula/php@7.3-debug-zts.rb | class PhpAT73DebugZts < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
url "https://github.com/shivammathur/php-src-backports/archive/2c97539020cfaadf6998f23fd301cb5158464fbc.tar.gz"
version "7.3.33"
sha256 "c9bc90d6c3d7b2d3a9e17581d36382f4db3e20e3e43225db5437c52e2f2de7bf"
... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@7.1-debug-zts.rb | Formula/php@7.1-debug-zts.rb | class PhpAT71DebugZts < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
url "https://github.com/shivammathur/php-src-backports/archive/45db7daedb330abded7576b9c4dadf5ed13e2f0b.tar.gz"
version "7.1.33"
sha256 "c83694b44f2c2fedad3617f86d384d05e04c605fa61a005f5d51dfffaba39772"
... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@7.2-debug.rb | Formula/php@7.2-debug.rb | class PhpAT72Debug < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
url "https://github.com/shivammathur/php-src-backports/archive/383aaa666ea5d825183dde9e676690f62f21ad88.tar.gz"
version "7.2.34"
sha256 "3b48ab3d2f57cc29e793846446024f7e1219641647bf1d678a5effe460358d4d"
li... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
shivammathur/homebrew-php | https://github.com/shivammathur/homebrew-php/blob/06eec83a2717b368f9105200eef26e9134dc67a5/Formula/php@8.1-debug-zts.rb | Formula/php@8.1-debug-zts.rb | class PhpAT81DebugZts < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
url "https://www.php.net/distributions/php-8.1.34.tar.xz"
mirror "https://fossies.org/linux/www/php-8.1.34.tar.xz"
sha256 "ffa9e0982e82eeaea848f57687b425ed173aa278fe563001310ae2638db5c251"
license all_o... | ruby | MIT | 06eec83a2717b368f9105200eef26e9134dc67a5 | 2026-01-04T15:53:04.815253Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.