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
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20131022030659_create_experiments.rb
Ruby
mit
45
master
211
require_relative './migration_helper' class CreateExperiments < MigrationHelper.migration_base_class def change create_table :experiments do |t| t.string :name t.timestamps end end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20140411001620_add_upgraded_from_to_space_shuttles.rb
Ruby
mit
45
master
693
require_relative './migration_helper' class AddUpgradedFromToSpaceShuttles < MigrationHelper.migration_base_class def up cti_recreate_views_after_change_to('SpaceShuttle') do add_column(:space_shuttles, :upgraded_from_id, :integer) end add_foreign_key :space_shuttles, :space_ships, :column => 'upgr...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130713133605_create_motor_vehicles.rb
Ruby
mit
45
master
320
require_relative './migration_helper' class CreateMotorVehicles < MigrationHelper.migration_base_class def change create_table :motor_vehicles do |t| t.references :vehicle t.string :fuel t.integer :number_of_wheels t.timestamps end cti_create_view('MotorVehicle') end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130817024220_create_rocket_engines.rb
Ruby
mit
45
master
303
require_relative './migration_helper' class CreateRocketEngines < MigrationHelper.migration_base_class def change create_table :rocket_engines do |t| t.references :space_ship t.string :name t.timestamps end add_foreign_key(:rocket_engines, :space_ships) end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130713153631_create_motor_cycles.rb
Ruby
mit
45
master
289
require_relative './migration_helper' class CreateMotorCycles < MigrationHelper.migration_base_class def change create_table :motor_cycles do |t| t.references :motor_vehicle t.boolean :offroad t.timestamps end cti_create_view('MotorCycle') end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20140425182847_add_field_to_base_class.rb
Ruby
mit
45
master
441
require_relative './migration_helper' class AddFieldToBaseClass < MigrationHelper.migration_base_class def up # this makes cti_recreate_views_after_change_to also works for the base class cti_recreate_views_after_change_to('Vehicle') do add_column(:vehicles, :bogus_field, :string) end end def ...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130816022212_create_space_ships.rb
Ruby
mit
45
master
405
require_relative './migration_helper' class CreateSpaceShips < MigrationHelper.migration_base_class def change create_table :space_ships do |t| t.references :vehicle t.references :category t.boolean :single_use t.timestamps end add_foreign_key(:space_ships, :vehicles) a...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130713133705_create_cars.rb
Ruby
mit
45
master
300
require_relative './migration_helper' class CreateCars < MigrationHelper.migration_base_class def change create_table :cars do |t| t.references :motor_vehicle t.boolean :stick_shift t.boolean :convertible t.timestamps end cti_create_view('Car') end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20131021211442_create_launches.rb
Ruby
mit
45
master
280
require_relative './migration_helper' class CreateLaunches < MigrationHelper.migration_base_class def change create_table :launches do |t| t.references :space_ship t.date :date t.timestamps end add_foreign_key(:launches, :space_ships) end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/migration_helper.rb
Ruby
mit
45
master
276
module MigrationHelper def self.migration_base_class klass = ActiveRecord::Migration if Rails::VERSION::MAJOR >= 5 if Rails::VERSION::MAJOR > 5 || Rails::VERSION::MINOR >= 1 klass = ActiveRecord::Migration[4.2] end end klass end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20131022030720_create_experiment_space_ship_performances.rb
Ruby
mit
45
master
465
require_relative './migration_helper' class CreateExperimentSpaceShipPerformances < MigrationHelper.migration_base_class def change create_table :experiment_space_ship_performances do |t| t.references :experiment t.references :space_ship t.date :performed_at t.timestamps end add...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130711214909_create_vehicles.rb
Ruby
mit
45
master
228
require_relative './migration_helper' class CreateVehicles < MigrationHelper.migration_base_class def change create_table :vehicles do |t| t.string :name t.integer :mass t.timestamps end end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20131022020655_create_habtm_join_table.rb
Ruby
mit
45
master
374
require_relative './migration_helper' class CreateHabtmJoinTable < MigrationHelper.migration_base_class def change create_table :astronauts_space_ships, id: false do |t| t.integer :astronaut_id t.integer :space_ship_id end add_foreign_key(:astronauts_space_ships, :astronauts) add_foreign...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130819040414_add_reliability_to_space_ships.rb
Ruby
mit
45
master
379
require_relative './migration_helper' class AddReliabilityToSpaceShips < MigrationHelper.migration_base_class def up cti_recreate_views_after_change_to('SpaceShip') do add_column(:space_ships, :reliability, :integer) end end def down cti_recreate_views_after_change_to('SpaceShip') do r...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20130816022112_create_categories.rb
Ruby
mit
45
master
209
require_relative './migration_helper' class CreateCategories < MigrationHelper.migration_base_class def change create_table :categories do |t| t.string :name t.timestamps end end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/db/migrate/20131022010731_create_captains.rb
Ruby
mit
45
master
282
require_relative './migration_helper' class CreateCaptains < MigrationHelper.migration_base_class def change create_table :captains do |t| t.references :space_ship t.string :name t.timestamps end add_foreign_key(:captains, :space_ships) end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/config/application.rb
Ruby
mit
45
master
551
require_relative 'boot' # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" #require 'rails/all' Bundler.require(*Rails.groups) require "dbview_cti" module Dummy class Application < Rails::Application # ...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-6/config/initializers/dbview_cti.rb
Ruby
mit
45
master
248
# For dbview_cti, it is important that all classes are loaded, otherwise # methods like specialize return incorrect results. # We can force Rails to load all classes in the CTI hierarchy by loading # the leaf classes Car MotorCycle SpaceShuttle
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/models/space_shuttle_spec.rb
Ruby
mit
45
master
19,109
# Since the gem provides model methods these tests serve as a kind of 'integration tests' for the gem require 'spec_helper' describe SpaceShuttle do it "raises exception on external foreign key violation caused by destroy" do # test that foreign key contraints to tables outside of the CTI hierarchy # prev...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/models/motor_vehicle_spec.rb
Ruby
mit
45
master
1,435
# Since the gem provides model methods these tests serve as a kind of 'integration tests' for the gem require 'spec_helper' describe MotorVehicle do it "correctly specializes to the derived class" do @car = Car.create(:name => 'MyCar') motor_vehicle = MotorVehicle.order(:id).last car = motor_vehicle.spe...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/models/vehicle_spec.rb
Ruby
mit
45
master
3,083
# Since the gem provides model methods these tests serve as a kind of 'integration tests' for the gem require 'spec_helper' describe Vehicle do it "correctly specializes to the derived class" do @car = Car.create(:name => 'MyCar') vehicle = Vehicle.order(:id).last car = vehicle.specialize expect(c...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/models/car_spec.rb
Ruby
mit
45
master
1,764
# Since the gem provides model methods these tests serve as a kind of 'integration tests' for the gem require 'spec_helper' describe Car do before :each do @car = Car.create(:name => 'MyCar', :mass => 1000, :number_of_wheels => 4, :stick_shift => true) end it "creates parent-class records on create" do ...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-5/config/initializers/new_framework_defaults.rb
Ruby
mit
45
master
1,168
# Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.0 upgrade. # # Read the Rails 5.0 release notes for more info on each option. # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_to...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/db/schema.rb
Ruby
mit
45
master
4,699
# 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
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/config/application.rb
Ruby
mit
45
master
552
require_relative 'boot' # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" #require "sprockets/railtie" #require 'rails/all' Bundler.require(*Rails.groups) require "dbview_cti" module Dummy class Application < Rails::Application #...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/config/environments/development.rb
Ruby
mit
45
master
1,886
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/config/initializers/dbview_cti.rb
Ruby
mit
45
master
355
# For dbview_cti, it is important that all classes are loaded, otherwise # methods like specialize return incorrect results. # We can force Rails to load all classes in the CTI hierarchy by loading # the leaf classes Rails.application.config.after_initialize do # Needed so we can autoload the job classes below Ca...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/app/models/experiment.rb
Ruby
mit
45
master
220
class Experiment < ActiveRecord::Base attr_accessible :name unless Rails::VERSION::MAJOR > 3 has_many :experiment_space_ship_performances has_many :space_ships, :through => :experiment_space_ship_performances end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/app/models/space_shuttle.rb
Ruby
mit
45
master
390
class SpaceShuttle < SpaceShip attr_accessible :single_use unless Rails::VERSION::MAJOR > 3 belongs_to :upgraded_from, :class_name => 'SpaceShip', :optional => true # cti_derived_class has to come after te above belongs_to, otherwise the association will not work correctly. # This is only because SpaceShutt...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/app/models/vehicle.rb
Ruby
mit
45
master
284
class Vehicle < ActiveRecord::Base attr_accessible :name, :mass unless Rails::VERSION::MAJOR > 3 cti_base_class validates :name, :presence => true validate do |vehicle| errors.add(:base, "Block validation failed: name can't be blank") if vehicle.name.blank? end end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/app/models/space_ship.rb
Ruby
mit
45
master
683
class SpaceShip < Vehicle attr_accessible :single_use, :reliability unless Rails::VERSION::MAJOR > 3 cti_derived_class belongs_to :category, :optional => true has_many :launches accepts_nested_attributes_for :launches has_one :captain accepts_nested_attributes_for :captain has_and_belongs_to_man...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-8/app/models/experiment_space_ship_performance.rb
Ruby
mit
45
master
218
class ExperimentSpaceShipPerformance < ActiveRecord::Base attr_accessible :performed_at unless Rails::VERSION::MAJOR > 3 belongs_to :experiment, :optional => true belongs_to :space_ship, :optional => true end
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-7/db/schema.rb
Ruby
mit
45
master
4,688
# 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
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-3/config/application.rb
Ruby
mit
45
master
2,912
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" Bundler.require(*Rails.groups) require "db...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-3/config/initializers/secret_token.rb
Ruby
mit
45
master
496
# Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attac...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-3/db/schema.rb
Ruby
mit
45
master
4,869
# encoding: UTF-8 # 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. # # Note that this schema.rb definition is the authoritative sou...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-3/app/models/space_shuttle.rb
Ruby
mit
45
master
371
class SpaceShuttle < SpaceShip attr_accessible :single_use unless Rails::VERSION::MAJOR > 3 belongs_to :upgraded_from, :class_name => 'SpaceShip' # cti_derived_class has to come after te above belongs_to, otherwise the association will not work correctly. # This is only because SpaceShuttle is a leaf class ...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-3/app/models/space_ship.rb
Ruby
mit
45
master
664
class SpaceShip < Vehicle attr_accessible :single_use, :reliability unless Rails::VERSION::MAJOR > 3 cti_derived_class belongs_to :category has_many :launches accepts_nested_attributes_for :launches has_one :captain accepts_nested_attributes_for :captain has_and_belongs_to_many :astronauts, :joi...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-4/config/application.rb
Ruby
mit
45
master
1,188
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" Bundler.require(*Rails.groups) require "dbview_cti" # for some strange reas...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-4/config/initializers/secret_token.rb
Ruby
mit
45
master
659
# Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to diction...
github
mvdamme/dbview_cti
https://github.com/mvdamme/dbview_cti
spec/dummy-rails-4/db/schema.rb
Ruby
mit
45
master
4,644
# encoding: UTF-8 # 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. # # Note that this schema.rb definition is the authoritative sou...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
Gemfile
Ruby
apache-2.0
45
master
794
# Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do gem 'voxpupuli-test', '~> 14.0', :require => false gem 'puppet_metadata', '~> 6.1', :require => false gem 'rexml', :...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
Rakefile
Ruby
apache-2.0
45
master
903
# 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-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_group.rb
Ruby
apache-2.0
45
master
2,100
# frozen_string_literal: true Puppet::Type.newtype(:cs_group) do @doc = "Type for manipulating Corosync/Pacemaker group entries. Groups are a set or resources (primitives) that need to be grouped together. More information can be found at the following link: * http://www.clusterlabs.org/doc/en-US/P...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_shadow.rb
Ruby
apache-2.0
45
master
1,281
# frozen_string_literal: true Puppet::Type.newtype(:cs_shadow) do @doc = "cs_shadow resources represent a Corosync shadow CIB. Any corosync resources defined with 'cib' set to the title of a cs_shadow resource will not become active until all other resources with the same cib value have also been applied...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_colocation.rb
Ruby
apache-2.0
45
master
4,437
# frozen_string_literal: true Puppet::Type.newtype(:cs_colocation) do @doc = "Type for manipulating corosync/pacemaker colocation. Colocation is the grouping together of a set of primitives so that they travel together when one of them fails. For instance, if a web server vhost is colocated with a spec...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_order.rb
Ruby
apache-2.0
45
master
4,146
# frozen_string_literal: true require 'puppet/property/boolean' Puppet::Type.newtype(:cs_order) do @doc = "Type for manipulating Corosync/Pacemaker ordering entries. Order entries are another type of constraint that can be put on sets of primitives but unlike colocation, order does matter. These designate...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_rsc_defaults.rb
Ruby
apache-2.0
45
master
1,548
# frozen_string_literal: true Puppet::Type.newtype(:cs_rsc_defaults) do @doc = "Type for manipulating corosync/pacemaker global defaults for resource options. The type is pretty simple interface for setting key/value pairs or removing them completely. Removing them will result in them taking on their de...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_commit.rb
Ruby
apache-2.0
45
master
2,213
# frozen_string_literal: true Puppet::Type.newtype(:cs_commit) do @doc = 'Final commit statement which triggers the synchronous application of all primitive changes which reference this CIB. Do not generate more than one cs_commit referencing the same CIB for a given cluster!' feature :refresh...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_clone.rb
Ruby
apache-2.0
45
master
4,387
# frozen_string_literal: true Puppet::Type.newtype(:cs_clone) do @doc = "Type for manipulating corosync/pacemaker resource clone. More information on Corosync/Pacemaker colocation can be found here: * http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_ensuring_resources_run_on_th...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_primitive.rb
Ruby
apache-2.0
45
master
9,349
# frozen_string_literal: false require 'puppet/parameter/boolean' Puppet::Type.newtype(:cs_primitive) do @doc = "Type for manipulating Corosync/Pacemaker primitives. Primitives are probably the most important building block when creating highly available clusters using Corosync and Pacemaker. Each primiti...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_location.rb
Ruby
apache-2.0
45
master
3,612
# frozen_string_literal: true Puppet::Type.newtype(:cs_location) do @doc = "Type for manipulating corosync/pacemaker resource location. More information on Corosync/Pacemaker colocation can be found here: * http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_ensuring_resources_run...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/type/cs_property.rb
Ruby
apache-2.0
45
master
2,632
# frozen_string_literal: true require 'puppet/parameter/boolean' Puppet::Type.newtype(:cs_property) do @doc = "Type for manipulating corosync/pacemaker configuration properties. Besides the configuration file that is managed by the module the contains all these related Corosync types and providers, there is...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_commit/pcs.rb
Ruby
apache-2.0
45
master
1,504
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_commit/crm.rb
Ruby
apache-2.0
45
master
1,431
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_order/crm.rb
Ruby
apache-2.0
45
master
3,818
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_order/pcs.rb
Ruby
apache-2.0
45
master
3,870
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_primitive/crm.rb
Ruby
apache-2.0
45
master
7,352
# frozen_string_literal: false begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_primitive/pcs.rb
Ruby
apache-2.0
45
master
12,239
# frozen_string_literal: false begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mo...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_group/pcs.rb
Ruby
apache-2.0
45
master
3,209
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_group/crm.rb
Ruby
apache-2.0
45
master
3,365
begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:modulepath]}") unless corosync ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_location/pcs.rb
Ruby
apache-2.0
45
master
4,484
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_location/crm.rb
Ruby
apache-2.0
45
master
5,102
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_rsc_defaults/pcs.rb
Ruby
apache-2.0
45
master
3,146
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_rsc_defaults/crm.rb
Ruby
apache-2.0
45
master
3,236
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_property/pcs.rb
Ruby
apache-2.0
45
master
3,189
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_property/crm.rb
Ruby
apache-2.0
45
master
3,282
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_shadow/crm.rb
Ruby
apache-2.0
45
master
1,260
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:m...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_shadow/pcs.rb
Ruby
apache-2.0
45
master
1,263
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_colocation/pcs.rb
Ruby
apache-2.0
45
master
6,464
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_colocation/crm.rb
Ruby
apache-2.0
45
master
6,116
# frozen_string_literal: false begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_clone/pcs.rb
Ruby
apache-2.0
45
master
5,352
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider/pcs' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:mod...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet/provider/cs_clone/crm.rb
Ruby
apache-2.0
45
master
4,672
# frozen_string_literal: false begin require 'puppet_x/voxpupuli/corosync/provider/crmsh' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet_x/voxpupuli/corosync/provider/crmsh.rb
Ruby
apache-2.0
45
master
3,522
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider' require 'puppet_x/voxpupuli/corosync/provider/cib_helper' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync modul...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet_x/voxpupuli/corosync/provider/pcs.rb
Ruby
apache-2.0
45
master
3,858
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider' require 'puppet_x/voxpupuli/corosync/provider/cib_helper' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync modul...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
lib/puppet_x/voxpupuli/corosync/provider/cib_helper.rb
Ruby
apache-2.0
45
master
5,042
# frozen_string_literal: true begin require 'puppet_x/voxpupuli/corosync/provider' rescue LoadError require 'pathname' # WORKAROUND #14073, #7788 and SERVER-973 corosync = Puppet::Module.find('corosync') raise(LoadError, "Unable to find corosync module in modulepath #{Puppet[:basemodulepath] || Puppet[:modulep...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/spec_helper.rb
Ruby
apache-2.0
45
master
832
# frozen_string_literal: true # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # puppetlabs_spec_helper will set up coverage if the env variable is set. # We want to do this if lib exists and it hasn't been explicitly set. ENV['COVERAGE'] ||= 'yes' if Dir.exis...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/spec_helper_corosync.rb
Ruby
apache-2.0
45
master
3,468
# frozen_string_literal: true # This file contains helpers that are specific to this module def corosync_stack(facts) case facts[:os]['family'] when 'RedHat' corosync_stack = 'pcs' pcs_version = if facts[:os]['release']['major'].to_i > 7 '0.10.0' else ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/spec_helper_acceptance.rb
Ruby
apache-2.0
45
master
2,445
# frozen_string_literal: true require 'voxpupuli/acceptance/spec_helper_acceptance' configure_beaker do |host| case fact_on(host, 'os.family') when 'RedHat' default_provider = 'pcs' pcs_version = if fact_on(host, 'os.release.major').to_i > 7 '0.10.0' else ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/type/cs_property_spec.rb
Ruby
apache-2.0
45
master
996
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_property) do subject do Puppet::Type.type(:cs_property) end describe 'with a simple usecase' do it 'is able to create an instance' do # Puppet::Type::Cs_clone.expects(:defaultprovider).returns(provider_class) ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/type/cs_group_spec.rb
Ruby
apache-2.0
45
master
4,920
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_group) do subject do Puppet::Type.type(:cs_group) end it "has a 'name' parameter" do expect(subject.new(name: 'mock_group')[:name]).to eq('mock_group') end describe 'basic structure' do it 'is able to create an ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/type/cs_location_spec.rb
Ruby
apache-2.0
45
master
6,682
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_location) do subject do Puppet::Type.type(:cs_location) end it "has a 'name' parameter" do expect(subject.new(name: 'mock_location')[:name]).to eq('mock_location') end describe 'basic structure' do it 'is able t...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/type/cs_clone_spec.rb
Ruby
apache-2.0
45
master
6,454
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_clone) do subject do Puppet::Type.type(:cs_clone) end it "has a 'name' parameter" do expect(subject.new(name: 'mock_clone', primitive: 'mock_primitive')[:name]).to eq('mock_clone') end describe 'basic structure' do ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/type/cs_primitive_spec.rb
Ruby
apache-2.0
45
master
6,279
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_primitive) do subject do Puppet::Type.type(:cs_primitive) end it "has a 'name' parameter" do expect(subject.new(name: 'mock_primitive')[:name]).to eq('mock_primitive') end describe 'basic structure' do it 'is ab...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_property_pcs_spec.rb
Ruby
apache-2.0
45
master
1,422
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_property).provider(:pcs) do include_context 'pcs' context 'when getting instances' do let :instances do cib = <<-EOS <cib> <configuration> <crm_config> <cluster_property_set id...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_primitive_pcs_spec.rb
Ruby
apache-2.0
45
master
15,927
# frozen_string_literal: true require 'spec_helper' require 'spec_helper_corosync' describe Puppet::Type.type(:cs_primitive).provider(:pcs) do include_context 'pcs' context 'when getting instances' do let :instances do cib = <<-EOS <configuration> <resources> <primitive cl...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_clone_crm_spec.rb
Ruby
apache-2.0
45
master
6,089
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_clone).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end context 'when getting instances with primitive' do let :instances do test_cib = <<-EOS <cib> ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_group_pcs_spec.rb
Ruby
apache-2.0
45
master
3,171
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_group).provider(:pcs) do include_context 'pcs' let :instances do cib = <<-EOS <cib> <configuration> <resources> <group id="duncan_group"> <primitive id="duncan_vip1" class="ocf" provid...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_property_crm_spec.rb
Ruby
apache-2.0
45
master
1,693
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_property).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end context 'when getting instances' do let :instances do test_cib = <<-EOS <cib> <co...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_clone_pcs_spec.rb
Ruby
apache-2.0
45
master
7,750
# frozen_string_literal: true require 'spec_helper' require 'spec_helper_corosync' describe Puppet::Type.type(:cs_clone).provider(:pcs) do include_context 'pcs' context 'when getting instances with primitive' do let :instances do cib = <<-EOS <cib> <configuration> <resources> ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_primitive_crm_spec.rb
Ruby
apache-2.0
45
master
6,353
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_primitive).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end context 'when getting instances' do let :instances do test_cib = <<-EOS <configuration> ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_group_crm_spec.rb
Ruby
apache-2.0
45
master
3,426
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_group).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end let :instances do cib = <<-EOS <cib> <configuration> <resources> <group id="du...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_location_pcs_spec.rb
Ruby
apache-2.0
45
master
5,313
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_location).provider(:pcs) do include_context 'pcs' let :instances do cib = <<-EOS <cib> <configuration> <constraints> <rsc_location id="clusterip_on_node_primary" node="primary" rsc="ClusterIP" sco...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_order_crm_spec.rb
Ruby
apache-2.0
45
master
2,641
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_order).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') allow(described_class).to receive(:block_until_ready).and_return(nil) end let :test_cib do <<-EOS <cib...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_rsc_defaults_crm_spec.rb
Ruby
apache-2.0
45
master
1,593
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_rsc_defaults).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end context 'when getting instances' do let :instances do test_cib = <<-EOS <cib> ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_colocation_crm_spec.rb
Ruby
apache-2.0
45
master
4,233
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_colocation).provider(:crm) do before do allow(described_class).to receive(:command).with(:crm).and_return('crm') end let :test_cib do <<-EOS <cib> <configuration> <constraints> <rsc_colocati...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_order_pcs_spec.rb
Ruby
apache-2.0
45
master
2,362
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_order).provider(:pcs) do include_context 'pcs' let :instances do cib = <<-EOS <cib> <configuration> <constraints> <rsc_order first="nul-messagebus" first-action="start" id="nul-messagebus_before_n...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_rsc_defaults_pcs_spec.rb
Ruby
apache-2.0
45
master
1,322
# frozen_string_literal: true require 'spec_helper' describe Puppet::Type.type(:cs_rsc_defaults).provider(:pcs) do include_context 'pcs' context 'when getting instances' do let :instances do cib = <<-EOS <cib> <configuration> <rsc_defaults> <meta_attributes i...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/unit/puppet/provider/cs_colocation_pcs_spec.rb
Ruby
apache-2.0
45
master
4,666
# frozen_string_literal: true require 'spec_helper' provider_class = Puppet::Type.type(:cs_colocation).provider(:pcs) describe provider_class do let(:resource) do Puppet::Type.type(:cs_colocation).new( name: 'colo1', primitives: %w[resA resB], score: 'INFINITY', ) end let(:provider) ...
github
voxpupuli/puppet-corosync
https://github.com/voxpupuli/puppet-corosync
spec/classes/corosync_spec.rb
Ruby
apache-2.0
45
master
35,424
# frozen_string_literal: true require 'spec_helper' describe 'corosync' do let :params do { set_votequorum: false, multicast_address: '239.1.1.2', } end shared_examples_for 'corosync' do it { is_expected.to compile.with_all_deps } it 'does manage the corosync service' do is_expected.to...