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
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/test/integration/resources/git_installed_spec.rb
test/integration/resources/git_installed_spec.rb
# rubocop:disable Chef/Deprecations/ResourceWithoutUnifiedTrue home_dir = if os.family == 'windows' if user('vagrant') 'C:/Users/vagrant' else 'C:/Users/RUNNER~1' end elsif os.family == 'darwin' '/Users/random' else '/home/random' end repo_dir = if os.family == 'windows' '...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/test/fixtures/cookbooks/test/metadata.rb
test/fixtures/cookbooks/test/metadata.rb
name 'test' version '0.1.0' depends 'git'
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/test/fixtures/cookbooks/test/recipes/source.rb
test/fixtures/cookbooks/test/recipes/source.rb
apt_update include_recipe 'git::source'
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/test/fixtures/cookbooks/test/recipes/default.rb
test/fixtures/cookbooks/test/recipes/default.rb
apt_update git_client 'install it' home_dir = if windows? 'C:\temp' elsif macos? '/Users/random' else '/home/random' end user 'random' do manage_home true home home_dir end unless windows? directory 'C:\temp' if windows? git_config 'add name to random' do user 'random' unless windows? s...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/test/fixtures/cookbooks/test/recipes/server.rb
test/fixtures/cookbooks/test/recipes/server.rb
apt_update include_recipe 'git::server'
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/recipes/source.rb
recipes/source.rb
# # Cookbook:: git # Recipe:: source # # Copyright:: 2012-2016, Brian Flad, Fletcher Nichol # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/recipes/default.rb
recipes/default.rb
# # Cookbook:: git # Recipe:: default # # Copyright:: 2008-2019, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/recipes/package.rb
recipes/package.rb
# # Cookbook:: git # Recipe:: package # # Copyright:: 2008-2019, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/recipes/windows.rb
recipes/windows.rb
# # Cookbook:: git # Recipe:: windows # # Copyright:: 2008-2019, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/attributes/default.rb
attributes/default.rb
# # Author:: Jamie Winsor (<jamie@vialstudios.com>) # Cookbook:: git # Attributes:: default # # Copyright:: 2008-2019, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/spec/spec_helper.rb
spec/spec_helper.rb
require 'chefspec' require 'chefspec/berkshelf' RSpec.configure do |config| config.formatter = :documentation # Use the specified formatter config.color = true config.log_level = :fatal # ignore warnings config.alias_example_group_to :describe_recipe, type: :recipe config.alias_example_group_to :describe_res...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/spec/unit/recipes/source_spec.rb
spec/unit/recipes/source_spec.rb
require_relative '../../spec_helper' describe 'git::source' do platform 'ubuntu' step_into :git_client before do stub_command(%r{test -f /tmp/.+/git-2.17.1.tar.gz}) stub_command('git --version | grep 2.17.1') stub_command('/usr/local/bin/git --version | grep 2.17.1') end it do is_expected....
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/spec/unit/recipes/default_spec.rb
spec/unit/recipes/default_spec.rb
require_relative '../../spec_helper' describe 'git::default' do context 'on windows' do let(:chef_run) do ChefSpec::ServerRunner.new( platform: 'windows', version: '10' ).converge(described_recipe) end it { is_expected.to install_git_client('default') } end context 'on l...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/spec/unit/recipes/windows_spec.rb
spec/unit/recipes/windows_spec.rb
require_relative '../../spec_helper' describe_recipe 'git::windows' do let(:chef_run) do ChefSpec::ServerRunner.new( platform: 'windows', version: '10' ).converge(described_recipe) end it do expect(chef_run).to install_git_client('default').with( windows_display_name: 'Git version ...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/libraries/helpers.rb
libraries/helpers.rb
module GitCookbook module Helpers # linux packages default to distro offering def parsed_package_name return new_resource.package_name if new_resource.package_name return 'developer/versioning/git' if platform?('omnios') return 'scmgit' if platform?('smartos') 'git' end def pa...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/resources/client_linux.rb
resources/client_linux.rb
unified_mode true provides :git_client, os: 'linux' # :install property :package_name, String property :package_version, String property :package_action, Symbol, default: :install # :install_from_source property :source_checksum, String property :source_prefix, String, default: '/usr/local' property :source_url, Str...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/resources/client_windows.rb
resources/client_windows.rb
unified_mode true provides :git_client, os: 'windows' property :windows_display_name, String property :windows_package_url, String property :windows_package_checksum, String property :windows_package_version, String action_class do include GitCookbook::Helpers end action :install do windows_package parsed_windo...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/resources/config.rb
resources/config.rb
unified_mode true property :key, String, name_property: true property :value, String property :scope, String, equal_to: %w(local global system file), default: 'global', desired_state: false property :config_file, String, desired_state: false property :path, String, desired_state: false property :user, String, desired_...
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
sous-chefs/git
https://github.com/sous-chefs/git/blob/83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43/resources/client_osx.rb
resources/client_osx.rb
unified_mode true provides :git_client, platform: 'mac_os_x' action :install do package 'git' do options '--override' end end
ruby
Apache-2.0
83fff1e6e1fd5a8fa180531ba9f5ac51769a7c43
2026-01-04T17:56:43.177115Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/app/controllers/hotsheet/sheets_controller.rb
app/controllers/hotsheet/sheets_controller.rb
# frozen_string_literal: true class Hotsheet::SheetsController < Hotsheet::ApplicationController before_action :set_sheet before_action :set_column, only: :update before_action :set_resource, only: :update def index @columns = @sheet.columns @cells, @config = @sheet.cells_for @columns, params end ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/app/controllers/hotsheet/home_controller.rb
app/controllers/hotsheet/home_controller.rb
# frozen_string_literal: true class Hotsheet::HomeController < Hotsheet::ApplicationController def show; end def error render "error", status: :not_found end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/app/controllers/hotsheet/application_controller.rb
app/controllers/hotsheet/application_controller.rb
# frozen_string_literal: true class Hotsheet::ApplicationController < ActionController::Base protect_from_forgery with: :exception # :nocov: ENV["HOTSHEET_BASIC_AUTH"]&.split(":")&.then do |name, password| http_basic_authenticate_with name:, password: end # :nocov: end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true ENV["RAILS_ENV"] = "test" begin require "simplecov" SimpleCov.start "rails" do add_filter %w[lib/generators/templates lib/hotsheet/engine.rb lib/hotsheet/version.rb] enable_coverage :branch minimum_coverage line: 100, branch: 100 end rescue LoadError nil end require...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/system/hotsheet/sheets_controller_spec.rb
spec/system/hotsheet/sheets_controller_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet::SheetsController do fixtures :users let(:user) { users(:admin) } before { prepare { Hotsheet.configure { sheet :User } } } it "updates the cell value" do visit hotsheet.sheets_path :users find(".cell", text: user.name).cli...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/support/utils.rb
spec/support/utils.rb
# frozen_string_literal: true def prepare(&) Hotsheet.instance_variable_set :@sheets, nil # reset memoized sheets yield end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/requests/hotsheet/home_controller_spec.rb
spec/requests/hotsheet/home_controller_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet::HomeController do describe "#error" do it "shows an error page" do get "/hotsheet/invalid/route" expect(response).to be_not_found expect(response.body).to include Hotsheet.t("error_not_found") end end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/requests/hotsheet/sheets_controller_spec.rb
spec/requests/hotsheet/sheets_controller_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet::SheetsController do fixtures :users let(:user) { users(:admin) } let(:config) { Hotsheet.configure { sheet(:User) { column :name } } } before { prepare { config } } describe "#index" do it "shows a spreadsheet with all value...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/controllers/application_controller.rb
spec/dummy/app/controllers/application_controller.rb
# frozen_string_literal: true class ApplicationController < ActionController::Base def index redirect_to "/hotsheet" end protected def current_user @current_user ||= User.first end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/models/tag.rb
spec/dummy/app/models/tag.rb
# frozen_string_literal: true class Tag < ApplicationRecord has_many :post_tags, dependent: :destroy has_many :posts, through: :post_tags validates :name, presence: true, length: { in: 1..20 } validates :color, presence: true, format: { with: /\A[0-9a-f]{6}\z/ } end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/models/post.rb
spec/dummy/app/models/post.rb
# frozen_string_literal: true class Post < ApplicationRecord belongs_to :user has_many :post_tags, dependent: :destroy has_many :tags, through: :post_tags validates :title, presence: true, length: { in: 2..50 } validates :body, presence: true, length: { in: 2..250 } end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/models/application_record.rb
spec/dummy/app/models/application_record.rb
# frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base if Rails::VERSION::MAJOR >= 7 primary_abstract_class else self.abstract_class = true end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/models/post_tag.rb
spec/dummy/app/models/post_tag.rb
# frozen_string_literal: true class PostTag < ApplicationRecord belongs_to :post belongs_to :tag end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/app/models/user.rb
spec/dummy/app/models/user.rb
# frozen_string_literal: true class User < ApplicationRecord has_many :posts, dependent: :destroy STATUS = { invisible: 0, do_not_disturb: 1, idle: 2, online: 3 }.freeze if Rails::VERSION::MAJOR >= 7 enum :status, STATUS, default: :invisible else enum status: STATUS, _default: :invisible # rubocop:di...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/db/seeds.rb
spec/dummy/db/seeds.rb
# frozen_string_literal: true require "faker" 10.times do handle = Faker::Internet.unique.username specifier: 1..20 User.create! name: Faker::Name.name, handle:, email: Faker::Internet.unique.email(name: handle), birthdate: Faker::Date.birthday, admin: F...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/db/schema.rb
spec/dummy/db/schema.rb
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/db/migrate/20250101010101_create_models.rb
spec/dummy/db/migrate/20250101010101_create_models.rb
# frozen_string_literal: true class CreateModels < ActiveRecord::Migration[6.1] def change create_users create_posts create_tags create_post_tags end private def create_users create_table :users do |t| t.string :name, null: false t.string :handle, null: false, index: { unique:...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/config/application.rb
spec/dummy/config/application.rb
# frozen_string_literal: true require "bundler/setup" require "logger" require "action_controller/railtie" require "active_record/railtie" require "active_support/railtie" require "rails" Bundler.require(*Rails.groups) class Dummy < Rails::Application config.load_defaults Rails::VERSION::STRING.to_f config.acti...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/config/environment.rb
spec/dummy/config/environment.rb
# frozen_string_literal: true require_relative "application" Rails.application.initialize!
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/config/puma.rb
spec/dummy/config/puma.rb
# frozen_string_literal: true cores = ENV.fetch "RAILS_MAX_THREADS", Concurrent.physical_processor_count env = ENV.fetch "RAILS_ENV", "development" environment env pidfile ENV.fetch "PIDFILE" if ENV.key? "PIDFILE" port ENV.fetch "PORT", 3000 threads cores, cores workers cores if env == "production" plugin :tmp_resta...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/config/routes.rb
spec/dummy/config/routes.rb
# frozen_string_literal: true Rails.application.routes.draw do mount Hotsheet::Engine, at: :hotsheet root "application#index" end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/dummy/config/initializers/hotsheet.rb
spec/dummy/config/initializers/hotsheet.rb
# frozen_string_literal: true Hotsheet.configure do sheet :Post, per: 10 do column :title column :body column :user_id column :created_at column :updated_at, editable: false end sheet :Tag sheet :User do column :name column :handle, editable: -> { false } column :email col...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/lib/hotsheet_spec.rb
spec/lib/hotsheet_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet do let(:config) { described_class.configure { sheet :User } } before do described_class.instance_variable_set :@sheets, nil config end it "configures hotsheet" do expect(config.sheets["users"].columns).not_to be_empty ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/lib/hotsheet/version_spec.rb
spec/lib/hotsheet/version_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe "Hotsheet::VERSION" do it "has a semantic version number" do expect(Hotsheet::VERSION).to match(/\A\d+\.\d+\.\d+\z/) end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/lib/hotsheet/column_spec.rb
spec/lib/hotsheet/column_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet::Column do let(:column) { described_class.new config } let(:config) { {} } it "is editable and visible by default" do expect(column.editable?).to be true expect(column.visible?).to be true end context "with config" do ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/lib/hotsheet/sheet_spec.rb
spec/lib/hotsheet/sheet_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Hotsheet::Sheet do let(:sheet) { described_class.new :User, config, &columns } let(:config) { {} } let(:columns) { ->(_) {} } it "includes the id by default" do expect(sheet.model).to eq User expect(sheet.columns.keys).to eq %w[id] ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/spec/lib/hotsheet/generators/install_generator_spec.rb
spec/lib/hotsheet/generators/install_generator_spec.rb
# frozen_string_literal: true require "spec_helper" require_relative "../../../../lib/generators/hotsheet/install_generator" RSpec.describe Hotsheet::Generators::InstallGenerator do let(:generator) { described_class.new [], [], destination_root: Rails.root.join("tmp") } before do FileUtils.rm_rf Rails.root.j...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet.rb
lib/hotsheet.rb
# frozen_string_literal: true require "hotsheet/version" require "hotsheet/engine" require "hotsheet/config" module Hotsheet autoload :Column, "#{__dir__}/hotsheet/column" autoload :Sheet, "#{__dir__}/hotsheet/sheet" class Error < StandardError; end class << self include Config attr_reader :config ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet/version.rb
lib/hotsheet/version.rb
# frozen_string_literal: true module Hotsheet VERSION = "0.2.2" end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet/config.rb
lib/hotsheet/config.rb
# frozen_string_literal: true module Hotsheet::Config def merge_config!(default, custom) config = default.transform_values { |value| value[:default] } custom.each do |key, value| unless default.key? key raise Hotsheet::Error, "Config must be one of #{default.keys}, got '#{key}'" end ...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet/sheet.rb
lib/hotsheet/sheet.rb
# frozen_string_literal: true class Hotsheet::Sheet include Hotsheet::Config attr_reader :config, :model CONFIG = { per: { allowed_classes: [Integer], default: 100 } }.freeze def initialize(name, config, &columns) @config = merge_config! CONFIG, config @model = name.to_s.constantize @colum...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet/engine.rb
lib/hotsheet/engine.rb
# frozen_string_literal: true class Hotsheet::Engine < Rails::Engine isolate_namespace Hotsheet initializer "hotsheet.assets" do |app| app.config.assets.paths << Hotsheet::Engine.root.join("app/assets") app.config.assets.precompile += %w[hotsheet.css hotsheet.js] end end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/hotsheet/column.rb
lib/hotsheet/column.rb
# frozen_string_literal: true class Hotsheet::Column include Hotsheet::Config attr_reader :config CONFIG = { editable: { allowed_classes: [FalseClass, Proc], default: true }, visible: { allowed_classes: [FalseClass, Proc], default: true } }.freeze def initialize(config) @config = merge_config!...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/generators/hotsheet/install_generator.rb
lib/generators/hotsheet/install_generator.rb
# frozen_string_literal: true require "rails/generators" module Hotsheet module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path "../templates", __dir__ def copy_initializer template "hotsheet.rb", "config/initializers/hotsheet.rb" end de...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/lib/generators/templates/hotsheet.rb
lib/generators/templates/hotsheet.rb
# frozen_string_literal: true # Configure the models to be used by Hotsheet. # See https://github.com/renuo/hotsheet/blob/main/README.md#usage. Hotsheet.configure do # Configure the visible and editable columns for each model. # The ID is included as the first column by default. # The number of rows displayed c...
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
renuo/hotsheet
https://github.com/renuo/hotsheet/blob/3855e67e071bdbab46653c03cb6e260a3ec1132e/config/routes.rb
config/routes.rb
# frozen_string_literal: true Hotsheet::Engine.routes.draw do root "home#show" scope ":sheet_name" do resources controller: :sheets, only: %i[index update], as: :sheets end match "*path", to: "home#error", via: :all end
ruby
MIT
3855e67e071bdbab46653c03cb6e260a3ec1132e
2026-01-04T17:56:47.791247Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/install.rb
install.rb
require "fileutils" include FileUtils::Verbose RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..")) unless defined?(RAILS_ROOT) mkdir_p File.join(RAILS_ROOT, "vendor", "sprockets") mkdir_p File.join(RAILS_ROOT, "app", "javascripts") touch File.join(RAILS_ROOT, "app", "javascripts", "ap...
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/init.rb
init.rb
require "sprockets" require "sprockets_helper" require "sprockets_application" class ActionController::Base helper :sprockets end
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/test/sprockets_test.rb
test/sprockets_test.rb
require 'test/unit' class SprocketsTest < Test::Unit::TestCase # Replace this with your real tests. test "the truth" do assert true end end
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/lib/sprockets_helper.rb
lib/sprockets_helper.rb
module SprocketsHelper def sprockets_include_tag javascript_include_tag("/sprockets.js") end end
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/lib/sprockets_controller.rb
lib/sprockets_controller.rb
class SprocketsController < ActionController::Base caches_page :show, :if => Proc.new { SprocketsApplication.use_page_caching } def show render :text => SprocketsApplication.source, :content_type => "text/javascript" end end
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
sstephenson/sprockets-rails
https://github.com/sstephenson/sprockets-rails/blob/8ddad4ce1a93db79187dfbcd06f3d5165568d8d1/lib/sprockets_application.rb
lib/sprockets_application.rb
module SprocketsApplication mattr_accessor :use_page_caching self.use_page_caching = true class << self def routes(map) map.resource(:sprockets) end def source concatenation.to_s end def install_script concatenation.save_to(asset_path) end def instal...
ruby
MIT
8ddad4ce1a93db79187dfbcd06f3d5165568d8d1
2026-01-04T17:56:50.420503Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/test/test__helper.rb
test/test__helper.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/test/test_degit.rb
test/test_degit.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/features/support/env.rb
features/support/env.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/features/step_definitions/steps.rb
features/step_definitions/steps.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/lib/degit.rb
lib/degit.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/lib/degit/version.rb
lib/degit/version.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/lib/degit/dashboard.rb
lib/degit/dashboard.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
cqfn/degit
https://github.com/cqfn/degit/blob/9da4f7d055b217ddb1faca63d5b32e51da694257/lib/degit/deploy.rb
lib/degit/deploy.rb
# frozen_string_literal: true # Copyright (c) 2020 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, co...
ruby
MIT
9da4f7d055b217ddb1faca63d5b32e51da694257
2026-01-04T17:56:53.276611Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/test/imported/test_helper.rb
test/imported/test_helper.rb
$:.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib')) require 'rubygems' if RUBY_VERSION < '1.9.0' && ENV['C_EXT'] require 'embedded-mongo' require 'test/unit' def silently warn_level = $VERBOSE $VERBOSE = nil result = yield $VERBOSE = warn_level result end begin require 'rubygems' if RUBY_VERS...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/test/imported/db_api_test.rb
test/imported/db_api_test.rb
require File.join(File.dirname(__FILE__), 'test_helper') class DBAPITest < Test::Unit::TestCase include Mongo include BSON @@conn = standard_connection @@db = @@conn.db(MONGO_TEST_DB) @@coll = @@db.collection('test') @@version = @@conn.server_version def setup @@coll.remove @r1 = {'a' => 1} ...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/test/functional/interface_test.rb
test/functional/interface_test.rb
require 'rubygems' require 'test/unit' require File.join(File.dirname(__FILE__), '../../lib/embedded-mongo') class InterfaceTest < Test::Unit::TestCase def setup # Tests should pass with either of the following lines @conn = EmbeddedMongo::Connection.new # @conn = Mongo::Connection.new @test_db = @...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo.rb
lib/embedded-mongo.rb
require 'logger' require 'rubygems' require 'mongo' $:.unshift(File.dirname(__FILE__)) module EmbeddedMongo def self.log unless @log @log = Logger.new(STDOUT) @log.level = Logger::WARN end @log end end require "embedded-mongo/version" require 'embedded-mongo/backend' require 'embedded-mon...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/collection.rb
lib/embedded-mongo/collection.rb
module EmbeddedMongo class Collection < Mongo::Collection def insert_documents(documents, collection_name=@name, check_keys=true, safe=false, opts={}) # TODO: do something with check_keys / safe EmbeddedMongo.log.debug("insert_documents: #{documents.inspect}, #{collection_name.inspect}, #{check_keys.i...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/version.rb
lib/embedded-mongo/version.rb
module EmbeddedMongo VERSION = "0.0.1" end
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/db.rb
lib/embedded-mongo/db.rb
module EmbeddedMongo class DB < Mongo::DB # verbatim def rename_collection(from, to) oh = BSON::OrderedHash.new oh[:renameCollection] = "#{@name}.#{from}" oh[:to] = "#{@name}.#{to}" doc = DB.new('admin', @connection).command(oh, :check_response => false) ok?(doc) || raise(MongoDB...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/cursor.rb
lib/embedded-mongo/cursor.rb
module EmbeddedMongo class Cursor < Mongo::Cursor def refresh send_initial_query end def send_initial_query if @query_run false else results = @connection.request(:find, @db.name, @collection.name, selector, :limit => @limit, :sort =...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/backend.rb
lib/embedded-mongo/backend.rb
module EmbeddedMongo module Backend @@backends = {} def self.connect_backend(spec) @@backends[spec] ||= Backend::Manager.new(spec) end end end
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/connection.rb
lib/embedded-mongo/connection.rb
module EmbeddedMongo class Connection < Mongo::Connection # mock methods def request(method, *args) @backend.send(method, *args) end def connect EmbeddedMongo.log.debug "Connecting to #{@host_to_try.inspect}" @backend = Backend.connect_backend(@host_to_try) end def send_mes...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/util.rb
lib/embedded-mongo/util.rb
module EmbeddedMongo module Util def self.stringify_hash!(hash) raise ArgumentError.new("Argument is not a hash: #{hash.inspect}") unless hash.kind_of?(Hash) stringify!(hash) end def self.deep_clone(obj) case obj when Hash clone = {} obj.each { |k, v| clone[deep_cl...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/backend/collection.rb
lib/embedded-mongo/backend/collection.rb
module EmbeddedMongo::Backend class Collection class DuplicateKeyError < StandardError; end def initialize(db, name) # TODO: system.namespaces @db = db @name = name @data = [] if name == 'system.namespaces' # mark as system? elsif name['.'] or name['$'] ra...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/backend/db.rb
lib/embedded-mongo/backend/db.rb
module EmbeddedMongo::Backend class DB attr_reader :collections, :name def initialize(manager, name) raise ArgumentError.new("Invalid collection name #{name.inspect}") if name['.'] or name['$'] @manager = manager @name = name @collections = {} set_last_error({}) end de...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
gdb/embedded-mongo
https://github.com/gdb/embedded-mongo/blob/db309362b9069796ceffdbb494f49e86dc26a7b2/lib/embedded-mongo/backend/manager.rb
lib/embedded-mongo/backend/manager.rb
module EmbeddedMongo::Backend class Manager def initialize(spec) @spec = spec @dbs = {} end def insert_documents(db_name, collection_name, documents) documents.each { |doc| EmbeddedMongo::Util.stringify_hash!(doc) } EmbeddedMongo.log.info("INSERT: #{db_name.inspect} #{collection_n...
ruby
MIT
db309362b9069796ceffdbb494f49e86dc26a7b2
2026-01-04T17:57:03.242146Z
false
pedro/heroku-mongo-sync
https://github.com/pedro/heroku-mongo-sync/blob/878899260c37a412b80e613f2b04f63ac3b3f5f4/init.rb
init.rb
$stderr.puts "the heroku-mongo-sync plugin has moved to a new owner" $stderr.puts "please refer to the fork at https://github.com/marcofognog/heroku-mongo-sync" require 'heroku/command/mongo'
ruby
MIT
878899260c37a412b80e613f2b04f63ac3b3f5f4
2026-01-04T17:57:04.256009Z
false
pedro/heroku-mongo-sync
https://github.com/pedro/heroku-mongo-sync/blob/878899260c37a412b80e613f2b04f63ac3b3f5f4/spec/mongo_spec.rb
spec/mongo_spec.rb
require 'rubygems' require 'mongo' require 'baconmocha' $: << File.dirname(__FILE__) + '/../lib' require 'heroku' require 'heroku/command' require 'heroku/command/mongo' describe Heroku::Command::Mongo do before do @mongo = Heroku::Command::Mongo.new ['--app', 'myapp'] @mongo.stubs(:app).returns('myapp') ...
ruby
MIT
878899260c37a412b80e613f2b04f63ac3b3f5f4
2026-01-04T17:57:04.256009Z
false
pedro/heroku-mongo-sync
https://github.com/pedro/heroku-mongo-sync/blob/878899260c37a412b80e613f2b04f63ac3b3f5f4/lib/heroku/command/mongo.rb
lib/heroku/command/mongo.rb
module Heroku::Command class Mongo < BaseWithApp def initialize(*args) super require 'mongo' rescue LoadError error "Install the Mongo gem to use mongo commands:\nsudo gem install mongo" end def push display "THIS WILL REPLACE ALL DATA for #{app} ON #{heroku_mongo_uri.host} W...
ruby
MIT
878899260c37a412b80e613f2b04f63ac3b3f5f4
2026-01-04T17:57:04.256009Z
false
indirect/middleman-heroku-static-app
https://github.com/indirect/middleman-heroku-static-app/blob/84b1b849021c62ee759d75fdc99845a697253ddd/config.rb
config.rb
activate :automatic_image_sizes activate :directory_indexes set :css_dir, 'stylesheets' set :js_dir, 'javascripts' set :images_dir, 'images' configure :build do activate :minify_css activate :minify_javascript activate :asset_hash end # silence i18n warning ::I18n.config.enforce_available_locales = false
ruby
MIT
84b1b849021c62ee759d75fdc99845a697253ddd
2026-01-04T17:57:06.631567Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/spec/spec_helper.rb
spec/spec_helper.rb
require 'rubygems' require 'bundler/setup' require 'vagrant-butcher'
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/spec/unit/vagrant_butcher_spec.rb
spec/unit/vagrant_butcher_spec.rb
require 'spec_helper.rb' describe Vagrant::Butcher::Plugin do end
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/spec/unit/vagrant_butcher/config_spec.rb
spec/unit/vagrant_butcher/config_spec.rb
require 'spec_helper.rb' describe Vagrant::Butcher::Config do subject { described_class.new } it "permits the user to (en|dis)able the plugin" do expect(subject).to respond_to(:enabled=) end it "has the option to set guest chef client pem path" do expect(subject).to respond_to(:guest_key_path=) end...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher.rb
lib/vagrant-butcher.rb
begin require "vagrant" rescue LoadError raise "This plugin must run within Vagrant." end require 'vagrant-butcher/version' require 'vagrant-butcher/errors' # Work around logger spam from hashie # https://github.com/intridea/hashie/issues/394 begin require "hashie" require "hashie/logger" # We cannot `disabl...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/version.rb
lib/vagrant-butcher/version.rb
module Vagrant module Butcher VERSION = "2.3.2.pre" end end
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/errors.rb
lib/vagrant-butcher/errors.rb
require 'vagrant/errors' module Vagrant module Butcher module Errors class KeyCopyFailure < ::Vagrant::Errors::VagrantError end class NoSyncedFolder < ::Vagrant::Errors::VagrantError end end end end
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/plugin.rb
lib/vagrant-butcher/plugin.rb
module Vagrant module Butcher class Plugin < Vagrant.plugin('2') name "vagrant-butcher" description <<-DESC Delete node and client from the Chef server when destroying the VM. DESC class << self def provision(hook) # This should be at the end so that it can copy th...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/helpers.rb
lib/vagrant-butcher/helpers.rb
module Vagrant module Butcher module Helpers autoload :Config, 'vagrant-butcher/helpers/config' autoload :Action, 'vagrant-butcher/helpers/action' autoload :KeyFiles, 'vagrant-butcher/helpers/key_files' autoload :Connection, 'vagrant-butcher/helpers/connection' autoload :Gu...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/config.rb
lib/vagrant-butcher/config.rb
module Vagrant module Butcher class Config < ::Vagrant.plugin('2', :config) include Helpers::Guest attr_accessor :enabled attr_accessor :guest_key_path attr_reader :cache_dir attr_accessor :verify_ssl attr_accessor :retries attr_accessor :retry_interval attr_acce...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/action.rb
lib/vagrant-butcher/action.rb
module Vagrant module Butcher module Action autoload :Cleanup, 'vagrant-butcher/action/cleanup' autoload :CopyGuestKey, 'vagrant-butcher/action/copy_guest_key' def self.cleanup ::Vagrant::Action::Builder.new.tap do |b| b.use Vagrant::Butcher::Action::Cleanup end ...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/helpers/connection.rb
lib/vagrant-butcher/helpers/connection.rb
require 'ridley' # Silence celluloid warnings and errors: https://github.com/RiotGames/ridley/issues/220 ::Ridley::Logging.logger.level = Logger.const_get 'FATAL' module Vagrant module Butcher module Helpers module Connection include ::Vagrant::Butcher::Helpers::KeyFiles def setup_connect...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/helpers/guest.rb
lib/vagrant-butcher/helpers/guest.rb
module Vagrant module Butcher module Helpers module Guest def windows?(env) machine(env).guest.capability_host_chain.last.first == :windows end def get_guest_key_path(env) return butcher_config(env).guest_key_path unless butcher_config(env).guest_key_path == :DE...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false
c10l/vagrant-butcher
https://github.com/c10l/vagrant-butcher/blob/169cc1d9deeadae3ffc450d454aa065100617e5d/lib/vagrant-butcher/helpers/config.rb
lib/vagrant-butcher/helpers/config.rb
module Vagrant module Butcher module Helpers module Config def vm_config(env) @vm_config ||= machine(env).config.vm end def butcher_config(env) @butcher_config ||= machine(env).config.butcher end def chef_provisioner(env) @chef_provisi...
ruby
MIT
169cc1d9deeadae3ffc450d454aa065100617e5d
2026-01-04T17:57:07.755956Z
false