Sha256: 1bd663a1cb252b5d8ab5593a7db6e26572ce5169774735ebce07074d0f44b84c
Contents?: true
Size: 1.18 KB
Versions: 18
Compression:
Stored size: 1.18 KB
Contents
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true module Contrast module Agent module Assess module Rule module Response module Framework # Rails 7 supports managing potential unsafe Headers # this module contains methods for checking if Rails 7 supersedes our rules module RailsSupport RAILS_VERSION = Gem::Version.new('7.0.0') # Some rules have features or settings that make them unsupported, meaning unnecessary or unavailable # in that framework. For now, the only distinction required is Rails 7 or not, so that's what we'll # report here. # # @return [Boolean] if the rule is unsupported by the framework def rails_seven? return false unless defined?(::Rails) rails_version = ::Rails.version return false unless !!rails_version Gem::Version.new(rails_version) >= RAILS_VERSION end end end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems