<commit_before>require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Cronofy < OmniAuth::Strategies::OAuth2
      option :name, "cronofy"

      option :client_options, {
        :site => "https://app.cronofy.com",
        :authorize_url => "/oauth/authorize"
      }

      uid{ raw_info['account_id'] }

      info do
        {
          :email => raw_info['email']
        }
      end

      extra do
        {
          'raw_info' => raw_info
        }
      end

      def raw_info
        @raw_info ||= access_token.get('/v1/account').parsed['account']
      end
    end
  end
end<commit_msg>ensured account details are retrieved from api host<commit_after>require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Cronofy < OmniAuth::Strategies::OAuth2
      option :name, "cronofy"

      option :client_options, {
        :site => "https://app.cronofy.com"
      }

      uid{ raw_info['account_id'] }

      info do
        {
          :email => raw_info['email']
        }
      end

      extra do
        {
          'raw_info' => raw_info
        }
      end

      def raw_info
        @raw_info ||= access_token.get('https://api.cronofy.com/v1/account').parsed['account']
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11609287429943956, 'fraction_numerical': 0.004803843074459567, 'mean_word_length': 1.9137529137529137, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 3, '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': '1989372', 'n_tokens_mistral': 426, 'n_tokens_neox': 412, 'n_words': 80}