source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/so_random.rb
Ruby
mit
49
master
289
# from http://www.bagley.org/~doug/shootout/bench/random/random.ruby IM = 139968.0 IA = 3877.0 IC = 29573.0 $last = 42.0 def gen_random(max) (max * ($last = ($last * IA + IC) % IM)) / IM end N = 3_000_000 i = 0 while i<N i +=1 gen_random(100.0) end # "%.9f" % gen_random(100.0)
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/vm_thread_sized_queue.rb
Ruby
mit
49
master
254
require 'thread' # on producer, one consumer n = 1_000_000 q = Thread::SizedQueue.new(100) consumer = Thread.new{ while q.pop # consuming end } producer = Thread.new{ while n > 0 q.push true n -= 1 end q.push nil } consumer.join
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/io_select3.rb
Ruby
mit
49
master
334
# IO.select performance. a lot of fd ios = [] nr = 100 if defined?(Process::RLIMIT_NOFILE) max = Process.getrlimit(Process::RLIMIT_NOFILE)[0] else max = 64 end puts "max fd: #{max} (results not apparent with <= 1024 max fd)" (max - 10).times do r, w = IO.pipe r.close ios.push w end nr.times do IO.select ...
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/so_spectralnorm.rb
Ruby
mit
49
master
870
# The Computer Language Shootout # http://shootout.alioth.debian.org/ # Contributed by Sokolov Yura def eval_A(i,j) return 1.0/((i+j)*(i+j+1)/2+i+1) end def eval_A_times_u(u) v, i = nil, nil (0..u.length-1).collect { |i| v = 0 for j in 0..u.length-1 v += eval_A(i,j)*u[j] ...
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/app_aobench.rb
Ruby
mit
49
master
6,197
# AO render benchmark # Original program (C) Syoyo Fujita in Javascript (and other languages) # https://code.google.com/p/aobench/ # Ruby(yarv2llvm) version by Hideki Miura # IMAGE_WIDTH = 256 IMAGE_HEIGHT = 256 NSUBSAMPLES = 2 NAO_SAMPLES = 8 class Vec def initialize(x, y, z) @x = x @y = y @z = z ...
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/io_select2.rb
Ruby
mit
49
master
394
# IO.select performance. worst case of single fd. ios = [] nr = 1000000 if defined?(Process::RLIMIT_NOFILE) max = Process.getrlimit(Process::RLIMIT_NOFILE)[0] else max = 64 end puts "max fd: #{max} (results not apparent with <= 1024 max fd)" ((max / 2) - 10).times do ios.concat IO.pipe end last = [ ios[-1] ] p...
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/so_meteor_contest.rb
Ruby
mit
49
master
21,283
#!/usr/bin/env ruby # # The Computer Language Shootout # http://shootout.alioth.debian.org # contributed by Kevin Barnes (Ruby novice) # PROGRAM: the main body is at the bottom. # 1) read about the problem here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/ # 2) see how I represent a board as ...
github
ruby-bench/ruby-bench-suite
https://github.com/ruby-bench/ruby-bench-suite
ruby/benchmark/so_nsieve_bits.rb
Ruby
mit
49
master
841
#!/usr/bin/ruby #coding: us-ascii # # The Great Computer Language Shootout # http://shootout.alioth.debian.org/ # # nsieve-bits in Ruby # Contributed by Glenn Parker, March 2005 CharExponent = 3 BitsPerChar = 1 << CharExponent LowMask = BitsPerChar - 1 def sieve(m) items = "\xFF" * ((m / BitsPerChar) + 1) masks =...
github
noahgibbs/env_mem
https://github.com/noahgibbs/env_mem
env_mem.gemspec
Ruby
mit
49
master
1,419
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'env_mem/version' Gem::Specification.new do |spec| spec.name = "env_mem" spec.version = EnvMem::VERSION spec.authors = ["Noah Gibbs"] spec.email = ["the.codefo...
github
noahgibbs/env_mem
https://github.com/noahgibbs/env_mem
lib/env_mem.rb
Ruby
mit
49
master
544
require "env_mem/version" module EnvMem extend self def dump_to_file(filename) File.open(filename, "w") { |f| f.write GC.stat.inspect } end def gc_stat_to_shell(stats) stats_hash = {} stats.scan(/:([a-zA-Z_]+)\s*=>\s*([0-9]+)/).each { |key, val| stats_hash[key] = val.to_i } <<SHELL export RU...
github
noahgibbs/env_mem
https://github.com/noahgibbs/env_mem
test/env_mem_test.rb
Ruby
mit
49
master
200
require 'test_helper' class EnvMemTest < Minitest::Test def test_that_it_has_a_version_number refute_nil ::EnvMem::VERSION end def test_it_does_something_useful assert false end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
Rakefile
Ruby
apache-2.0
49
ubuntu-jammy
3,935
require 'json' namespace :stemcell do desc 'Build a base OS image for use in stemcells' task :build_os_image, [:operating_system_name, :operating_system_version, :os_image_path] do |_, args| begin require 'bosh/stemcell/archive_handler' require 'bosh/stemcell/build_environment' require 'bosh/...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/Rakefile
Ruby
apache-2.0
49
ubuntu-jammy
247
require "rspec/core/rake_task" require "standard/rake" task default: [:standard, :spec] RSpec::Core::RakeTask.new(:spec) namespace :spec do RSpec::Core::RakeTask.new(:shellout_types) do |t| t.rspec_opts = "--tag shellout_types" end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/bosh-stemcell.gemspec
Ruby
apache-2.0
49
ubuntu-jammy
1,044
require File.expand_path("../lib/bosh/stemcell/version", __FILE__) version = Bosh::Stemcell::VERSION Gem::Specification.new do |spec| spec.name = "bosh-stemcell" spec.version = version spec.authors = "Pivotal" spec.email = "support@cloudfoundry.com" spec.description = "Bosh::Stemcell provides tools to manag...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/package.rb
Ruby
apache-2.0
49
ubuntu-jammy
626
module ShelloutTypes class Package attr_reader :last_message, :last_error def initialize(package, chroot_cmd_runner) @package = package @chroot_cmd_runner = chroot_cmd_runner end def to_s @package end def installed? @last_message, @last_error, status = @chroot_cmd_ru...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/group.rb
Ruby
apache-2.0
49
ubuntu-jammy
279
module ShelloutTypes class Group def initialize(group_name, chroot) @group = group_name @chroot = chroot end def to_s @group end def exists? _, _, status = @chroot.run("getent", "group", @group) status == 0 end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/command.rb
Ruby
apache-2.0
49
ubuntu-jammy
447
module ShelloutTypes class Command def initialize(cmd, chroot) @cmd = cmd @chroot = chroot end def to_s @cmd end def stdout exec @stdout end def stderr exec @stderr end def exit_status exec @exit_status end private ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/file.rb
Ruby
apache-2.0
49
ubuntu-jammy
3,581
module ShelloutTypes class File def initialize(path, chroot) @path = path @chroot = chroot end def to_s @path end def file? stdout, _, _ = @chroot.run("stat", "-c", "%F", true_path_in_chroot) !stdout.strip.match(/\Aregular (empty )?file\z/).nil? rescue RuntimeE...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/service.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,583
require "shellout_types/file" module ShelloutTypes class Service DEFAULT_RUNLEVEL = 2 def initialize(service_name, chroot) @service = service_name @chroot = chroot end def to_s @service end def enabled? check_service_enabled(DEFAULT_RUNLEVEL) end def enable...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/chroot.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,108
require "open3" require "shellwords" module ShelloutTypes class Chroot @@chroot_dir = "" def self.chroot_dir=(dir) @@chroot_dir = dir end def self.unmount_proc dir = @@chroot_dir return if dir.empty? system("sudo", "umount", "#{dir}/proc", [:out, :err] => "/dev/null") en...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/shellout_types/user.rb
Ruby
apache-2.0
49
ubuntu-jammy
590
module ShelloutTypes class User def initialize(user_name, chroot_cmd_runner) @user_name = user_name @chroot_cmd_runner = chroot_cmd_runner end def to_s @user_name end def exists? _, _, status = @chroot_cmd_runner.run("id #{@user_name}") status == 0 end def ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/stage_runner.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,835
require "bosh/core/shell" module Bosh::Stemcell class BuildReport def initialize @stats = [] end def measure_configure(name, &block) start = Time.now.utc puts "== Started configuring '#{name}' at #{start.strftime("%a %b %e %H:%M:%S %Z %Y")} ==" yield @stats << {type: "conf...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/stemcell_builder.rb
Ruby
apache-2.0
49
ubuntu-jammy
690
require "fileutils" require "bosh/stemcell/stage_collection" module Bosh::Stemcell class StemcellBuilder def initialize(dependencies = {}) @environment = dependencies.fetch(:environment) @runner = dependencies.fetch(:runner) @collection = dependencies.fetch(:collection) end def build ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/stemcell.rb
Ruby
apache-2.0
49
ubuntu-jammy
511
module Bosh module Stemcell class Stemcell attr_reader :version, :definition, :disk_format, :base_name def initialize(definition, base_name, version, disk_format) @definition = definition @base_name = base_name @version = version @disk_format = disk_format end ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/build_environment.rb
Ruby
apache-2.0
49
ubuntu-jammy
6,383
require "bosh/core/shell" require "bosh/stemcell/builder_options" require "bosh/stemcell/stemcell" require "forwardable" module Bosh::Stemcell class BuildEnvironment extend Forwardable BUILD_TIME_MARKER_FILE = File.join(File.expand_path("../../../../..", __FILE__), "build_time.txt") STEMCELL_BUILDER_SOU...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/stemcell_packager.rb
Ruby
apache-2.0
49
ubuntu-jammy
3,568
require "psych" require "open3" module Bosh module Stemcell class StemcellPackager def initialize(options = {}) @definition = options.fetch(:definition) @version = options.fetch(:version) @stemcell_build_path = File.join(options.fetch(:work_path), "stemcell") @tarball_path =...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/definition.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,413
require "bosh/stemcell/infrastructure" require "bosh/stemcell/operating_system" module Bosh::Stemcell class Definition attr_reader :infrastructure, :hypervisor_name, :operating_system def self.for(infrastructure_name, hypervisor_name, operating_system_name, operating_system_version) new( Bosh:...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/stage_collection.rb
Ruby
apache-2.0
49
ubuntu-jammy
8,396
require "bosh/stemcell/definition" require "forwardable" # rubocop:disable Metrics/ClassLength module Bosh::Stemcell class StageCollection extend Forwardable def initialize(definition) @definition = definition end def operating_system_stages ubuntu_os_stages end def kernel_stag...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/os_image_builder.rb
Ruby
apache-2.0
49
ubuntu-jammy
625
module Bosh::Stemcell class OsImageBuilder def initialize(dependencies = {}) @environment = dependencies.fetch(:environment) @collection = dependencies.fetch(:collection) @runner = dependencies.fetch(:runner) @archive_handler = dependencies.fetch(:archive_handler) end def build(os...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/operating_system.rb
Ruby
apache-2.0
49
ubuntu-jammy
868
module Bosh::Stemcell module OperatingSystem def self.for(operating_system_name, operating_system_version = nil) case operating_system_name when "ubuntu" then Ubuntu.new(operating_system_version) else raise ArgumentError.new("invalid operating system: #{operating_system_name}") end end...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/archive_filename.rb
Ruby
apache-2.0
49
ubuntu-jammy
627
require "bosh/stemcell/arch" require "forwardable" module Bosh::Stemcell class ArchiveFilename extend Forwardable def initialize(version, definition, base_name, disk_format) @version = version @definition = definition @base_name = base_name @disk_format = disk_format end def...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/infrastructure.rb
Ruby
apache-2.0
49
ubuntu-jammy
5,169
module Bosh::Stemcell module Infrastructure def self.for(name) case name when "openstack" OpenStack.new when "aws" Aws.new when "alicloud" Alicloud.new when "google" Google.new when "vsphere" Vsphere.new when "warden" Warden...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/archive_handler.rb
Ruby
apache-2.0
49
ubuntu-jammy
248
module Bosh::Stemcell class ArchiveHandler def initialize @shell = Bosh::Core::Shell.new end def compress(directory, archive_filename) @shell.run("sudo tar -cz -f #{archive_filename} -C #{directory} .") end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/disk_image.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,229
require "bosh/core/shell" require "bosh/stemcell/arch" module Bosh::Stemcell class DiskImage attr_reader :image_mount_point def initialize(options) @image_file_path = options.fetch(:image_file_path) @image_mount_point = options.fetch(:image_mount_point, Dir.mktmpdir) @verbose = options.fet...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/builder_options.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,324
require "rbconfig" require "forwardable" require "bosh/stemcell/archive_filename" module Bosh::Stemcell class BuilderOptions extend Forwardable def initialize(dependencies = {}) @environment = dependencies.fetch(:env) @definition = dependencies.fetch(:definition) @stemcell_version = depen...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/archive.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,280
require "yaml" require "rake/file_utils_ext" require "bosh/stemcell/aws/region" module Bosh::Stemcell class Archive attr_reader :path def initialize(path = "") @path = path validate_stemcell end def manifest @manifest ||= Psych.load(`tar -Oxzf #{path} stemcell.MF`) end de...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/stemcell/aws/region.rb
Ruby
apache-2.0
49
ubuntu-jammy
327
require "net/http" module Bosh module Stemcell module Aws class Region DEFAULT = "us-east-1" REGIONS = %w[ us-east-1 us-west-1 us-west-2 eu-west-1 eu-central-1 ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2 sa-east-1 ] end end e...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/lib/bosh/core/shell.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,712
module Bosh::Core class Shell def initialize(stdout = $stdout) @stdout = stdout end def run(command, options = {}) output_lines = run_command(command, options) output_lines = tail(output_lines, options) command_output = output_lines.join("\n") report(command, command_output...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/spec_helper.rb
Ruby
apache-2.0
49
ubuntu-jammy
472
require "rspec" require "rspec/its" require "support/shellout_type_assertions" require "tmpdir" Dir.glob(File.expand_path("../support/**/*.rb", __FILE__)).each { |f| require(f) } # do not truncate array comparison RSpec.configure do |rspec| rspec.expect_with :rspec do |c| c.max_formatted_output_length = nil e...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/warden_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,906
require "spec_helper" describe "Warden Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" describe file("/usr/sbin/runsvdir-start") do it { should be_file } end context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:conten...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/stig_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,542
require "spec_helper" describe "Stig test case verification", stemcell_image: true, security_spec: true do it "confirms all stig test cases ran" do expected_base_stig_test_cases = %w[ V-38443 V-38444 V-38445 V-38446 V-38448 V-38449 V-38450 V-38451 V-38457 ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/go_agent_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
3,809
require "spec_helper" describe "Stemcell with Go Agent", stemcell_image: true do describe "installed by bosh_go_agent" do %w[bosh-agent bosh-agent-rc bosh-blobstore-dav bosh-blobstore-gcs bosh-blobstore-s3 bosh-blobstore-azure-storage].each do |binary| describe file("/var/vcap/bosh/bin/#{binary}") do ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/ubuntu_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
22,396
require "spec_helper" describe "Ubuntu 22.04 stemcell image", stemcell_image: true do it_behaves_like "All Stemcells" it_behaves_like "a Linux kernel based OS image" it_behaves_like "a Linux kernel module configured OS image" # linux_version_regex = '/linux-(.+)-([0-9]+.+)/d' linux_version_regex = 's/linux-...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/openstack_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
938
require "spec_helper" describe "OpenStack Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should include("openstack") } end end context "installed by pac...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/fips_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
6,987
require "spec_helper" describe "FIPS Stemcell", os_image: true do use_iaas_kernel = ENV.fetch("UBUNTU_FIPS_USE_IAAS_KERNEL", "false") == "true" context "installed by system_kernel" do infrastructure = ENV["STEMCELL_INFRASTRUCTURE"] describe package(use_iaas_kernel ? "linux-image-#{infrastructure}-fips" : "...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/cloudstack_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
472
require "spec_helper" describe "CloudStack Stemcell", stemcell_image: true do context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should match("cloudstack") } end end context "installed by base_ssh" do describe "disallows password a...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/alicloud_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
753
require "spec_helper" describe "AliCloud Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should match("alicloud") } end end context "installed by bosh_di...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/softlayer_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
584
require "spec_helper" describe "Softlayer Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should include("softlayer") } end end describe "ssh authenticat...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/vcloud_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
579
require "spec_helper" describe "vCloud Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should include("vsphere") } end end describe "ssh authentication" ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/vsphere_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
977
require "spec_helper" describe "vSphere Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should match("vsphere") } end end describe "ssh authentication" d...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/google_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,690
require "spec_helper" describe "Google Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "rsyslog conf directory only contains files installed by rsyslog_config stage and google-compute-engine package" do describe command("ls -A /etc/rsyslog.d") do it "match expected li...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/aws_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,145
require "spec_helper" describe "AWS Stemcell", stemcell_image: true do it_behaves_like "udf module is disabled" context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should match("aws") } end end context "installed by bosh_disable_pass...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/azure_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
4,452
require "spec_helper" describe "Azure Stemcell", stemcell_image: true do context "installed by system_parameters" do describe file("/var/vcap/bosh/etc/infrastructure") do its(:content) { should include("azure") } end end context "installed by bosh_disable_password_authentication" do describe "...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/stemcells/cis_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,643
require "spec_helper" describe "CIS test case verification", {stemcell_image: true, security_spec: true} do let(:base_cis_test_cases) do %W[ CIS-2.18 CIS-2.19 CIS-2.20 CIS-2.21 CIS-2.22 CIS-2.23 CIS-3.2.4 CIS-4.1 CIS-7.2.5 CIS-7.2.6 CIS-7.2.7 ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/stemcell_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
5,326
require "rspec" shared_examples_for "All Stemcells" do context "building a new stemcell" do describe file "/var/vcap/bosh/etc/stemcell_version" do let(:expected_version) { ENV["CANDIDATE_BUILD_NUMBER"] || "0000" } it { should be_file } its(:content) { should eq expected_version } end ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/be_valid_json_file_matcher.rb
Ruby
apache-2.0
49
ubuntu-jammy
317
require "json" RSpec::Matchers.define(:be_valid_json_file) do match do |file| @content = file.content JSON.parse(@content) true rescue JSON::ParserError => e @error = e false end failure_message do "Expected '#{@content}' to be valid JSON. Parser error: #{@error.inspect}" end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
35,946
shared_examples_for "every OS image" do let(:sshd_config) { file("/etc/ssh/sshd_config") } let(:etc_environment) { file("/etc/environment") } let(:syslog_config) { file("/etc/audisp/plugins.d/syslog.conf") } context "etc_environment" do it "should have /var/vcap/bosh/bin on the PATH" do expect(etc_en...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_systemd_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
903
shared_examples_for "a systemd-based OS image" do context "systemd services" do describe service("runit") do it { should be_enabled } end describe service("rsyslog") do it { should be_enabled } end describe service("chrony") do it { should be_enabled } end describe fil...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_ubuntu_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
222
shared_examples_for "an Ubuntu-based OS image" do context "X Windows must not be enabled unless required (stig: V-38674)" do describe package("xserver-xorg") do it { should_not be_installed } end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/udf_module_disabled.rb
Ruby
apache-2.0
49
ubuntu-jammy
248
shared_examples_for "udf module is disabled" do context "prevent udf module from being loaded (CIS-2.24)" do describe file("/etc/modprobe.d/blacklist.conf") do its(:content) { should match(/install udf \/bin\/true/) } end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_linux_kernel_modules_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
3,092
shared_examples_for "a Linux kernel module configured OS image" do context "prevent bluetooth module from being loaded (stig: V-38682)" do describe file("/etc/modprobe.d/blacklist.conf") do it { should be_file } its(:content) { should match "install bluetooth /bin/true" } end end context "pre...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_chrony_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
453
shared_examples_for "an os with chrony" do describe "(stig: V-38620 V-38621 V-260520)" do describe file("/var/vcap/bosh/bin/sync-time") do it { should be_file } its(:content) { should match(/chronyc reload sources/) } its(:content) { should match(/chronyc waitsync 10/) } end describe fi...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,490
require "rspec/core/formatters/console_codes" require "shellout_types/chroot" require_relative "shellout_type_assertions" RSpec.configure do |config| # shellout types tests support env variable 'OS_IMAGE', therefore check that os image tests # will not be executed when testing shellout types. unless config.inclu...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/stemcell_tarball.rb
Ruby
apache-2.0
49
ubuntu-jammy
291
RSpec.configure do |config| unless ENV["STEMCELL_WORKDIR"] warning = "All stemcell_tarball tests are being skipped. STEMCELL_WORKDIR needs to be set" puts RSpec::Core::Formatters::ConsoleCodes.wrap(warning, :yellow) config.filter_run_excluding stemcell_tarball: true end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_upstart_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
842
shared_examples_for "an upstart-based OS image" do context "installed by rsyslog_config" do rsyslog_executable = "/usr/sbin/rsyslogd".freeze describe file("/etc/init/rsyslog.conf") do its(:content) { should match rsyslog_executable } end # verify that the path used in the upstart config points...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/shellout_type_assertions.rb
Ruby
apache-2.0
49
ubuntu-jammy
982
require "shellout_types/file" require "shellout_types/package" require "shellout_types/user" require "shellout_types/command" require "shellout_types/service" require "shellout_types/group" require "shellout_types/chroot" module ShelloutTypes module Assertions def file(file_path, chroot = ShelloutTypes::Chroot.n...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/spec_assets.rb
Ruby
apache-2.0
49
ubuntu-jammy
374
require "support/shellout_type_assertions" module Bosh::Stemcell module SpecAssets def spec_asset(name) File.expand_path(File.join("..", "assets", name), File.dirname(__FILE__)) end end end RSpec.configure do |config| config.include(Bosh::Stemcell::SpecAssets) config.extend(ShelloutTypes::Assert...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/cis.rb
Ruby
apache-2.0
49
ubuntu-jammy
303
$cis_test_cases = Set.new # standard:disable Style/GlobalVars RSpec.configure do |config| config.before(:each) do |example| if example.full_description.include? "CIS-" $cis_test_cases += example.full_description.scan(/CIS-(?:\d+\.?)+/) # standard:disable Style/GlobalVars end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/stemcell_image.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,407
require "bosh/stemcell/disk_image" require "shellout_types/chroot" require_relative "shellout_type_assertions" RSpec.configure do |config| # do not run stemcell image tests when shellout types tests are executed. unless config.inclusion_filter[:shellout_types] if ENV["STEMCELL_IMAGE"] # if `config.filter...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/stig.rb
Ruby
apache-2.0
49
ubuntu-jammy
296
$stig_test_cases = Set.new # standard:disable Style/GlobalVars RSpec.configure do |config| config.before(:each) do |example| if example.full_description.include? "stig:" $stig_test_cases += example.full_description.scan(/V-\d+/) # standard:disable Style/GlobalVars end end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/spec_ordering.rb
Ruby
apache-2.0
49
ubuntu-jammy
320
RSpec.configure do |config| config.register_ordering(:global) do |list| # make sure that stig test case check will be run at last list.each do |example_group| if example_group.metadata[:security_spec] list.delete example_group list.push example_group end end list end end
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/support/os_image_linux_kernel_shared_examples.rb
Ruby
apache-2.0
49
ubuntu-jammy
3,747
shared_examples_for "a Linux kernel based OS image" do def kernel_version command("ls -rt /lib/modules | tail -1").stdout.chomp end context "installed by bosh_sysctl" do describe file("/etc/sysctl.d/60-bosh-sysctl.conf") do it { should be_file } it "must not accept ICMPv4 secure redirect pac...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/stage_collection_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
12,402
require "spec_helper" require "bosh/stemcell/arch" require "bosh/stemcell/stage_collection" module Bosh::Stemcell describe StageCollection do subject(:stage_collection) { StageCollection.new(definition) } let(:definition) do instance_double( "Bosh::Stemcell::Definition", infrastructure:...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/stemcell_packager_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
8,423
require "spec_helper" require "bosh/stemcell/stemcell_packager" require "bosh/stemcell/stage_collection" require "bosh/stemcell/stage_runner" require "bosh/stemcell/definition" require "bosh/stemcell/archive_filename" require "yaml" class FakeInfrastructure < Bosh::Stemcell::Infrastructure::Base def additional_cloud...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/archive_filename_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,228
require "spec_helper" require "bosh/stemcell/archive_filename" require "bosh/stemcell/definition" module Bosh::Stemcell describe ArchiveFilename do let(:version) { "007" } let(:infrastructure) do instance_double("Bosh::Stemcell::Infrastructure::Base", name: "INFRASTRUCTURE", hypervisor:...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/definition_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
4,066
require "spec_helper" require "bosh/stemcell/definition" module Bosh::Stemcell describe Definition do subject(:definition) { Bosh::Stemcell::Definition.new(infrastructure, hypervisor, operating_system) } let(:infrastructure) do instance_double( "Bosh::Stemcell::Infrastructure::Base", n...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/builder_options_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
7,281
require "spec_helper" require "bosh/stemcell/builder_options" require "bosh/stemcell/definition" module Bosh::Stemcell describe BuilderOptions do subject(:stemcell_builder_options) { described_class.new(dependencies) } let(:dependencies) do { env: env, definition: definition, ve...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/stemcell_builder_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,456
require "spec_helper" require "bosh/stemcell/stemcell_builder" require "bosh/stemcell/build_environment" require "bosh/stemcell/stage_collection" require "bosh/stemcell/stage_runner" require "bosh/stemcell/stemcell_packager" require "yaml" describe Bosh::Stemcell::StemcellBuilder do subject(:builder) do describe...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/stage_runner_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
6,938
require "spec_helper" require "bosh/stemcell/stage_runner" require "timecop" require "fakefs/spec_helpers" module Bosh::Stemcell describe StageRunner do include FakeFS::SpecHelpers let(:shell) { instance_double("Bosh::Core::Shell", run: nil) } let(:stages) { [:stage_0, :stage_1] } let(:build_path) ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
12,033
require "spec_helper" require "bosh/stemcell/build_environment" require "bosh/stemcell/infrastructure" require "bosh/stemcell/operating_system" require "bosh/stemcell/definition" require "fakefs/spec_helpers" module Bosh::Stemcell describe BuildEnvironment do include FakeFS::SpecHelpers subject { described_...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/operating_system_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,815
require "spec_helper" require "bosh/stemcell/operating_system" module Bosh::Stemcell describe OperatingSystem do describe ".for" do it "returns the correct infrastrcture" do expect(OperatingSystem.for("ubuntu", "penguin")).to be_a(OperatingSystem::Ubuntu) end it "raises for unknown ope...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/archive_handler_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
550
require "spec_helper" require "bosh/stemcell/archive_handler" module Bosh::Stemcell describe ArchiveHandler do subject(:archiver) { described_class.new } let(:shell) { instance_double(Bosh::Core::Shell) } before do allow(Bosh::Core::Shell).to receive(:new).and_return(shell) end describe ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/os_image_builder_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,499
require "spec_helper" require "bosh/stemcell/archive_handler" require "bosh/stemcell/build_environment" require "bosh/stemcell/stage_collection" require "bosh/stemcell/stage_runner" require "bosh/stemcell/os_image_builder" describe Bosh::Stemcell::OsImageBuilder do subject(:builder) do described_class.new( ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/helpers_sh_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,319
require "spec_helper" context "helpers.sh" do before do skip "This spec requires linux" unless RUBY_PLATFORM.downcase.include?("linux") end context "add_on_exit runs cleanup commands in LIFO order" do describe ShelloutTypes::Command.new( File.expand_path( "../../../assets/on_exit_with_norm...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/archive_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,888
require "spec_helper" require "bosh/stemcell/archive" module Bosh::Stemcell describe Archive do subject { described_class.new(stemcell_path) } let(:stemcell_path) { spec_asset("fake-stemcell-aws-xen-ubuntu.tgz") } describe "#initialize" do it "errors if path does not exist" do expect { ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/disk_image_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
7,755
require "spec_helper" require "bosh/stemcell/disk_image" module Bosh::Stemcell describe DiskImage do let(:shell) { instance_double("Bosh::Core::Shell", run: nil) } let(:kpartx_map_output) { "add map FAKE_LOOP1p1 (252:3): 0 3997984 linear /dev/loop1 63" } let(:kpartx_map_output_efi) { "add map FAKE_...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
7,390
require "spec_helper" require "bosh/stemcell/infrastructure" module Bosh::Stemcell describe Infrastructure do describe ".for" do it "returns the correct infrastructure" do expect(Infrastructure.for("openstack")).to be_an(Infrastructure::OpenStack) expect(Infrastructure.for("aws")).to be_an(...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/os_image/ubuntu_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
17,137
require "bosh/stemcell/arch" require "spec_helper" require "shellout_types/file" describe "Ubuntu 22.04 OS image", os_image: true do it_behaves_like "every OS image" do let(:syslog_config) { file("/etc/audit/plugins.d/syslog.conf") } end it_behaves_like "an os with chrony" it_behaves_like "a systemd-based ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/user_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
2,157
require_relative "spec_helper" require "shellout_types/user" module ShelloutTypes describe User, shellout_types: true do let(:runner) { ShelloutTypes::Chroot.new } let(:user) { described_class.new(user_name, runner) } describe "#exists?" do context "when the user exists" do let(:user_name)...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/service_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
655
require_relative "spec_helper" require "shellout_types/service" module ShelloutTypes describe Service, shellout_types: true do let(:chroot) { ShelloutTypes::Chroot.new } describe "#enabled?" do context "when the service is enabled" do let(:service) { described_class.new("networking", chroot) }...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/package_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
699
require_relative "spec_helper" require "shellout_types/package" module ShelloutTypes describe Package, shellout_types: true do subject(:package) { described_class.new(package_name, runner) } let(:runner) { ShelloutTypes::Chroot.new } describe "#installed?" do context "when a package is i...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/command_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,089
require_relative "spec_helper" require "shellout_types/command" module ShelloutTypes describe Command, shellout_types: true do let(:chroot) { ShelloutTypes::Chroot.new } let(:chroot_dir) { chroot.chroot_dir } let(:echo) { described_class.new("echo $PWD", chroot) } let(:errorful) { described_class.ne...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/group_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
642
require_relative "spec_helper" require "shellout_types/group" module ShelloutTypes describe Group, shellout_types: true do describe "#exists?" do let(:chroot) { ShelloutTypes::Chroot.new } let(:group) { described_class.new(group_name, chroot) } context "when the group exists" do let(:g...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/chroot_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,596
require_relative "spec_helper" require "shellout_types/chroot" module ShelloutTypes describe Chroot, shellout_types: true do let(:chroot_dir) { ShelloutTypes::Chroot.new.chroot_dir } before do described_class.chroot_dir = chroot_dir end describe "#chroot_dir" do context "when no dir is ...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/file_spec.rb
Ruby
apache-2.0
49
ubuntu-jammy
23,529
require_relative "spec_helper" require "tempfile" require "shellout_types/file" module ShelloutTypes describe File, shellout_types: true do def chown(uid, gid, file_name) cmd = ["-c"] chown_cmd = "chown " chown_cmd += uid.to_s unless uid.nil? chown_cmd += ":#{gid}" unless gid.nil? c...
github
cloudfoundry/bosh-linux-stemcell-builder
https://github.com/cloudfoundry/bosh-linux-stemcell-builder
bosh-stemcell/spec/shellout_types/spec_helper.rb
Ruby
apache-2.0
49
ubuntu-jammy
1,540
require "bosh/core/shell" require "rspec" require "shellout_types/chroot" require "tmpdir" def supported_testing_os? RUBY_PLATFORM.downcase.include?("linux") end RSpec.configure do |config| if config.inclusion_filter[:shellout_types] config.before(:suite) do raise "Running 'shellout_types' specs on '#{R...
github
hopsoft/stimulus_reflex_todomvc
https://github.com/hopsoft/stimulus_reflex_todomvc
Gemfile
Ruby
mit
49
master
872
source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "2.6.4" gem "bootsnap", ">= 1.4.2", require: false gem "jbuilder", "~> 2.7" gem "pg", ">= 0.18", "< 2.0" gem "puma", "~> 4.1" gem "rails", "~> 6.0.0" gem "rails_12factor", group: :production gem "redis", "~> 4.0" gem "s...
github
hopsoft/stimulus_reflex_todomvc
https://github.com/hopsoft/stimulus_reflex_todomvc
config/application.rb
Ruby
mit
49
master
649
require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module StimulusReflexTodomvc class Application < Rails::Application # Initialize configuration defaults for originally gen...
github
hopsoft/stimulus_reflex_todomvc
https://github.com/hopsoft/stimulus_reflex_todomvc
config/environments/test.rb
Ruby
mit
49
master
1,901
# The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! Rails.application.configure do # Settings...
github
hopsoft/stimulus_reflex_todomvc
https://github.com/hopsoft/stimulus_reflex_todomvc
config/environments/production.rb
Ruby
mit
49
master
5,057
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...