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 |
|---|---|---|---|---|---|---|---|---|
trailblazer/reform | https://github.com/trailblazer/reform/blob/94b0916746a237fc696e1831af3d5db8302650ae/lib/reform/form/dry/input_hash.rb | lib/reform/form/dry/input_hash.rb | module Reform::Form::Dry
module InputHash
private
# if dry_error is a hash rather than an array then it contains
# the messages for a nested property
# these messages need to be added to the correct collection
# objects.
# collections:
# {0=>{:name=>["must be filled"]}, 1=>{:name=>["must... | ruby | MIT | 94b0916746a237fc696e1831af3d5db8302650ae | 2026-01-04T15:55:03.310193Z | false |
trailblazer/reform | https://github.com/trailblazer/reform/blob/94b0916746a237fc696e1831af3d5db8302650ae/lib/reform/contract/custom_error.rb | lib/reform/contract/custom_error.rb | module Reform
class Contract < Disposable::Twin
# a "fake" Dry schema object to add into the @results array
# super ugly hack required for 2.3.x version since we are creating
# a new Reform::Errors instance every time we call form.errors
class CustomError
def initialize(key, error_text, results)... | ruby | MIT | 94b0916746a237fc696e1831af3d5db8302650ae | 2026-01-04T15:55:03.310193Z | false |
trailblazer/reform | https://github.com/trailblazer/reform/blob/94b0916746a237fc696e1831af3d5db8302650ae/lib/reform/contract/validate.rb | lib/reform/contract/validate.rb | class Reform::Contract < Disposable::Twin
module Validate
def initialize(*)
# this will be removed in Reform 3.0. we need this for the presenting form, form builders
# call the Form#errors method before validation.
super
@result = Result.new([])
end
def validate
validate!(ni... | ruby | MIT | 94b0916746a237fc696e1831af3d5db8302650ae | 2026-01-04T15:55:03.310193Z | false |
lisamelton/video_transcoding | https://github.com/lisamelton/video_transcoding/blob/bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e/convert-video.rb | convert-video.rb | #!/usr/bin/env ruby
#
# convert-video.rb
#
# Copyright (c) 2025 Lisa Melton
#
require 'English'
require 'json'
require 'optparse'
module Converting
class UsageError < RuntimeError
end
class Command
def about
<<-HERE
convert-video.rb 2025.01.28
Copyright (c) 2025 Lisa Melton
HERE
end
d... | ruby | MIT | bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e | 2026-01-04T15:54:59.665501Z | false |
lisamelton/video_transcoding | https://github.com/lisamelton/video_transcoding/blob/bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e/transcode-video.rb | transcode-video.rb | #!/usr/bin/env ruby
#
# transcode-video.rb
#
# Copyright (c) 2025 Lisa Melton
#
require 'English'
require 'json'
require 'optparse'
module Transcoding
class UsageError < RuntimeError
end
class Command
def about
<<-HERE
transcode-video.rb 2025.01.28
Copyright (c) 2025 Lisa Melton
HERE
end
... | ruby | MIT | bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e | 2026-01-04T15:54:59.665501Z | false |
lisamelton/video_transcoding | https://github.com/lisamelton/video_transcoding/blob/bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e/detect-crop.rb | detect-crop.rb | #!/usr/bin/env ruby
#
# detect-crop.rb
#
# Copyright (c) 2025 Lisa Melton
#
require 'English'
require 'open3'
require 'optparse'
require 'tempfile'
module Cropping
class UsageError < RuntimeError
end
class Command
def about
<<-HERE
detect-crop.rb 2025.01.28
Copyright (c) 2025 Lisa Melton
HERE
... | ruby | MIT | bc1e7e572ba6cb6aad8deb15bd978d4f90a4e80e | 2026-01-04T15:54:59.665501Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/spec_helper.rb | spec/spec_helper.rb | require 'serverspec'
set :backend, :exec
module Specinfra
module Backend
class Exec < Base
def run_command cmd
CommandResult.new({
:stdout => ::Specinfra.configuration.stdout,
:stderr => ::Specinfra.configuration.stderr,
:exit_status => ::Specinfra.configura... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat5/iptables_spec.rb | spec/type/redhat5/iptables_spec.rb | require 'spec_helper'
set :os, :family => 'redhat', :release => 5
describe iptables do
it { should have_rule '-P INPUT ACCEPT' }
end
describe iptables do
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/opensuse/service_spec.rb | spec/type/opensuse/service_spec.rb | require 'spec_helper'
set :os, :family => 'opensuse'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/smartos/package_spec.rb | spec/type/smartos/package_spec.rb | require 'spec_helper'
set :os, :family => 'smartos'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
let(:stdout) { "2.2.15\n" }
its(:version) { should eq '2.2.15' }
its(:versi... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/smartos/service_spec.rb | spec/type/smartos/service_spec.rb | require 'spec_helper'
set :os, :family => 'smartos'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_running }
end
describe service('sshd') do
it { should have_property :foo => 'bar' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/port_spec.rb | spec/type/aix/port_spec.rb | require 'spec_helper'
set :os, :family => 'aix'
describe port(80) do
it { should be_listening }
end
describe port(80) do
it { should be_listening.with('tcp') }
end
describe port(80) do
it { should be_listening.on('127.0.0.1') }
end
describe port(53) do
it { should be_listening.with('udp') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/file_spec.rb | spec/type/aix/file_spec.rb | require 'spec_helper'
set :os, {:family => 'aix'}
describe file('/tmp') do
it { should be_readable.by_user('mail') }
end
describe file('/tmp') do
it { should be_writable.by_user('mail') }
end
describe file('/tmp') do
it { should be_executable.by_user('mail') }
end
describe file('/etc/passwd') do
it { shoul... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/group_spec.rb | spec/type/aix/group_spec.rb | require 'spec_helper'
set :os, :family => 'aix'
describe group('root') do
it { should have_gid 0 }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/package_spec.rb | spec/type/aix/package_spec.rb | require 'spec_helper'
set :os, :family => 'aix'
describe package('httpd') do
it { should be_installed }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/service_spec.rb | spec/type/aix/service_spec.rb | require 'spec_helper'
set :os, :family => 'aix'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/aix/user_spec.rb | spec/type/aix/user_spec.rb | require 'spec_helper'
set :os, :family => 'aix'
describe user('root') do
it { should belong_to_group 'root' }
end
describe user('root') do
it { should have_login_shell '/bin/bash' }
end
describe user('root') do
it { should have_home_directory '/root' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat/yumrepo_spec.rb | spec/type/redhat/yumrepo_spec.rb | require 'spec_helper'
set :os, :family => 'redhat'
describe yumrepo('epel') do
it { should exist }
end
describe yumrepo('epel') do
it { should be_enabled }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat/file_spec.rb | spec/type/redhat/file_spec.rb | require 'spec_helper'
set :os, :family => 'redhat'
describe file('/tmp') do
it { should be_readable.by_user('mail') }
end
describe file('/tmp') do
it { should be_writable.by_user('mail') }
end
describe file('/tmp') do
it { should be_executable.by_user('mail') }
end
describe file('/tmp') do
it { should be_i... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat/package_spec.rb | spec/type/redhat/package_spec.rb | require 'spec_helper'
set :os, :family => 'redhat'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
it { should be_installed.by('rpm').with_version('2.2.15-28.el6') }
end
describe... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat/service_spec.rb | spec/type/redhat/service_spec.rb | require 'spec_helper'
set :os, :family => 'redhat'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/port_spec.rb | spec/type/base/port_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe port(80) do
it { should be_listening }
end
describe port(80) do
it { should be_listening.with('tcp') }
end
describe port(80) do
it do
expect {
should be_listening.with('not implemented')
}.to raise_error(ArgumentError, %r/\A`be_list... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/file_spec.rb | spec/type/base/file_spec.rb | require 'spec_helper'
set :os, {:family => 'base'}
describe file('/etc/ssh/sshd_config') do
it { should be_file }
end
describe file('/etc/ssh') do
it { should be_directory }
end
describe file('/var/run/unicorn.sock') do
it { should be_socket }
end
describe file('/dev/disk0') do
it { should be_block_device ... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/group_spec.rb | spec/type/base/group_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe group('root') do
it { should exist }
end
describe group('root') do
it { should have_gid 0 }
end
describe group('root') do
its(:gid) { should == 0 }
its(:gid) { should < 10 }
end
describe group('root') do
it { should be_is_system_group }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/package_spec.rb | spec/type/base/package_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe package('jekyll') do
it { should be_installed.by(:gem) }
end
describe package('jekyll') do
it { should be_installed.by(:gem).with_version('1.1.1') }
end
describe package('ruby') do
it { should be_installed.by(:rvm) }
end
describe package('ruby') do
... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/routing_table_spec.rb | spec/type/base/routing_table_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe routing_table do
let(:stdout) { "192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.10 \r\n" }
it { should have_entry( :destination => '192.168.100.0/24' ) }
end
describe routing_table do
let(:exit_status) { 1 }
it { should_not have_... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/default_gateway_spec.rb | spec/type/base/default_gateway_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe default_gateway do
let(:stdout) { "default via 192.168.1.1 dev eth1 \r\n" }
its(:ipaddress) { should eq '192.168.1.1' }
its(:interface) { should eq 'eth1' }
its(:ipaddress) { should_not eq '192.168.1.2' }
its(:interface) { should_not eq 'eth0' ... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/json_file_spec.rb | spec/type/base/json_file_spec.rb | require 'spec_helper'
set :os, {:family => 'base'}
describe json_file('example.json') do
let(:stdout) {<<EOF
{
"json": {
"title": "this is a json",
"array" : [
{
"title": "array 1"
},
{
"title": "array 2"
}
]
}
}
EOF
}
its(:content) { should include('json... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/php_config_spec.rb | spec/type/base/php_config_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe php_config('default_mimetype') do
let(:stdout) { 'text/html' }
its(:value) { should eq 'text/html' }
end
describe php_config('default_mimetype') do
let(:stdout) { 'text/html' }
its(:value) { should_not eq 'text/plain' }
end
describe php_config('sessi... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/mail_alias_spec.rb | spec/type/base/mail_alias_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe mail_alias('daemon') do
it { should be_aliased_to "root" }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/service_spec.rb | spec/type/base/service_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe service('sshd') do
it { should be_running }
end
describe service('sshd') do
let(:stdout) { "sshd is stopped\r\n" }
it { should be_running }
end
describe service('sshd') do
it { should be_running.under(:supervisor) }
end
describe service('sshd') do
... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/command_spec.rb | spec/type/base/command_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe command('cat /etc/resolv.conf') do
let(:stdout) { "nameserver 127.0.0.1\r\n" }
its(:stdout) { should match /nameserver 127.0.0.1/ }
end
describe 'complete matching of stdout' do
context command('cat /etc/resolv.conf') do
let(:stdout) { "foocontent-s... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/cron_spec.rb | spec/type/base/cron_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe cron do
it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
end
describe cron do
it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/php_extension_spec.rb | spec/type/base/php_extension_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe php_extension('tillext') do
let(:exit_status) { 1 }
it { should_not be_loaded }
end
describe php_extension('session') do
let(:exit_status) { 0 }
it { should be_loaded }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/host_spec.rb | spec/type/base/host_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe host('127.0.0.1') do
it { should be_resolvable }
end
describe host('127.0.0.1') do
it { should be_resolvable.by('hosts') }
end
describe host('127.0.0.1') do
it { should be_resolvable.by('dns') }
end
describe host('127.0.0.1') do
it { should be_reach... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/mysql_config_spec.rb | spec/type/base/mysql_config_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe mysql_config('innodb-buffer-pool-size') do
let(:stdout) { 'innodb-buffer-pool-size 134217728' }
its(:value) { should eq 134217728 }
end
describe mysql_config('socket') do
let(:stdout) { 'socket /tmp/mysql.sock' }
i... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/user_spec.rb | spec/type/base/user_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe user('root') do
it { should exist }
end
describe user('root') do
it { should belong_to_group 'root' }
end
describe user('root') do
it { should belong_to_primary_group 'root' }
end
describe user('root') do
it { should have_uid 0 }
end
describe user(... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/base/process_spec.rb | spec/type/base/process_spec.rb | require 'spec_helper'
set :os, :family => 'base'
describe process("memcached") do
let(:stdout) { " 1407\n" }
its(:pid) { should eq 1407 }
end
describe process("memcached") do
let(:stdout) { "/usr/bin/memcached -m 14386 -p 11211 -u nobody -l 10.11.1.53 -c 30000\n" }
its(:args) { should match /-c 30000\b/ }
en... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/port_spec.rb | spec/type/openbsd/port_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe port(80) do
it { should be_listening }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/file_spec.rb | spec/type/openbsd/file_spec.rb | require 'spec_helper'
set :os, {:family => 'openbsd'}
describe file('/etc/passwd') do
it { should be_mode 644 }
end
describe file('/etc/passwd') do
it { should be_owned_by 'root' }
end
describe file('/etc/passwd') do
it { should be_grouped_into 'root' }
end
describe file('/etc/pam.d/system-auth') do
it { s... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/interface_spec.rb | spec/type/openbsd/interface_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe interface('eth0') do
let(:stdout) { '1000' }
its(:speed) { should eq 1000 }
end
describe interface('eth0') do
it { should have_ipv4_address("192.168.10.10") }
end
describe interface('eth0') do
it { should have_ipv4_address("192.168.10.10/24") }
en... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/package_spec.rb | spec/type/openbsd/package_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/mail_alias_spec.rb | spec/type/openbsd/mail_alias_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe mail_alias('daemon') do
it { should be_aliased_to "root" }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/service_spec.rb | spec/type/openbsd/service_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/openbsd/user_spec.rb | spec/type/openbsd/user_spec.rb | require 'spec_helper'
set :os, :family => 'openbsd'
describe user('root') do
it { should have_login_shell '/bin/bash' }
end
describe user('root') do
it { should have_home_directory '/root' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/redhat7/service_spec.rb | spec/type/redhat7/service_spec.rb | require 'spec_helper'
set :os, :family => 'redhat', :release => 7
describe service('sshd') do
it { should be_enabled }
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/ubuntu/ppa_spec.rb | spec/type/ubuntu/ppa_spec.rb | require 'spec_helper'
set :os, :family => 'ubuntu'
describe ppa('username/ppa-name') do
it { should exist }
end
describe ppa('username/ppa-name') do
it { should be_enabled }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/ubuntu/service_spec.rb | spec/type/ubuntu/service_spec.rb | require 'spec_helper'
set :os, :family => 'ubuntu'
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/plamo/package_spec.rb | spec/type/plamo/package_spec.rb | require 'spec_helper'
set :os, :family => 'plamo'
describe package('httpd') do
it { should be_installed }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/plamo/service_spec.rb | spec/type/plamo/service_spec.rb | require 'spec_helper'
set :os, :family => 'plamo'
describe service('sshd') do
it { should be_enabled }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/fedora15/service_spec.rb | spec/type/fedora15/service_spec.rb | require 'spec_helper'
set :os, :family => 'fedora', :release => 15
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/suse/package_spec.rb | spec/type/suse/package_spec.rb | require 'spec_helper'
set :os, :family => 'suse'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
it { should be_installed.by('rpm').with_version('2.2.15-28.el6') }
end
describe p... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/suse/service_spec.rb | spec/type/suse/service_spec.rb | require 'spec_helper'
set :os, :family => 'suse'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/debian/package_spec.rb | spec/type/debian/package_spec.rb | require 'spec_helper'
set :os, :family => 'debian'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
it { should be_installed.by('apt').with_version('2.2.15-28.el6') }
end
describe... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/debian/service_spec.rb | spec/type/debian/service_spec.rb | require 'spec_helper'
set :os, :family => 'debian'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/darwin/port_spec.rb | spec/type/darwin/port_spec.rb | require 'spec_helper'
set :os, :family => 'darwin'
describe port(80) do
it { should be_listening }
end
describe port(80) do
it { should be_listening.with('tcp') }
end
describe port(80) do
it do
expect {
should be_listening.with('not implemented')
}.to raise_error(ArgumentError, %r/\A`be_listeni... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/darwin/file_spec.rb | spec/type/darwin/file_spec.rb | require 'spec_helper'
set :os, :family => 'darwin'
describe file('/tmp') do
it { should be_readable.by_user('mail') }
end
describe file('/tmp') do
it { should be_writable.by_user('mail') }
end
describe file('/tmp') do
it { should be_executable.by_user('mail') }
end
describe file('/etc/services') do
let(:st... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/darwin/package_spec.rb | spec/type/darwin/package_spec.rb | require 'spec_helper'
set :os, :family => 'darwin'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
it { should be_installed.by('homebrew') }
end
describe package('httpd') do
it... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/darwin/service_spec.rb | spec/type/darwin/service_spec.rb | require 'spec_helper'
set :os, :family => 'darwin'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_enabled.with_level(4) }
end
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/file_spec.rb | spec/type/linux/file_spec.rb | require 'spec_helper'
property[:os] = nil
set :os, {:family => 'linux'}
describe file('/tmp') do
it { should be_readable.by_user('mail') }
end
describe file('/tmp') do
it { should be_writable.by_user('mail') }
end
describe file('/tmp') do
it { should be_executable.by_user('mail') }
end
describe file('/tmp') ... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/docker_container_pre_1_8_spec.rb | spec/type/linux/docker_container_pre_1_8_spec.rb | # -*- coding: utf-8 -*-
require 'spec_helper'
require 'json'
property[:os] = nil
set :os, {:family => 'linux'}
describe docker_container('c1') do
it { should exist }
end
describe docker_container('c1 pre 1.8') do
let(:stdout) { inspect_container }
it { should be_running }
it { should have_volume('/tmp', '/da... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/cgroup_spec.rb | spec/type/linux/cgroup_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe cgroup('group1') do
let(:stdout) { "1\r\n" }
its('cpuset.cpus') { should eq 1 }
end
describe cgroup('group1') do
let(:stdout) { "1\r\n" }
its('cpuset.cpus') { should_not eq 0 }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/interface_spec.rb | spec/type/linux/interface_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe interface('eth0') do
let(:stdout) { '1000' }
its(:speed) { should eq 1000 }
end
describe interface('eth0') do
let(:stdout) { '1500' }
its(:mtu) { should eq 1500 }
end
describe interface('eth0') do
it { should have_ipv4_address('192.168.10.10') }
e... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/kernel_module_spec.rb | spec/type/linux/kernel_module_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe kernel_module('lp') do
it { should be_loaded }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/ip6tables_spec.rb | spec/type/linux/ip6tables_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe ip6tables do
it { should have_rule '-P INPUT ACCEPT' }
end
describe ip6tables do
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/selinux_spec.rb | spec/type/linux/selinux_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe selinux do
it { should be_enforcing }
end
describe selinux do
it { should be_enforcing.with_policy('mls') }
end
describe selinux do
it { should be_permissive }
end
describe selinux do
it { should be_permissive.with_policy('targeted') }
end
describ... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/linux_kernel_parameter_spec.rb | spec/type/linux/linux_kernel_parameter_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe linux_kernel_parameter('net.ipv4.tcp_syncookies') do
let(:stdout) { "1\n" }
its(:value) { should eq 1 }
end
describe linux_kernel_parameter('net.ipv4.tcp_syncookies') do
let(:stdout) { "1\n" }
its(:value) { should_not eq 2 }
end
describe linux_kerne... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/bridge_spec.rb | spec/type/linux/bridge_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe bridge('br0') do
it { should exist }
end
describe bridge('br0') do
let(:stdout) { 'eth0' }
it { should have_interface 'eth0' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/bond_spec.rb | spec/type/linux/bond_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe bond('bond0') do
it { should exist }
end
describe bond('bond0') do
let(:stdout) { 'eth0' }
it { should have_interface 'eth0' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/iptables_spec.rb | spec/type/linux/iptables_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe iptables do
it { should have_rule '-P INPUT ACCEPT' }
end
describe iptables do
it { should have_rule('-P INPUT ACCEPT').with_table('mangle').with_chain('INPUT') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/fstab_spec.rb | spec/type/linux/fstab_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe fstab do
let(:stdout) { "/dev/sda1 /mnt ext4 ro,errors=remount-ro,barrier=0 0 2\r\n" }
it { should have_entry( :mount_point => '/mnt' ) }
end
describe fstab do
let(:exit_status) { 1 }
it { should_not have_entry( :mount_point => '/mnt' ) }
end
descri... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/selinux_module_spec.rb | spec/type/linux/selinux_module_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe selinux_module('bootloader') do
it { should be_installed }
end
describe selinux_module('bootloader') do
it { should be_installed.with_version('1.10') }
end
describe selinux_module('bootloader') do
it { should be_enabled }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/zfs_spec.rb | spec/type/linux/zfs_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe zfs('rpool') do
it { should exist }
end
describe zfs('rpool') do
it { should have_property 'mountpoint' => '/rpool' }
end
describe zfs('rpool') do
it { should have_property 'mountpoint' => '/rpool', 'compression' => 'off' }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/docker_container_spec.rb | spec/type/linux/docker_container_spec.rb | # -*- coding: utf-8 -*-
require 'spec_helper'
require 'multi_json'
property[:os] = nil
set :os, {:family => 'linux'}
describe docker_container('c1') do
it { should exist }
end
describe docker_container('c1') do
let(:stdout) { inspect_container }
it { should be_running }
it { should have_volume('/tmp', '/data... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/lxc_container_spec.rb | spec/type/linux/lxc_container_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe lxc('ct01') do
it { should exist }
end
describe lxc('ct01') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/x509_certificate_spec.rb | spec/type/linux/x509_certificate_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe x509_certificate('test.pem') do
let(:exit_status) { 0 }
it { should be_certificate }
end
describe x509_certificate('test.pem') do
let(:exit_status) { 1 }
it { should_not be_certificate }
end
describe x509_certificate('test-openssl-1.0.pem') do
let... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/kvm_guest_spec.rb | spec/type/linux/kvm_guest_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe kvm('ct01') do
it { should exist }
end
describe kvm('ct01') do
it { should be_running }
end
describe kvm('ct01') do
it { should be_enabled }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/docker_image_spec.rb | spec/type/linux/docker_image_spec.rb | # -*- coding: utf-8 -*-
require 'spec_helper'
property[:os] = nil
set :os, {:family => 'linux'}
describe docker_image('busybox:latest') do
it { should exist }
end
describe docker_image('busybox:latest') do
let(:stdout) { inspect_image }
its(:inspection) { should include 'Architecture' => 'amd64' }
its(['Arch... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/linux_audit_system_spec.rb | spec/type/linux/linux_audit_system_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe linux_audit_system do
let(:stdout) { out_auditctl1_1 }
it { should be_enabled }
end
describe linux_audit_system do
let(:stdout) { out_auditctl1_2 }
it { should_not be_enabled }
end
describe linux_audit_system do
let(:stdout) { out_auditctl1_1 }
... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/linux/x509_private_key_spec.rb | spec/type/linux/x509_private_key_spec.rb | require 'spec_helper'
set :os, :family => 'linux'
describe x509_private_key('key.pem') do
let(:exit_status) { 0 }
let(:stdout) { 'RSA key ok' }
it { should be_valid }
end
describe x509_private_key('key.pem') do
let(:exit_status) { 1 }
let(:stdout) { 'RSA key ok' }
it { should_not be_valid }
end
describe... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/freebsd10/package_spec.rb | spec/type/freebsd10/package_spec.rb | require 'spec_helper'
set :os, :family => 'freebsd', :release => 10
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
let(:stdout) { "2.2.15\n" }
its(:version) { should eq '2.2.15... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/arch/file_spec.rb | spec/type/arch/file_spec.rb | require 'spec_helper'
set :os, :family => 'arch'
describe file('/tmp') do
it { should be_readable.by_user('mail') }
end
describe file('/tmp') do
it { should be_writable.by_user('mail') }
end
describe file('/tmp') do
it { should be_executable.by_user('mail') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/arch/package_spec.rb | spec/type/arch/package_spec.rb | require 'spec_helper'
set :os, :family => 'arch'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
let(:stdout) { "2.2.15\n" }
its(:version) { should eq '2.2.15' }
its(:version)... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/arch/service_spec.rb | spec/type/arch/service_spec.rb | require 'spec_helper'
set :os, :family => 'arch'
describe service('sshd') do
it { should be_enabled }
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/gentoo/package_spec.rb | spec/type/gentoo/package_spec.rb | require 'spec_helper'
set :os, :family => 'gentoo'
describe package('httpd') do
it { should be_installed }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/gentoo/service_spec.rb | spec/type/gentoo/service_spec.rb | require 'spec_helper'
set :os, :family => 'gentoo'
describe service('sshd') do
it { should be_enabled }
end
describe service('sshd') do
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/nixos/package_spec.rb | spec/type/nixos/package_spec.rb | require 'spec_helper'
set :os, :family => 'nixos'
describe package('httpd') do
it { should be_installed }
end
describe package('httpd') do
it { should be_installed.with_version('2.2.15-28.el6') }
end
describe package('httpd') do
it { should be_installed.by('nix').with_version('2.2.15-28.el6') }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/nixos/service_spec.rb | spec/type/nixos/service_spec.rb | require 'spec_helper'
set :os, :family => 'nixos'
describe service('sshd') do
it { should be_enabled }
it { should be_running }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/port_spec.rb | spec/type/windows/port_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe port(80) do
it { should be_listening }
end
describe port(80) do
it { should be_listening.with("tcp") }
end
describe port(123) do
it { should be_listening.with("udp") }
end
describe port(80) do
it {
expect {
should b... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/file_spec.rb | spec/type/windows/file_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe file('/some/valid/file') do
it { should be_file }
end
describe file('/some/valid/folder') do
it { should be_directory }
end
describe file('/some/file') do
it { should contain 'search text' }
end
describe file('/some/file') do
... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/scheduled_task_spec.rb | spec/type/windows/scheduled_task_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe windows_scheduled_task('foo') do
it { should exist }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/iis_webisite_spec.rb | spec/type/windows/iis_webisite_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe iis_website('Default Website') do
it { should exist }
it { should be_enabled }
it { should be_running }
it { should be_in_app_pool('Default App Pool') }
it { should have_physical_path('C:\\inetpub\\www') }
it { should have_s... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/group_spec.rb | spec/type/windows/group_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe group('test.group') do
it { should exist }
end
describe group('test.domain\test.group') do
it { should exist }
end
describe group('test.group') do
it "should raise error if command is not supported" do
{
:have_gid => [... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/registry_key_spec.rb | spec/type/windows/registry_key_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe windows_registry_key('PATH/TO/THE_KEY') do
it { should exist }
end
describe windows_registry_key('PATH/TO/THE_KEY') do
it { should have_value('Test Value') }
end
describe 'Key value types' do
context 'default type' do
describe... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/package_spec.rb | spec/type/windows/package_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe package('foo') do
it { should be_installed }
end
| ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/iis_app_pool_spec.rb | spec/type/windows/iis_app_pool_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe iis_app_pool('Default App Pool') do
it { should exist }
it { should have_dotnet_version('2.0') }
it { should have_32bit_enabled }
it { should have_idle_timeout(5) }
it { should have_identity_type('foo') }
it { should have_per... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/service_spec.rb | spec/type/windows/service_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe service('Test Service') do
it { should be_enabled }
end
describe service('Test Service') do
it { should be_running }
end
describe service('service') do
it { should be_installed }
end
describe service('service') do
it { should ... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/command_spec.rb | spec/type/windows/command_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe command('test_cmd /test/path/file') do
let(:stdout) { "test output 1.2.3\r\n" }
its(:stdout) { should match /test output 1.2.3/ }
end
describe 'complete matching of stdout' do
context command('test_cmd /test/path/file') do
let(... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/hot_fix_spec.rb | spec/type/windows/hot_fix_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe windows_hot_fix('DESCRIPTION-OR-KB-ID') do
it { should be_installed }
end
describe windows_hot_fix('DESCRIPTION') do
it { should be_installed.with_version('KB-ID') }
end
describe windows_hot_fix('DESCRIPTION_WITH_KB123456789_INLINE... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
mizzy/serverspec | https://github.com/mizzy/serverspec/blob/a0acb13102f60b89c7e4e74b679b7786df6c97a6/spec/type/windows/host_spec.rb | spec/type/windows/host_spec.rb | require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
describe host('127.0.0.1') do
it { should be_resolvable }
end
describe host('127.0.0.1') do
it { should be_resolvable.by('hosts') }
end
describe host('127.0.0.1') do
it { should be_resolvable.by('dns') }
end
describe host('127.0.0.1') do
... | ruby | MIT | a0acb13102f60b89c7e4e74b679b7786df6c97a6 | 2026-01-04T15:54:51.970620Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.