Sha256: ae9fb63708d1ac9282217cbd4adce85ed4604064d556c5ade1e114c132ec033c

Contents?: true

Size: 590 Bytes

Versions: 6

Compression:

Stored size: 590 Bytes

Contents

module Workarea
  module ForterApiConfig
    def self.included(test)
      super
      test.setup :set_key
      test.teardown :reset_key
    end

    def site_id
      "4d12ac5d794c"
    end

    def set_key
      @_old_secrets = Rails.application.secrets.forter
      @old_site_id = Workarea.config.forter.site_id
      Workarea.config.forter.site_id = site_id
      Rails.application.secrets.forter = {
        secret_key: 'a'
      }
    end

    def reset_key
      Rails.application.secrets.forter = @_old_secrets
      Workarea.config.forter.site_id = @old_site_id
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-forter-1.3.2 test/support/workarea/forter_api_config.rb
workarea-forter-1.3.1 test/support/workarea/forter_api_config.rb
workarea-forter-1.3.0 test/support/workarea/forter_api_config.rb
workarea-forter-1.2.4 test/support/workarea/forter_api_config.rb
workarea-forter-1.2.3 test/support/workarea/forter_api_config.rb
workarea-forter-1.2.2 test/support/workarea/forter_api_config.rb