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-corosync | https://github.com/voxpupuli/puppet-corosync | spec/classes/corosync_qdevice_spec.rb | Ruby | apache-2.0 | 45 | master | 2,842 | # frozen_string_literal: true
require 'spec_helper'
describe 'corosync::qdevice' do
let(:params) do
{
sensitive_hacluster_hash: RSpec::Puppet::RawString.new("Sensitive('some-secret-hash')"),
}
end
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
os_fac... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_order_spec.rb | Ruby | apache-2.0 | 45 | master | 6,232 | # rubocop:disable Style/FrozenStringLiteralComment
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTU... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_group_spec.rb | Ruby | apache-2.0 | 45 | master | 4,254 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTUwMzI4MjI1MjU5WjBCMQsw... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_commit_spec.rb | Ruby | apache-2.0 | 45 | master | 6,947 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
let(:pcs_shadow_cib) { "#{default.puppet['vardir']}/shadow.puppet" }
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZ... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_clone_spec.rb | Ruby | apache-2.0 | 45 | master | 12,411 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTUwMzI4MjI1MjU5WjBCMQsw... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_shadow_spec.rb | Ruby | apache-2.0 | 45 | master | 7,825 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
let(:pcs_shadow_cib) { "#{default.puppet['vardir']}/shadow.puppet" }
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZ... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_primitive_spec.rb | Ruby | apache-2.0 | 45 | master | 12,576 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTUwMzI4MjI1MjU5WjBCMQsw... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_location_spec.rb | Ruby | apache-2.0 | 45 | master | 9,081 | # rubocop:disable Style/FrozenStringLiteralComment
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTU... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_colocation_spec.rb | Ruby | apache-2.0 | 45 | master | 4,163 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI2MjI1MjU5WhcNMTUwMzI4MjI1MjU5WjBCMQsw... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/basic_spec.rb | Ruby | apache-2.0 | 45 | master | 2,167 | # frozen_string_literal: true
require 'spec_helper_acceptance'
# These tests are designed to ensure that the module, when ran with defaults,
# sets up everything correctly and allows us to connect to Postgres.
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQE... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/corosync_class_spec.rb | Ruby | apache-2.0 | 45 | master | 2,173 | # frozen_string_literal: true
require 'spec_helper_acceptance'
# These tests are designed to ensure that the module, when ran with defaults,
# sets up everything correctly and allows us to connect to Postgres.
describe 'corosync' do
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQE... |
github | voxpupuli/puppet-corosync | https://github.com/voxpupuli/puppet-corosync | spec/acceptance/cs_rsc_defaults_spec.rb | Ruby | apache-2.0 | 45 | master | 2,582 | # frozen_string_literal: true
require 'spec_helper_acceptance'
describe 'corosync' do
if fact('os.family') == 'Debian'
cert = '-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJAJNCo5ZPmKegMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwMjI... |
github | plexus/typecheck | https://github.com/plexus/typecheck | Rakefile | Ruby | mit | 45 | master | 807 | ########################################
# Testing
require 'rspec/core/rake_task'
require 'mutant'
RSpec::Core::RakeTask.new
task :default => :mutant
task :mutant do
pattern = ENV.fetch('PATTERN', 'Typecheck*')
opts = ENV.fetch('MUTANT_OPTS', '').split(' ')
result = Mutant::CLI.run(%w[-Ilib -rtypecheck --... |
github | plexus/typecheck | https://github.com/plexus/typecheck | typecheck.gemspec | Ruby | mit | 45 | master | 808 | # encoding: utf-8
require File.expand_path('../lib/typecheck', __FILE__)
Gem::Specification.new do |gem|
gem.name = 'typecheck'
gem.version = Typecheck::VERSION
gem.authors = [ 'Arne Brasseur' ]
gem.email = [ 'arne@arnebrasseur.net' ]
gem.description = 'Type checking for Ruby methods.'
... |
github | plexus/typecheck | https://github.com/plexus/typecheck | spec/integration/typecheck_spec.rb | Ruby | mit | 45 | master | 4,755 | require 'spec_helper'
describe Typecheck do
shared_examples 'valid' do |method, args, result|
it 'should call the original method' do
expect(subject.send(method, *args)).to eq result
end
end
shared_examples 'invalid' do |method, args, message = '', error = Typecheck::TypeError|
it 'should type... |
github | plexus/typecheck | https://github.com/plexus/typecheck | lib/typecheck.rb | Ruby | mit | 45 | master | 2,551 | module Typecheck
VERSION = '0.1.2'
def typecheck(signature, method)
alias_method "#{method}_unchecked", method
define_method method, &SignatureCompiler.new.call(signature, method)
end
class SignatureCompiler
def call(signature, method)
unchecked_method = "#{method}_unchecked"
check_arg... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | Rakefile | Ruby | mit | 45 | master | 2,086 | $LOAD_PATH << File.expand_path('../lib', __FILE__)
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
###### RSPEC
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.rcov = true
end
task :default => :spec
###### TESTBED
desc 'Set up the rails app that the specs and featu... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | surveyor_gui.gemspec | Ruby | mit | 45 | master | 2,214 | $:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "surveyor_gui/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "surveyor_gui"
s.version = SurveyorGui::VERSION
s.authors = ["Kevin Jay"]
s.email = ["kjayma@... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | Gemfile | Ruby | mit | 45 | master | 230 | source "https://rubygems.org"
gem 'surveyor', github: 'NUBIC/surveyor'
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/facades/report_formatter.rb | Ruby | mit | 45 | master | 1,077 | class ReportFormatter
STAT_FUNCTIONS = {
sum: ->(arr){arr.sum},
min: ->(arr){arr.min},
max: ->(arr){arr.max},
average: ->(arr){arr.average}
}
STAT_FORMATS = {
number: "%g",
date: "%m-%d-%y",
time: "%I:%M:%S %P",
datetime: "%m-%d-%y %I:%M:%S %P"
}
def initialize(question, res... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/facades/report_response_generator.rb | Ruby | mit | 45 | master | 5,521 | class ReportResponseGenerator
RESPONSE_GENERATOR = {
pick_one: pick_one = ->(response, response_set, q, context){ context.send(:make_pick_one, response_set, q) },
pick_any: pick_any = ->(response, response_set, q, context){ context.send(:random_anys, response, response_set, q) },
dropdown: pick_one,
s... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/models/question_group_tracker.rb | Ruby | mit | 45 | master | 583 | class QuestionGroupTracker
attr_reader :questions, :question_group_id, :question_group
def initialize(question_group_id)
@questions = Question.where('question_group_id=?',question_group_id)
@counter = 0
@question_group_id = question_group_id
@question_group = QuestionGroup.find(question_group_id)
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/models/permitted_params_decorator.rb | Ruby | mit | 45 | master | 3,554 | PermittedParams.class_eval do
alias_method :base_answer_attributes, :answer_attributes
def answer_attributes
base_answer_attributes +
[:text, :response_class, :display_order, :original_choice, :hide_label,
:question_id, :display_type, :_destroy, :id, :is_comment, :comment]
end
alias_method :base... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/models/surveyform.rb | Ruby | mit | 45 | master | 3,211 | class Surveyform < Survey
def self.search(search)
search ? where('title LIKE ?', "%#{search}%") : all
end
def sort_as_per_array(serialized_sort_data)
question_sorter = QuestionSorter.new
_iterate_survey_sections(serialized_sort_data, question_sorter)
survey_section_questions = survey_sections.c... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_controller.rb | Ruby | mit | 45 | master | 3,345 | module SurveyorControllerCustomMethods
def self.included(base)
base.send :layout, 'surveyor_gui/surveyor_modified'
end
def edit
root = File.expand_path('../../', __FILE__)
#place the surveyor_gui views ahead of the default surveyor view in order of preference
#so we can load customized partials.
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/question_groups_controller.rb | Ruby | mit | 45 | master | 3,471 | class SurveyorGui::QuestionGroupsController < ApplicationController
layout 'surveyor_gui/surveyor_gui_blank'
def new
@title = "Add Question"
@survey_section_id = question_params[:survey_section_id]
@question_group = QuestionGroup.new(
text: params[:text],
question_type_id: params[:question... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/survey_controller.rb | Ruby | mit | 45 | master | 723 | class SurveyorGui::SurveyController < ApplicationController
def show
@title = "User Will See this Survey"
@survey = Survey.find(params[:survey_id])
user_id = defined?(current_user) && current_user ? current_user.id : 1
ResponseSet.where('survey_id = ? and test_data = ? and user_id = ?',params[:survey... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/dependencys_controller.rb | Ruby | mit | 45 | master | 9,253 | class SurveyorGui::DependencysController < ApplicationController
layout 'surveyor_gui/surveyor_gui_blank'
def new
prep_variables
@title = "Add Logic for "+@this_question
if @question.part_of_group?
@question.question_group.build_dependency(:rule=>'A')
else
@question.build_dependency(:ru... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/survey_sections_controller.rb | Ruby | mit | 45 | master | 3,231 | class SurveyorGui::SurveySectionsController < ApplicationController
layout 'surveyor_gui/surveyor_gui_blank'
def new
@title = "Add Survey Section"
survey = Survey.find(params[:survey_id])
prev_section = SurveySection.find(params[:prev_section_id])
@last_survey_section = survey.survey_sections.last
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/reports_controller.rb | Ruby | mit | 45 | master | 12,705 | require 'complex'
include Math
class SurveyorGui::ReportsController < ApplicationController
include ReportPreviewWrapper
# ReportPreviewWrapper wraps preview in a database transaction so test data is not permanently saved.
around_action :wrap_in_transaction, only: :preview
layout 'surveyor_gui/surveyor_gui_de... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/questions_controller.rb | Ruby | mit | 45 | master | 6,830 | class SurveyorGui::QuestionsController < ApplicationController
layout 'surveyor_gui/surveyor_gui_blank'
def new
@title = "Add Question"
survey_section = SurveySection.find(params[:survey_section_id])
survey = Survey.find(survey_section.survey_id)
@question_group = QuestionGroup.new
if params[:p... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/controllers/surveyor_gui/responses_controller.rb | Ruby | mit | 45 | master | 1,389 | class SurveyorGui::ResponsesController < ApplicationController
include ReportPreviewWrapper
# ReportPreviewWrapper wraps preview in a database transaction so test data is not permanently saved.
around_action :wrap_in_transaction, only: :preview
layout 'surveyor_gui/surveyor_gui_default'
def index
@title ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/helpers/surveyor_gui/surveyforms_helper.rb | Ruby | mit | 45 | master | 5,126 | module SurveyorGui
module SurveyformsHelper
require 'deep_cloneable'
def list_dependencies(o)
controlling_questions = o.controlling_questions
controlling_question_ids = controlling_questions.map{|q| q.question_number.to_s+')'}.uniq
count = controlling_question_ids.count
retstr ='... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/helpers/surveyor_gui/dependencys_helper.rb | Ruby | mit | 45 | master | 232 | module SurveyorGui::DependencysHelper
def link_to_remove_tbody (name, f)
f.hidden_field(:_destroy) + link_to(image_tag("delete.png",:border => 0, :margin=>'-1em'), "#", onclick: "remove_dependency_condition(this);")
end
end |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/helpers/surveyor_gui/questions_helper.rb | Ruby | mit | 45 | master | 639 | module SurveyorGui::QuestionsHelper
def link_to_remove_fields (name, f, dom_to_hide=nil)
f.hidden_field(:_destroy) + link_to(image_tag("delete.png",:border => 0, :margin=>'-1em'), "#", onclick: "remove_fields(this, \"#{dom_to_hide}\");")
end
def adjusted_text
if @question.part_of_group?
@question.q... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/helpers/surveyor_gui/reports_helper.rb | Ruby | mit | 45 | master | 546 | module SurveyorGui::ReportsHelper
def question_should_display(q)
display=true
if q.dependency
q.dependency.dependency_conditions.each do |dc|
if Response.where(:question_id => dc.question_id).first && dc.answer_id != Response.where(:question_id => dc.question_id).first.answer_id
displ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | app/uploaders/blob_uploader.rb | Ruby | mit | 45 | master | 1,327 | # encoding: utf-8
class BlobUploader < CarrierWave::Uploader::Base
# Include RMagick or ImageScience support:
# include CarrierWave::RMagick
# include CarrierWave::ImageScience
# Choose what kind of storage to use for this uploader:
# storage :file
storage :file
# Override the directory where uploade... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | config/routes.rb | Ruby | mit | 45 | master | 1,524 | SurveyorGui::Engine.routes.draw do
resources :surveyforms do
member do
get 'replace_form'
get 'insert_survey_section'
get 'replace_survey_section'
get 'insert_new_question'
get 'replace_question'
get 'clone_survey'
put 'create_cloned'
patch 'create_cloned'
ge... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | test/dummy/config/application.rb | Ruby | mit | 45 | master | 2,576 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
require "surveyor_gui"
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in conf... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | test/dummy/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 | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui.rb | Ruby | mit | 45 | master | 445 | require 'surveyor'
module SurveyorGui
require 'surveyor_gui/engine' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
autoload :VERSION, 'surveyor_gui/version'
end
require 'jquery-rails'
require 'sass-rails'
require 'jquery-ui-sass-rails'
require 'will_paginate'
require 'simple_form'
require 'colorbox-rails'
requir... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/enumerable_extenders.rb | Ruby | mit | 45 | master | 597 | module Enumerable
def dups
inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
end
# sum of an array of numbers
def arraysum
return self.inject(0){|acc,i|acc +i}
end
# average of an array of numbers
def average
return self.sum/self.length.to_f
end
# variance of an array... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/surveyforms_controller_methods.rb | Ruby | mit | 45 | master | 8,757 | module SurveyorGui
module SurveyformsControllerMethods
def self.included(base)
base.send :layout, 'surveyor_gui/surveyor_gui_default'
end
def index
if params[:template]=='false'
template=false
elsif params[:template]=='true'
template=true
else
template=false
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/engine.rb | Ruby | mit | 45 | master | 1,073 | require 'rails'
require 'surveyor_gui'
require 'haml' # required for view resolution
module SurveyorGui
class Engine < Rails::Engine
isolate_namespace SurveyorGui
root = File.expand_path('../../', __FILE__)
config.autoload_paths << root
config.to_prepare do
Dir.glob(root + "/surveyor_gui/model... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/answer_methods.rb | Ruby | mit | 45 | master | 943 | module SurveyorGui
module Models
module AnswerMethods
def self.included(base)
base.send :belongs_to, :question
base.send :has_many, :responses
base.send :belongs_to, :column
base.send :default_scope, lambda { base.order('display_order') }
base.send :attr_accessible, ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/survey_section_methods.rb | Ruby | mit | 45 | master | 1,359 | module SurveyorGui
module Models
module SurveySectionMethods
def self.included(base)
base.send :attr_accessible, :title, :display_order,
:questions_attributes, :survey_id, :modifiable if defined? ActiveModel::MassAssignmentSecurity
base.send :belongs_to, :surveyform... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/question_type_methods.rb | Ruby | mit | 45 | master | 24,106 | module SurveyorGui
module Models
module QuestionTypeMethods
attr_accessor :id, :text, :part_of_group, :pick, :display_type, :group_display_type, :response_class
def initialize(args)
@id = args[:id]
@text = args[:text]
@part_of_group = args[:... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/column_methods.rb | Ruby | mit | 45 | master | 1,324 | require 'surveyor/common'
module SurveyorGui
module Models
module ColumnMethods
extend ActiveSupport::Concern
include ActiveModel::Validations
include Surveyor::MustacheContext
include ActiveModel::ForbiddenAttributesProtection
included do
belongs_to :question_group
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/row_methods.rb | Ruby | mit | 45 | master | 273 | module SurveyorGui
module Models
module RowMethods
def self.included(base)
base.send :belongs_to, :question_group
base.send :attr_accessible, :text, :question_group_id if defined? ActiveModel::MassAssignmentSecurity
end
end
end
end |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/question_and_group_shared_methods.rb | Ruby | mit | 45 | master | 368 | module SurveyorGui
module Models
module QuestionAndGroupSharedMethods
def controlling_questions
dependencies = []
dependencies << self.dependency
dependencies.map{|d| d.dependency_conditions.map{|dc| dc.question.part_of_group? ? dc.question.question_group.questions.last : dc.question... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/response_methods.rb | Ruby | mit | 45 | master | 2,051 | module SurveyorGui
module Models
module ResponseMethods
def self.included(base)
base.send :has_many, :answers, :primary_key => :answer_id, :foreign_key => :id
base.send :has_many, :questions
base.send :belongs_to, :column
base.send :attr_accessible, :response_set, :question,... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/question_group_methods.rb | Ruby | mit | 45 | master | 1,771 | module SurveyorGui
module Models
module QuestionGroupMethods
include QuestionAndGroupSharedMethods
def self.included(base)
base.send :attr_accessor, :is_mandatory, :survey_section_id
base.send :attr_writer, :question_id
base.send :attr_accessible, :questions_attributes if
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/survey_methods.rb | Ruby | mit | 45 | master | 1,240 | module SurveyorGui
module Models
module SurveyMethods
def self.included(base)
base.extend Surveyor::Models::SurveyMethods
base.send :attr_accessible, :title, :access_code, :template,
:survey_sections_attributes if defined? ActiveModel::MassAssignmentSecurity
b... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/dependency_condition_methods.rb | Ruby | mit | 45 | master | 1,286 | module SurveyorGui
module Models
module DependencyConditionMethods
def self.included(base)
base.send :attr_accessible, :dependency_id, :rule_key, :question_id, :operator, :answer_id,
:float_value, :integer_value, :join_operator, :column_id, :columns_attributes if defined? ActiveMo... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/question_methods.rb | Ruby | mit | 45 | master | 16,065 | require 'stringio'
module SurveyorGui
module Models
module QuestionMethods
include QuestionAndGroupSharedMethods
def self.included(base)
base.send :attr_accessor, :dummy_answer, :dummy_answer_array, :type, :decimals
base.send :attr_writer, :grid_columns_textbox, :omit, :omit_text,
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/response_set_methods.rb | Ruby | mit | 45 | master | 2,823 | module SurveyorGui
module Models
module ResponseSetMethods
def self.included(base)
base.send :has_many, :responses, :dependent=>:destroy
base.send :attr_accessible, :survey, :responses_attributes, :user_id, :survey_id, :test_data if defined? ActiveModel::MassAssignmentSecurity
end
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/models/dependency_methods.rb | Ruby | mit | 45 | master | 3,540 | module SurveyorGui
module Models
module DependencyMethods
def self.included(base)
# Associations
base.send :attr_accessible, :dependency_conditions_attributes if defined? ActiveModel::MassAssignmentSecurity
base.send :accepts_nested_attributes_for, :dependency_conditions, :reject_if ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/surveyor_gui/helpers/surveyor_helper_methods.rb | Ruby | mit | 45 | master | 785 | module SurveyorGui
module Helpers
module SurveyorGuiHelperMethods
# Responses
def response_for(response_set, question, answer = nil, response_group = nil, column_id = nil)
return nil unless response_set && question && question.id
result = response_set.responses.detect{|r|
(r... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/generators/surveyor_gui/install_generator.rb | Ruby | mit | 45 | master | 1,963 | require 'rails/generators'
module SurveyorGui
class InstallGenerator < Rails::Generators::Base
source_root File.expand_path("../templates", __FILE__)
desc "Generate surveyor README, migrations, assets and sample survey"
class_option :skip_migrations, :type => :boolean, :desc => "skip migrations, but gen... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/generators/surveyor_gui/templates/config/initializers/simple_form.rb | Ruby | mit | 45 | master | 5,449 | # surveyor_gui mods to the simple_form config
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
# complete input. You can remove any component from the
# wrapper, change the order or even add your own to the
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | lib/generators/surveyor_gui/templates/app/models/response_set_user.rb | Ruby | mit | 45 | master | 342 | class ResponseSetUser
def initialize(user_id)
#find the user. You can use the commented code below, but switch the model name
#if your user model is not User.
#
#@user = User.find_by_id(user_id)
end
def report_user_name
#return a value to identify users on a report, e.g.:
#@user ? @user.... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/factories.rb | Ruby | mit | 45 | master | 5,511 | # encoding: utf-8
# http://github.com/thoughtbot/factory_girl/tree/master
require 'rubygems'
require 'factory_girl'
FactoryGirl.define do
sequence(:unique_survey_access_code){|n| "simple survey #{UUIDTools::UUID.random_create.to_s}" }
factory :survey do |s|
s.title "Simple survey"
s.description ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/spec_helper.rb | Ruby | mit | 45 | master | 3,787 | # This file is customized to run specs withing the testbed environemnt
ENV["RAILS_ENV"] ||= 'test'
begin
require File.expand_path("../../testbed/config/environment", __FILE__)
rescue LoadError => e
fail "Could not load the testbed app. Have you generated it?\n#{e.class}: #{e}"
end
require 'rspec/rails'
require 'rs... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/lib/rake_kitchen_sink.rb | Ruby | mit | 45 | master | 1,257 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'rake'
describe Surveyor::Parser do
before do
@rake = Rake::Application.new
Rake.application = @rake
Rake.application.add_import "#{gem_path('surveyor')}/lib/tasks/surveyor_tasks.rake"
Rake.application.load_imports
Rake:... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/support/scenario_outline_helper.rb | Ruby | mit | 45 | master | 999 | require 'stringio'
require 'ostruct'
class ScenarioOutline
attr_reader :examples
def initialize(example_string)
@example_string = example_string.gsub(/(^\n*)|(\s*\n*$)/,'')
@examples = parse_example_string
end
private
def parse_example_string
example_string = StringIO.new(@example_string)
h... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/support/surveyforms_rearrangement_helpers.rb | Ruby | mit | 45 | master | 5,844 | module CutAndPaste
def construct_scenario
examples = """
|from_item | over_under | to_item | order|
|2 | over | 1 | 213 |
|2 | over | 3 | 123 |
|2 | under | 1 | 123 |
|2 | under | 3 ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/support/surveyforms_creation_helpers.rb | Ruby | mit | 45 | master | 9,579 | module SurveyFormsCreationHelpers
module CreateSurvey
def start_a_new_survey
visit surveyor_gui.new_surveyform_path
fill_in "Title", with: "How was Boston?"
click_button "Save Changes"
end
def first_section_title
find('.survey_section h2')
end
def first_question
fin... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/support/shared.rb | Ruby | mit | 45 | master | 331 | %w(favorites feelings lifestyle numbers favorites-ish everything).each do |name|
shared_context name do
before { Surveyor::Parser.parse_file( File.join(Rails.root, '..', 'spec', 'fixtures', "#{name}.rb"), trace: false) }
end
end
def gem_path(gem_name)
spec = Gem::Specification.find_by_name(gem_name)
spec.g... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/controllers/surveyforms_controller_spec.rb | Ruby | mit | 45 | master | 9,852 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe SurveyorGui::SurveyformsController do
include Surveyor::Engine.routes.url_helpers
include SurveyorGui::Engine.routes.url_helpers
before do
self.routes = SurveyorGui::Engine.routes
end
let!(:survey) { FactoryGirl.create(:survey... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/controllers/surveyor_controller_spec.rb | Ruby | mit | 45 | master | 12,015 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe SurveyorController do
include Surveyor::Engine.routes.url_helpers
before do
@routes = Surveyor::Engine.routes
end
let!(:survey) { FactoryGirl.create(:survey, :title => "Alphabet", :access_code => "alpha", :survey_versi... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/helpers/formtastic_custom_input_spec.rb | Ruby | mit | 45 | master | 757 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
#require File.expand_path(File.dirname(__FILE__) + '/../../lib/surveyor/helpers/formtastic_custom_input')
describe Surveyor::Helpers::FormtasticCustomInput do
context "input helpers" do
it "should translate response class into attribute" do
... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/helpers/surveyor_helper_spec.rb | Ruby | mit | 45 | master | 5,300 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe SurveyorHelper do
context "numbering" do
it "should return the question text with number, except for labels, dependencies, images, and grouped questions" do
q1 = FactoryGirl.create(:question)
q2 = FactoryGirl.create(:questi... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/features/ui_spec.rb | Ruby | mit | 45 | master | 18,661 | require 'spec_helper'
describe "ui interactions" do
context "saves responses" do
include_context "everything"
it "radio button" do
response_set = start_survey('Everything')
expect(page).to have_content("What is your favorite color?")
within question("1") do
choose "red"
choo... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/features/rearrange_survey_spec.rb | Ruby | mit | 45 | master | 4,108 | require 'spec_helper'
#from spec/support/surveyforms_helpers.rb
include SurveyFormsCreationHelpers::CreateSurvey
include SurveyFormsCreationHelpers::BuildASurvey
feature "Survey Creator rearranges survey", %q{
As a Survey Creator
I want to rearrange a survey
So that I can change my mind if I don't like the ord... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/features/make_and_take_spec.rb | Ruby | mit | 45 | master | 5,873 | require 'spec_helper'
include SurveyFormsCreationHelpers::CreateSurvey
include SurveyFormsCreationHelpers::BuildASurvey
feature "Bug fix #41", %q{
As a user
I want to create a new survey using a browser
And have some mandatory questions per issue #41
And take the new survey successfully
} do
scenario "Make... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/features/dependencies_spec.rb | Ruby | mit | 45 | master | 2,945 | require 'spec_helper'
#from spec/support/surveyforms_helpers.rb
include SurveyFormsCreationHelpers::CreateSurvey
include SurveyFormsCreationHelpers::BuildASurvey
feature "User creates a dependency using browser", %q{
As a user
I want to create logic on questions
So that I can display one question depending on th... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/features/create_survey_spec.rb | Ruby | mit | 45 | master | 13,902 | require 'spec_helper'
#from spec/support/surveyforms_helpers.rb
include SurveyFormsCreationHelpers::CreateSurvey
include SurveyFormsCreationHelpers::BuildASurvey
feature "User creates a new survey using a browser", %q{
As a user
I want to create a new survey using a browser
So that I don't have to learn the Su... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/models/response_set_spec.rb | Ruby | mit | 45 | master | 22,292 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe ResponseSet do
let(:response_set) { FactoryGirl.create(:response_set) }
before(:each) do
@response_set = FactoryGirl.create(:response_set)
@radio_response_attributes = HashWithIndifferentAccess.new({"1"=>{"question_id"=>"1", "an... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/models/response_spec.rb | Ruby | mit | 45 | master | 7,449 | require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Response, "when saving a response" do
before(:each) do
# @response = Response.new(:question_id => 314, :response_set_id => 159, :answer_id => 1)
@response = FactoryGirl.create(:response, :question => FactoryGirl.create(:question), ... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/models/surveyor_gui/question_spec.rb | Ruby | mit | 45 | master | 2,211 | # encoding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe Question do
let(:question){ FactoryGirl.create(:question) }
let(:question2){ FactoryGirl.create(:question, question_type_id: "pick_one")}
def build_answers_from_answers_textbox
question2.answers_textbox = "b... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/models/surveyor_gui/question_type_spec.rb | Ruby | mit | 45 | master | 9,640 | # encoding: UTF-8
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe QuestionType do
let(:grid) { FactoryGirl.create(:question_group, display_type: "grid") }
let(:inline) { FactoryGirl.create(:question_group, display_type: "inline") }
let(:repeater){ FactoryGirl.create(:question... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/views/surveyforms/edit.html.erb_spec.rb | Ruby | mit | 45 | master | 4,348 | require 'spec_helper'
module CapybaraHelper
Capybara::Session::DSL_METHODS.each do |method|
define_method method do |*args, &block|
Capybara.string(response).send method, *args, &block
end
end
end
RSpec.configure do |config|
config.order = :default
end
describe "surveyor_gui/surveyforms/edit.html.... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | spec/views/questions/edit.html.erb_spec.rb | Ruby | mit | 45 | master | 2,065 | require 'spec_helper'
module CapybaraHelper
Capybara::Session::DSL_METHODS.each do |method|
define_method method do |*args, &block|
Capybara.string(response).send method, *args, &block
end
end
end
describe "surveyor_gui/questions/edit.html.erb" do
include CapybaraHelper
let(:question){ FactoryG... |
github | kjayma/surveyor_gui | https://github.com/kjayma/surveyor_gui | db/migrate/20140601011151_create_columns.rb | Ruby | mit | 45 | master | 214 | class CreateColumns < ActiveRecord::Migration
def change
create_table :columns do |t|
t.integer :question_group_id
t.text :text
t.text :answers_textbox
t.timestamps
end
end
end |
github | pacuna/frappe_charts | https://github.com/pacuna/frappe_charts | frappe_charts.gemspec | Ruby | mit | 45 | master | 913 | lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "frappe_charts/version"
Gem::Specification.new do |spec|
spec.name = "frappe_charts"
spec.version = FrappeCharts::VERSION
spec.authors = ["Pablo Acuna"]
spec.email = ["pabloac... |
github | pacuna/frappe_charts | https://github.com/pacuna/frappe_charts | test/frappe_charts_test.rb | Ruby | mit | 45 | master | 212 | require "test_helper"
class FrappeChartsTest < Minitest::Test
def test_that_it_has_a_version_number
refute_nil ::FrappeCharts::VERSION
end
def test_it_does_something_useful
assert false
end
end |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | bunny-mock.gemspec | Ruby | mit | 45 | master | 1,407 | #!/usr/bin/env gem build
# encoding: utf-8
require 'base64'
require File.expand_path("../lib/bunny_mock/version", __FILE__)
Gem::Specification.new do |s|
s.name = 'bunny-mock'
s.version = BunnyMock::VERSION.dup
s.platform = Gem::Platform::RUBY
s.authors = ['Andrew Rempe']
s.email = [... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | Rakefile | Ruby | mit | 45 | master | 555 | require 'rubygems'
require 'bundler'
Bundler.setup :default, :test, :development
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
end
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.r... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny-mock.rb | Ruby | mit | 45 | master | 1,345 | # frozen_string_literal: true
require 'bunny_mock/version'
require 'timeout'
require 'bunny/exceptions'
require 'amq/protocol/client'
require 'bunny_mock/get_response'
require 'bunny_mock/message_properties'
require 'bunny_mock/session'
require 'bunny_mock/channel'
require 'bunny_mock/exchange'
require 'bunny_mock/q... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/get_response.rb | Ruby | mit | 45 | master | 1,888 | # frozen_string_literal: true
module BunnyMock
class GetResponse
#
# Behavior
#
include Enumerable
#
# API
#
# @return [BunnyMock::Channel] Channel the response is from
attr_reader :channel
# @return [BunnyMock::Queue] Queue the response is from
attr_reader :queue
... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/exchange.rb | Ruby | mit | 45 | master | 8,198 | # frozen_string_literal: true
module BunnyMock
class Exchange
class << self
##
# Create a new {BunnyMock::Exchange} instance
#
# @param [BunnyMock::Channel] channel Channel this exchange will use
# @param [String] name Name of exchange
# @param [Hash] opts Creation options
... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/queue.rb | Ruby | mit | 45 | master | 7,518 | # frozen_string_literal: true
module BunnyMock
class Queue
#
# API
#
# @return {BunnyMock::Channel} Channel used by queue
attr_reader :channel
# @return [String] Queue name
attr_reader :name
# @return [Hash] Creation options
attr_reader :opts
##
# Create a new [BunnyMoc... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/message_properties.rb | Ruby | mit | 45 | master | 2,541 | # frozen_string_literal: true
module BunnyMock
class MessageProperties
#
# Behaviors
#
include Enumerable
#
# API
#
# @private
def initialize(properties)
properties.delete :exchange
@properties = properties
end
# Iterate over the properties
# @see Enumer... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/session.rb | Ruby | mit | 45 | master | 3,876 | # frozen_string_literal: true
module BunnyMock
# Mocks Bunny::Session
class Session
#
# API
#
# @return [Symbol] Current session status
attr_reader :status
# @return [Hash<String, BunnyMock::Exchange>] Exchanges created by this channel
attr_reader :exchanges
# @return [Hash<String... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/channel.rb | Ruby | mit | 45 | master | 10,423 | # frozen_string_literal: true
module BunnyMock
class Channel
#
# API
#
# @return [Integer] Channel identifier
attr_reader :id
# @return [BunnyMock::Session] Session this channel belongs to
attr_reader :connection
# @return [Symbol] Current channel state
attr_reader :status
... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/exchanges/topic.rb | Ruby | mit | 45 | master | 1,064 | # frozen_string_literal: true
module BunnyMock
module Exchanges
class Topic < BunnyMock::Exchange
# @private
# @return [String] Multiple subdomain wildcard
MULTI_WILDCARD = '#'.freeze
# @private
# @return [String] Single subdomain wildcard
SINGLE_WILDCARD = '*'.freeze
#... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/exchanges/direct.rb | Ruby | mit | 45 | master | 526 | # frozen_string_literal: true
module BunnyMock
module Exchanges
class Direct < BunnyMock::Exchange
#
# API
#
##
# Deliver a message to route with direct key match
#
# @param [Object] payload Message content
# @param [Hash] opts Message properties
# @param [St... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/exchanges/headers.rb | Ruby | mit | 45 | master | 726 | # frozen_string_literal: true
module BunnyMock
module Exchanges
class Headers < BunnyMock::Exchange
# @private
# @return [Regexp] Any match
ANY = /^any$/i
# @private
# @return [Regexp] All match
ALL = /^all$/i
#
# API
#
##
# Deliver a message to... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | lib/bunny_mock/exchanges/fanout.rb | Ruby | mit | 45 | master | 517 | # frozen_string_literal: true
module BunnyMock
module Exchanges
class Fanout < BunnyMock::Exchange
#
# API
#
##
# Deliver a message to all routes
#
# @param [Object] payload Message content
# @param [Hash] opts Message properties
# @param [String] key Routing... |
github | arempe93/bunny-mock | https://github.com/arempe93/bunny-mock | spec/spec_helper.rb | Ruby | mit | 45 | master | 364 | require 'rspec'
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'bundler'
Bundler.setup :default, :test
Bundler.require
require 'coveralls'
Coveralls.wear!
require 'bunny-mock'
BunnyMock.use_bunny_queue_pop_api = true
RSpec.configure do |config|
config.before :each do
@session = BunnyMock.new.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.