<commit_before>require 'gds_api/publisher'
require 'gds_api/imminence'
require 'gds_api/panopticon'

class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :api
  def api
    @api ||= GdsApi::Publisher.new(Rails.env)
  end

  helper_method :places_api
  def places_api
    @places_api ||= GdsApi::Imminence.new(Rails.env)
  end

  helper_method :artefact_api
  def artefact_api
    @artefact_api ||= GdsApi::Panopticon.new(Rails.env)
  end
end<commit_msg>Get the environment details from Plek so it's platform-aware<commit_after>require 'gds_api/publisher'
require 'gds_api/imminence'
require 'gds_api/panopticon'

class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :api
  def api
    @api ||= GdsApi::Publisher.new(Plek.current.environment)
  end

  helper_method :places_api
  def places_api
    @places_api ||= GdsApi::Imminence.new(Plek.current.environment)
  end

  helper_method :artefact_api
  def artefact_api
    @artefact_api ||= GdsApi::Panopticon.new(Plek.current.environment)
  end
end
{'fraction_non_alphanumeric': 0.09369202226345083, 'fraction_numerical': 0.0, 'mean_word_length': 5.236994219653179, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '119565', 'n_tokens_mistral': 397, 'n_tokens_neox': 385, 'n_words': 71}