Sha256: 4669618fd6fd836eafe4b8dfc4cfaceaaefcf36d4673c8957a7b7bfd66274a74

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/config/yaml_file'
require 'contrast/config/validate'

module Contrast
  # A Rake task to generate a contrast_security.yaml file with some basic settings
  module Config
    extend Rake::DSL
    # The file create methods are required in the gemspec. Some of the Agent functions are not
    # available there. To be safe the validate mechanics are extracted in different module.
    extend Contrast::Config::Validate

    namespace :contrast do
      namespace :config do
        desc 'Create a contrast_security.yaml in the applications root directory'
        task :create do
          Contrast::Config::YamlFile.create
        end
      end
    end

    namespace :contrast do
      namespace :config do
        desc 'Validate the provided Contrast configuration and confirm connectivity'
        task validate: :environment do
          validate_file
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
contrast-agent-7.6.1 lib/contrast/tasks/config.rb
contrast-agent-7.6.0 lib/contrast/tasks/config.rb
contrast-agent-7.5.0 lib/contrast/tasks/config.rb
contrast-agent-7.4.1 lib/contrast/tasks/config.rb
contrast-agent-7.4.0 lib/contrast/tasks/config.rb
contrast-agent-7.3.2 lib/contrast/tasks/config.rb
contrast-agent-7.3.1 lib/contrast/tasks/config.rb
contrast-agent-7.3.0 lib/contrast/tasks/config.rb
contrast-agent-7.2.0 lib/contrast/tasks/config.rb
contrast-agent-7.1.0 lib/contrast/tasks/config.rb
contrast-agent-7.0.0 lib/contrast/tasks/config.rb
contrast-agent-6.15.3 lib/contrast/tasks/config.rb
contrast-agent-6.15.2 lib/contrast/tasks/config.rb
contrast-agent-6.15.1 lib/contrast/tasks/config.rb
contrast-agent-6.15.0 lib/contrast/tasks/config.rb
contrast-agent-6.14.0 lib/contrast/tasks/config.rb