<commit_before>class SamlController < ApplicationController

  def consume
    response = OneLogin::RubySaml::Response.new(params[:SAMLResponse])
    render :text => response.name_id
  end

end<commit_msg>Make tests compatable with Rails 5.1<commit_after>class SamlController < ApplicationController

  def consume
    response = OneLogin::RubySaml::Response.new(params[:SAMLResponse])
    if Gem::Requirement.new('< 4.1') =~ Gem::Version.new(Rails.version)
      render :text => response.name_id
    else
      render :plain => response.name_id
    end
  end

end
{'fraction_non_alphanumeric': 0.10638297872340426, 'fraction_numerical': 0.0070921985815602835, 'mean_word_length': 4.485436893203883, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '669458', 'n_tokens_mistral': 178, 'n_tokens_neox': 166, 'n_words': 37}