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 | microsoftgraph/msgraph-sample-rubyrailsapp | https://github.com/microsoftgraph/msgraph-sample-rubyrailsapp | graph-sample/db/schema.rb | Ruby | mit | 97 | main | 1,117 | # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rai... |
github | microsoftgraph/msgraph-sample-rubyrailsapp | https://github.com/microsoftgraph/msgraph-sample-rubyrailsapp | graph-sample/db/migrate/20221004165905_add_sessions_table.rb | Ruby | mit | 97 | main | 292 | class AddSessionsTable < ActiveRecord::Migration[7.0]
def change
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id, :unique => true
add_index :sessions, :updated_at
end
end |
github | lynxman/hiera-consul | https://github.com/lynxman/hiera-consul | lib/hiera/backend/consul_backend.rb | Ruby | apache-2.0 | 97 | master | 5,554 | # Hiera backend for Consul
class Hiera
module Backend
class Consul_backend
def initialize()
require 'net/http'
require 'net/https'
require 'json'
@config = Config[:consul]
if (@config[:host] && @config[:port])
@consul = Net::HTTP.new(@config[:host], @config... |
github | lynxman/hiera-consul | https://github.com/lynxman/hiera-consul | lib/puppet/parser/functions/consul_info.rb | Ruby | apache-2.0 | 97 | master | 1,625 | module Puppet::Parser::Functions
newfunction(:consul_info, :type => :rvalue, :doc => <<-EOS
Parse the incoming consul info and return a value
EOS
) do |args|
data = args[0]
field = args[1]
if args[2]
separator = args[2]
else
separator = ":"
end
debug("consul-info() :: Deter... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | matplotlib.gemspec | Ruby | mit | 97 | master | 1,018 | # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'matplotlib/version'
Gem::Specification.new do |spec|
spec.name = "matplotlib"
spec.version = MATPLOTLIB_VERSION
spec.authors = ["Kenta Murata"]
spec.email = [... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | spec/spec_helper.rb | Ruby | mit | 97 | master | 469 | $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "matplotlib"
Dir.glob(File.expand_path('../support/**/*.rb', __FILE__)) do |file|
require file
end
RSpec.configure do |config|
config.disable_monkey_patching!
config.expose_current_running_example_as :example
config.filter_run_when_matching :... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | spec/matplotlib_spec.rb | Ruby | mit | 97 | master | 803 | require "spec_helper"
RSpec.describe Matplotlib do
it "has a version number" do
expect(Matplotlib::VERSION).not_to be nil
end
describe Matplotlib::Axis::XAxis do
specify do
fig = Matplotlib::Pyplot.figure
ax = fig.add_axes(PyCall.tuple([0.1, 0.2, 0.8, 0.7]))
expect(ax.xaxis).to be_a(Ma... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | spec/matplotlib/pyplot_spec.rb | Ruby | mit | 97 | master | 762 | require 'spec_helper'
require 'matplotlib/pyplot'
module Matplotlib
::RSpec.describe Pyplot do
describe '.xkcd' do
specify do
saved_font_family = Matplotlib.rcParams['font.family']
saved_path_sketch = Matplotlib.rcParams['path.sketch']
expect { |b|
Pyplot.xkcd(scale: 42, l... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | lib/matplotlib.rb | Ruby | mit | 97 | master | 604 | require 'matplotlib/version'
require 'pycall'
Matplotlib = PyCall.import_module('matplotlib')
module Matplotlib
VERSION = MATPLOTLIB_VERSION
Object.class_eval { remove_const :MATPLOTLIB_VERSION }
# FIXME: MacOSX backend is unavailable via pycall.
# I don't know why it is.
if get_backend == 'MacOSX'
... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | lib/matplotlib/iruby.rb | Ruby | mit | 97 | master | 9,116 | require 'matplotlib'
module Matplotlib
module IRuby
module HookExtension
def self.extended(obj)
@event_registry ||= {}
@event_registry[obj] = {}
end
def self.register_event(target, event, hook)
@event_registry[target][event] ||= []
@event_registry[target][event]... |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | lib/matplotlib/pyplot.rb | Ruby | mit | 97 | master | 294 | require 'matplotlib'
module Matplotlib
Pyplot = PyCall.import_module('matplotlib.pyplot')
module Pyplot
def self.xkcd(scale: 1, length: 100, randomness: 2, &block)
ctx = super(scale: scale, length: length, randomness: randomness)
PyCall.with(ctx, &block)
end
end
end |
github | red-data-tools/matplotlib.rb | https://github.com/red-data-tools/matplotlib.rb | lib/matplotlib/axis.rb | Ruby | mit | 97 | master | 382 | module Matplotlib
Axis = PyCall.import_module('matplotlib.axis')
module Axis
XTick = self.XTick
XTick.__send__ :register_python_type_mapping
YTick = self.YTick
YTick.__send__ :register_python_type_mapping
XAxis = self.XAxis
XAxis.__send__ :register_python_type_mapping
YAxis = self.YAx... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | add_to_calendar.gemspec | Ruby | mit | 97 | main | 1,680 | lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "add_to_calendar/version"
Gem::Specification.new do |spec|
spec.name = "add_to_calendar"
spec.version = AddToCalendar::VERSION
spec.authors = ["Jared Turner"]
spec.email = ["jared... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/test_helper.rb | Ruby | mit | 97 | main | 220 | $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "add_to_calendar"
require "minitest/autorun"
require "timecop"
require "pry"
Dir[File.expand_path('support/**/*.rb', __dir__)].each { |file| require file } |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/add_to_calendar_test.rb | Ruby | mit | 97 | main | 11,993 | require "test_helper"
class AddToCalendarTest < Minitest::Test
def setup
# TODO: DRY this in test_helper to be shared across all test files
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/support/assertions/hey_url_assertions.rb | Ruby | mit | 97 | main | 1,862 | require 'uri'
require 'cgi'
module Minitest::Assertions
def assert_hey_urls_equal(expected, actual, msg = nil)
differences = compare_hey_urls(expected, actual)
if differences.empty?
assert true # URLs are identical
else
failure_message = build_failure_message(differences)
msg = mes... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/hey_url_test.rb | Ruby | mit | 97 | main | 16,569 | require "test_helper"
class HeyUrlTest < Minitest::Test
def setup
# We need to freeze time on each test because DTSTAMP is generated via Time.now
Timecop.freeze(Time.now.utc)
end
def teardown
Timecop.return
end
def test_without_end_datetime_ends_one_hour_after_start
event = TestEvent.new(... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/yahoo_url_test.rb | Ruby | mit | 97 | main | 8,955 | require "test_helper"
class YahooUrlTest < Minitest::Test
def setup
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftime('%d')
@hour = 13
@minute = 30
@second = 00
one_day... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/office365_test.rb | Ruby | mit | 97 | main | 12,647 | require "test_helper"
class Office365UrlTest < Minitest::Test
def setup
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftime('%d')
@hour = 13
@minute = 30
@second = 00
one... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/ical_url_test.rb | Ruby | mit | 97 | main | 14,932 | require "test_helper"
class IcalUrlTest < Minitest::Test
def setup
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftime('%d')
one_day = 1 * 24 * 60 * 60
@next_month_year_plus_one_d... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/outlook_com_url_test.rb | Ruby | mit | 97 | main | 12,618 | require "test_helper"
class OutlookComUrlTest < Minitest::Test
def setup
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftime('%d')
@hour = 13
@minute = 30
@second = 00
on... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/dates_test.rb | Ruby | mit | 97 | main | 1,354 | require "test_helper"
class DatessTest < Minitest::Test
def setup
# TODO: DRY this in test_helper to be shared across all test files
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftim... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | test/urls/google_url_test.rb | Ruby | mit | 97 | main | 9,605 | require "test_helper"
class GoogleUrlTest < Minitest::Test
def setup
next_month = Time.now + 60*60*24*30
@next_month_year = next_month.strftime('%Y')
@next_month_month = next_month.strftime('%m')
@next_month_day = next_month.strftime('%d')
one_day = 1 * 24 * 60 * 60
@next_month_year_plus_one... |
github | jaredlt/add_to_calendar | https://github.com/jaredlt/add_to_calendar | lib/add_to_calendar.rb | Ruby | mit | 97 | main | 14,787 | require "add_to_calendar/version"
# erb util needed for url_encode method
# CGI::escape uses + instead of %20 which doesn't work for ical files
require "erb"
include ERB::Util
require 'tzinfo'
require 'date'
# require 'pry'
module AddToCalendar
class Error < StandardError; end
class URLs
attr_accessor :sta... |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | rails-vue-loader.gemspec | Ruby | mit | 97 | master | 900 | $:.unshift File.expand_path("../lib", __FILE__)
require 'sprockets/vue/version'
Gem::Specification.new do |s|
s.name = 'rails-vue-loader'
s.version = Sprockets::Vue::VERSION
s.homepage = "https://github.com/kikyous/rails-vue-loader"
s.summary = "Sprockets Vue transformer"
s.description = <<-EOS
... |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | lib/rails-vue-loader.rb | Ruby | mit | 97 | master | 486 | require 'sprockets'
require 'sprockets/vue/version'
require 'sprockets/vue/utils'
require 'sprockets/vue/script'
require 'sprockets/vue/style'
module Sprockets
if respond_to?(:register_transformer)
register_mime_type 'text/vue', extensions: ['.vue'], charset: :unicode
register_transformer 'text/vue', 'applica... |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | lib/sprockets/vue/style.rb | Ruby | mit | 97 | master | 709 | module Sprockets::Vue
class Style
class << self
STYLE_REGEX = Utils.node_regex('style')
STYLE_COMPILES = {
'scss' => Sprockets::ScssProcessor,
'sass' => Sprockets::SassProcessor,
nil => ->(i){i[:data]}
}
def call(input)
data = input[:data]
input[:cac... |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | lib/sprockets/vue/script.rb | Ruby | mit | 97 | master | 1,638 | require 'active_support/concern'
require "action_view"
module Sprockets::Vue
class Script
class << self
include ActionView::Helpers::JavaScriptHelper
SCRIPT_REGEX = Utils.node_regex('script')
TEMPLATE_REGEX = Utils.node_regex('template')
SCRIPT_COMPILES = {
'coffee' => ->(s, input... |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | lib/sprockets/vue/utils.rb | Ruby | mit | 97 | master | 213 | module Sprockets::Vue::Utils
class << self
def node_regex(tag)
%r(
\<#{tag}
(\s+lang=["'](?<lang>\w+)["'])?
\>
(?<content>.+)
\<\/#{tag}\>
)mx
end
end
end |
github | kikyous/rails-vue-loader | https://github.com/kikyous/rails-vue-loader | test/test_vue.rb | Ruby | mit | 97 | master | 1,140 | require 'minitest/autorun'
require 'sprockets'
require 'sprockets/vue'
require 'execjs'
require "coffee-script"
require 'sass'
require 'pry'
class TestVue < MiniTest::Test
def setup
@env = Sprockets::Environment.new
@env.append_path File.expand_path("../fixtures", __FILE__)
end
def test_directive
as... |
github | sous-chefs/line | https://github.com/sous-chefs/line | metadata.rb | Ruby | apache-2.0 | 97 | main | 512 | name 'line'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Provides line editing resources for use by recipes'
version '4.6.0'
source_url 'https://github.com/sous-chefs/line'
issues_url 'https://github.com/sous-chef... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/chefspec_helper.rb | Ruby | apache-2.0 | 97 | main | 308 | Dir.glob('libraries/*.rb').each do |lib|
require_relative "../#{lib}"
end
require 'berkshelf'
require 'chefspec'
require 'chefspec/berkshelf'
RSpec.configure do |config|
config.expose_dsl_globally = true
config.mock_with :rspec do |mocks|
mocks.allow_message_expectations_on_nil = true
end
end |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/recipes/add_to_list_missing_file_spec.rb | Ruby | apache-2.0 | 97 | main | 1,056 | #
# Cookbook:: line
# Spec:: add_to_list_missing_file
#
# Copyright:: 2017 Sous Chefs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/recipes/append_if_no_line_missing_file_spec.rb | Ruby | apache-2.0 | 97 | main | 1,074 | #
# Cookbook:: line
# Spec:: append_if_no_line_missing_file
#
# Copyright:: 2017 Sous Chefs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/recipes/replace_or_add_missing_file_spec.rb | Ruby | apache-2.0 | 97 | main | 1,065 | #
# Cookbook:: line
# Spec:: replace_or_add_missing_file
#
# Copyright:: 2017 Sous Chefs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/recipes/delete_lines_missing_file_spec.rb | Ruby | apache-2.0 | 97 | main | 1,059 | #
# Cookbook:: line
# Spec:: delete_lines_missing_file
#
# Copyright:: 2017 Sous Chefs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/recipes/delete_from_list_missing_file_spec.rb | Ruby | apache-2.0 | 97 | main | 1,071 | #
# Cookbook:: line
# Spec:: delete_from_list_missing_file
#
# Copyright:: 2017 Sous Chefs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/helper_spec.rb | Ruby | apache-2.0 | 97 | main | 3,545 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/list_helper_spec.rb | Ruby | apache-2.0 | 97 | main | 13,320 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/verify_kind_spec.rb | Ruby | apache-2.0 | 97 | main | 1,378 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/match_limits_spec.rb | Ruby | apache-2.0 | 97 | main | 1,463 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/missing_line_between_spec.rb | Ruby | apache-2.0 | 97 | main | 1,985 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/string_to_lines_spec.rb | Ruby | apache-2.0 | 97 | main | 1,144 | #
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing perm... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/next_match_after_spec.rb | Ruby | apache-2.0 | 97 | main | 1,377 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/match_insert_lines_spec.rb | Ruby | apache-2.0 | 97 | main | 1,890 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/expand_spec.rb | Ruby | apache-2.0 | 97 | main | 2,899 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/options_spec.rb | Ruby | apache-2.0 | 97 | main | 1,565 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/verify_all_of_spec.rb | Ruby | apache-2.0 | 97 | main | 1,507 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/verify_one_of_spec.rb | Ruby | apache-2.0 | 97 | main | 1,196 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter_helper/chomp_spec.rb | Ruby | apache-2.0 | 97 | main | 1,276 | #
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing perm... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/comment_spec.rb | Ruby | apache-2.0 | 97 | main | 2,194 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/between_spec.rb | Ruby | apache-2.0 | 97 | main | 1,444 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/substitute_spec.rb | Ruby | apache-2.0 | 97 | main | 3,860 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/stanza_spec.rb | Ruby | apache-2.0 | 97 | main | 4,970 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/delete_between_spec.rb | Ruby | apache-2.0 | 97 | main | 3,098 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/before_spec.rb | Ruby | apache-2.0 | 97 | main | 4,386 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/replace_between_spec.rb | Ruby | apache-2.0 | 97 | main | 4,213 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/missing_spec.rb | Ruby | apache-2.0 | 97 | main | 2,867 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/replace_spec.rb | Ruby | apache-2.0 | 97 | main | 2,946 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/unit/library/filter/after_spec.rb | Ruby | apache-2.0 | 97 | main | 4,843 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | spec/cookbook/documentation_spec.rb | Ruby | apache-2.0 | 97 | main | 446 | require 'rspec_helper'
require 'ostruct'
link_lines = `egrep -R 'https:\/\/github.com\/sous-chefs\/line' *`.split("\n")
line_files = link_lines.map do |line|
md = %r{\]\(https://github.com/sous-chefs/line/blob/master/(.*)\)}.match(line)
md ? md[1] : nil
end
describe 'linked documentation files exist' do
line_fi... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/delete_between.rb | Ruby | apache-2.0 | 97 | main | 2,213 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/between.rb | Ruby | apache-2.0 | 97 | main | 1,284 | # Filter to insert lines between two matches
module Line
class Filter
def between(current, args)
# Insert a set of lines between lines of two matching patterns
# current is an array of lines
# args[0] is a pattern. Insert lines after this pattern
# args[1] is a pattern. Insert lines before... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/stanza_filter.rb | Ruby | apache-2.0 | 97 | main | 5,106 | # Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/filter_helper.rb | Ruby | apache-2.0 | 97 | main | 5,111 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/after_filter.rb | Ruby | apache-2.0 | 97 | main | 2,542 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/replace_between.rb | Ruby | apache-2.0 | 97 | main | 3,060 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/helper.rb | Ruby | apache-2.0 | 97 | main | 2,730 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/list_helper.rb | Ruby | apache-2.0 | 97 | main | 4,400 | #
# Copyright:: 2019 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/missing_filter.rb | Ruby | apache-2.0 | 97 | main | 1,664 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/before_filter.rb | Ruby | apache-2.0 | 97 | main | 2,892 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/substitute_filter.rb | Ruby | apache-2.0 | 97 | main | 1,953 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/replace_filter.rb | Ruby | apache-2.0 | 97 | main | 1,479 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | libraries/comment_filter.rb | Ruby | apache-2.0 | 97 | main | 1,510 | #
# Copyright:: 2018 Sous Chefs
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_from_list/inspec/controls/delete_from_list_1d.rb | Ruby | apache-2.0 | 97 | main | 391 | #
# Delete from list with 1 deliminator ,
#
control 'delete_from_list_1d' do
describe file('/tmp/1d') do
it { should exist }
its('content') { should match /^People to call: Bobby, Karen$/ }
its('content') { should_not match /^\s*kernel .*\s+rhgb\s+/ }
end
describe file_ext('/tmp/1d') do
it { shou... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_from_list/inspec/controls/delete_from_list_empty.rb | Ruby | apache-2.0 | 97 | main | 243 | #
# Delete from empty file
#
control 'delete_from_list_empty' do
describe file('/tmp/emptyfile') do
it { should exist }
its('size') { should eq 0 }
end
describe file('/tmp/missingfile') do
it { should_not exist }
end
end |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_from_list/inspec/controls/delete_from_list_3d.rb | Ruby | apache-2.0 | 97 | main | 384 | #
# Delete from list with 3 deliminators [], []
#
control 'delete_from_list_3d' do
describe file('/tmp/3d') do
it { should exist }
its('content') { should match /^multi = \(\[310\]\)$/ }
its('content') { should match /^wo3d_list=\[second3\]$/ }
end
describe file_ext('/tmp/3d') do
it { should have... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_from_list/inspec/controls/delete_from_list_2d.rb | Ruby | apache-2.0 | 97 | main | 423 | #
# Delete from list with 2 deliminators ||, ||
#
control 'delete_from_list_2d' do
describe file('/tmp/2d') do
it { should exist }
its('content') { should match %r{^my @net1918 = \("172.16.0.0/12", "192.168.0.0/16"\);$} }
its('content') { should match /^last_delimited_list= \(\)$/ }
end
describe file... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/line_resources/libraries/file_ext.rb | Ruby | apache-2.0 | 97 | main | 766 | class FileExtResource < Inspec.resource(1)
name 'file_ext'
desc '
Check the number of lines in a file
'
example "
describe file_ext('/tmp/output') do
its('size_lines') { should eq 7 }
end
"
def initialize(path)
@path = path
@file = inspec.backend.file(path)
end
%w(size_line... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/line_resources/libraries/matches.rb | Ruby | apache-2.0 | 97 | main | 603 | class MatchResource < Inspec.resource(1)
name 'matches'
desc '
Check the number of occurances of a match in a file
'
example "
describe matches('/tmp/output', /^$/) do
its('count') { should eq 1 }
end
"
def initialize(path, pattern)
@path = path
@pattern = pattern
@file = in... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_lines/inspec/controls/delete_lines_string.rb | Ruby | apache-2.0 | 97 | main | 579 | #
# Delete lines using string pattern
#
control 'delete_lines_string' do
describe file('/tmp/string_pattern_1') do
it { should exist }
its('content') { should_not match /^HELLO.*/ }
end
describe file_ext('/tmp/string_pattern_1') do
it { should have_correct_eol }
its('size_lines') { should eq 4 }
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_lines/inspec/controls/delete_lines_regexp.rb | Ruby | apache-2.0 | 97 | main | 578 | #
# Delete lines using regex pattern
#
control 'delete_lines_regexp' do
describe file('/tmp/regexp_pattern_1') do
it { should exist }
its('content') { should_not match /^HELLO.*/ }
end
describe file_ext('/tmp/regexp_pattern_1') do
it { should have_correct_eol }
its('size_lines') { should eq 4 }
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/delete_lines/inspec/controls/delete_lines_empty.rb | Ruby | apache-2.0 | 97 | main | 243 | #
# Delete lines on empty file
#
control 'delete_lines_empty' do
describe file('/tmp/emptyfile') do
it { should exist }
its('size') { should eq 0 }
end
describe file('/tmp/missingfile') do
it { should_not exist }
end
end |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/append_if_no_line/inspec/controls/append_if_no_line_empty.rb | Ruby | apache-2.0 | 97 | main | 1,036 | #
# Append a line to an empty file
#
control 'append_if_no_line_empty' do
describe file('/tmp/emptyfile') do
it { should exist }
its('content') { should match /^added line$/ }
end
describe file_ext('/tmp/emptyfile') do
it { should have_correct_eol }
its('size_lines') { should eq 1 }
end
desc... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/append_if_no_line/inspec/controls/append_if_no_line_template.rb | Ruby | apache-2.0 | 97 | main | 468 | #
# Append to complex file
#
control 'append_if_no_line_teplate' do
describe file('/tmp/add_line_file') do
it { should exist }
its('content') { should match /^HI THERE I AM STRING$/ }
its('content') { should match /^last line$/ }
its('content') { should match %r{^AM I A STRING\?\+\'\"\.\*/\-\\\(\)\{\... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/append_if_no_line/inspec/controls/append_if_no_line_single_line.rb | Ruby | apache-2.0 | 97 | main | 401 | #
# Append to simple file
#
control 'append_if_no_line_single_line' do
describe file('/tmp/single_line_file') do
it { should exist }
its('content') { should match /^single line file$/ }
its('content') { should match /^SHOULD GO ON ITS OWN LINE$/ }
end
describe file_ext('/tmp/single_line_file') do
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_stanza.rb | Ruby | apache-2.0 | 97 | main | 605 | #
# Spec tests for the stanza filter
#
control 'filter_lines_stanza' do
describe file('/tmp/stanza') do
it { should exist }
end
describe ini('/tmp/stanza') do
its('libvas.use-dns-srv') { should cmp 'false' }
its('libvas.mscldap-timeout') { should cmp 5 }
its('nss_vas.addme') { should cmp 'option'... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_replace.rb | Ruby | apache-2.0 | 97 | main | 527 | #
# Spec tests for the replace filter
#
control 'filter_lines_replace' do
describe file('/tmp/replace') do
it { should exist }
its('content') { should_not match /^HELLO THERE I AM DANGERFILE/ }
its('content') { should_not match /^COMMENT ME AND I STOP YELLING I PROMISE/ }
end
describe matches('/tmp/r... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_multi.rb | Ruby | apache-2.0 | 97 | main | 537 | #
# Spec tests for the multiple filters
#
control 'filter_lines_multi' do
describe file('/tmp/multiple_filters') do
it { should exist }
its('content') { should match(/^HELLO THERE I AM DANGERFILE\r?\nline1\r?\nline2\r?\nline3$/) }
its('content') { should match(/^COMMENT ME AND I STOP YELLING I PROMISE\r?... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_after.rb | Ruby | apache-2.0 | 97 | main | 1,837 | #
# Spec tests for the after filter
#
control 'filter_lines_after - Verify the code to use the after filter.' do
describe file('/tmp/after_text') do
its('content') { should match(/HELLO THERE I AM DANGERFILE\r?\nline1\r?\nline2\r?\nline3\r?\n# UN/) }
its('content') { should match(/COMMENT ME AND I STOP YELLI... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_inline.rb | Ruby | apache-2.0 | 97 | main | 717 | #
# Spec tests for the inline filters
#
control 'filter_lines_inlune' do
describe file('/tmp/inline_nothing') do
it { should exist }
its('content') do
should cmp <<~EOF
sator
arepo
tenet
opera
rotas
EOF
end
end
describe file_ext('/tmp/inline_nothing') do
it... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_delete_between.rb | Ruby | apache-2.0 | 97 | main | 440 | #
# Spec tests for the delete_between filter
#
control 'filter_lines_delete_between' do
describe file('/tmp/delete_between') do
it { should exist }
its('content') { should_not match /^kernel/ }
end
describe matches('/tmp/delete_between', /crashkernel/) do
its('count') { should eq 1 }
end
describe... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_replace_between.rb | Ruby | apache-2.0 | 97 | main | 507 | #
# Spec tests for the replace_between filter
#
control 'filter_lines_replace_between' do
describe file('/tmp/replace_between') do
it { should exist }
its('content') { should match(/FOOL\r?\nline1\r?\nline2\r?\nline3\r?\nint/) }
end
describe matches('/tmp/replace_between', /FOOL\r?\nline1\r?\nline2\r?\nl... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_misc.rb | Ruby | apache-2.0 | 97 | main | 549 | #
# Spec tests for the nonstatdard properties
#
control 'filter_lines_other_props' do
describe file('/tmp/missingfile') do
it { should_not exist }
end
describe file('/tmp/emptyfile') do
it { should exist }
its('size') { should eq 0 }
end
describe file('/tmp/safe_bypass') do
it { should exis... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_before.rb | Ruby | apache-2.0 | 97 | main | 1,341 | #
# Spec tests for the before filter
#
control 'filter_lines_before' do
describe file('/tmp/before') do
its('content') { should match(/^line1\r?\nline2\r?\nline3\r?\nHELLO THERE/) }
its('content') { should match(/^line1\r?\nline2\r?\nline3\r?\nCOMMENT ME/) }
end
describe matches('/tmp/before', /^line1\r?\... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_substitue.rb | Ruby | apache-2.0 | 97 | main | 369 | #
# Spec tests for the substitute filter
#
control 'filter_lines_substitute' do
describe file('/tmp/substitute') do
it { should exist }
end
describe matches('/tmp/substitute', /start_list/) do
its('count') { should eq 1 }
end
describe file_ext('/tmp/substitute') do
it { should have_correct_eol }
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_between.rb | Ruby | apache-2.0 | 97 | main | 449 | #
# Spec tests for the between filter
#
control 'filter_lines_between' do
describe file('/tmp/between') do
it { should exist }
its('content') { should match /^empty_list=\r?\nadd line\r?\nempty_delimited_list=\(\)$/ }
end
describe matches('/tmp/between', /^add line$/) do
its('count') { should eq 1 }
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/filter_lines/controls/filter_lines_comment.rb | Ruby | apache-2.0 | 97 | main | 399 | #
# Spec tests for the comment filter
#
control 'filter_lines_comment' do
describe file('/tmp/comment') do
it { should exist }
its('content') { should_not match /^COMMENT ME/ }
end
describe matches('/tmp/comment', /^#/) do
its('count') { should eq 3 }
end
describe file_ext('/tmp/comment') do
... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/add_to_list/inspec/controls/add_to_list_1d.rb | Ruby | apache-2.0 | 97 | main | 388 | #
# Test for lists with 1 delimitor ,
#
control 'add_to_list_1d' do
describe file('/tmp/1d') do
it { should exist }
its('content') { should match /^empty_list=newentry$/ }
its('content') { should match /^People to call: Joe, Bobby, Karen, Harry$/ }
end
describe file_ext('/tmp/1d') do
it { should ... |
github | sous-chefs/line | https://github.com/sous-chefs/line | test/integration/add_to_list/inspec/controls/add_to_list_empty.rb | Ruby | apache-2.0 | 97 | main | 256 | #
# Test for missing and empty file behavior
#
control 'add_to_list_empty' do
describe file('/tmp/emptyfile') do
it { should exist }
its('size') { should eq 0 }
end
describe file('/tmp/missingfile') do
it { should_not exist }
end
end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.