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
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/type_aliases/plugin_spec.rb
Ruby
apache-2.0
90
master
415
# frozen_string_literal: true require 'spec_helper' describe 'Letsencrypt::Plugin' do it { is_expected.to allow_values('apache', 'standalone', 'webroot', 'nginx', 'dns-azure', 'dns-route53', 'dns-google', 'dns-cloudflare', 'dns-rfc2136', 'dns-linode', 'dns-ovh') } it { is_expected.not_to allow_value(nil) } it {...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/letsencrypt_spec.rb
Ruby
apache-2.0
90
master
13,667
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt' do on_supported_os.each do |os, facts| context "on #{os}" do let :facts do facts end context 'when specifying an email address with the email parameter' do let(:params) { additional_params.merge(default...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/dns_route53_spec.rb
Ruby
apache-2.0
90
master
1,580
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::dns_route53' do on_supported_os.each do |os, facts| context "on #{os} based operating systems" do let(:facts) { facts } let(:params) { {} } let(:pre_condition) do <<-PUPPET class { 'letsencrypt':...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/apache_spec.rb
Ruby
apache-2.0
90
master
1,011
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::apache' do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } let(:params) { {} } let(:pre_condition) do <<-PUPPET class { 'letsencrypt': email => 'fo...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/nginx_spec.rb
Ruby
apache-2.0
90
master
1,005
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::nginx' do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } let(:params) { {} } let(:pre_condition) do <<-PUPPET class { 'letsencrypt': email => 'foo...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/dns_linode_spec.rb
Ruby
apache-2.0
90
master
1,627
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::dns_linode' do on_supported_os.each do |os, os_facts| context "on #{os} based operating systems" do let(:facts) { os_facts } let(:params) { { 'api_key' => 'dummy-linode-api-token' } } let(:pre_condition) do ...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/dns_cloudflare_spec.rb
Ruby
apache-2.0
90
master
1,657
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::dns_cloudflare' do on_supported_os.each do |os, os_facts| context "on #{os} based operating systems" do let(:facts) { os_facts } let(:params) { { 'api_token' => 'dummy-cloudflare-api-token' } } let(:pre_conditio...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/classes/plugin/dns_rfc2136_spec.rb
Ruby
apache-2.0
90
master
2,267
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::plugin::dns_rfc2136' do on_supported_os.each do |os, facts| context "on #{os} based operating systems" do let(:facts) { facts } let(:params) { {} } let(:pre_condition) do <<-PUPPET class { 'letsencrypt':...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/defines/letsencrypt_certonly_spec.rb
Ruby
apache-2.0
90
master
30,432
# frozen_string_literal: true require 'spec_helper' describe 'letsencrypt::certonly' do on_supported_os.each do |os, facts| context "on #{os} based operating systems" do let :facts do facts end let(:pre_condition) { "class { letsencrypt: email => 'foo@example.com', package_command => ...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/defines/letsencrypt_hook_spec.rb
Ruby
apache-2.0
90
master
2,254
# frozen_string_literal: true require 'spec_helper' # rubocop:disable RSpec/MultipleMemoizedHelpers describe 'letsencrypt::hook' do on_supported_os.each do |os, facts| let(:title) { 'foo.example.com' } let(:pre_condition) { ["class { letsencrypt: email => 'foo@example.com', package_command => 'letsencrypt'...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_dns_route53_spec.rb
Ruby
apache-2.0
90
master
300
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt::plugin::dns_route53' do it_behaves_like 'an idempotent resource' do let(:manifest) do <<-PUPPET include letsencrypt include letsencrypt::plugin::dns_route53 PUPPET end end end
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_nginx_spec.rb
Ruby
apache-2.0
90
master
288
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt::plugin::nginx' do it_behaves_like 'an idempotent resource' do let(:manifest) do <<-PUPPET include letsencrypt include letsencrypt::plugin::nginx PUPPET end end end
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_dns_cloudflare_spec.rb
Ruby
apache-2.0
90
master
599
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt::plugin::dns_cloudflare' do it_behaves_like 'an idempotent resource' do let(:manifest) do <<-PUPPET include letsencrypt class { 'letsencrypt::plugin::dns_cloudflare': api_token => 'dummy-cloudflare-api...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_spec.rb
Ruby
apache-2.0
90
master
667
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt' do context 'with defaults values' do it_behaves_like 'an idempotent resource' do let(:manifest) { 'include letsencrypt' } end describe file('/etc/letsencrypt/cli.ini') do it { is_expected.to be_file } ...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_dns_rfc2136_spec.rb
Ruby
apache-2.0
90
master
639
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt::plugin::dns_rfc2136' do it_behaves_like 'an idempotent resource' do let(:manifest) do <<-PUPPET include letsencrypt class { 'letsencrypt::plugin::dns_rfc2136': server => '192.0.2.1', key_n...
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_apache_spec.rb
Ruby
apache-2.0
90
master
290
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'letsencrypt::plugin::apache' do it_behaves_like 'an idempotent resource' do let(:manifest) do <<-PUPPET include letsencrypt include letsencrypt::plugin::apache PUPPET end end end
github
voxpupuli/puppet-letsencrypt
https://github.com/voxpupuli/puppet-letsencrypt
spec/acceptance/letsencrypt_plugin_dns_linode_spec.rb
Ruby
apache-2.0
90
master
758
# frozen_string_literal: true require 'spec_helper_acceptance' # python3-certbot-dns-linode package does not exist for Debian 13 trixie. # https://tracker.debian.org/pkg/python-certbot-dns-linode describe 'letsencrypt::plugin::dns_linode', skip: fact('os.distro.codename') == 'trixie' do it_behaves_like 'an idempote...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
Rakefile
Ruby
apache-2.0
90
master
902
# Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ begin require 'voxpupuli/test/rake' rescue LoadError # only available if gem group test is installed end begin require 'voxpupuli/acceptance/rake' rescue LoadError # only available if gem group acceptanc...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/functions/mongodb_password.rb
Ruby
apache-2.0
90
master
789
# frozen_string_literal: true require_relative File.join('..', 'util', 'mongodb_md5er') # Get the mongodb password hash from the clear text password. Puppet::Functions.create_function(:mongodb_password) do dispatch :mongodb_password do required_param 'String[1]', :username required_param 'Variant[String[1],...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/type/mongodb_database.rb
Ruby
apache-2.0
90
master
544
# frozen_string_literal: true Puppet::Type.newtype(:mongodb_database) do @doc = 'Manage MongoDB databases.' ensurable newparam(:name, namevar: true) do desc 'The name of the database.' newvalues(%r{^[\w-]+$}) end newparam(:tries) do desc 'The maximum amount of two second tries to wait MongoDB ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/type/mongodb_user.rb
Ruby
apache-2.0
90
master
4,308
# frozen_string_literal: true require File.expand_path(File.join(File.dirname(__FILE__), '..', 'util', 'mongodb_md5er')) require File.expand_path(File.join(File.dirname(__FILE__), '..', 'util', 'mongodb_scram')) Puppet::Type.newtype(:mongodb_user) do @doc = 'Manage a MongoDB user. This includes management of users p...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/type/mongodb_replset.rb
Ruby
apache-2.0
90
master
2,114
# frozen_string_literal: true # # Author: Francois Charlier <francois.charlier@enovance.com> # Puppet::Type.newtype(:mongodb_replset) do @doc = 'Manage a MongoDB replicaSet' ensurable do desc 'Ensure the replicaset is either present or absent' defaultto :present newvalue(:present) do provider....
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/type/mongodb_shard.rb
Ruby
apache-2.0
90
master
701
# frozen_string_literal: true # # Author: Emilien Macchi <emilien.macchi@enovance.com> # Puppet::Type.newtype(:mongodb_shard) do @doc = 'Manage a MongoDB Shard' ensurable do desc 'Ensure the shard is either present or absent' defaultto :present newvalue(:present) do provider.create end e...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/type/mongodb_conn_validator.rb
Ruby
apache-2.0
90
master
1,445
# frozen_string_literal: true Puppet::Type.newtype(:mongodb_conn_validator) do @doc = "Verify that a connection can be successfully established between a node and the mongodb server. Its primary use is as a precondition to prevent configuration changes from being applied if the mongodb ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/util/mongodb_scram.rb
Ruby
apache-2.0
90
master
1,103
# frozen_string_literal: true require 'securerandom' require 'base64' module Puppet module Util class MongodbScram CLIENT_KEY = 'Client Key' SERVER_KEY = 'Server Key' attr_reader :password_hash, :salt, :iterations def initialize(password_hash, salt, iterations) @password_hash =...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/util/mongodb_md5er.rb
Ruby
apache-2.0
90
master
234
# frozen_string_literal: true require 'digest/md5' module Puppet module Util class MongodbMd5er def self.md5(username, password) Digest::MD5.hexdigest("#{username}:mongo:#{password}") end end end end
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/util/mongodb_output.rb
Ruby
apache-2.0
90
master
790
# frozen_string_literal: true module Puppet module Util module MongodbOutput def self.sanitize(data) # Dirty hack to remove JavaScript objects data.gsub!(%r{\w+\((\d+).+?\)}, '\1') # Remove extra parameters from 'Timestamp(1462971623, 1)' Objects data.gsub!(%r{\w+\((.+?)\)}, '\1') ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/util/mongodb_validator.rb
Ruby
apache-2.0
90
master
1,540
# frozen_string_literal: true require 'socket' require 'timeout' require 'ipaddr' require 'uri' module Puppet module Util class MongodbValidator attr_reader :mongodb_server, :mongodb_port def initialize(mongodb_resource_name, mongodb_server, mongodb_port) # NOTE: (spredzy) : By relying on t...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb.rb
Ruby
apache-2.0
90
master
4,698
# frozen_string_literal: true $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..')) require 'puppet/util/mongodb_output' require 'yaml' require 'json' class Puppet::Provider::Mongodb < Puppet::Provider # Without initvars commands won't work. initvars commands mongosh: 'mongosh' # Optional default...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb_replset/mongo.rb
Ruby
apache-2.0
90
master
12,146
# frozen_string_literal: true # # Author: Francois Charlier <francois.charlier@enovance.com> # require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mongodb')) Puppet::Type.type(:mongodb_replset).provide(:mongo, parent: Puppet::Provider::Mongodb) do desc 'Manage hosts members for a replicaset.' confi...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb_user/mongodb.rb
Ruby
apache-2.0
90
master
5,134
# frozen_string_literal: true require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mongodb')) Puppet::Type.type(:mongodb_user).provide(:mongodb, parent: Puppet::Provider::Mongodb) do desc 'Manage users for a MongoDB database.' defaultfor kernel: 'Linux' def self.instances require 'json' s...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb_conn_validator/tcp_port.rb
Ruby
apache-2.0
90
master
1,996
# frozen_string_literal: true $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) require 'puppet/util/mongodb_validator' # This file contains a provider for the resource type `mongodb_conn_validator`, # which validates the mongodb connection by attempting an https connection. Puppet::Type.type(:...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb_shard/mongo.rb
Ruby
apache-2.0
90
master
4,608
# frozen_string_literal: true require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mongodb')) Puppet::Type.type(:mongodb_shard).provide(:mongo, parent: Puppet::Provider::Mongodb) do desc 'Manage mongodb sharding.' confine true: begin require 'json' true rescue LoadError false end m...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/puppet/provider/mongodb_database/mongodb.rb
Ruby
apache-2.0
90
master
1,556
# frozen_string_literal: true require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mongodb')) Puppet::Type.type(:mongodb_database).provide(:mongodb, parent: Puppet::Provider::Mongodb) do desc 'Manages MongoDB database.' defaultfor kernel: 'Linux' def self.instances require 'json' if db_is...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/facter/mongodb_version.rb
Ruby
apache-2.0
90
master
285
# frozen_string_literal: true Facter.add(:mongodb_version) do setcode do if Facter::Core::Execution.which('mongod') mongodb_version = Facter::Core::Execution.execute('mongod --version 2>&1') %r{^db version:?\s+v?([\w.]+)}.match(mongodb_version)[1] end end end
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
lib/facter/is_master.rb
Ruby
apache-2.0
90
master
1,775
# frozen_string_literal: true require 'json' require 'yaml' def mongod_conf_file '/etc/mongod.conf' end def get_options_from_hash_config(config) result = [] port = config['net.port'] || config.fetch('net', {}).fetch('port', nil) ipv6 = config['net.ipv6'] || config.fetch('net', {}).fetch('ipv6', nil) tls_m...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/opsmanager_spec.rb
Ruby
apache-2.0
90
master
961
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::opsmanager' do on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) { facts } let(:params) do { opsmanager_url: 'http://localhost:8080', } end describe 'with defaults' do ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/mongodb_version_spec.rb
Ruby
apache-2.0
90
master
524
# frozen_string_literal: true require 'spec_helper' describe Facter::Util::Fact do before do Facter.clear end describe 'mongodb_version' do context 'with value' do before do allow(Facter::Core::Execution).to receive(:which).with('mongod').and_return(true) allow(Facter::Core::Execu...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/util/mongodb_output_spec.rb
Ruby
apache-2.0
90
master
1,876
require 'spec_helper' # Frozen strings break the regex below require 'puppet/util/mongodb_output' require 'json' describe Puppet::Util::MongodbOutput do let(:bson_data) do <<-EOT { "setName": "rs_test", "ismaster": true, "secondary": false, "hosts": [ "mongo1:27017...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/type/mongodb_replset_spec.rb
Ruby
apache-2.0
90
master
1,265
# frozen_string_literal: true # # Author: Emilien Macchi <emilien.macchi@enovance.com> # require 'puppet' require 'puppet/type/mongodb_replset' describe Puppet::Type.type(:mongodb_replset) do let(:replset) { Puppet::Type.type(:mongodb_replset).new(name: 'test') } it 'accepts a replica set name' do expect(re...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/type/mongodb_shard_spec.rb
Ruby
apache-2.0
90
master
743
# frozen_string_literal: true require 'puppet' require 'puppet/type/mongodb_shard' describe Puppet::Type.type(:mongodb_shard) do let(:shard) { Puppet::Type.type(:mongodb_shard).new(name: 'test') } it 'accepts a shard name' do expect(shard[:name]).to eq('test') end it 'accepts a member' do shard[:mem...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/type/mongodb_user_spec.rb
Ruby
apache-2.0
90
master
1,877
# frozen_string_literal: true require 'puppet' require 'puppet/type/mongodb_user' describe Puppet::Type.type(:mongodb_user) do let(:user) do Puppet::Type.type(:mongodb_user).new( name: 'test', database: 'testdb', password_hash: 'pass', ) end it 'accepts a user name' do expect(user...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/provider/mongodb_spec.rb
Ruby
apache-2.0
90
master
643
# frozen_string_literal: true require 'spec_helper' require 'puppet/provider/mongodb' provider_class = Puppet::Provider::Mongodb describe provider_class do before do # Clear the cached version before each test provider_class.remove_instance_variable(:@mongo_version) \ if provider_class.instance_varia...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb
Ruby
apache-2.0
90
master
6,721
# frozen_string_literal: true # # Authors: Emilien Macchi <emilien.macchi@enovance.com> # Francois Charlier <francois.charlier@enovance.com> # require 'spec_helper' require 'tempfile' describe Puppet::Type.type(:mongodb_replset).provider(:mongo) do valid_members = [{ 'host' => 'mongo1:27017' }, { 'host' =...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb
Ruby
apache-2.0
90
master
1,775
# frozen_string_literal: true require 'spec_helper' require 'tempfile' describe Puppet::Type.type(:mongodb_database).provider(:mongodb) do let(:raw_dbs) do { 'databases' => [ { 'name' => 'admin', 'sizeOnDisk' => 83_886_080, 'empty' => false, }, { ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/provider/mongodb_user/mongodb_spec.rb
Ruby
apache-2.0
90
master
5,637
# frozen_string_literal: true require 'spec_helper' require 'json' require 'tempfile' describe Puppet::Type.type(:mongodb_user).provider(:mongodb) do let(:raw_users) do [ { '_id' => 'admin.root', 'user' => 'root', 'db' => 'admin', 'credentials' => { 'MONGODB-CR' =...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/unit/puppet/provider/mongodb_shard/mongodb_spec.rb
Ruby
apache-2.0
90
master
2,066
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:mongodb_shard).provider(:mongo) do let(:resource) do Puppet::Type.type(:mongodb_shard).new( ensure: :present, name: 'rs_test', member: 'rs_test/mongo1:27018', keys: [], provider: :mongo, ) end ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/functions/mongodb_password_spec.rb
Ruby
apache-2.0
90
master
767
# frozen_string_literal: true require 'spec_helper' describe 'mongodb_password' do it { is_expected.not_to eq(nil) } it { is_expected.to run.with_params.and_raise_error(ArgumentError) } it { is_expected.to run.with_params(:undef, :undef).and_raise_error(ArgumentError) } it { is_expected.to run.with_params('',...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/mongos_spec.rb
Ruby
apache-2.0
90
master
2,536
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version describe 'mongodb::mongos class', if: supported_version?(default[:platform], repo_version) do package_name = 'mongo...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/user_spec.rb
Ruby
apache-2.0
90
master
5,785
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version describe 'mongodb_user', if: supported_version?(default[:platform], repo_version) do context 'with default server p...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/sharding_spec.rb
Ruby
apache-2.0
90
master
2,600
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version if hosts.length > 1 && supported_version?(default[:platform], repo_version) describe 'mongodb_shard resource' do ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/database_spec.rb
Ruby
apache-2.0
90
master
2,076
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version describe 'mongodb_database', if: supported_version?(default[:platform], repo_version) do describe 'creating a datab...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/replset_spec.rb
Ruby
apache-2.0
90
master
13,830
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version if hosts.length > 1 && supported_version?(default[:platform], repo_version) describe 'mongodb_replset resource' do ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/acceptance/server_spec.rb
Ruby
apache-2.0
90
master
7,560
# frozen_string_literal: true require 'spec_helper_acceptance' repo_version = ENV.fetch('BEAKER_FACTER_mongodb_repo_version', nil) repo_ver_param = "repo_version => '#{repo_version}'" if repo_version describe 'mongodb::server class', if: supported_version?(default[:platform], repo_version) do config_file = '/etc/m...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/defines/db_spec.rb
Ruby
apache-2.0
90
master
2,764
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::db' do context 'default' do let(:title) { 'testdb' } on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) do os_facts end let(:params) do { 'user' => 'testuser',...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/classes/client_spec.rb
Ruby
apache-2.0
90
master
754
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::client' do on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) { facts } context 'with defaults' do it { is_expected.to compile.with_all_deps } it { is_expected.to create_package('mongodb_client...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/classes/globals_spec.rb
Ruby
apache-2.0
90
master
462
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::globals' do on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) { facts } it { is_expected.to contain_class('mongodb::repo') } context 'with manage_package_repo at false' do let(:params) do ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/classes/mongos_spec.rb
Ruby
apache-2.0
90
master
2,971
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::mongos' do on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) { facts } package_name = 'mongodb-org-mongos' config_file = '/etc/mongos.conf' context 'with defaults' do it { is_expected.to...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/classes/repo_spec.rb
Ruby
apache-2.0
90
master
2,805
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::repo' do on_supported_os.each do |os, facts| context "on #{os}" do let :facts do facts end describe 'without parameters' do it { is_expected.to raise_error(Puppet::Error, %r{required}) } end de...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/classes/server_spec.rb
Ruby
apache-2.0
90
master
28,174
# frozen_string_literal: true require 'spec_helper' describe 'mongodb::server' do shared_examples 'server classes' do it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('mongodb::server::install') .that_comes_before('Class[mongodb::server::config]') } it { ...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/types/mongodb_database_spec.rb
Ruby
apache-2.0
90
master
445
# frozen_string_literal: true require 'spec_helper' describe 'mongodb_database' do let(:title) { 'test' } it do is_expected.to be_valid_type .with_provider(:mongodb) .with_properties('ensure') .with_parameters(%w[name tries]) end it { is_expected.to be_valid_type.with_set_attributes(tr...
github
voxpupuli/puppet-mongodb
https://github.com/voxpupuli/puppet-mongodb
spec/support/acceptance/supported_version.rb
Ruby
apache-2.0
90
master
458
# frozen_string_literal: true def supported_version?(platform, version) return true if version.nil? supported_versions = %w[6.0 7.0 8.0] return false unless supported_versions.include?(version) supported_versions.reject! do |v| (v > '7.0' && platform.start_with?('debian-11')) || (v < '7.0' && platf...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
inflections.gemspec
Ruby
mit
90
master
788
# -*- encoding: utf-8 -*- require File.expand_path('../lib/inflections/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['David Celis'] gem.email = ['david@davidcelis.com'] gem.description = %q{A better set of singularization and pluralization rules for Ruby/Rails applications us...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
Rakefile
Ruby
mit
90
master
217
#!/usr/bin/env rake require 'bundler/gem_tasks' require 'rake/testtask' task :default => :test Rake::TestTask.new(:test) do |t| t.libs << 'test' t.test_files = Dir.glob('test/*_test.rb') t.verbose = true end
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/kk_test.rb
Ruby
mit
90
master
1,679
# encoding: utf-8 require 'test_helper' require 'inflections/kk' class TestKazakhInflections < Minitest::Test def test_voiceless assert_equal 'сабақтар', 'сабақ'.pluralize(:kk) assert_equal 'сабақ', 'сабақтар'.singularize(:kk) assert_equal 'мектептер', 'мектеп'.pluralize(:kk) assert_equal 'мектеп',...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/it_test.rb
Ruby
mit
90
master
1,163
# encoding: utf-8 require 'test_helper' require 'inflections/it' class TestItalianInflections < Minitest::Test def test_plurales_regulares assert_equal 'gelati', 'gelato'.pluralize(:it) assert_equal 'gelato', 'gelati'.singularize(:it) assert_equal 'donna', 'donne'.singularize(:it) assert_equal 'ma...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/tr_test.rb
Ruby
mit
90
master
1,110
# -*- encoding: utf-8 -*- require 'test_helper' require 'inflections/tr' class TestTurkishInflections < Minitest::Test def test_regular_plurals assert_equal 'günler', 'gün'.pluralize(:tr) assert_equal 'gün', 'günler'.singularize(:tr) assert_equal 'kirazlar', 'kiraz'.pluralize(:tr) assert_equal 'kir...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/es_test.rb
Ruby
mit
90
master
1,561
# encoding: utf-8 require 'test_helper' require 'inflections/es' class TestSpanishInflections < Minitest::Test def test_plurales_regulares assert_equal 'libros', 'libro'.pluralize(:es) assert_equal 'libro', 'libros'.singularize(:es) assert_equal 'radios', 'radio'.pluralize(:es) assert_equal 'radio'...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/pt-br_test.rb
Ruby
mit
90
master
1,856
# encoding: utf-8 require 'test_helper' require 'inflections/pt-BR' class TestSpanishInflections < Minitest::Test def test_plurales_regulares assert_equal 'livros', 'livro'.pluralize(:pt_br) assert_equal 'livro', 'livros'.singularize(:pt_br) assert_equal 'radios', 'radio'.pluralize(:pt_br) assert_e...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/fr_test.rb
Ruby
mit
90
master
1,942
# encoding: utf-8 require 'test_helper' require 'inflections/fr' class TestFrenchInflections < Minitest::Test def test_regular_plurals assert_equal 'amis', 'ami'.pluralize(:fr) assert_equal 'ami', 'amis'.singularize(:fr) assert_equal 'fidèles', 'fidèle'.pluralize(:fr) assert_equal 'fidèle', 'fidèle...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
test/nb_test.rb
Ruby
mit
90
master
1,158
# encoding: utf-8 require 'test_helper' require 'inflections/nb' class TestNorwegianBokmalInflections < Minitest::Test def test_svake_substantiv_er assert_equal 'hunder', 'hund'.pluralize(:nb) assert_equal 'hund', 'hunder'.singularize(:nb) assert_equal 'dager', 'dag'.pluralize(:nb) assert_equal 'da...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/es.rb
Ruby
mit
90
master
657
# encoding: utf-8 module Inflections ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.clear inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/kk.rb
Ruby
mit
90
master
632
# encoding: utf-8 module Inflections ActiveSupport::Inflector.inflections(:kk) do |inflect| inflect.clear vowels = 'оұаыөүәіе' inflect.plural(/[кқпстфхчцшщбвгд]$/i, '\0тар') inflect.plural(/[өүәіе][^#{vowels}]*[кқпстфхчцшщбвгд]$/i, '\0тер') inflect.plural(/[лмнңжз]$/i, '\0дар') inflect.plu...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/pt-BR.rb
Ruby
mit
90
master
2,166
# encoding: utf-8 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.ir...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/it.rb
Ruby
mit
90
master
1,371
# encoding: utf-8 module Inflections ActiveSupport::Inflector.inflections(:it) do |inflect| inflect.clear inflect.plural(/[oei]$/i, 'i') inflect.plural(/[àèìòù]$/i, '\0') inflect.plural(/^.{2,3}$/, '\0') inflect.plural(/go$/i, 'ghi') inflect.singular(/i$/i, 'o') inflect.singular(/e$/i, ...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/nb.rb
Ruby
mit
90
master
308
module Inflections ActiveSupport::Inflector.inflections(:nb) do |inflect| inflect.clear inflect.plural(/$/, 'er') inflect.plural(/r$/i, 're') inflect.plural(/e$/i, 'er') inflect.singular(/er$/i, '') inflect.singular(/re$/i, 'r') inflect.irregular('konto', 'konti') end end
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/tr.rb
Ruby
mit
90
master
400
# -*- encoding: utf-8 -*- module Inflections ActiveSupport::Inflector.inflections(:tr) do |inflect| inflect.clear inflect.plural(/([aoıu][^aoıueöiü]{,6})$/, '\1lar') inflect.plural(/([eöiü][^aoıueöiü]{,6})$/, '\1ler') inflect.singular(/l[ae]r$/i, '') inflect.irregular('ben', 'biz') inflect...
github
davidcelis/inflections
https://github.com/davidcelis/inflections
lib/inflections/fr.rb
Ruby
mit
90
master
1,061
# encoding: utf-8 # # These rules come from a port of ActiveSupport's Inflector to PHP: # https://github.com/ICanBoogie/Inflector/blob/master/lib/inflections/fr.php module Inflections ActiveSupport::Inflector.inflections(:fr) do |inflect| inflect.clear inflect.plural(/$/, 's') inflect.singular(/s$/, '')...
github
josephruscio/aggregate
https://github.com/josephruscio/aggregate
Rakefile
Ruby
mit
90
master
204
require 'rake' require 'bundler/gem_tasks' require 'rake/testtask' Rake::TestTask.new do |t| t.libs << "test" t.test_files = FileList['test/ts_*.rb'] t.verbose = true end task :default => :test
github
josephruscio/aggregate
https://github.com/josephruscio/aggregate
aggregate.gemspec
Ruby
mit
90
master
1,212
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'aggregate/version' Gem::Specification.new do |s| s.name = %q{aggregate} s.version = Aggregate::VERSION s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required...
github
josephruscio/aggregate
https://github.com/josephruscio/aggregate
lib/aggregate.rb
Ruby
mit
90
master
7,291
# Implements aggregate statistics and maintains # configurable histogram for a set of given samples. Convenient for tracking # high throughput data. class Aggregate #The current number of samples attr_reader :count #The maximum sample value attr_reader :max #The minimum samples value attr_reader :min #...
github
josephruscio/aggregate
https://github.com/josephruscio/aggregate
test/ts_aggregate.rb
Ruby
mit
90
master
3,735
require 'minitest/autorun' require 'aggregate' class SimpleStatsTest < MiniTest::Test def setup @stats = Aggregate.new @@DATA.each do |x| @stats << x end end def test_stats_count assert_equal @@DATA.length, @stats.count end def test_stats_min_max sorted_data = @@DATA.sort a...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
Capfile
Ruby
mit
90
main
362
# Load DSL and Setup Up Stages require 'capistrano/setup' require 'capistrano/deploy' require 'capistrano-pending' require 'capistrano/rails' require 'capistrano/bundler' require 'capistrano/rbenv' require 'capistrano/puma' # Loads custom tasks from `lib/capistrano/tasks' if you have any defined. Dir.glob('lib/capist...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
Guardfile
Ruby
mit
90
main
1,150
# A sample Guardfile # More info at https://github.com/guard/guard#readme guard :rspec do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } # Rails example watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
Gemfile
Ruby
mit
90
main
2,400
source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 7.2.2' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use SCSS for stylesheets gem 'sass-rails' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScri...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/schema.rb
Ruby
mit
90
main
9,677
# 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
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231526_create_gtfs_engine_shapes.gtfs_engine.rb
Ruby
mit
90
main
655
# This migration comes from gtfs_engine (originally 20140320050100) class CreateGtfsEngineShapes < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_shapes def change create_table TABLE do |t| t.string :shape_id, null: false t.float :shape_pt_lat, null: false t.float :s...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231529_create_gtfs_engine_trips.gtfs_engine.rb
Ruby
mit
90
main
803
# This migration comes from gtfs_engine (originally 20140320052508) class CreateGtfsEngineTrips < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_trips def change create_table TABLE do |t| t.string :trip_id, null: false t.string :service_id, null: false t.string ...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231536_create_gtfs_engine_feed_infos.gtfs_engine.rb
Ruby
mit
90
main
521
# This migration comes from gtfs_engine (originally 20140406073548) class CreateGtfsEngineFeedInfos < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_feed_infos def change create_table TABLE do |t| t.string :feed_publisher_name, null: false t.string :feed_publisher_url, null: false t.strin...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231528_create_gtfs_engine_stops.gtfs_engine.rb
Ruby
mit
90
main
865
# This migration comes from gtfs_engine (originally 20140320052005) class CreateGtfsEngineStops < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_stops def change create_table TABLE do |t| t.string :stop_id, null: false t.string :stop_code t.string :stop_name, null:...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231530_create_gtfs_engine_stop_times.gtfs_engine.rb
Ruby
mit
90
main
794
# This migration comes from gtfs_engine (originally 20140320052907) class CreateGtfsEngineStopTimes < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_stop_times def change create_table TABLE do |t| t.string :stop_id, null: false t.string :trip_id, null: false t.str...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231531_create_gtfs_engine_agencies.gtfs_engine.rb
Ruby
mit
90
main
563
# This migration comes from gtfs_engine (originally 20140401032609) class CreateGtfsEngineAgencies < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_agencies def change create_table TABLE do |t| t.string :agency_id t.string :agency_name, null: false t.string :agency_url, null: fals...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231525_create_gtfs_engine_calendar_dates.gtfs_engine.rb
Ruby
mit
90
main
487
# This migration comes from gtfs_engine (originally 20140320045751) class CreateGtfsEngineCalendarDates < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_calendar_dates def change create_table TABLE do |t| t.string :service_id, null: false t.date :date, null: false t.integ...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20210915154328_create_sptrans_urls.rb
Ruby
mit
90
main
222
class CreateSptransUrls < ActiveRecord::Migration[6.1] def change create_table :sptrans_urls do |t| t.string :sigla t.string :url t.timestamps end add_index :sptrans_urls, :sigla end end
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231524_create_gtfs_engine_calendars.gtfs_engine.rb
Ruby
mit
90
main
790
# This migration comes from gtfs_engine (originally 20140320045232) class CreateGtfsEngineCalendars < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_calendars def change create_table TABLE do |t| t.string :service_id, null: false t.boolean :monday, null: false t.boolean :tuesday, n...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231523_create_gtfs_engine_data_sets.gtfs_engine.rb
Ruby
mit
90
main
439
# This migration comes from gtfs_engine (originally 20140320045108) class CreateGtfsEngineDataSets < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_data_sets def change create_table TABLE do |t| t.string :name, null: false t.string :title, null: false t.string :url, null: false t....
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231535_create_gtfs_engine_transfers.gtfs_engine.rb
Ruby
mit
90
main
530
# This migration comes from gtfs_engine (originally 20140406072309) class CreateGtfsEngineTransfers < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_transfers def change create_table TABLE do |t| t.string :from_stop_id, null: false t.string :to_stop_id, null: false t.integer ...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231533_create_gtfs_engine_fare_rules.gtfs_engine.rb
Ruby
mit
90
main
468
# This migration comes from gtfs_engine (originally 20140406063500) class CreateGtfsEngineFareRules < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_fare_rules def change create_table TABLE do |t| t.string :fare_id, null: false t.string :route_id t.string :origin_id t.string :...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231534_create_gtfs_engine_frequencies.gtfs_engine.rb
Ruby
mit
90
main
518
# This migration comes from gtfs_engine (originally 20140406071922) class CreateGtfsEngineFrequencies < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_frequencies def change create_table TABLE do |t| t.string :trip_id, null: false t.integer :start_time, null: false t.integer :end_t...
github
chesterbr/cruzalinhas
https://github.com/chesterbr/cruzalinhas
db/migrate/20141001231527_create_gtfs_engine_routes.gtfs_engine.rb
Ruby
mit
90
main
680
# This migration comes from gtfs_engine (originally 20140320051140) class CreateGtfsEngineRoutes < ActiveRecord::Migration[4.2] TABLE = :gtfs_engine_routes def change create_table TABLE do |t| t.string :route_id, null: false t.string :agency_id t.string :route_short_name, null: fal...