<commit_before>require "auric/vault/door/version"
require 'openssl'
require 'httparty'

module Auric
  module Vault
    class Door
        class EncryptionError < StandardError; end
        class DecryptionError < StandardError; end


      attr_accessor :secret, :mtid, :config_id, :production, :segment
      attr_reader :error, :success
      SANDBOXURLS = ['https://vault01-sb.auricsystems.com/vault/v2/', 'https://vault02-sb.auricsystems.com/vault/v2/']
      PRODUCTIONURLS= ['https://vault01-sb.auricsystems.com/vault/v2/', 'https://vault02-sb.auricsystems.com/vault/v2/']

      def initialize(args)
        required_args = [:secret, :mtid, :config_id]
        required_args.each do |arg|
          raise ArgumentError, "Required argument: (#{arg}) not provided" unless args.include?(arg)
        end
        @secret = args[:secret]
        @mtid = args[:mtid]
        @config_id = args[:config_id]
        @production = args[:production] || false
        @segment = args[:segment]
        @success = false
        @error = nil
        if @production
          @url = PRODUCTIONURLS
        else
          @url = SANDBOXURLS
        end
      end<commit_msg>Add production urls<commit_after>require "auric/vault/door/version"
require 'openssl'
require 'httparty'

module Auric
  module Vault
    class Door
        class EncryptionError < StandardError; end
        class DecryptionError < StandardError; end


      attr_accessor :secret, :mtid, :config_id, :production, :segment
      attr_reader :error, :success
      SANDBOXURLS = ['https://vault01-sb.auricsystems.com/vault/v2/', 'https://vault02-sb.auricsystems.com/vault/v2/']
      PRODUCTIONURLS= ['https://vault01.auricsystems.com/vault/v2/', 'https://vault02.auricsystems.com/vault/v2/']

      def initialize(args)
        required_args = [:secret, :mtid, :config_id]
        required_args.each do |arg|
          raise ArgumentError, "Required argument: (#{arg}) not provided" unless args.include?(arg)
        end
        @secret = args[:secret]
        @mtid = args[:mtid]
        @config_id = args[:config_id]
        @production = args[:production] || false
        @segment = args[:segment]
        @success = false
        @error = nil
        if @production
          @url = PRODUCTIONURLS
        else
          @url = SANDBOXURLS
        end
      end
{'fraction_non_alphanumeric': 0.120926243567753, 'fraction_numerical': 0.010291595197255575, 'mean_word_length': 2.5947611710323573, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1645337', 'n_tokens_mistral': 766, 'n_tokens_neox': 731, 'n_words': 157}