Sha256: 67f51ffd5b05c5110311164bcad98c173c976a02ebb373ad832e3995a3b6d6a6

Contents?: true

Size: 837 Bytes

Versions: 36

Compression:

Stored size: 837 Bytes

Contents

RSpec::Matchers.define :have_rule do |rule_id|
  match do |type|
    return type.has_rule?(rule_id, @priority, @action) if type.instance_of?(Awspec::Type::WafWebAcl)
    return type.has_rule?(rule_id, @priority, @conditions, @actions) if type.instance_of?(Awspec::Type::AlbListener)
    type.has_rule?(rule_id, @priority, @conditions, @actions) if type.instance_of?(Awspec::Type::NlbListener)
  end

  chain :priority do |priority|
    @priority = priority
  end

  chain :order do |priority|
    @priority = priority
  end

  chain :action do |action|
    @action = action
  end

  chain :conditions do |conditions|
    @conditions = conditions
  end

  chain :actions do |actions|
    @actions = actions
  end

  chain :if do |conditions|
    @conditions = conditions
  end

  chain :then do |actions|
    @actions = actions
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
awspec-1.16.1 lib/awspec/matcher/have_rule.rb
awspec-1.16.0 lib/awspec/matcher/have_rule.rb
awspec-1.15.3 lib/awspec/matcher/have_rule.rb
awspec-1.15.2 lib/awspec/matcher/have_rule.rb
awspec-1.15.1 lib/awspec/matcher/have_rule.rb
awspec-1.15.0 lib/awspec/matcher/have_rule.rb
awspec-1.14.1 lib/awspec/matcher/have_rule.rb
awspec-1.14.0 lib/awspec/matcher/have_rule.rb
awspec-1.13.0 lib/awspec/matcher/have_rule.rb
awspec-1.12.7 lib/awspec/matcher/have_rule.rb
awspec-1.12.6 lib/awspec/matcher/have_rule.rb
awspec-1.12.5 lib/awspec/matcher/have_rule.rb
awspec-1.12.4 lib/awspec/matcher/have_rule.rb
awspec-1.12.3 lib/awspec/matcher/have_rule.rb
awspec-1.12.2 lib/awspec/matcher/have_rule.rb
awspec-1.12.1 lib/awspec/matcher/have_rule.rb
awspec-1.12.0 lib/awspec/matcher/have_rule.rb
awspec-1.11.1 lib/awspec/matcher/have_rule.rb
awspec-1.11.0 lib/awspec/matcher/have_rule.rb
awspec-1.10.0 lib/awspec/matcher/have_rule.rb