<commit_before>module Luban
  module Deployment
    class Application
      class Controller < Worker
        include Luban::Deployment::Service::Controller::Base

        def current_configured?; !!task.opts.release[:current]; end
        alias_method :current?, :current_configured?

        def current_symlinked?
          release_tag == current_release_tag
        end

        def current_release_tag
          if symlink?(current_app_path)
            File.basename(readlink(current_app_path))
          else
            nil
          end
        end

        def published?
          directory?(release_path)
        end

        def get_summary
          status = if current_symlinked?
                     current? ? " *" : "s*"
                   else
                     current? ? "c*" : "  "
                   end

          if published?
            published = 'published'<commit_msg>add status checking on deprecated release<commit_after>module Luban
  module Deployment
    class Application
      class Controller < Worker
        include Luban::Deployment::Service::Controller::Base

        def current_configured?; !!task.opts.release[:current]; end
        alias_method :current?, :current_configured?

        def current_symlinked?
          release_tag == current_release_tag
        end

        def current_release_tag
          if symlink?(current_app_path)
            File.basename(readlink(current_app_path))
          else
            nil
          end
        end

        def published?; directory?(release_path); end
        def deprecated?; !!task.opts.release[:deprecated]; end

        def get_summary
          status = if current_symlinked?
                     current? ? " *" : "s*"
                   else
                     current? ? "c*" : (deprecated? ? " d" : "  ")
                   end

          if published?
            published = 'published'
{'fraction_non_alphanumeric': 0.07833859095688749, 'fraction_numerical': 0.0, 'mean_word_length': 1.6916548797736917, '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': '7552155', 'n_tokens_mistral': 479, 'n_tokens_neox': 468, 'n_words': 112}