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
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/apk_listing.rb
supply/lib/supply/apk_listing.rb
module Supply class ApkListing attr_accessor :recent_changes attr_accessor :language attr_accessor :apk_version_code # Initializes the apk listing with the current listing if available def initialize(recent_changes, language, apk_version_code) self.recent_changes = recent_changes self...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/commands_generator.rb
supply/lib/supply/commands_generator.rb
require "commander" require "fastlane_core" require 'fastlane_core/ui/help_formatter' require "supply" HighLine.track_eof = false module Supply class CommandsGenerator include Commander::Methods def self.start new.run end def run program :name, 'supply' program :version, Fastlane...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/image_listing.rb
supply/lib/supply/image_listing.rb
module Supply class ImageListing attr_reader :id attr_reader :sha1 attr_reader :sha256 attr_reader :url def initialize(id, sha1, sha256, url) @id = id @sha1 = sha1 @sha256 = sha256 @url = url end end end
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/listing.rb
supply/lib/supply/listing.rb
module Supply class Listing attr_reader :language attr_accessor :title attr_accessor :short_description attr_accessor :full_description attr_accessor :video # Initializes the listing to use the given api client, language, and fills it with the current listing if available def initialize(...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/languages.rb
supply/lib/supply/languages.rb
# https://support.google.com/googleplay/android-developer/answer/3125566?hl=en # => Add your own text translations & localized graphic assets => See available languages => replace `-` with `_` # %w => https://stackoverflow.com/a/1274703/252627 module Supply module Languages ALL_LANGUAGES = %w[ af am ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/supply/lib/supply/client.rb
supply/lib/supply/client.rb
require 'googleauth' require 'google/apis/androidpublisher_v3' AndroidPublisher = Google::Apis::AndroidpublisherV3 require 'net/http' # rubocop:disable Metrics/ClassLength module Supply class AbstractGoogleServiceClient SCOPE = nil SERVICE = nil # Connecting with Google attr_accessor :client d...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/spec/app_file_config_spec.rb
credentials_manager/spec/app_file_config_spec.rb
require 'credentials_manager/appfile_config' describe CredentialsManager do describe CredentialsManager::AppfileConfig do describe "#load_for_lane_configuration" do it "overrides Appfile configuration with current driven lane." do ENV["FASTLANE_LANE_NAME"] = :beta.to_s expect(CredentialsMa...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/spec/account_manager_spec.rb
credentials_manager/spec/account_manager_spec.rb
describe CredentialsManager do describe CredentialsManager::AccountManager do let(:user) { "felix@krausefx.com" } let(:password) { "suchSecret" } it "allows passing user and password" do c = CredentialsManager::AccountManager.new(user: user, password: password) expect(c.user).to eq(user) ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/spec/spec_helper.rb
credentials_manager/spec/spec_helper.rb
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/lib/credentials_manager.rb
credentials_manager/lib/credentials_manager.rb
require_relative 'credentials_manager/account_manager' require_relative 'credentials_manager/cli' require_relative 'credentials_manager/appfile_config' module CredentialsManager ROOT = Pathname.new(File.expand_path('../..', __FILE__)) end
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/lib/credentials_manager/cli.rb
credentials_manager/lib/credentials_manager/cli.rb
require 'commander' require_relative 'account_manager' module CredentialsManager class CLI include Commander::Methods # Parses command options and executes actions def run program :name, 'CredentialsManager' program :version, Fastlane::VERSION program :description, 'Manage credentials...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/lib/credentials_manager/appfile_config.rb
credentials_manager/lib/credentials_manager/appfile_config.rb
require 'fastlane_core/globals' module CredentialsManager # Access the content of the app file (e.g. app identifier and Apple ID) class AppfileConfig def self.try_fetch_value(key) # We need to load the file every time we call this method # to support the `for_lane` keyword begin retur...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/credentials_manager/lib/credentials_manager/account_manager.rb
credentials_manager/lib/credentials_manager/account_manager.rb
require 'security' require 'highline/import' # to hide the entered password require_relative 'appfile_config' module CredentialsManager class AccountManager DEFAULT_PREFIX = "deliver" # Is used for iTunes Transporter attr_reader :prefix # @param prefix [String] Very optional, is used for the #...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/strings_parser_spec.rb
frameit/spec/strings_parser_spec.rb
describe Frameit do describe Frameit::StringsParser do describe "parse" do it "raise error when file can't be found" do expect do Frameit::StringsParser.parse("./nothere") end.to raise_exception("Couldn't find strings file at path './nothere'") end it "raise error when...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/device_spec.rb
frameit/spec/device_spec.rb
require 'frameit/device' describe Frameit::Device do def screen_size_from(path) path.match(/{([0-9]+)x([0-9]+)}/).captures.map(&:to_i) end before do allow(FastImage).to receive(:size) do |path| screen_size_from(path) end Frameit.config = instance_double("FastlaneCore::Configuration") ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/commands_generator_spec.rb
frameit/spec/commands_generator_spec.rb
require 'frameit/commands_generator' describe Frameit::CommandsGenerator do def expect_runner_run fake_runner = "runner" expect(Frameit::Runner).to receive(:new).and_return(fake_runner) expect(fake_runner).to receive(:run) end describe ":run options handling" do it "can use the use_legacy_iphone...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/editor_spec.rb
frameit/spec/editor_spec.rb
require 'frameit/config_parser' describe Frameit do describe Frameit::Editor do describe "frame!" do before do allow_any_instance_of(MiniMagick::Tool::Mogrify).to receive(:call) { '' } allow(MiniMagick::Image).to receive(:open) { |path| MiniMagick::Image.new(path) } allow_any_instan...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/config_parser_spec.rb
frameit/spec/config_parser_spec.rb
describe Frameit do describe Frameit::ConfigParser do it "doesn't mind if there is no config file" do result = Frameit::ConfigParser.new.load("./invalid") expect(result).to eq(nil) end describe "Invalid JSON file" do it "raises an exception" do expect do Frameit::Confi...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/template_finder_spec.rb
frameit/spec/template_finder_spec.rb
require 'ostruct' describe Frameit do describe Frameit::TemplateFinder do DEVICE_SCREEN_IDS = Frameit::DEVICE_SCREEN_IDS DisplayType = Frameit::DisplayType describe 'it can find some screenshots' do # Prevent the tests from looking in the real home # directory. before(:all) do ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/spec/spec_helper.rb
frameit/spec/spec_helper.rb
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit.rb
frameit/lib/frameit.rb
require 'frameit/frame_downloader' require 'frameit/device_types' require 'frameit/runner' require 'frameit/screenshot' require 'frameit/config_parser' require 'frameit/offsets' require 'frameit/editor' require 'frameit/template_finder' require 'frameit/strings_parser' require 'frameit/mac_editor' require 'frameit/depe...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/strings_parser.rb
frameit/lib/frameit/strings_parser.rb
require_relative 'module' module Frameit # This class will parse the .string files class StringsParser def self.parse(path) UI.user_error!("Couldn't find strings file at path '#{path}'") unless File.exist?(path) UI.user_error!("Must be .strings file, only got '#{path}'") unless path.end_with?(".str...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/options.rb
frameit/lib/frameit/options.rb
require 'fastlane_core/configuration/config_item' require 'fastlane/actions/actions_helper' require 'fastlane/helper/lane_helper' require_relative 'module' require_relative 'config_parser' require_relative 'device_types' module Frameit class Options def self.available_options @options ||= [ Fastl...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/dependency_checker.rb
frameit/lib/frameit/dependency_checker.rb
require_relative 'module' module Frameit class DependencyChecker def self.check_dependencies return if Helper.test? self.check_image_magick end def self.check_image_magick unless `which convert`.include?("convert") UI.error('####################################################...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/commands_generator.rb
frameit/lib/frameit/commands_generator.rb
require 'commander' require 'fastlane/version' require 'fastlane_core/ui/help_formatter' require 'fastlane_core/globals' require 'fastlane_core/configuration/configuration' require_relative 'device_types' require_relative 'runner' require_relative 'options' require_relative 'dependency_checker' require_relative 'devic...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/trim_box.rb
frameit/lib/frameit/trim_box.rb
require_relative 'module' module Frameit # Represents the MiniMagick trim bounding box for cropping a text image class Trimbox attr_accessor :width # width of the trim box attr_accessor :height # height of the trim box attr_accessor :offset_x # horizontal offset from the canvas to the trim box attr...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/config_parser.rb
frameit/lib/frameit/config_parser.rb
require_relative 'device_types' module Frameit class ConfigParser attr_reader :data def load(path) return nil unless File.exist?(path) # we are okay with no config at all UI.verbose("Parsing config file '#{path}'") @path = path self.parse(File.read(path)) end # @param data (...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/runner.rb
frameit/lib/frameit/runner.rb
require 'fastimage' require_relative 'frame_downloader' require_relative 'module' require_relative 'screenshot' require_relative 'device_types' module Frameit class Runner def initialize downloader = FrameDownloader.new unless downloader.frames_exist? downloader.download_frames end ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/frame_downloader.rb
frameit/lib/frameit/frame_downloader.rb
require 'fastlane_core/module' require_relative 'module' module Frameit class FrameDownloader HOST_URL = "https://fastlane.github.io/frameit-frames" def download_frames print_disclaimer require 'json' require 'fileutils' UI.message("Downloading device frames to '#{templates_path}'...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/device_types.rb
frameit/lib/frameit/device_types.rb
require_relative 'module' require_relative './device' require 'spaceship/connect_api/models/app_screenshot_set' module Frameit DisplayType = Spaceship::ConnectAPI::AppScreenshotSet::DisplayType DEVICE_SCREEN_IDS = { DisplayType::APP_IPHONE_35 => "iOS-3.5-in", DisplayType::APP_IPHONE_40 => "iOS-4-in", ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/editor.rb
frameit/lib/frameit/editor.rb
require 'mini_magick' require_relative 'template_finder' require_relative 'trim_box' require_relative 'module' require_relative 'offsets' require_relative 'config_parser' require_relative 'strings_parser' require_relative 'device_types' module Frameit # Currently the class is 2 lines too long. Reevaluate refactorin...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/mac_editor.rb
frameit/lib/frameit/mac_editor.rb
require 'mini_magick' require_relative 'editor' module Frameit # Responsible for framing Mac Screenshots class MacEditor < Editor def prepare_image image = super image.resize("#{offset['width']}x") if offset['width'] end def put_device_into_background(background) self.top_space_above...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/offsets.rb
frameit/lib/frameit/offsets.rb
require_relative 'module' require_relative 'frame_downloader' module Frameit class Offsets # Returns the image offset needed for a certain device type def self.image_offset(screenshot) require 'json' unless @offsets_cache offsets_json_path = File.join(FrameDownloader.new.templates_path, ...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/template_finder.rb
frameit/lib/frameit/template_finder.rb
require 'deliver/app_screenshot' require_relative 'module' require_relative 'device_types' require_relative 'frame_downloader' module Frameit # Responsible for finding the correct device class TemplateFinder # This will detect the screen size and choose the correct template def self.get_template(screenshot...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/module.rb
frameit/lib/frameit/module.rb
require 'fastlane_core/helper' require 'fastlane/boolean' require_relative 'config_parser' module Frameit class << self attr_accessor :config end Boolean = Fastlane::Boolean Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore UI = Fastlane...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/screenshot.rb
frameit/lib/frameit/screenshot.rb
require_relative 'editor' require_relative 'mac_editor' require_relative 'device_types' require_relative 'module' require_relative 'device' module Frameit # Represents one screenshot class Screenshot attr_accessor :path # path to the screenshot attr_accessor :size # size in px array of 2 elements: height a...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
fastlane/fastlane
https://github.com/fastlane/fastlane/blob/d1f6eb6228644936997aae1956d8036ea62cd5b4/frameit/lib/frameit/device.rb
frameit/lib/frameit/device.rb
require 'fastimage' require_relative 'module' module Frameit class Device REQUIRED_PRIORITY = 999 attr_reader :id attr_reader :deliver_screen_id attr_reader :formatted_name attr_reader :resolutions attr_reader :density_ppi attr_reader :default_color attr_reader :platform attr_rea...
ruby
MIT
d1f6eb6228644936997aae1956d8036ea62cd5b4
2026-01-04T15:37:27.371479Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/paths.rb
samples/paths.rb
SAMPLES_DIR = Pathname.new(__dir__).relative_path_from(Pathname.pwd) CONFIGURATION_DIR = SAMPLES_DIR.join('configuration') CLEAN_FILE = SAMPLES_DIR.join('clean_source').join('clean.rb') SMELLY_FILE = SAMPLES_DIR.join('smelly_source').join('smelly.rb')
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/clean_source/clean.rb
samples/clean_source/clean.rb
# Well documented Clean class. class Clean def hello(argument) say argument end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_exclude_paths/nested/uncommunicative_parameter_name.rb
samples/source_with_exclude_paths/nested/uncommunicative_parameter_name.rb
# Klass comment class Klass def method(a) a + @x end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_exclude_paths/nested/uncommunicative_variable_name.rb
samples/source_with_exclude_paths/nested/uncommunicative_variable_name.rb
# Klass comment. class Klass def meth x = 5 end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_exclude_paths/nested/ignore_me_as_well/irresponsible_module.rb
samples/source_with_exclude_paths/nested/ignore_me_as_well/irresponsible_module.rb
class Klass end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_exclude_paths/ignore_me/uncommunicative_method_name.rb
samples/source_with_exclude_paths/ignore_me/uncommunicative_method_name.rb
# Klass comment. class Klass def m end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/smelly_source/inline.rb
samples/smelly_source/inline.rb
#!/usr/local/bin/ruby -w ## # Ruby Inline is a framework for writing ruby extensions in foreign # languages. # # == SYNOPSIS # # require 'inline' # class MyClass # inline do |builder| # builder.include "<math.h>" # builder.c %q{ # long factorial(int max) { # int i=max, result=1; #...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/smelly_source/optparse.rb
samples/smelly_source/optparse.rb
# # optparse.rb - command-line option analysis with the OptionParser class. # # Author:: Nobu Nakada # Documentation:: Nobu Nakada and Gavin Sinclair. # # See OptionParser for documentation. # # == Developer Documentation (not for RDoc output) # # === Class tree # # - OptionParser:: front end # - OptionParser::Sw...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
true
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/smelly_source/redcloth.rb
samples/smelly_source/redcloth.rb
# vim:ts=4:sw=4: # = RedCloth - Textile and Markdown Hybrid for Ruby # # Homepage:: http://whytheluckystiff.net/ruby/redcloth/ # Author:: why the lucky stiff (http://whytheluckystiff.net/) # Copyright:: (cc) 2004 why the lucky stiff (and his puppet organizations.) # License:: BSD # ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
true
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/smelly_source/smelly.rb
samples/smelly_source/smelly.rb
# Smelly class class Smelly # This will reek of UncommunicativeMethodName def x y = 10 # This will reek of UncommunicativeVariableName end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/smelly_source/ruby.rb
samples/smelly_source/ruby.rb
module CodeRay module Scanners # This scanner is really complex, since Ruby _is_ a complex language! # # It tries to highlight 100% of all common code, # and 90% of strange codes. # # It is optimized for HTML highlighting, and is not very useful for # parsing or pretty printing. # # For now, I think ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_non_ruby_files/ruby.rb
samples/source_with_non_ruby_files/ruby.rb
# Klass comment class Klass def method(a) a + @x end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_hidden_directories/not_hidden.rb
samples/source_with_hidden_directories/not_hidden.rb
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/samples/source_with_hidden_directories/.hidden/hidden.rb
samples/source_with_hidden_directories/.hidden/hidden.rb
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/features/support/env.rb
features/support/env.rb
# frozen_string_literal: true require_relative '../../lib/reek' require_relative '../../lib/reek/cli/application' require 'aruba/cucumber' # # Provides runner methods used in the cucumber steps. # class ReekWorld def reek(args) run_command_and_stop("reek --no-color --no-documentation #{args}", fail_on_error: fa...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/features/step_definitions/sample_file_steps.rb
features/step_definitions/sample_file_steps.rb
# frozen_string_literal: true require_relative '../../samples/paths' Given(/^the smelly file '(.+)'$/) do |filename| write_file(filename, SAMPLES_DIR.join('smelly_source').join(filename).read) end Given(/^the smelly file "(.+)" in the directory "(.+)"$/) do |filename, directory| FileUtils.mkdir_p directory wri...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/features/step_definitions/reek_steps.rb
features/step_definitions/reek_steps.rb
# frozen_string_literal: true When /^I run reek (.*)$/ do |args| reek(args) end When 'I run the code climate reek runner' do run_command_and_stop 'code_climate_reek' end When /^I pass "([^"]*)" to reek *(.*)$/ do |stdin, args| reek_with_pipe(stdin, args) end When /^I pass a stdin to reek *(.*) with:$/ do |arg...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true require 'pathname' require 'timeout' require 'rspec-benchmark' require_relative '../lib/reek' require_relative '../lib/reek/spec' require_relative '../lib/reek/ast/ast_node_class_map' require_relative '../lib/reek/configuration/app_configuration' require_relative '../samples/paths' # Si...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/performance/reek/smell_detectors/runtime_speed_spec.rb
spec/performance/reek/smell_detectors/runtime_speed_spec.rb
# frozen_string_literal: true require_relative '../../../spec_helper' require_lib 'reek/examiner' RSpec.describe 'Runtime speed' do let(:source_directory) { SAMPLES_DIR.join('smelly_source') } it 'runs on our smelly sources in less than 5 seconds' do expect do Dir[source_directory.join('**/*.rb')].each...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/quality/reek_source_spec.rb
spec/quality/reek_source_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' RSpec.describe 'Reek source code' do Pathname.glob('lib/**/*.rb').each do |pathname| describe pathname do it 'has no smells' do expect(pathname).not_to reek end end end end
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/documentation_link_spec.rb
spec/reek/documentation_link_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' RSpec.describe Reek::DocumentationLink do describe '.build' do it 'returns the correct link for a smell type' do expect(described_class.build('FeatureEnvy')). to eq "https://github.com/troessner/reek/blob/v#{Reek::Version::STRING}/doc...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/tree_dresser_spec.rb
spec/reek/tree_dresser_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' Reek::CLI::Silencer.without_warnings { require 'parser/ruby25' } require_lib 'reek/tree_dresser' RSpec.describe Reek::TreeDresser do describe '#dress' do let(:dresser) { described_class.new } let(:sexp) do Parser::Ruby25.parse('class Klaz...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/logging_error_handler_spec.rb
spec/reek/logging_error_handler_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/logging_error_handler' RSpec.describe Reek::LoggingErrorHandler do describe '#handle' do let(:exception) { RuntimeError.new('some message') } let(:handler) { described_class.new } it "outputs the exception's message to st...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_configuration_spec.rb
spec/reek/smell_configuration_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/smell_configuration' RSpec.describe Reek::SmellConfiguration do context 'when overriding default configs' do let(:base_config) do { 'accept' => ['_'], 'enabled' => true, 'exclude' => [], 'rej...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report_spec.rb
spec/reek/report_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/report' RSpec.describe Reek::Report do describe '.report_class' do it 'returns the correct class' do expect(described_class.report_class(:text)).to eq described_class::TextReport end end describe '.location_formatte...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/code_comment_spec.rb
spec/reek/code_comment_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/code_comment' RSpec.describe Reek::CodeComment do context 'with an empty comment' do let(:comment) { build_code_comment(comment: '') } it 'is not descriptive' do expect(comment).not_to be_descriptive end it 'ha...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_warning_spec.rb
spec/reek/smell_warning_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/smell_warning' RSpec.describe Reek::SmellWarning do let(:uncommunicative_name_detector) { build(:smell_detector, smell_type: 'UncommunicativeVariableName') } describe 'sort order' do shared_examples_for 'first sorts ahead of se...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/examiner_spec.rb
spec/reek/examiner_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/examiner' require_lib 'reek/logging_error_handler' RSpec.shared_examples_for 'no smells found' do it 'is not smelly' do expect(examiner).not_to be_smelly end it 'finds no smells' do expect(examiner.smells.length).to eq(0)...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/detector_repository_spec.rb
spec/reek/detector_repository_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/smell_detectors/base_detector' require_lib 'reek/detector_repository' RSpec.describe Reek::DetectorRepository do describe '.smell_types' do let(:smell_types) { described_class.smell_types } it 'includes existing smell_types' ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/context_builder_spec.rb
spec/reek/context_builder_spec.rb
# frozen_string_literal: true require_relative '../spec_helper' require_lib 'reek/context_builder' RSpec.describe Reek::ContextBuilder do describe '#context_tree' do context 'with some simple example code' do let(:walker) do code = 'class Car; def drive; end; end' described_class.new(synta...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/errors/base_error_spec.rb
spec/reek/errors/base_error_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/errors/base_error' RSpec.describe Reek::Errors::BaseError do let(:error) { described_class.new } describe '#long_message' do it 'returns the message' do expect(error.long_message).to eq error.message end end end...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/default_directive_spec.rb
spec/reek/configuration/default_directive_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/configuration/default_directive' RSpec.describe Reek::Configuration::DefaultDirective do describe '#add' do let(:directives) { {}.extend(described_class) } it 'adds a smell configuration' do directives.add(Uncommunic...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/schema_validator_spec.rb
spec/reek/configuration/schema_validator_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/configuration/schema_validator' require_lib 'reek/errors/config_file_error' RSpec.describe Reek::Configuration::SchemaValidator do describe 'validate' do subject(:validator) { described_class.new configuration } context 'w...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/directory_directives_spec.rb
spec/reek/configuration/directory_directives_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/errors/config_file_error' require_lib 'reek/configuration/directory_directives' RSpec.describe Reek::Configuration::DirectoryDirectives do describe '#directive_for' do let(:baz_config) { { Reek::SmellDetectors::IrresponsibleMo...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/excluded_paths_spec.rb
spec/reek/configuration/excluded_paths_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/errors/config_file_error' require_lib 'reek/configuration/excluded_paths' RSpec.describe Reek::Configuration::ExcludedPaths do describe '#add' do let(:exclusions) { [].extend(described_class) } let(:paths) do %w(sampl...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/schema_spec.rb
spec/reek/configuration/schema_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/configuration/schema' RSpec.shared_examples_for 'all detectors present' do |path| it 'contains a rule for the Attribute detector' do expect(schema.info.dig(*(path + [:Attribute]))).not_to be_nil end it 'contains a rule for...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/rake_task_converter_spec.rb
spec/reek/configuration/rake_task_converter_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/configuration/rake_task_converter' RSpec.describe Reek::Configuration::RakeTaskConverter do describe 'convert' do let(:configuration_for_smell_detector) do { 'exclude' => [/Klass#foobar$/, /^Klass#omg$/], ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/app_configuration_spec.rb
spec/reek/configuration/app_configuration_spec.rb
# frozen_string_literal: true require 'pathname' require_relative '../../spec_helper' require_lib 'reek/configuration/app_configuration' require_lib 'reek/configuration/directory_directives' require_lib 'reek/configuration/default_directive' require_lib 'reek/configuration/excluded_paths' RSpec.describe Reek::Configu...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/configuration/configuration_file_finder_spec.rb
spec/reek/configuration/configuration_file_finder_spec.rb
# frozen_string_literal: true require 'fileutils' require 'pathname' require 'tmpdir' require_relative '../../spec_helper' require_lib 'reek/configuration/app_configuration' RSpec.describe Reek::Configuration::ConfigurationFileFinder do describe '.find' do let(:regular_configuration_dir) { CONFIGURATION_DIR.joi...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/source/source_code_spec.rb
spec/reek/source/source_code_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require 'stringio' require_lib 'reek/source/source_code' RSpec.describe Reek::Source::SourceCode do describe '#syntax_tree' do it 'associates comments with the AST' do source = "# this is\n# a comment\ndef foo; end" source_code = des...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/source/source_locator_spec.rb
spec/reek/source/source_locator_spec.rb
# frozen_string_literal: true require 'pathname' require_relative '../../spec_helper' require_lib 'reek/configuration/app_configuration' require_lib 'reek/source/source_locator' RSpec.describe Reek::Source::SourceLocator do describe '#sources' do context 'when applied to hidden directories' do let(:path) ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/code_climate/code_climate_formatter_spec.rb
spec/reek/code_climate/code_climate_formatter_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_formatter' RSpec.describe Reek::CodeClimate::CodeClimateFormatter do describe '#render' do let(:warning) do Reek::SmellWarning.new( 'UtilityFunction', context: 'context foo', ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/code_climate/code_climate_fingerprint_spec.rb
spec/reek/code_climate/code_climate_fingerprint_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_fingerprint' RSpec.describe Reek::CodeClimate::CodeClimateFingerprint do describe '#compute' do let(:computed) { described_class.new(warning).compute } context 'when fingerprinting a warning with ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/code_climate/code_climate_configuration_spec.rb
spec/reek/code_climate/code_climate_configuration_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/code_climate/code_climate_configuration' RSpec.describe Reek::CodeClimate::CodeClimateConfiguration do let(:yml) { described_class.load } Reek::SmellDetectors::BaseDetector.descendants.each do |detector| describe "for #{dete...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/code_climate/code_climate_report_spec.rb
spec/reek/code_climate/code_climate_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/code_climate' require 'json' require 'stringio' RSpec.describe Reek::CodeClimate::CodeClimateReport do let(:options) { {} } let(:instance) { described_class.new(**options) } let(:examiner) { Reek::E...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/spec/should_reek_only_of_spec.rb
spec/reek/spec/should_reek_only_of_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/spec' RSpec.describe Reek::Spec::ShouldReekOnlyOf do let(:examiner) { instance_double(Reek::Examiner).as_null_object } let(:expected_context_name) { 'SmellyClass#big_method' } let(:expected_smell_type) { :NestedIterators } le...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/spec/smell_matcher_spec.rb
spec/reek/spec/smell_matcher_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/spec/smell_matcher' RSpec.describe Reek::Spec::SmellMatcher do let(:smell_warning) do build_smell_warning(smell_type: 'UncommunicativeVariableName', message: "has the variable name '@s'", ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/spec/should_reek_spec.rb
spec/reek/spec/should_reek_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/spec' RSpec.describe Reek::Spec::ShouldReek do describe 'checking code in a string' do let(:matcher) { described_class.new } let(:clean_code) { 'def good() true; end' } let(:smelly_code) { 'def x() y = 4; end' } it...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/spec/should_reek_of_spec.rb
spec/reek/spec/should_reek_of_spec.rb
# frozen_string_literal: true require 'pathname' require_relative '../../spec_helper' require_lib 'reek/spec' RSpec.describe Reek::Spec::ShouldReekOf do describe 'smell type selection' do let(:ruby) { 'def double_thing() @other.thing.foo + @other.thing.foo end' } it 'reports duplicate calls by smell type' ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/yaml_report_spec.rb
spec/reek/report/yaml_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/yaml_report' require 'yaml' require 'stringio' RSpec.describe Reek::Report::YAMLReport do let(:options) { {} } let(:instance) { described_class.new(**options) } let(:examiner) { Reek::Examine...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/xml_report_spec.rb
spec/reek/report/xml_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/xml_report' RSpec.describe Reek::Report::XMLReport do let(:xml_report) { described_class.new } context 'with an empty source' do it 'prints empty checkstyle XML' do xml_report.add_exa...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/github_report_spec.rb
spec/reek/report/github_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/json_report' RSpec.describe Reek::Report::GithubReport do let(:instance) do described_class.new end let(:examiner) do Reek::Examiner.new(source) end context 'with empty source' d...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/html_report_spec.rb
spec/reek/report/html_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/html_report' RSpec.describe Reek::Report::HTMLReport do let(:instance) { described_class.new } context 'with an empty source' do let(:examiner) { Reek::Examiner.new('') } before do ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/text_report_spec.rb
spec/reek/report/text_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/text_report' require_lib 'reek/report/heading_formatter' require_lib 'reek/report/simple_warning_formatter' require 'rainbow' RSpec.describe Reek::Report::TextReport do let(:instance) { described_...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/location_formatter_spec.rb
spec/reek/report/location_formatter_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/report/location_formatter' RSpec.describe Reek::Report::BlankLocationFormatter do let(:warning) { build_smell_warning(lines: [11, 9, 250, 100]) } describe '.format' do it 'returns a blank String regardless of the warning' do...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/json_report_spec.rb
spec/reek/report/json_report_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/examiner' require_lib 'reek/report/json_report' require 'json' require 'stringio' RSpec.describe Reek::Report::JSONReport do let(:options) { {} } let(:instance) { described_class.new(**options) } let(:examiner) { Reek::Examine...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/report/progress_formatter_spec.rb
spec/reek/report/progress_formatter_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/report/progress_formatter' RSpec.describe Reek::Report::ProgressFormatter::Dots do let(:sources_count) { 23 } let(:formatter) { described_class.new(sources_count) } describe '#header' do it 'announces the number of files t...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/rake/task_spec.rb
spec/reek/rake/task_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/rake/task' RSpec.describe Reek::Rake::Task do describe '#source_files' do it 'is set to "lib/**/*.rb" by default' do task = described_class.new expect(task.source_files).to eq FileList['lib/**/*.rb'] end it...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_detectors/irresponsible_module_spec.rb
spec/reek/smell_detectors/irresponsible_module_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/smell_detectors/irresponsible_module' RSpec.describe Reek::SmellDetectors::IrresponsibleModule do it 'reports the right values' do src = <<-RUBY class Alfa end RUBY expect(src).to reek_of(:IrresponsibleModu...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_detectors/too_many_constants_spec.rb
spec/reek/smell_detectors/too_many_constants_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/smell_detectors/too_many_constants' RSpec.describe Reek::SmellDetectors::TooManyConstants do let(:config) do { described_class::MAX_ALLOWED_CONSTANTS_KEY => 2 } end it 'reports the right values' do src = <<-RUBY ...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_detectors/nested_iterators_spec.rb
spec/reek/smell_detectors/nested_iterators_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/smell_detectors/nested_iterators' RSpec.describe Reek::SmellDetectors::NestedIterators do it 'reports the right values' do src = <<-RUBY def alfa(bravo) bravo.each do |charlie| charlie.each { |delta| del...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb
spec/reek/smell_detectors/uncommunicative_parameter_name_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_parameter_name' RSpec.describe Reek::SmellDetectors::UncommunicativeParameterName do it 'reports the right values' do src = <<-RUBY def alfa(x) x end RUBY expect(src)...
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false
troessner/reek
https://github.com/troessner/reek/blob/cf216cc2a6d709a840d74a7f54ebe5ae1a98699b/spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb
spec/reek/smell_detectors/uncommunicative_variable_name_spec.rb
# frozen_string_literal: true require_relative '../../spec_helper' require_lib 'reek/smell_detectors/uncommunicative_variable_name' RSpec.describe Reek::SmellDetectors::UncommunicativeVariableName do it 'reports the right values' do src = <<-RUBY def alfa x = 5 end RUBY expect(src)....
ruby
MIT
cf216cc2a6d709a840d74a7f54ebe5ae1a98699b
2026-01-04T15:47:06.659122Z
false