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
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/ruby_spec.rb
spec/ruby_spec.rb
describe 'Ruby interface' do def ruby(*args) assert_execute(RbConfig.ruby, *args) end def with_clean_env(&block) if Bundler.respond_to?(:with_unbundled_env) Bundler.with_unbundled_env do block.call end else Bundler.with_clean_env do block.call end end end...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/benchmark_driver_spec.rb
spec/benchmark_driver_spec.rb
describe 'benchmark-driver command' do { 'ips' => 'compare', 'block' => 'all', 'time' => 'simple', 'memory' => 'simple', 'once' => 'markdown', }.each do |runner, output| it "runs benchmark with fixed loop_count, #{runner.dump} runner and #{output.dump} output" do benchmark_driver fixtu...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/yaml_spec.rb
spec/yaml_spec.rb
describe 'YAML interface' do def with_clean_env(&block) if Bundler.respond_to?(:with_unbundled_env) Bundler.with_unbundled_env do block.call end else Bundler.with_clean_env do block.call end end end Dir.glob(File.expand_path('./fixtures/yaml/*.yml', __dir__)).e...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/spec_helper.rb
spec/spec_helper.rb
require 'open3' require 'shellwords' require 'benchmark_driver' module BenchmarkDriverSpecHelper def assert_execute(*command) stdout, stderr, status = Open3.capture3(*command) command_to_show = command.map { |c| c.gsub(Dir.pwd, '.') }.shelljoin on_failure = -> { # Show output directly since RSpec ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/support/benchmark_driver/output/test_output.rb
spec/support/benchmark_driver/output/test_output.rb
class BenchmarkDriver::Output::TestOutput < BenchmarkDriver::BulkOutput # @param [Hash{ BenchmarkDriver::Job => Hash{ BenchmarkDriver::Context => BenchmarkDriver::Result } }] result # @param [Array<BenchmarkDriver::Metric>] metrics def bulk_output(job_context_result:, metrics:) job_context_result.each do |job...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/fixtures/extra/single.rb
spec/fixtures/extra/single.rb
# hello 100000.times { 3 * 3 }
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/fixtures/extra/sleep.rb
spec/fixtures/extra/sleep.rb
sleep 1000
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/fixtures/ruby/exec_blank_simple.rb
spec/fixtures/ruby/exec_blank_simple.rb
require 'benchmark_driver' Benchmark.driver(output: :simple) do |x| x.prelude <<-EOS class Array alias_method :blank?, :empty? end array = [] EOS x.report %{ array.empty? } x.report %{ array.blank? } x.loop_count 1000 end
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/fixtures/ruby/exec_blank.rb
spec/fixtures/ruby/exec_blank.rb
require 'benchmark_driver' Benchmark.driver do |x| x.prelude <<-EOS class Array alias_method :blank?, :empty? end array = [] EOS x.report 'Array#empty?', %{ array.empty? } x.report 'Array#blank?', %{ array.blank? } x.output 'markdown' x.loop_count 1000 end
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/benchmark_driver/bulk_output_spec.rb
spec/benchmark_driver/bulk_output_spec.rb
require 'shellwords' describe BenchmarkDriver::BulkOutput do describe '#bulk_output' do around do |example| env = ENV.to_h.dup ENV['RUBYOPT'] = ['-I', File.expand_path('../support', __dir__)].shelljoin example.run ENV.replace(env) end it 'allows to simplify output plugin implemen...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/spec/benchmark_driver/repeater_spec.rb
spec/benchmark_driver/repeater_spec.rb
describe BenchmarkDriver::Repeater do describe '.with_repeat' do it 'returns an average result correctly' do config = BenchmarkDriver::Config::RunnerConfig.new( repeat_count: 10, repeat_result: 'average', run_duration: 1.0, timeout: 1.0, verbose: 0, ) resu...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver.rb
lib/benchmark_driver.rb
require 'benchmark_driver/bulk_output' require 'benchmark_driver/config' require 'benchmark_driver/job_parser' require 'benchmark_driver/output' require 'benchmark_driver/rbenv' require 'benchmark_driver/chruby' require 'benchmark_driver/rvm' require 'benchmark_driver/repeater' require 'benchmark_driver/ridkuse' requir...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/job_parser.rb
lib/benchmark_driver/job_parser.rb
require 'benchmark_driver/runner' module BenchmarkDriver class << JobParser = Module.new # @param [Hash] config # @param [Hash] working_directory - YAML-specific special parameter for "command_stdout" and a relative path in type def parse(config, working_directory: nil) config = symbolize_keys(conf...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/rvm.rb
lib/benchmark_driver/rvm.rb
require 'shellwords' require 'pathname' module BenchmarkDriver module Rvm # Execute "which -a ruby" command to get a list of Ruby versions from $PATH. def self.system_ruby_path env_rubies = `which -a ruby` abort "Failed to execute 'which -a ruby'" unless $?.success? env_rubies.each_line do...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/version.rb
lib/benchmark_driver/version.rb
module BenchmarkDriver VERSION = '0.17.0' end
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/struct.rb
lib/benchmark_driver/struct.rb
# Extended Struct with: # * Polyfilled `keyword_init: true` # * Default value configuration # * Deeply freezing members module BenchmarkDriver class ::Struct SUPPORT_KEYWORD_P = begin s = ::Struct.new(:a, keyword_init: true) s.new(a: 1).a == 1 ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/repeater.rb
lib/benchmark_driver/repeater.rb
require 'benchmark_driver/struct' module BenchmarkDriver # Repeat calling block and return desired result: "best", "worst" or "average". module Repeater VALID_TYPES = %w[best worst average median] RepeatResult = ::BenchmarkDriver::Struct.new( :value, # the value desired by --repeat-result :all...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output.rb
lib/benchmark_driver/output.rb
module BenchmarkDriver # BenchmarkDriver::Runner::* --> BenchmarkDriver::Output --> BenchmarkDriver::Output::* # # This is interface between runner plugin and output plugin, so that they can be loosely # coupled and to simplify implementation of both runner and output. # # Runner should call its interface i...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/chruby.rb
lib/benchmark_driver/chruby.rb
require 'shellwords' module BenchmarkDriver module Chruby # @param [String] version def self.ruby_path(version) prefix = (Dir.glob('/opt/rubies/*') + Dir.glob("#{ENV['HOME']}/.rubies/*")).find do |dir| File.basename(dir) == version end unless prefix abort "Failed to find '#{...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/ridkuse.rb
lib/benchmark_driver/ridkuse.rb
require 'open3' require 'shellwords' module BenchmarkDriver module RidkUse # Execute "ridk use list" command to get a list of Ruby versions. # # * "ridk use list" is a sub-command of ridk. It returns a list of installed ruby ​​versions. # * "ridk" is a helper command tool of RubyInstaller2 for Window...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/default_job.rb
lib/benchmark_driver/default_job.rb
require 'benchmark_driver/struct' module BenchmarkDriver DefaultJob = ::BenchmarkDriver::Struct.new( :name, # @param [String] name - This is mandatory for all runner :metrics, # @param [Array<BenchmarkDriver::Metric>] - This is mandatory for all runner too, set by job parser. :contexts, # @par...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner.rb
lib/benchmark_driver/runner.rb
module BenchmarkDriver module Runner require 'benchmark_driver/runner/command_stdout' require 'benchmark_driver/runner/ips' require 'benchmark_driver/runner/block' require 'benchmark_driver/runner/memory' require 'benchmark_driver/runner/once' require 'benchmark_driver/runner/recorded' req...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/config.rb
lib/benchmark_driver/config.rb
require 'benchmark_driver/struct' require 'rbconfig' require 'shellwords' module BenchmarkDriver # All CLI options Config = ::BenchmarkDriver::Struct.new( :runner_type, # @param [String] :output_type, # @param [String] :output_opts, # @param [Hash{ Symbol => Object }] :args, # @param...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/default_job_parser.rb
lib/benchmark_driver/default_job_parser.rb
module BenchmarkDriver module DefaultJobParser # Build default JobParser for given job klass def self.for(klass:, metrics:) Module.new.tap do |parser| class << parser include DefaultJobParser end parser.define_singleton_method(:job_class) { klass } parser.define...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/metric.rb
lib/benchmark_driver/metric.rb
require 'benchmark_driver/struct' # All benchmark results should be expressed by this model. module BenchmarkDriver # BenchmarkDriver returns benchmark results with the following nested Hash structure: # { # #<BenchmarkDriver::Job> => { # #<BenchmarkDriver::Context> => #<BenchmarkDriver::Result # ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/ruby_interface.rb
lib/benchmark_driver/ruby_interface.rb
module BenchmarkDriver class RubyInterface def self.run(**args, &block) new(**args).tap { |x| block.call(x) }.run end # Build jobs and run. This is NOT interface for users. def run unless @executables.empty? @config.executables = @executables end jobs = @jobs.flat_map...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/bulk_output.rb
lib/benchmark_driver/bulk_output.rb
module BenchmarkDriver # This is API for your casual output plugin and NOT internally used by BenchmarkDriver. # # By fully utilizing with_*/report APIs, you can implement streaming-output plugins. # See also: lib/benchmark_driver/output.rb (this class's instance will be `@output`) # But using these APIs can ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/rbenv.rb
lib/benchmark_driver/rbenv.rb
require 'shellwords' module BenchmarkDriver module Rbenv # @param [String] version def self.ruby_path(version) path = `RBENV_VERSION='#{version}' rbenv which ruby`.rstrip unless $?.success? abort "Failed to execute 'rbenv which ruby'" end path end # @param [String] fu...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/ips.rb
lib/benchmark_driver/runner/ips.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'benchmark_driver/default_job' require 'benchmark_driver/default_job_parser' require 'tempfile' require 'shellwords' # Show iteration per second. class BenchmarkDriver::Runner::Ips METRIC = BenchmarkDriver::Metric.new(name: 'Iteration per se...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/memory.rb
lib/benchmark_driver/runner/memory.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'benchmark_driver/default_job' require 'benchmark_driver/default_job_parser' require 'tempfile' require 'shellwords' # Max resident set size class BenchmarkDriver::Runner::Memory METRIC = BenchmarkDriver::Metric.new( name: 'Max resident ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/recorded.rb
lib/benchmark_driver/runner/recorded.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'tempfile' require 'shellwords' # Run only once, for testing class BenchmarkDriver::Runner::Recorded # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job" Job = ::BenchmarkDriver::Struct.new( :name, ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/time.rb
lib/benchmark_driver/runner/time.rb
require 'benchmark_driver/runner/ips' class BenchmarkDriver::Runner::Time < BenchmarkDriver::Runner::Ips METRIC = BenchmarkDriver::Metric.new(name: 'Execution time', unit: 's', larger_better: false) # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job" Job = Class.new(BenchmarkDriver:...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/once.rb
lib/benchmark_driver/runner/once.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'benchmark_driver/default_job' require 'benchmark_driver/default_job_parser' require 'tempfile' require 'shellwords' # Run only once, for testing class BenchmarkDriver::Runner::Once METRIC = BenchmarkDriver::Metric.new(name: 'Iteration per s...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/command_stdout.rb
lib/benchmark_driver/runner/command_stdout.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'tempfile' require 'shellwords' require 'open3' # Use stdout of ruby command class BenchmarkDriver::Runner::CommandStdout # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job" Job = ::BenchmarkDriver::Struct.new(...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/ruby_stdout.rb
lib/benchmark_driver/runner/ruby_stdout.rb
require 'benchmark_driver/struct' require 'benchmark_driver/metric' require 'tempfile' require 'shellwords' require 'open3' # Use stdout of ruby command class BenchmarkDriver::Runner::RubyStdout CommandFailure = Class.new(StandardError) # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::J...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/runner/block.rb
lib/benchmark_driver/runner/block.rb
require 'benchmark_driver/default_job' require 'benchmark_driver/default_job_parser' class BenchmarkDriver::Runner::Block < BenchmarkDriver::Runner::Ips METRIC = BenchmarkDriver::Metric.new(name: 'Iteration per second', unit: 'i/s') # JobParser returns this, `BenchmarkDriver::Runner.runner_for` searches "*::Job" ...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output/record.rb
lib/benchmark_driver/output/record.rb
class BenchmarkDriver::Output::Record # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver::Context>] contexts def initialize(metrics:, jobs:, contexts:) @metrics = metrics @job_warmup_context_result = Hash.new do |h1, job| h...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output/compare.rb
lib/benchmark_driver/output/compare.rb
# Compare output like benchmark-ips class BenchmarkDriver::Output::Compare NAME_LENGTH = 20 # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver::Context>] contexts def initialize(metrics:, jobs:, contexts:) @metrics = metrics @...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output/simple.rb
lib/benchmark_driver/output/simple.rb
class BenchmarkDriver::Output::Simple NAME_LENGTH = 10 OPTIONS = { humanize: ['--output-humanize true|false', TrueClass, 'Humanize result numbers (default: true)'], } # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver::Context>...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output/markdown.rb
lib/benchmark_driver/output/markdown.rb
class BenchmarkDriver::Output::Markdown NAME_LENGTH = 8 OPTIONS = { compare: ['--output-compare', 'Show comparison between results'], } # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver::Context>] contexts # @param [Hash{ Sy...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
benchmark-driver/benchmark-driver
https://github.com/benchmark-driver/benchmark-driver/blob/6c1f90001d5bdee32e67d112b2c91dc40db03e57/lib/benchmark_driver/output/all.rb
lib/benchmark_driver/output/all.rb
class BenchmarkDriver::Output::All NAME_LENGTH = 20 CONTEXT_LENGTH = 20 OPTIONS = { sort: ['--output-sort true|false', TrueClass, 'Sort all output or not (default: true)'], } # @param [Array<BenchmarkDriver::Metric>] metrics # @param [Array<BenchmarkDriver::Job>] jobs # @param [Array<BenchmarkDriver...
ruby
MIT
6c1f90001d5bdee32e67d112b2c91dc40db03e57
2026-01-04T17:32:45.703932Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/test/timeline_test.rb
test/timeline_test.rb
require File.expand_path('../helper', __FILE__) class GritTest < MadroxTest def setup clear_git_fixtures @path = File.join(File.dirname(__FILE__), 'fixtures/simple.git') @repo = Madrox::Repo.with_grit(@path) @bad_repo = Madrox::Repo.with_grit("FOO") end def test_repo_exists assert !@bad_repo...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/test/helper.rb
test/helper.rb
require 'test/unit' require File.expand_path('../../lib/madrox', __FILE__) Madrox.require_lib :grit_repo class MadroxTest < Test::Unit::TestCase def fork_git_fixture(name, dest = :test) old_path = File.join(File.dirname(__FILE__), "fixtures/#{name}.git") new_path = File.join(File.dirname(__FILE__), "#{dest}....
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox.rb
lib/madrox.rb
module Madrox VERSION = "0.3.0" class << self attr_accessor :root_path def require_libs(*files) files.each { |file| require(File.join(root_path, file.to_s)) } end alias require_lib require_libs end self.root_path = File.expand_path("../madrox", __FILE__) require_libs :structs, :repo, ...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox/entry.rb
lib/madrox/entry.rb
require 'forwardable' module Madrox # Represents an author of a Madrox::Entry. class Actor extend Forwardable def_delegators :@actor, # Public: Returns the String name of the Actor. :name, # Public: Returns the String email address of the Actor. :email, # Public: Returns the...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox/grit_repo.rb
lib/madrox/grit_repo.rb
require 'grit' unless Object.const_defined?(:Grit) module Madrox class GritRepo < Repo # Gets the Grit object for this Madrox::Repo. # # Returns a Grit::Repo instance. attr_reader :grit def initialize(path) @grit = Grit::Repo.new(path) rescue Grit::NoSuchPathError, Grit::InvalidGitRepo...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox/structs.rb
lib/madrox/structs.rb
module Madrox # Internal: Common Option Struct methods. module StructMethods def self.included(base) base.extend ClassMethods end module ClassMethods # Internal: Initializes the option struct with the given optional Hash. # # hash - Either a Hash of key,value pairs, or nil. ...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox/timeline.rb
lib/madrox/timeline.rb
module Madrox class Timeline # Public: Gets the user name for this timeline. # # Returns a String. attr_reader :user # Public: Gets the email for this timeline. This is used as part of the # git actor when posting updates. # # Returns a String. attr_reader :email # Public: S...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
technoweenie/madrox
https://github.com/technoweenie/madrox/blob/3dcd3f2a95ad2bb345df392661723616860d3c2f/lib/madrox/repo.rb
lib/madrox/repo.rb
module Madrox class Repo class << self attr_accessor :repo_class end # Public: Loads a Repo using the first available Git adapter. # # path - the String path of the Repository. # # Returns a Madrox::Repo subclass. def self.for(path) if repo_class repo_class.new(pat...
ruby
MIT
3dcd3f2a95ad2bb345df392661723616860d3c2f
2026-01-04T17:32:36.540207Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_3_filesystem_integrity_checking.rb
controls/1_3_filesystem_integrity_checking.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/6_1_system_file_permissions.rb
controls/6_1_system_file_permissions.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/6_2_user_and_group_settings.rb
controls/6_2_user_and_group_settings.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_6_wireless_interfaces.rb
controls/3_6_wireless_interfaces.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_6_mandatory_access_control.rb
controls/1_6_mandatory_access_control.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_7_disable_ipv6.rb
controls/3_7_disable_ipv6.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/5_1_configure_cron.rb
controls/5_1_configure_cron.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/2_2_special_purpose_services.rb
controls/2_2_special_purpose_services.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/2_3_service_clients.rb
controls/2_3_service_clients.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_7_warning_banners.rb
controls/1_7_warning_banners.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_5_firewall_configuration.rb
controls/3_5_firewall_configuration.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/4_2_configure_logging.rb
controls/4_2_configure_logging.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_1_network_parameters_host_only.rb
controls/3_1_network_parameters_host_only.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_4_secure_boot_settings.rb
controls/1_4_secure_boot_settings.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/5_3_configure_pam.rb
controls/5_3_configure_pam.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_3_tcp_wrappers.rb
controls/3_3_tcp_wrappers.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/5_2_ssh_server_configuration.rb
controls/5_2_ssh_server_configuration.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/2_1_inetd_services.rb
controls/2_1_inetd_services.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_2_network_parameters_host_and_router.rb
controls/3_2_network_parameters_host_and_router.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_8_ensure_patches.rb
controls/1_8_ensure_patches.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_2_configure_software_updates.rb
controls/1_2_configure_software_updates.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_5_additional_process_hardening.rb
controls/1_5_additional_process_hardening.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/3_4_uncommon_network_protocols.rb
controls/3_4_uncommon_network_protocols.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/1_1_filesystem_configuration.rb
controls/1_1_filesystem_configuration.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/5_4_user_accounts_and_environments.rb
controls/5_4_user_accounts_and_environments.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/controls/4_1_configure_system_accounting_auditd.rb
controls/4_1_configure_system_accounting_auditd.rb
# frozen_string_literal: true # # Copyright:: 2017, Schuberg Philis B.V. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
dev-sec/cis-dil-benchmark
https://github.com/dev-sec/cis-dil-benchmark/blob/c73917fb02e7b452e1f080bf970e09338cb2f9eb/libraries/grubconf.rb
libraries/grubconf.rb
# frozen_string_literal: true class GrubConf < Inspec.resource(1) name 'grub_conf' def locations %w(/boot/grub/grub.conf /boot/grub/grub.cfg /boot/grub/menu.lst /boot/boot/grub/grub.conf /boot/boot/grub/grub.cfg /boot/boot/grub/menu.lst /boot/grub2/grub.cfg) end end
ruby
Apache-2.0
c73917fb02e7b452e1f080bf970e09338cb2f9eb
2026-01-04T17:32:47.003138Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/spec/mailer_spec.rb
spec/mailer_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe MailSafe do TEXT_POSTSCRIPT_PHRASE = /The original recipients were:/ HTML_POSTSCRIPT_PHRASE = /<p>\s+The original recipients were:\s+<\/p>/ def deliver_message(message_name, *args) TestMailer.send(message_name, *args).deliver end ...
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/spec/config_spec.rb
spec/config_spec.rb
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe MailSafe::Config do describe '#developer_email_address' do after(:each) do # clear class variable caching... MailSafe::Config.class_eval do remove_class_variable(:@@developer_email_address) end end conte...
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/spec/spec_helper.rb
spec/spec_helper.rb
require "coveralls" Coveralls.wear! require 'mail_safe' require 'mailers/test_mailer' ActionMailer::Base.delivery_method = :test require 'rspec' RSpec.configure do |config| config.color = true config.filter_run :focus => true config.run_all_when_everything_filtered = true end
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/spec/mailers/test_mailer.rb
spec/mailers/test_mailer.rb
class TestMailer < ActionMailer::Base def plain_text_message(options) setup = setup_recipients(options) mail({from: 'test@mailsafe.org', subject: "Plain text Message Test"}.update(setup)) do |format| format.text { render text: "Here is the message body." } end end def html_message(opt...
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/lib/mail_safe.rb
lib/mail_safe.rb
require 'action_mailer' require 'active_support/core_ext/class/attribute_accessors' # to be able to use cattr_accessor require 'mail_safe/config' require 'mail_safe/address_replacer' require 'mail_safe/rails_hook'
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/lib/mail_safe/version.rb
lib/mail_safe/version.rb
module MailSafe VERSION = "0.3.4" end
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/lib/mail_safe/address_replacer.rb
lib/mail_safe/address_replacer.rb
module MailSafe class AddressReplacer class << self ADDRESS_TYPES = [:to, :cc, :bcc].freeze def replace_external_addresses(mail) replaced_addresses = {} ADDRESS_TYPES.each do |address_type| if addresses = mail[address_type].try(:value) new_addresses = [] ...
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/lib/mail_safe/rails_hook.rb
lib/mail_safe/rails_hook.rb
require 'mail' module MailSafe class MailInterceptor def self.delivering_email(message) MailSafe::AddressReplacer.replace_external_addresses(message) if message end ::Mail.register_interceptor(self) end end
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
myronmarston/mail_safe
https://github.com/myronmarston/mail_safe/blob/fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d/lib/mail_safe/config.rb
lib/mail_safe/config.rb
module MailSafe class InvalidConfigSettingError < StandardError; end class Config cattr_accessor :internal_address_definition def self.is_internal_address?(address) case internal_address_definition when Regexp then !!(address =~ internal_address_definition) when Proc then internal_...
ruby
MIT
fbb3ea3ba7c524d4ba53aabe5ba165c938fa1a5d
2026-01-04T17:32:50.792504Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/test/helper.rb
test/helper.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/test/plugin/test_filter_systemd_entry.rb
test/plugin/test_filter_systemd_entry.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/test/plugin/test_in_systemd.rb
test/plugin/test_in_systemd.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/test/plugin/systemd/test_entry_mutator.rb
test/plugin/systemd/test_entry_mutator.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/lib/fluent/plugin/filter_systemd_entry.rb
lib/fluent/plugin/filter_systemd_entry.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/lib/fluent/plugin/in_systemd.rb
lib/fluent/plugin/in_systemd.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
fluent-plugins-nursery/fluent-plugin-systemd
https://github.com/fluent-plugins-nursery/fluent-plugin-systemd/blob/7907fdac0f95e8c83dd87d4da9e0398da0eb5299/lib/fluent/plugin/systemd/entry_mutator.rb
lib/fluent/plugin/systemd/entry_mutator.rb
# frozen_string_literal: true # Copyright 2015-2018 Edward Robinson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
ruby
Apache-2.0
7907fdac0f95e8c83dd87d4da9e0398da0eb5299
2026-01-04T17:32:51.774230Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/spec_helper.rb
spec/spec_helper.rb
# frozen_string_literal: true require 'pry' require 'simplecov' SimpleCov.start do enable_coverage :branch add_filter [ %r{^/spec} ] end SimpleCov.minimum_coverage line: 100, branch: 94 SimpleCov.refuse_coverage_drop require 'rspec/snapshot' # This file was generated by the `rspec --init` command. Conve...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/version_spec.rb
spec/rspec/snapshot/version_spec.rb
# frozen_string_literal: true require 'spec_helper' describe RSpec::Snapshot::VERSION do it 'is set to 2.0.3' do expect(subject).to eq('2.0.3') end end
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/configuration_spec.rb
spec/rspec/snapshot/configuration_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'rspec/snapshot/configuration' describe RSpec::Snapshot::Configuration do describe '.initialize_configuration' do let(:rspec_configuration) { object_double(RSpec.configuration) } before do allow(rspec_configuration).to receive(:add_setting) ...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/serializer_factory_spec.rb
spec/rspec/snapshot/serializer_factory_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'rspec/snapshot/serializer_factory' describe RSpec::Snapshot::SerializerFactory do describe '#initialize' do context 'when config is not provided' do subject { described_class.new } it 'sets config instance var to an empty hash' do ...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/file_operator_spec.rb
spec/rspec/snapshot/file_operator_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'rspec/snapshot/file_operator' describe RSpec::Snapshot::FileOperator do subject { described_class.new(snapshot_name, metadata) } let(:snapshot_name) { 'descriptive_snapshot_name' } let(:metadata) { { file_path: 'spec/example_spec.rb' } } let(:relat...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/matchers_spec.rb
spec/rspec/snapshot/matchers_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'json' require 'logger' describe RSpec::Snapshot::Matchers do describe 'unit tests' do # rubocop:disable Lint/ConstantDefinitionInBlock # rubocop:disable RSpec/LeakyConstantDeclaration class TestClass include RSpec::Snapshot::Matchers ...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/default_serializer_spec.rb
spec/rspec/snapshot/default_serializer_spec.rb
# frozen_string_literal: true require 'spec_helper' require 'rspec/snapshot/default_serializer' describe RSpec::Snapshot::DefaultSerializer do subject { described_class.new } describe '#dump' do let(:object_param) { Object.new } let(:expected) { 'foobar' } let!(:actual) do allow(object_param)....
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false
levinmr/rspec-snapshot
https://github.com/levinmr/rspec-snapshot/blob/5c1212ca0502de1555d8b3e1af6ab8bd74782cb9/spec/rspec/snapshot/matchers/match_snapshot_spec.rb
spec/rspec/snapshot/matchers/match_snapshot_spec.rb
# frozen_string_literal: true require 'spec_helper' describe RSpec::Snapshot::Matchers::MatchSnapshot do subject { described_class.new(serializer, file_operator) } let(:file_operator) { instance_double(RSpec::Snapshot::FileOperator) } let(:serializer) { instance_double(RSpec::Snapshot::DefaultSerializer) } ...
ruby
MIT
5c1212ca0502de1555d8b3e1af6ab8bd74782cb9
2026-01-04T17:32:54.285296Z
false