<commit_before>$ = require('jquery')

class ExternalData

  constructor: (app) ->
    @sslProxy = app.options.sslProxy

  get: (url) ->
    deferred = $.Deferred()

    url = if @sslProxy
      "#{@sslProxy}#{url}"
    else
      url

    $.get url, (data) -> deferred.resolve(data)

    deferred.promise()

module.exports = ExternalData
<commit_msg>only use ssl proxy if url is http<commit_after>$ = require('jquery')

class ExternalData

  constructor: (app) ->
    @sslProxy = app.options.sslProxy

  get: (url) ->
    deferred = $.Deferred()

    url = if url.startsWith('http:') && @sslProxy
      "#{@sslProxy}#{url}"
    else
      url

    $.get url, (data) -> deferred.resolve(data)

    deferred.promise()

module.exports = ExternalData

{'fraction_non_alphanumeric': 0.15528781793842034, 'fraction_numerical': 0.0, 'mean_word_length': 2.9162303664921465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7572275', 'n_tokens_mistral': 262, 'n_tokens_neox': 248, 'n_words': 58}