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
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/config/loader.rb
lib/active_record_doctor/config/loader.rb
# frozen_string_literal: true module ActiveRecordDoctor # :nodoc: class << self # The config file that's currently being processed by .load_config. attr_reader :current_config # This method is part of the public API that is intended for use by # active_record_doctor users. The remaining methods are ...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/missing_foreign_keys.rb
lib/active_record_doctor/detectors/missing_foreign_keys.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class MissingForeignKeys < Base # :nodoc: @description = "detect foreign-key-like columns lacking an actual foreign key constraint" @config = { ignore_models: { de...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/table_without_primary_key.rb
lib/active_record_doctor/detectors/table_without_primary_key.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class TableWithoutPrimaryKey < Base # :nodoc: @description = "detect tables without primary keys" @config = { ignore_tables: { description: "tables whose primary k...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/undefined_table_references.rb
lib/active_record_doctor/detectors/undefined_table_references.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class UndefinedTableReferences < Base # :nodoc: @description = "detect models referencing undefined tables or views" @config = { ignore_models: { description: "mod...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/unindexed_foreign_keys.rb
lib/active_record_doctor/detectors/unindexed_foreign_keys.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class UnindexedForeignKeys < Base # :nodoc: @description = "detect unindexed foreign keys" @config = { ignore_tables: { description: "tables whose foreign keys sho...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/incorrect_length_validation.rb
lib/active_record_doctor/detectors/incorrect_length_validation.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class IncorrectLengthValidation < Base # :nodoc: @description = "detect mismatches between database length limits and model length validations" @config = { ignore_models: { ...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/base.rb
lib/active_record_doctor/detectors/base.rb
# frozen_string_literal: true module ActiveRecordDoctor module Detectors # Base class for all active_record_doctor detectors. class Base BASE_CONFIG = { enabled: { description: "set to false to disable the detector altogether" } }.freeze class << self attr...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/missing_presence_validation.rb
lib/active_record_doctor/detectors/missing_presence_validation.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class MissingPresenceValidation < Base # :nodoc: @description = "detect non-NULL columns without a corresponding presence validator" @config = { ignore_models: { d...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/missing_non_null_constraint.rb
lib/active_record_doctor/detectors/missing_non_null_constraint.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class MissingNonNullConstraint < Base # :nodoc: @description = "detect columns whose presence is always validated but isn't enforced via a non-NULL constraint" @config = { i...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/missing_unique_indexes.rb
lib/active_record_doctor/detectors/missing_unique_indexes.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class MissingUniqueIndexes < Base # :nodoc: @description = "detect uniqueness validators not backed by a database constraint" @config = { ignore_models: { descript...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/table_without_timestamps.rb
lib/active_record_doctor/detectors/table_without_timestamps.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class TableWithoutTimestamps < Base # :nodoc: @description = "detect tables without created_at/updated_at columns" @config = { ignore_tables: { description: "table...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/incorrect_boolean_presence_validation.rb
lib/active_record_doctor/detectors/incorrect_boolean_presence_validation.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class IncorrectBooleanPresenceValidation < Base # :nodoc: @description = "detect presence (instead of inclusion) validators on boolean columns" @config = { ignore_models: { ...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/extraneous_indexes.rb
lib/active_record_doctor/detectors/extraneous_indexes.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class ExtraneousIndexes < Base # :nodoc: @description = "identify indexes that can be dropped without degrading performance" @config = { ignore_tables: { descripti...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/unindexed_deleted_at.rb
lib/active_record_doctor/detectors/unindexed_deleted_at.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class UnindexedDeletedAt < Base # :nodoc: @description = "detect indexes that exclude deletion timestamp columns" @config = { ignore_tables: { description: "tables...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/short_primary_key_type.rb
lib/active_record_doctor/detectors/short_primary_key_type.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class ShortPrimaryKeyType < Base # :nodoc: @description = "detect primary keys with short integer types" @config = { ignore_tables: { description: "tables whose pr...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/mismatched_foreign_key_type.rb
lib/active_record_doctor/detectors/mismatched_foreign_key_type.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class MismatchedForeignKeyType < Base # :nodoc: @description = "detect foreign key type mismatches" @config = { ignore_tables: { description: "tables whose foreign...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/active_record_doctor/detectors/incorrect_dependent_option.rb
lib/active_record_doctor/detectors/incorrect_dependent_option.rb
# frozen_string_literal: true require "active_record_doctor/detectors/base" module ActiveRecordDoctor module Detectors class IncorrectDependentOption < Base # :nodoc: @description = "detect associations with incorrect dependent options" @config = { ignore_models: { description: "mo...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
gregnavis/active_record_doctor
https://github.com/gregnavis/active_record_doctor/blob/69ed244d4eeefff4c446149f5a78fa856fba7791/lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb
lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb
# frozen_string_literal: true module ActiveRecordDoctor # Generate migrations that add missing indexes to the database. class AddIndexesGenerator < Rails::Generators::Base desc "Generate migrations for the specified indexes" argument :path, type: :string, default: nil, banner: "PATH" def create_migrat...
ruby
MIT
69ed244d4eeefff4c446149f5a78fa856fba7791
2026-01-04T15:59:53.827607Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/migrate-icons.rb
scripts/migrate-icons.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Script to migrate existing icons to community registry structure # Run from repository root: ruby scripts/migrate-icons.rb require 'json' require 'fileutils' # Load ICONS_CONFIG require_relative '../Library/Icons' REPO_ROOT = File.expand_path('..', __dir__) ICONS_...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/create-community-icon.rb
scripts/create-community-icon.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Script to create a new community icon with proper structure # Usage: ruby scripts/create-community-icon.rb [icon.icns] require 'json' require 'fileutils' REPO_ROOT = File.expand_path('..', __dir__) COMMUNITY_DIR = File.join(REPO_ROOT, 'community') ICONS_DIR = File....
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/validate-icons.rb
scripts/validate-icons.rb
#!/usr/bin/env ruby # frozen_string_literal: true require 'digest' require 'pathname' require_relative '../Library/Icons' # Validation script for icon files and their SHA256 checksums class IconValidator ICONS_DIR = Pathname.new(__dir__).parent / 'icons' EXCLUDED_FILES = ['.DS_Store'].freeze def initialize ...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/generate-icon-previews.rb
scripts/generate-icon-previews.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Script to generate icon previews and update community/icons/README.md # Usage: ruby scripts/generate-icon-previews.rb # # This script: # 1. Generates preview.png (128x128) from icon.icns for standard icons # 2. For Tahoe icons with icon.icon, generates preview-light/...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/create-community-patch.rb
scripts/create-community-patch.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Script to create a new community patch with proper structure # Usage: ruby scripts/create-community-patch.rb require 'json' require 'fileutils' REPO_ROOT = File.expand_path('..', __dir__) COMMUNITY_DIR = File.join(REPO_ROOT, 'community') PATCHES_DIR = File.join(COM...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/scripts/validate-registry.rb
scripts/validate-registry.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Script to validate the community registry and all referenced files # Usage: ruby scripts/validate-registry.rb # Exit codes: 0 = valid, 1 = errors found require 'json' REPO_ROOT = File.expand_path('..', __dir__) COMMUNITY_DIR = File.join(REPO_ROOT, 'community') REGI...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/tests/test_applescript_escaping.rb
tests/test_applescript_escaping.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Test suite for AppleScript escaping logic used in Emacs Client.app # # Run with: ruby tests/test_applescript_escaping.rb # Or run all tests: ruby tests/test_applescript_escaping.rb require 'minitest/autorun' require 'tempfile' require 'open3' # Extract the escaping...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/tests/test_format_maintainer.rb
tests/test_format_maintainer.rb
#!/usr/bin/env ruby # frozen_string_literal: true # Test suite for format_maintainer helper in EmacsBase # # Run with: ruby tests/test_format_maintainer.rb require 'minitest/autorun' # Extract the formatting method for testing without loading Homebrew dependencies module MaintainerFormatting # Format maintainer fo...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@26.rb
Formula/emacs-plus@26.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT26 < EmacsBase init 26 url "https://ftpmirror.gnu.org/emacs/emacs-26.3.tar.xz" mirror "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz" sha256 "4d90e6751ad8967822c6e092db07466b9d383ef1653feb2f95c93e7de66d3485" desc "GNU Emacs text editor" homepage "...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@28.rb
Formula/emacs-plus@28.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT28 < EmacsBase init 28 url "https://ftpmirror.gnu.org/emacs/emacs-28.2.tar.xz" mirror "https://ftp.gnu.org/gnu/emacs/emacs-28.2.tar.xz" sha256 "ee21182233ef3232dc97b486af2d86e14042dbb65bbc535df562c3a858232488" desc "GNU Emacs text editor" homepage "...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@30.rb
Formula/emacs-plus@30.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT30 < EmacsBase init 30 url "https://ftpmirror.gnu.org/emacs/emacs-30.2.tar.xz" mirror "https://ftp.gnu.org/gnu/emacs/emacs-30.2.tar.xz" sha256 "b3f36f18a6dd2715713370166257de2fae01f9d38cfe878ced9b1e6ded5befd9" desc "GNU Emacs text editor" homepage "...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@27.rb
Formula/emacs-plus@27.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT27 < EmacsBase init 27 url "https://ftpmirror.gnu.org/emacs/emacs-27.2.tar.xz" mirror "https://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.xz" sha256 "b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9" desc "GNU Emacs text editor" homepage "...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@31.rb
Formula/emacs-plus@31.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT31 < EmacsBase init 31 version "31.0.50" desc "GNU Emacs text editor" homepage "https://www.gnu.org/software/emacs/" # # Options # # Opt-out option "without-cocoa", "Build a non-Cocoa version of Emacs" # Opt-in option "with-x11", "Exper...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Formula/emacs-plus@29.rb
Formula/emacs-plus@29.rb
require_relative "../Library/EmacsBase" class EmacsPlusAT29 < EmacsBase init 29 url "https://ftpmirror.gnu.org/emacs/emacs-29.4.tar.xz" mirror "https://ftp.gnu.org/gnu/emacs/emacs-29.4.tar.xz" sha256 "ba897946f94c36600a7e7bb3501d27aa4112d791bfe1445c61ed28550daca235" desc "GNU Emacs text editor" homepage "...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/UrlResolver.rb
Library/UrlResolver.rb
TAP_OWNER = "d12frosted" TAP_REPO = "emacs-plus" class UrlResolver def initialize(version, mode) name = "#{TAP_REPO}@#{version}" tap = Tap.fetch(TAP_OWNER, TAP_REPO) @version = version @formula_root = mode == "local" || !tap.installed? ? Dir.pwd : (tap.path.to_s.delete_suffix "/...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/Icons.rb
Library/Icons.rb
ICONS_CONFIG = { "EmacsIcon1" => "22f842a20d4b325c1934497045a5b1bae583ccf557db481a3b84b3c7ddad0dae", "EmacsIcon2" => "deef69972fc3677aab19f01cfb1f5238f2d5a3476a285c86a37061e1b162a654", "EmacsIcon3" => "b8559291d7062b120e92c32f60f08dbba270383b3f22beeeafef0e3af806ce75", "EmacsIcon4" => "238df087f3075c5b48f6170799...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/BuildConfig.rb
Library/BuildConfig.rb
# frozen_string_literal: true # Shared module for parsing build.yml and resolving icons/patches from the community registry. # Used by both the formula (EmacsBase) and cask (postflight). require 'yaml' require 'json' require 'etc' module BuildConfig class << self def tap_path @tap_path ||= File.expand_pa...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/IconApplier.rb
Library/IconApplier.rb
# frozen_string_literal: true # Shared module for applying icons to Emacs.app and Emacs Client.app. # Used by both the formula (post_install) and cask (postflight). require 'fileutils' require_relative 'BuildConfig' module IconApplier class << self # Apply icon from build.yml to the given app paths # @para...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/EmacsBase.rb
Library/EmacsBase.rb
require_relative "UrlResolver" require_relative "Icons" class CopyDownloadStrategy < AbstractFileDownloadStrategy def initialize(url, name, version, **meta) @cached_location = Pathname.new url end end class EmacsBase < Formula def self.init version @@urlResolver = UrlResolver.new(version, ENV["HOMEBREW_...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Library/PathInjector.rb
Library/PathInjector.rb
# frozen_string_literal: true # PathInjector - Inject environment variables into Emacs.app for cask installations # # This module sets LSEnvironment in Info.plist to ensure Homebrew's tools are # available when Emacs is launched from Finder/Dock. This is necessary for # native compilation (libgccjit) to find gcc and i...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Casks/emacs-plus@30.rb
Casks/emacs-plus@30.rb
cask "emacs-plus@30" do # Version format: <emacs-version>-<build-number> # Build number corresponds to GitHub Actions run number version "30.2.50-31" # Base URL for release assets (versioned releases: cask-30-<build>) base_url = "https://github.com/d12frosted/homebrew-emacs-plus/releases/download/cask-30-#{v...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
d12frosted/homebrew-emacs-plus
https://github.com/d12frosted/homebrew-emacs-plus/blob/8cc213add8a9afeb6df99fee12ae2b6add09cb98/Casks/emacs-plus@31.rb
Casks/emacs-plus@31.rb
cask "emacs-plus@31" do # Version format: <emacs-version>-<build-number> # Build number corresponds to GitHub Actions run number version "31.0.50-29" # Base URL for release assets (versioned releases: cask-31-<build>) base_url = "https://github.com/d12frosted/homebrew-emacs-plus/releases/download/cask-31-#{v...
ruby
MIT
8cc213add8a9afeb6df99fee12ae2b6add09cb98
2026-01-04T15:53:05.798166Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/spec_helper.rb
spec/spec_helper.rb
require 'serverspec' set :backend, :exec
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/directories_spec.rb
spec/localhost/directories_spec.rb
require 'spec_helper' describe file('/opt/boxen/repo') do it { should be_directory } end describe 'Boxen managed configuration files' do describe file('/usr/local/etc/boxen') do it { should be_directory } end end
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/hub_spec.rb
spec/localhost/hub_spec.rb
require 'spec_helper' describe package('hub') do it { should be_installed } end
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/git_spec.rb
spec/localhost/git_spec.rb
require 'spec_helper' describe package('git') do it { should be_installed } end
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/cli_spec.rb
spec/localhost/cli_spec.rb
require 'spec_helper' # describe 'script/nuke' do # describe command('/opt/boxen/repo/script/nuke --help') do # its(:stdout) { should include '--all' } # its(:stdout) { should include '--force' } # its(:stdout) { should include '--opt' } # its(:stdout) { should include '--services' } # its(:stdou...
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/packages_spec.rb
spec/localhost/packages_spec.rb
require 'spec_helper' %w(ack findutils gnu-tar).each do |package_name| describe package(package_name) do it { should be_installed } end end
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/services/dnsmasq_spec.rb
spec/localhost/services/dnsmasq_spec.rb
require 'spec_helper' describe 'dnsmasq' do describe file('/usr/local/etc/boxen/dnsmasq') do it { should be_directory } end describe file('/usr/local/etc/boxen/dnsmasq/dnsmasq.conf') do it { should be_file } end describe file('/opt/boxen/data/dnsmasq') do it { should be_directory } end des...
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/spec/localhost/services/nginx_spec.rb
spec/localhost/services/nginx_spec.rb
require 'spec_helper' describe 'nginx' do describe file('/usr/local/etc/boxen/nginx') do it { should be_directory } end describe file('/usr/local/etc/boxen/nginx/sites') do it { should be_directory } end describe file('/usr/local/etc/boxen/nginx/public') do it { should be_directory } end d...
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/config/boxen.rb
config/boxen.rb
# This file will be loaded by config/basic early in a Boxen run. Use # it to provide any custom code or behavior your Boxen setup requires. # Change the prefix boxen is installed to. # ENV['BOXEN_HOME'] = '/opt/boxen' # Change the repo boxen will use. # ENV['BOXEN_REPO_NAME'] = 'boxen/our-boxen' # Boxen binary packa...
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
boxen/our-boxen
https://github.com/boxen/our-boxen/blob/d277dd3dfcffd1024d3165bfd52e39542b3fc2e5/config/basic.rb
config/basic.rb
# Set up the execution environment. Load this file before trying to do # anything else. This file assumes that the repo's been bootstrapped. require "pathname" # Make sure we're in the repo's root directory. Dir.chdir Pathname.new(__FILE__).realpath + "../.." # Load custom config. load File.expand_path "../boxen.r...
ruby
MIT
d277dd3dfcffd1024d3165bfd52e39542b3fc2e5
2026-01-04T15:54:29.249304Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/environments_list_spec.rb
spec/environments_list_spec.rb
describe Wordmove::EnvironmentsList do let(:instance) { described_class.new(options) } let(:options) { {} } describe ".print" do subject { described_class.print(options) } it "create new instance and call its #print" do expect_any_instance_of(described_class).to receive(:print).once subject ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/movefile_spec.rb
spec/movefile_spec.rb
describe Wordmove::Movefile do let(:movefile) { described_class.new } context ".initialize" do it "instantiate a logger instance" do expect(movefile.logger).to be_an_instance_of(Wordmove::Logger) end end context ".load_env" do TMPDIR = "/tmp/wordmove".freeze let(:path) { File.join(TMPDI...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/cli_spec.rb
spec/cli_spec.rb
require 'spec_helper' describe Wordmove::CLI do let(:cli) { described_class.new } let(:deployer) { double("deployer") } let(:options) { {} } before do allow(Wordmove::Deployer::Base).to receive(:deployer_for).with(options).and_return(deployer) end context "#init" do it "delagates the command to t...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/docotor_spec.rb
spec/docotor_spec.rb
describe Wordmove::Doctor do context "#start" do it "calls all movefile doctors" do movefile_doctor = double(:movefile_doctor) allow(Wordmove::Doctor::Movefile).to receive(:new).and_return(movefile_doctor) expect(movefile_doctor).to receive(:validate!).exactly(1).times mysql_doctor = doub...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/hook_spec.rb
spec/hook_spec.rb
require 'spec_helper' require 'tmpdir' describe Wordmove::Hook do let(:common_options) { { "wordpress" => true, "config" => movefile_path_for('with_hooks') } } let(:cli) { Wordmove::CLI.new } context 'testing comand order' do let(:options) { common_options.merge("environment" => 'ssh_with_hooks') } bef...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/spec_helper.rb
spec/spec_helper.rb
$LOAD_PATH.unshift File.expand_path('../lib', __dir__) require "tempfile" require "pry-byebug" require "priscilla" require "simplecov" SimpleCov.start do add_filter "/spec/" end require "wordmove" Dir[File.expand_path("support/**/*.rb", __dir__)].sort.each { |f| require f } # I don't know from where this method ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/support/fixture_helpers.rb
spec/support/fixture_helpers.rb
module FixtureHelpers def fixture_folder_path File.join(__dir__, '..', 'fixtures') end def fixture_folder_root_relative_path File.join('spec', 'fixtures') end def fixture_path_for(filename) File.join(__dir__, '..', 'fixtures', filename) end def fixture_root_relative_path_for(filename) F...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/logger/logger_spec.rb
spec/logger/logger_spec.rb
describe Wordmove::Logger do context "#info" do context "having some string to filter" do let(:logger) { described_class.new(STDOUT, ['hidden']) } it "will hide the passed strings" do expect { logger.info('What I write is hidden') } .to output(/What I write is \[secret\]/) ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/doctor/mysql_spec.rb
spec/doctor/mysql_spec.rb
describe Wordmove::Doctor::Mysql do let(:movefile_name) { 'multi_environments' } let(:movefile_dir) { "spec/fixtures/movefiles" } let(:doctor) { described_class.new(movefile_name, movefile_dir) } context ".new" do it "implements #check! method" do expect_any_instance_of(described_class).to receive(:c...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/doctor/wpcli_spec.rb
spec/doctor/wpcli_spec.rb
describe Wordmove::Doctor::Wpcli do let(:doctor) { described_class.new } context ".new" do it "implements #check! method" do expect_any_instance_of(described_class).to receive(:check!) silence_stream(STDOUT) { doctor.check! } end end end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/doctor/movefile_spec.rb
spec/doctor/movefile_spec.rb
describe Wordmove::Doctor::Movefile do let(:movefile_name) { 'multi_environments' } let(:movefile_dir) { "spec/fixtures/movefiles" } let(:doctor) { Wordmove::Doctor::Movefile.new(movefile_name, movefile_dir) } context ".new" do it "create an Hash representing the Movefile content" do expect(doctor.co...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/doctor/ssh_spec.rb
spec/doctor/ssh_spec.rb
describe Wordmove::Doctor::Ssh do let(:doctor) { described_class.new } context ".new" do it "implements #check! method" do expect_any_instance_of(described_class).to receive(:check!) silence_stream(STDOUT) { doctor.check! } end end end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/doctor/rsync_spec.rb
spec/doctor/rsync_spec.rb
describe Wordmove::Doctor::Rsync do let(:doctor) { described_class.new } context ".new" do it "implements #check! method" do expect_any_instance_of(described_class).to receive(:check!) silence_stream(STDOUT) { doctor.check! } end end end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/features/movefile_spec.rb
spec/features/movefile_spec.rb
describe Wordmove::Generators::Movefile do let(:movefile) { 'movefile.yml' } let(:tmpdir) { "/tmp/wordmove" } before do @pwd = Dir.pwd FileUtils.mkdir(tmpdir) Dir.chdir(tmpdir) end after do Dir.chdir(@pwd) FileUtils.rm_rf(tmpdir) end context "::start" do before do silence_...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/deployer/base_spec.rb
spec/deployer/base_spec.rb
describe Wordmove::Deployer::Base do let(:options) do { config: movefile_path_for("multi_environments") } end context ".deployer_for" do context "with more then one environment, but none chosen" do it "raises an exception" do expect { described_class.deployer_for(options) } .to rai...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/sql_adapter/wpcli_spec.rb
spec/sql_adapter/wpcli_spec.rb
require 'spec_helper' describe Wordmove::SqlAdapter::Wpcli do let(:config_key) { :vhost } let(:source_config) { { vhost: 'sausage' } } let(:dest_config) { { vhost: 'bacon' } } let(:local_path) { '/path/to/ham' } let(:adapter) do Wordmove::SqlAdapter::Wpcli.new( source_config, dest_config, ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/spec/sql_adapter/default_spec.rb
spec/sql_adapter/default_spec.rb
describe Wordmove::SqlAdapter::Default do let(:sql_path) { double } let(:source_config) { double } let(:dest_config) { double } let(:adapter) do Wordmove::SqlAdapter::Default.new( sql_path, source_config, dest_config ) end context ".initialize" do it "should assign variables c...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove.rb
lib/wordmove.rb
require 'English' require 'active_support' require 'active_support/core_ext' require 'colorize' require 'dotenv' require 'erb' require 'kwalify' require 'logger' require 'open-uri' require 'ostruct' require 'thor' require 'thor/group' require 'yaml' require 'photocopier' require 'wordmove/cli' require 'wordmove/doct...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/version.rb
lib/wordmove/version.rb
module Wordmove VERSION = "5.2.2".freeze end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/exceptions.rb
lib/wordmove/exceptions.rb
module Wordmove class UndefinedEnvironment < StandardError; end class NoAdapterFound < StandardError; end class MovefileNotFound < StandardError; end class ShellCommandError < StandardError; end class ImplementInSubclassError < StandardError; end class UnmetPeerDependencyError < StandardError; end class R...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/guardian.rb
lib/wordmove/guardian.rb
module Wordmove class Guardian attr_reader :movefile, :environment, :action, :logger def initialize(options: nil, action: nil) @movefile = Wordmove::Movefile.new(options[:config]) @environment = @movefile.environment(options).to_sym @action = action @logger = Logger.new(STDOUT).tap { ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor.rb
lib/wordmove/doctor.rb
module Wordmove class Doctor def self.start banner movefile mysql wpcli rsync ssh end def self.movefile movefile_doctor = Wordmove::Doctor::Movefile.new movefile_doctor.validate! end def self.mysql mysql_doctor = Wordmove::Doctor::Mysql.new ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/wordpress_directory.rb
lib/wordmove/wordpress_directory.rb
require 'wordmove/wordpress_directory/path' class WordpressDirectory attr_accessor :type, :options def initialize(type, options) @type = type @options = options end DEFAULT_PATHS = { Path::WP_CONTENT => 'wp-content', Path::WP_CONFIG => 'wp-config.php', Path::PLUGINS => 'wp-content/plugins...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/logger.rb
lib/wordmove/logger.rb
module Wordmove class Logger < ::Logger MAX_LINE = 70 def initialize(device, strings_to_hide = []) super(device, formatter: proc { |_severity, _datetime, _progname, message| formatted_message = if strings_to_hide.empty? message else ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/environments_list.rb
lib/wordmove/environments_list.rb
module Wordmove class EnvironmentsList attr_reader :movefile, :logger, :remote_vhosts, :local_vhost class << self def print(cli_options) new(cli_options).print end end def initialize(options) @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } @movefile = ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/cli.rb
lib/wordmove/cli.rb
module Wordmove class CLI < Thor map %w[--version -v] => :__print_version desc "--version, -v", "Print the version" def __print_version puts Wordmove::VERSION end desc "init", "Generates a brand new movefile.yml" def init Wordmove::Generators::Movefile.start end desc "do...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/hook.rb
lib/wordmove/hook.rb
module Wordmove class Hook def self.logger Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG } end # rubocop:disable Metrics/MethodLength def self.run(action, step, cli_options) movefile = Wordmove::Movefile.new(cli_options[:config]) options = movefile.fetch(false) environm...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/movefile.rb
lib/wordmove/movefile.rb
module Wordmove class Movefile attr_reader :logger, :name, :start_dir def initialize(name = nil, start_dir = current_dir) @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG } @name = name @start_dir = start_dir end def fetch(verbose = true) entries = if name.nil? ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/wordpress_directory/path.rb
lib/wordmove/wordpress_directory/path.rb
class WordpressDirectory module Path WP_CONTENT = :wp_content WP_CONFIG = :wp_config PLUGINS = :plugins MU_PLUGINS = :mu_plugins THEMES = :themes UPLOADS = :uploads LANGUAGES = :languages end end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor/mysql.rb
lib/wordmove/doctor/mysql.rb
module Wordmove class Doctor class Mysql attr_reader :config, :logger def initialize(movefile_name = nil, movefile_dir = '.') @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } begin @config = Wordmove::Movefile.new(movefile_name, movefile_dir).fetch[:local][:da...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor/wpcli.rb
lib/wordmove/doctor/wpcli.rb
module Wordmove class Doctor class Wpcli attr_reader :logger def initialize @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } end def check! logger.task "Checking local wp-cli installation" if in_path? logger.success "wp-cli is correctly i...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor/rsync.rb
lib/wordmove/doctor/rsync.rb
module Wordmove class Doctor class Rsync attr_reader :logger def initialize @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } end def check! logger.task "Checking rsync" if (version = /\d\.\d.\d/.match(`rsync --version | head -n1`)[0]) log...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor/ssh.rb
lib/wordmove/doctor/ssh.rb
module Wordmove class Doctor class Ssh attr_reader :logger def initialize @logger = Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } end def check! logger.task "Checking SSH client" if system('which ssh', out: File::NULL, err: File::NULL) logger.su...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/doctor/movefile.rb
lib/wordmove/doctor/movefile.rb
module Wordmove class Doctor class Movefile MANDATORY_SECTIONS = %i[global local].freeze attr_reader :movefile, :contents, :root_keys def initialize(name = nil, dir = '.') @movefile = Wordmove::Movefile.new(name, dir) begin @contents = movefile.fetch @root_k...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/generators/movefile_adapter.rb
lib/wordmove/generators/movefile_adapter.rb
module Wordmove module Generators module MovefileAdapter def wordpress_path File.expand_path(Dir.pwd) end def database DBConfigReader.config end end class DBConfigReader def self.config new.config end def config OpenStruct.new(da...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/generators/movefile.rb
lib/wordmove/generators/movefile.rb
module Wordmove module Generators class Movefile < Thor::Group include Thor::Actions include MovefileAdapter def self.source_root File.dirname(__FILE__) end def copy_movefile template "movefile.yml" end end end end
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/deployer/ssh.rb
lib/wordmove/deployer/ssh.rb
require 'pathname' module Wordmove module Deployer class SSH < Base attr_reader :local_dump_path, :local_backup_path, :local_gzipped_dump_path, :local_gzipped_backup_path def initialize(environment, options) super(environment, options) ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/deployer/base.rb
lib/wordmove/deployer/base.rb
module Wordmove module Deployer class Base attr_reader :options attr_reader :logger attr_reader :environment class << self def deployer_for(cli_options) movefile = Wordmove::Movefile.new(cli_options[:config]) movefile.load_dotenv(cli_options) options...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/deployer/ftp.rb
lib/wordmove/deployer/ftp.rb
module Wordmove module Deployer class FTP < Base def initialize(environment, options) super(environment, options) ftp_options = remote_options[:ftp] @copier = Photocopier::FTP.new(ftp_options).tap { |c| c.logger = logger } end def push_db super return tr...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/deployer/ssh/default_sql_adapter.rb
lib/wordmove/deployer/ssh/default_sql_adapter.rb
module Wordmove module Deployer module Ssh class DefaultSqlAdapter < SSH private def backup_remote_db! download_remote_db(local_gzipped_backup_path) end def adapt_local_db! save_local_db(local_dump_path) adapt_sql(local_dump_path, local_options...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb
lib/wordmove/deployer/ssh/wpcli_sql_adapter.rb
module Wordmove module Deployer module Ssh class WpcliSqlAdapter < SSH def backup_remote_db! download_remote_db(local_gzipped_backup_path) end def adapt_local_db! save_local_db(local_dump_path) run wpcli_search_replace(local_options, remote_options, :vh...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/sql_adapter/wpcli.rb
lib/wordmove/sql_adapter/wpcli.rb
module Wordmove module SqlAdapter class Wpcli attr_accessor :sql_content attr_reader :from, :to, :local_path def initialize(source_config, dest_config, config_key, local_path) @from = source_config[config_key] @to = dest_config[config_key] @local_path = local_path ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
welaika/wordmove
https://github.com/welaika/wordmove/blob/bc9bce6ded43b01dfd44230c4a8e51b4a016ce33/lib/wordmove/sql_adapter/default.rb
lib/wordmove/sql_adapter/default.rb
module Wordmove module SqlAdapter class Default attr_writer :sql_content attr_reader :sql_path, :source_config, :dest_config def initialize(sql_path, source_config, dest_config) @sql_path = sql_path @source_config = source_config @dest_config = dest_config end ...
ruby
MIT
bc9bce6ded43b01dfd44230c4a8e51b4a016ce33
2026-01-04T16:00:15.173838Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/chewy_spec.rb
spec/chewy_spec.rb
require 'spec_helper' describe Chewy do it 'should have a version number' do expect(Chewy::VERSION).not_to be nil end describe '.derive_name' do before do stub_const('SomeIndex', Class.new) stub_index(:developers) stub_index('namespace/autocomplete') end specify do exp...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/spec_helper.rb
spec/spec_helper.rb
require 'bundler' Bundler.require require 'active_record' require 'rspec/its' require 'rspec/collection_matchers' require 'timecop' Kaminari::Hooks.init if defined?(Kaminari::Hooks) require 'support/fail_helpers' require 'support/class_helpers' require 'chewy/rspec' host = ENV['ES_HOST'] || 'localhost' port = E...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/support/active_record.rb
spec/support/active_record.rb
require 'database_cleaner' ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:', pool: 10) ActiveRecord::Base.logger = Logger.new('/dev/null') if ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks) ActiveRecord::Base.raise_in_transactional_callbacks = true end def create_co...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/support/fail_helpers.rb
spec/support/fail_helpers.rb
module FailHelpers def fail raise_error(RSpec::Expectations::ExpectationNotMetError) end def fail_with(message) raise_error(RSpec::Expectations::ExpectationNotMetError, message) end def fail_matching(message) raise_error(RSpec::Expectations::ExpectationNotMetError, /#{Regexp.escape(message)}/) ...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/support/class_helpers.rb
spec/support/class_helpers.rb
module ClassHelpers extend ActiveSupport::Concern def stub_index(name, superclass = nil, &block) stub_class("#{name.to_s.camelize}Index", superclass || Chewy::Index) .tap { |i| i.class_eval(&block) if block } end def stub_class(name, superclass = nil, &block) stub_const(name.to_s.camelize, Class...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/chewy/search_spec.rb
spec/chewy/search_spec.rb
require 'spec_helper' describe Chewy::Search do before { drop_indices } before do stub_index(:products) end describe '.all' do specify { expect(ProductsIndex.all).to be_a(Chewy::Search::Request) } context do before { allow(Chewy).to receive_messages(search_class: Chewy::Search::Request) } ...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false
toptal/chewy
https://github.com/toptal/chewy/blob/fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4/spec/chewy/multi_search_spec.rb
spec/chewy/multi_search_spec.rb
require 'spec_helper' require 'chewy/multi_search' describe Chewy::MultiSearch do before { drop_indices } before do stub_model(:city) stub_model(:country) stub_index(:cities) do def self.aggregate_by_country aggs(country: {terms: {field: :country_id}}) end index_scope City ...
ruby
MIT
fde2fdc1e009ce8f24f622ee03efc85d2cbe6aa4
2026-01-04T16:00:03.341084Z
false