<commit_before>require "bundler/setup"
Bundler.setup

require "responsys_api.rb"
require "vcr"
require "yaml"

if File.exist?("#{File.dirname(__FILE__)}/api_credentials.yml")
  CREDENTIALS = YAML.load_file("#{File.dirname(__FILE__)}/api_credentials.yml")
else
  CREDENTIALS = YAML.load_file("#{File.dirname(__FILE__)}/api_credentials.sample.yml")
end

DATA = YAML.load_file("#{File.dirname(__FILE__)}/test_data.yml")
IGNORE_LOGIN_REQUEST = true
IGNORE_LOGOUT_REQUEST = true

VCR.configure do |c|
  c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
  c.hook_into :webmock
  c.filter_sensitive_data("your_responsys_username") { CREDENTIALS["username"] }
  c.filter_sensitive_data("your_responsys_password") { CREDENTIALS["password"] }
  c.default_cassette_options = { match_requests_on: [:host, :method, :uri, :body, :path] }
  c.before_record do |c|
    c.request.headers = nil
    c.response.headers = nil
    c.request.body.sub!(/<sessionId>.*<\/sessionId>/, "<sessionId>DEAR_SESSION_ID</sessionId>")
    c.response.body.sub!(/<sessionId>.*<\/sessionId>/, "<sessionId>DEAR_SESSION_ID</sessionId>")
  end
end

Responsys.configure do |config|
  config.settings = {
    username: CREDENTIALS["username"],
    password: CREDENTIALS["password"],
    wsdl: CREDENTIALS["wsdl"],
    element_form_default: :qualified
  }
end<commit_msg>[CLEAN] Unused code, params in the spec_helper<commit_after>require "bundler/setup"
Bundler.setup

require "responsys_api.rb"
require "vcr"
require "yaml"

if File.exist?("#{File.dirname(__FILE__)}/api_credentials.yml")
  CREDENTIALS = YAML.load_file("#{File.dirname(__FILE__)}/api_credentials.yml")
else
  CREDENTIALS = YAML.load_file("#{File.dirname(__FILE__)}/api_credentials.sample.yml")
end

DATA = YAML.load_file("#{File.dirname(__FILE__)}/test_data.yml")

VCR.configure do |c|
  c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
  c.hook_into :webmock
  c.filter_sensitive_data("your_responsys_username") { CREDENTIALS["username"] }
  c.filter_sensitive_data("your_responsys_password") { CREDENTIALS["password"] }
  c.default_cassette_options = { match_requests_on: [:method, :uri, :body] }
  c.before_record do |c|
    c.request.headers = nil
    c.response.headers = nil
    c.request.body.sub!(/<sessionId>.*<\/sessionId>/, "<sessionId>DEAR_SESSION_ID</sessionId>")
    c.response.body.sub!(/<sessionId>.*<\/sessionId>/, "<sessionId>DEAR_SESSION_ID</sessionId>")
  end
end

Responsys.configure do |config|
  config.settings = {
    username: CREDENTIALS["username"],
    password: CRED<PASSWORD>S["password"],
    wsdl: CREDENTIALS["wsdl"],
    element_form_default: :qualified
  }
end
{'fraction_non_alphanumeric': 0.1560364464692483, 'fraction_numerical': 0.0, 'mean_word_length': 5.739130434782608, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, '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': '7206506', 'n_tokens_mistral': 989, 'n_tokens_neox': 967, 'n_words': 133}