<commit_before>require 'net/http'

module Alchemy
  module Admin
    class DashboardController < Alchemy::Admin::BaseController

      def index
        @last_edited_pages = Page.from_current_site.all_last_edited_from(current_user)
        @locked_pages = Page.from_current_site.all_locked
        @online_users = User.logged_in.to_a - [current_user]
        @first_time = current_user.sign_in_count == 1 && current_user.last_sign_in_at.nil?
        @sites = Site.scoped
      end

      def info
        @alchemy_version = Alchemy.version
        render layout: !request.xhr?
      end

      def update_check<commit_msg>Require `alchemy/version` in dashboard controller.<commit_after>require 'net/http'
require 'alchemy/version'

module Alchemy
  module Admin
    class DashboardController < Alchemy::Admin::BaseController

      def index
        @last_edited_pages = Page.from_current_site.all_last_edited_from(current_user)
        @locked_pages = Page.from_current_site.all_locked
        @online_users = User.logged_in.to_a - [current_user]
        @first_time = current_user.sign_in_count == 1 && current_user.last_sign_in_at.nil?
        @sites = Site.scoped
      end

      def info
        @alchemy_version = Alchemy.version
        render layout: !request.xhr?
      end

      def update_check
{'fraction_non_alphanumeric': 0.07880642693190512, 'fraction_numerical': 0.001530221882172915, 'mean_word_length': 3.1132075471698113, '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': '6738730', 'n_tokens_mistral': 427, 'n_tokens_neox': 401, 'n_words': 75}