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 |
|---|---|---|---|---|---|---|---|---|
frodefi/rails-messaging | https://github.com/frodefi/rails-messaging/blob/b840f344dbc3af141c124b5f2df0ea9947fe6493/config/routes.rb | config/routes.rb | Messaging::Engine.routes.draw do
resources :messages do
member do
delete 'trash'
post 'untrash'
end
collection do
delete 'trash'
end
end
post 'search' => 'messages#search'
root :to => 'messages#index'
end
| ruby | MIT | b840f344dbc3af141c124b5f2df0ea9947fe6493 | 2026-01-04T17:57:44.259159Z | false |
gowalla-archive/boxer | https://github.com/gowalla-archive/boxer/blob/a4e1c1d8e3a1649719e0bbd3d605598602248c9f/spec/boxer_spec.rb | spec/boxer_spec.rb | require 'spec_helper'
require 'boxer'
module MyTestModule
def my_test_method; 42 end
end
module MySecondTestModule
def my_second_test_method; 43 end
end
describe Boxer do
describe ".box" do
it "can create a box based on a simple hash" do
Boxer.box(:foo) do
{:working => true}
end
... | ruby | MIT | a4e1c1d8e3a1649719e0bbd3d605598602248c9f | 2026-01-04T17:57:52.641386Z | false |
gowalla-archive/boxer | https://github.com/gowalla-archive/boxer/blob/a4e1c1d8e3a1649719e0bbd3d605598602248c9f/spec/spec_helper.rb | spec/spec_helper.rb | $:.push File.expand_path("../../lib", __FILE__)
RSpec.configure do |config|
# ...
end
| ruby | MIT | a4e1c1d8e3a1649719e0bbd3d605598602248c9f | 2026-01-04T17:57:52.641386Z | false |
gowalla-archive/boxer | https://github.com/gowalla-archive/boxer/blob/a4e1c1d8e3a1649719e0bbd3d605598602248c9f/lib/boxer.rb | lib/boxer.rb | require 'boxer/version'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/hash/deep_merge'
require 'ostruct'
class Boxer
cattr_accessor :config
self.config = OpenStruct.new({
:box_includes => [],
})
class V... | ruby | MIT | a4e1c1d8e3a1649719e0bbd3d605598602248c9f | 2026-01-04T17:57:52.641386Z | false |
gowalla-archive/boxer | https://github.com/gowalla-archive/boxer/blob/a4e1c1d8e3a1649719e0bbd3d605598602248c9f/lib/boxer/version.rb | lib/boxer/version.rb | class Boxer
VERSION = "1.0.2"
end
| ruby | MIT | a4e1c1d8e3a1649719e0bbd3d605598602248c9f | 2026-01-04T17:57:52.641386Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/helpers/application_helper.rb | app/helpers/application_helper.rb | module ApplicationHelper
# Returns the full title on a per-page basis
def full_title(page_title)
base_title = "Bitroad"
if page_title.empty?
base_title
else
"#{ page_title } | #{ base_title }"
end
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/helpers/pages_helper.rb | app/helpers/pages_helper.rb | module PagesHelper
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/helpers/listings_helper.rb | app/helpers/listings_helper.rb | module ListingsHelper
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/helpers/invoices_helper.rb | app/helpers/invoices_helper.rb | module InvoicesHelper
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/controllers/invoices_controller.rb | app/controllers/invoices_controller.rb | require "coinbase"
class InvoicesController < ApplicationController
def show
@invoice = Invoice.friendly.find(params[:id])
if !@invoice.completed
coinbase = Coinbase::Client.new(Figaro.env.coinbase_secret)
coinbase.send_money @invoice.listing.bitcoin_address, @invoice.listing.price * 0.9
@i... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/controllers/listings_controller.rb | app/controllers/listings_controller.rb | require 'bitpay'
class ListingsController < ApplicationController
def new
@listing = Listing.new
end
def create
@listing = Listing.new(listing_params)
if @listing.save
redirect_to @listing
else
render "new"
end
end
def show
@listing = Listing.find(params[:id])
end
... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/controllers/pages_controller.rb | app/controllers/pages_controller.rb | class PagesController < ApplicationController
def home
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/models/listing.rb | app/models/listing.rb | require 'bitcoin'
class Listing < ActiveRecord::Base
has_attached_file :file
has_many :invoices
validate :valid_bitcoin_address
validates :name, presence: true
validates :description, length: { maximum: 500 }
validates :file, presence: true
validates :price, presence: true, numericality: { greater_than:... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/app/models/invoice.rb | app/models/invoice.rb | class Invoice < ActiveRecord::Base
extend FriendlyId
friendly_id :code, use: :slugged
belongs_to :listing
has_attached_file :file
validates :file, presence: true
validates :session_id, presence: true
private
def code
Digest::SHA1.hexdigest self.file.url
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/seeds.rb | 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: 'Emanuel... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/schema.rb | db/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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207235911_add_slug_to_invoice.rb | db/migrate/20131207235911_add_slug_to_invoice.rb | class AddSlugToInvoice < ActiveRecord::Migration
def change
add_column :invoices, :slug, :string
add_index :invoices, :slug, unique: true
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207231811_create_invoices.rb | db/migrate/20131207231811_create_invoices.rb | class CreateInvoices < ActiveRecord::Migration
def change
create_table :invoices do |t|
t.boolean :completed
t.belongs_to :listing
t.timestamps
end
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207235839_create_friendly_id_slugs.rb | db/migrate/20131207235839_create_friendly_id_slugs.rb | class CreateFriendlyIdSlugs < ActiveRecord::Migration
def change
create_table :friendly_id_slugs do |t|
t.string :slug, :null => false
t.integer :sluggable_id, :null => false
t.string :sluggable_type, :limit => 50
t.string :scope
t.datetime :created_at
end
... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207231916_add_attachment_file_to_invoices.rb | db/migrate/20131207231916_add_attachment_file_to_invoices.rb | class AddAttachmentFileToInvoices < ActiveRecord::Migration
def self.up
change_table :invoices do |t|
t.attachment :file
end
end
def self.down
drop_attached_file :invoices, :file
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131208002027_add_session_id_to_invoice.rb | db/migrate/20131208002027_add_session_id_to_invoice.rb | class AddSessionIdToInvoice < ActiveRecord::Migration
def change
add_column :invoices, :session_id, :string
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207190926_add_attachment_file_to_listings.rb | db/migrate/20131207190926_add_attachment_file_to_listings.rb | class AddAttachmentFileToListings < ActiveRecord::Migration
def self.up
change_table :listings do |t|
t.attachment :file
end
end
def self.down
drop_attached_file :listings, :file
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/db/migrate/20131207190900_create_listings.rb | db/migrate/20131207190900_create_listings.rb | class CreateListings < ActiveRecord::Migration
def change
create_table :listings do |t|
t.string :name
t.text :description
t.decimal :price
t.string :bitcoin_address
t.timestamps
end
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/test_helper.rb | test/test_helper.rb | ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
ActiveRecord::Migration.check_pending!
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
#
# Note: You'll currently still have to de... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/helpers/listings_helper_test.rb | test/helpers/listings_helper_test.rb | require 'test_helper'
class ListingsHelperTest < ActionView::TestCase
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/helpers/invoices_helper_test.rb | test/helpers/invoices_helper_test.rb | require 'test_helper'
class InvoicesHelperTest < ActionView::TestCase
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/helpers/pages_helper_test.rb | test/helpers/pages_helper_test.rb | require 'test_helper'
class PagesHelperTest < ActionView::TestCase
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/controllers/invoices_controller_test.rb | test/controllers/invoices_controller_test.rb | require 'test_helper'
class InvoicesControllerTest < ActionController::TestCase
test "should get show" do
get :show
assert_response :success
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/controllers/listings_controller_test.rb | test/controllers/listings_controller_test.rb | require 'test_helper'
class ListingsControllerTest < ActionController::TestCase
test "should get new" do
get :new
assert_response :success
end
test "should get show" do
get :show
assert_response :success
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/controllers/pages_controller_test.rb | test/controllers/pages_controller_test.rb | require 'test_helper'
class PagesControllerTest < ActionController::TestCase
test "should get home" do
get :home
assert_response :success
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/models/listing_test.rb | test/models/listing_test.rb | require 'test_helper'
class ListingTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/test/models/invoice_test.rb | test/models/invoice_test.rb | require 'test_helper'
class InvoiceTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/application.rb | config/application.rb | require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module Bitroad
class Application < Rails::Application
# Settings in config/environments/* take... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/environment.rb | config/environment.rb | # Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Bitroad::Application.initialize!
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/routes.rb | config/routes.rb | Bitroad::Application.routes.draw do
resources :listings do
member do
patch "purchase"
end
end
resources :invoices
get "home", to: redirect("/")
root to: "pages#home"
%w[home].each do |page|
get page, controller: "pages", action: page
end
end
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/boot.rb | config/boot.rb | # 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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/initializers/simple_form_foundation.rb | config/initializers/simple_form_foundation.rb | # Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.wrappers :foundation, class: :input, hint_class: :field_with_hint, error_class: :error do |b|
b.use :html5
b.use :placeholder
b.optional :maxlength
b.optional :pattern
b.optional :min_max
... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/initializers/session_store.rb | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file.
Bitroad::Application.config.session_store :cookie_store, key: '_bitroad_session'
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/initializers/friendly_id.rb | config/initializers/friendly_id.rb | # FriendlyId Global Configuration
#
# Use this to set up shared configuration options for your entire application.
# Any of the configuration options shown here can also be applied to single
# models by passing arguments to the `friendly_id` class method or defining
# methods in your model.
#
# To learn more, check out... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/initializers/simple_form.rb | config/initializers/simple_form.rb | # Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
# complete input. You can remove any component from the
# wrapper, change the order or even add your own to the
# stack. The options given below are used to... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/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
# Mime::Type.register_alias "text/html", :iphone
| ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/initializers/secret_token.rb | config/initializers/secret_token.rb | # Be sure to restart your server when you modify this file.
# Your secret key is used 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 diction... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/environments/test.rb | config/environments/test.rb | Bitroad::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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/environments/development.rb | config/environments/development.rb | Bitroad::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 | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
zachlatta/bitroad | https://github.com/zachlatta/bitroad/blob/aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38/config/environments/production.rb | config/environments/production.rb | Bitroad::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 thread web serv... | ruby | MIT | aee67f2cc87fbbcb467e098b9fcf178b5b9cfa38 | 2026-01-04T17:57:48.681008Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/test/test_helper.rb | test/test_helper.rb | $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
if ENV["CODECLIMATE_REPO_TOKEN"]
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
end
require "suo"
require "thread"
require "minitest/autorun"
require "minitest/benchmark"
ENV["SUO_TEST"] = "true"
| ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/test/client_test.rb | test/client_test.rb | require "test_helper"
TEST_KEY = "suo_test_key".freeze
module ClientTests
def client(options = {})
@client.class.new(options[:key] || TEST_KEY, options.merge(client: @client.client))
end
def test_throws_failed_error_on_bad_client
assert_raises(Suo::LockClientError) do
client = @client.class.new(T... | ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo.rb | lib/suo.rb | require "securerandom"
require "monitor"
require "dalli"
require "dalli/cas/client"
require "redis"
require "msgpack"
require "suo/version"
require "suo/errors"
require "suo/client/base"
require "suo/client/memcached"
require "suo/client/redis"
| ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo/version.rb | lib/suo/version.rb | module Suo
VERSION = "0.4.0".freeze
end
| ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo/errors.rb | lib/suo/errors.rb | module Suo
class LockClientError < StandardError; end
end
| ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo/client/redis.rb | lib/suo/client/redis.rb | module Suo
module Client
class Redis < Base
OK_STR = "OK".freeze
def initialize(key, options = {})
options[:client] ||= ::Redis.new(options[:connection] || {})
super
end
def clear
with { |r| r.del(@key) }
end
private
def with(&block)
if... | ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo/client/memcached.rb | lib/suo/client/memcached.rb | module Suo
module Client
class Memcached < Base
def initialize(key, options = {})
options[:client] ||= Dalli::Client.new(options[:connection] || ENV["MEMCACHE_SERVERS"] || "127.0.0.1:11211")
super
end
def clear
@client.with { |client| client.delete(@key) }
end
... | ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
nickelser/suo | https://github.com/nickelser/suo/blob/7bb28cc0073bf7d6dc8b30f26b11a9b520678024/lib/suo/client/base.rb | lib/suo/client/base.rb | module Suo
module Client
class Base
DEFAULT_OPTIONS = {
acquisition_timeout: 0.1,
acquisition_delay: 0.01,
stale_lock_expiration: 3600,
resources: 1,
ttl: 60,
}.freeze
BLANK_STR = "".freeze
attr_accessor :client, :key, :resources, :options
i... | ruby | MIT | 7bb28cc0073bf7d6dc8b30f26b11a9b520678024 | 2026-01-04T17:57:58.197698Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/gems.rb | gems.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
source "https://rubygems.org"
# Specify your gem's dependencies in bake.gemspec
gemspec
group :maintenance, optional: true do
gem "bake-modernize"
gem "bake-gem"
gem "bake-releases"
gem "utopia-project"... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/bake.rb | bake.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
# Update the project documentation with the new version number.
#
# @parameter version [String] The new version number.
def after_gem_release_version_increment(version)
context["releases:update"].call(version)... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake.rb | test/bake.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake"
describe Bake do
it "has a version number" do
expect(Bake::VERSION).to be =~ /\d+\.\d+\.\d+/
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/recipe.rb | test/bake/recipe.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
require "bake/recipe"
class TestObject < Bake::Base
def test(*arguments, **options, &block)
[arguments, options, block]
end
end
describe Bake::Recipe do
let(:instance) {TestObject.new}
let(:name) {"test"}
l... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type.rb | test/bake/type.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake/type"
require "bake/context"
describe Bake::Type do
it "can use | operator" do
type = Bake::Type::Array(Bake::Type::Integer) | Bake::Type::String
end
with "test project" do
let(:bakefile... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/base.rb | test/bake/base.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake/base"
describe Bake::Base do
let(:path) {["foo", "bar"]}
let(:base) {subject.derive(path)}
it "has a path" do
expect(base::PATH).to be == path
end
it "formats nicely" do
expect(base.... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/context.rb | test/bake/context.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake/context"
describe Bake::Context do
let(:bakefile) {File.expand_path(".test-project/bake.rb", __dir__)}
let(:context) {subject.load(bakefile)}
it "can invoke root task" do
recipe = context.... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type/array.rb | test/bake/type/array.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "bake/type/array"
require "bake/type"
describe Bake::Type::Array do
let(:type) {Bake::Type.parse(typename)}
with typename: "Array(Integer)" do
it "can parse an array of integers" do
expect(typ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type/output.rb | test/bake/type/output.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "bake/type/output"
describe Bake::Type::Output do
let(:value) {subject.parse(text)}
with text: "-" do
it "should be stdout" do
expect(value).to be_a(IO)
expect(value).to be == $stdout
end... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type/boolean.rb | test/bake/type/boolean.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "bake/type/boolean"
describe Bake::Type::Boolean do
let(:value) {subject.parse(text)}
with text: "true" do
it "should be true" do
expect(value).to be_a(TrueClass)
expect(value).to be == tru... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type/input.rb | test/bake/type/input.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "bake/type/input"
describe Bake::Type::Input do
let(:value) {subject.parse(text)}
with text: "-" do
it "should be stdin" do
expect(value).to be_a(IO)
expect(value).to be == $stdin
end
en... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/type/nil.rb | test/bake/type/nil.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2023-2025, by Samuel Williams.
require "bake/type/nil"
describe Bake::Type::Nil do
let(:value) {subject.parse(text)}
with text: "nil" do
it "should be nil" do
expect(value).to be_a(NilClass)
expect(value).to be == nil
end
end... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/command/list.rb | test/bake/command/list.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake/command/top"
require "bake/command/list"
describe Bake::Command::List do
let(:root) {File.expand_path(".test-project", __dir__)}
let(:buffer) {StringIO.new}
let(:parent) {Bake::Command::Top["-... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/command/call.rb | test/bake/command/call.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require "bake/command/top"
require "bake/command/call"
describe Bake::Command::Call do
let(:root) {File.expand_path(".test-project", __dir__)}
let(:parent) {Bake::Command::Top["--bakefile", root]}
let(:comm... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/command/.test-project/bake.rb | test/bake/command/.test-project/bake.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
def initialize(*)
super
@called = false
end
attr :called
# A test method.
#
# A second paragraph.
#
def test_called
@called = true
end
def a_very_unique_method
end
def test_arguments(x, y)
x+y
end
def ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake.rb | test/bake/.test-project/bake.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
def doot
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/setup.rb | test/bake/.test-project/bake/setup.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
recipe :setup do |x, y|
end
recipe :deploy do |x:, y:|
end
recipe :self_destruct do |**options|
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/invoke.rb | test/bake/.test-project/bake/invoke.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
def task1(argument, option:)
end
def task2
task1("argument", option: "option")
end
def task3(argument)
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/parent.rb | test/bake/.test-project/bake/parent.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
def parent
end
def sibling
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/types.rb | test/bake/.test-project/bake/types.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
# @parameter x [Integer] the number to square.
def square(x)
x*x
end
# @parameter numbers [Array(Integer)] the numbers to sum up.
def sum(numbers)
numbers.sum
end
# @parameter key [Symbol] the key to lookup... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/wrap.rb | test/bake/.test-project/bake/wrap.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2024-2025, by Samuel Williams.
def wrap(...)
self.invoked(...)
end
protected
def invoked(...)
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/parent/child.rb | test/bake/.test-project/bake/parent/child.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
def child
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/test/bake/.test-project/bake/parent/sibling.rb | test/bake/.test-project/bake/parent/sibling.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2024, by Samuel Williams.
def hello
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/bake/output.rb | bake/output.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2022-2025, by Samuel Williams.
def initialize(...)
super
require_relative "../lib/bake/format"
end
# Dump the last result to the specified file (defaulting to stdout) in the specified format (defaulting to Ruby's pretty print).
# @param... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/bake/input.rb | bake/input.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2022-2025, by Samuel Williams.
def initialize(...)
super
require_relative "../lib/bake/format"
end
# Parse an input file (defaulting to stdin) in the specified format. The format can be extracted from the file extension if left unspecif... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake.rb | lib/bake.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "bake/version"
require_relative "bake/registry"
require_relative "bake/context"
require_relative "bake/format"
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/recipe.rb | lib/bake/recipe.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "type"
require_relative "arguments"
require_relative "documentation"
module Bake
# Structured access to an instance method in a bakefile.
class Recipe
# Initialize the recipe.
#
# @par... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/command.rb | lib/bake/command.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "command/top"
module Bake
# The command line interface.
module Command
def self.call(*arguments)
Top.call(*arguments)
end
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/version.rb | lib/bake/version.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
module Bake
VERSION = "0.24.1"
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type.rb | lib/bake/type.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "type/any"
require_relative "type/array"
require_relative "type/boolean"
require_relative "type/decimal"
require_relative "type/float"
require_relative "type/hash"
require_relative "type/input"... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/format.rb | lib/bake/format.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2025, by Samuel Williams.
module Bake
module Format
REGISTRY = {}
def self.[](name)
unless name =~ /\A[a-z_]+\z/
raise ArgumentError.new("Invalid format name: #{name}")
end
begin
require_relative "format/#{name}"... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/documentation.rb | lib/bake/documentation.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "scope"
module Bake
# Structured access to a set of comment lines.
class Documentation
# Initialize the documentation with an array of comments.
#
# @parameter comments [Array(String)]... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/arguments.rb | lib/bake/arguments.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "type"
require_relative "documentation"
module Bake
# Structured access to arguments.
class Arguments
def self.extract(recipe, arguments, **defaults)
# Only supply defaults that match t... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/registry.rb | lib/bake/registry.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2024-2025, by Samuel Williams.
require_relative "registry/aggregate"
module Bake
# Structured access to the working directory and loaded gems for loading bakefiles.
module Registry
def self.default(...)
Aggregate.default(...)
end
... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/base.rb | lib/bake/base.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "recipe"
require_relative "scope"
module Bake
# The base class for including {Scope} instances which define {Recipe} instances.
class Base < Struct.new(:context)
# Generate a base class fo... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/scope.rb | lib/bake/scope.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "recipe"
module Bake
# Used for containing all methods defined in a bakefile.
module Scope
# Load the specified file into a unique scope module, which can then be included into a {Base} in... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/context.rb | lib/bake/context.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
# Copyright, 2020, by Olle Jonsson.
require_relative "base"
require_relative "registry"
module Bake
# The default file name for the top level bakefile.
BAKEFILE = "bake.rb"
# Represents a context of task ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/tuple.rb | lib/bake/type/tuple.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
class Tuple
include Type
def initialize(item_types)
@item_types = item_types
end
def composite?
true
end
def parse(input)... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/decimal.rb | lib/bake/type/decimal.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
require "bigdecimal"
module Bake
module Type
module Decimal
extend Type
def self.composite?
false
end
def self.parse(input)
BigDecimal(input)
end
end... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/array.rb | lib/bake/type/array.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
class Array
include Type
def initialize(item_type)
@item_type = item_type
end
def composite?
true
end
def map(values)
... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/float.rb | lib/bake/type/float.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Float
extend Type
def self.composite?
false
end
def self.parse(input)
input.to_f
end
end
end
end
| ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
ioquatix/bake | https://github.com/ioquatix/bake/blob/4f6cba256c9757d72772e02bde264a456feeeb4b/lib/bake/type/output.rb | lib/bake/type/output.rb | # frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2020-2025, by Samuel Williams.
require_relative "any"
module Bake
module Type
module Output
extend Type
def self.composite?
false
end
def self.parse(input)
case input
when "-"
return $stdout
when ... | ruby | MIT | 4f6cba256c9757d72772e02bde264a456feeeb4b | 2026-01-04T17:58:02.163537Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.