<commit_before># name: discourse-directoryopus
# about: Plugin specific to the GPSoftware Directory Opus support forum.
# version: 0.1
# authors: <NAME>
# url: https://www.gpsoft.com.au

enabled_site_setting :directoryopus_enabled

register_asset 'stylesheets/directoryopus.scss'
register_asset 'stylesheets/directoryopus_mobile_only.scss', :mobile
# register_asset 'stylesheets/directoryopus_desktop_only.scss', :desktop

require 'net/http'
require 'json'

after_initialize do

  # We have two modules as we want to have URLs in two different places on the site.

  module ::DiscourseOpusLinkLanding
    class Engine < ::Rails::Engine
      engine_name "opuslinklanding"
      isolate_namespace DiscourseOpusLinkLanding
    end
  end

  module ::DiscourseOpusLink
    class Engine < ::Rails::Engine
      engine_name "opuslink"
      isolate_namespace DiscourseOpusLink
    end
  end

  class DiscourseOpusLink::OpusUpdateAccountLinks < ::Jobs::Scheduled
    every 6.hour
    def execute(args)
      OpuslinkController.new.refreshAllLinks
    end
  end

  require_dependency 'application_controller'

  # Server side of the landing component does nothing. We just want the client-side URL to work so it can show
  # some fairly static pages or redirect people to things, based on login state. For whatever reason, that
  # requires setting up a dummy server-side route as well.<commit_msg>Corrected namespace in scheduled job.<commit_after># name: discourse-directoryopus
# about: Plugin specific to the GPSoftware Directory Opus support forum.
# version: 0.1
# authors: <NAME>
# url: https://www.gpsoft.com.au

enabled_site_setting :directoryopus_enabled

register_asset 'stylesheets/directoryopus.scss'
register_asset 'stylesheets/directoryopus_mobile_only.scss', :mobile
# register_asset 'stylesheets/directoryopus_desktop_only.scss', :desktop

require 'net/http'
require 'json'

after_initialize do

  # We have two modules as we want to have URLs in two different places on the site.

  module ::DiscourseOpusLinkLanding
    class Engine < ::Rails::Engine
      engine_name "opuslinklanding"
      isolate_namespace DiscourseOpusLinkLanding
    end
  end

  module ::DiscourseOpusLink
    class Engine < ::Rails::Engine
      engine_name "opuslink"
      isolate_namespace DiscourseOpusLink
    end
  end

  class DiscourseOpusLink::OpusUpdateAccountLinks < ::Jobs::Scheduled
    every 6.hour
    def execute(args)
      DiscourseOpusLink::OpuslinkController.new.refreshAllLinks
    end
  end

  require_dependency 'application_controller'

  # Server side of the landing component does nothing. We just want the client-side URL to work so it can show
  # some fairly static pages or redirect people to things, based on login state. For whatever reason, that
  # requires setting up a dummy server-side route as well.
{'fraction_non_alphanumeric': 0.06553312079348211, 'fraction_numerical': 0.0021253985122210413, 'mean_word_length': 4.430769230769231, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1907141', 'n_tokens_mistral': 842, 'n_tokens_neox': 788, 'n_words': 267}