<commit_before>module CloudObjectStoreObjectHelper::TextualSummary
  include TextualMixins::TextualGroupTags

  def textual_group_properties
    TextualGroup.new(_("Properties"), %i(key content_length last_modified etag))
  end

  def textual_group_relationships
    TextualGroup.new(_("Relationships"), %i(parent_ems_cloud ems cloud_tenant cloud_object_store_container))
  end

  def textual_parent_ems_cloud
    textual_link(@record.ext_management_system.try(:parent_manager), :label => _("Parent Cloud Provider"))
  end

  def textual_ems
    textual_link(@record.ext_management_system)
  end

  def textual_key
    @record.key
  end

  def textual_content_length
    {:label => _("Content Length"), :value => number_to_human_size(@record.content_length, :precision => 2)}
  end

  def textual_last_modified
    @record.last_modified
  end

  def textual_etag
    @record.etag
  end

  def textual_cloud_tenant
    cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant)
    h = {:label => _('Cloud Tenant'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)}
    if cloud_tenant && role_allows?(:feature => "cloud_tenant_show")
      h[:title] = _("Show this Cloud Object's parent Cloud Tenant")
      h[:link]  = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant)
    end
    h
  end

  def textual_cloud_object_store_container
    object_store_container = @record.cloud_object_store_container if @record.respond_to?(:cloud_object_store_container)
    h = {
      :label => _('Cloud Object Store Container'),
      :icon  => "ff ff-cloud-object-store",
      :value => (object_store_container.nil? ? "None" : object_store_container.key)
    }
    if object_store_container && role_allows?(:feature => "cloud_object_store_container_show")
      h[:title] = _("Show this Cloud Object's parent Cloud Object Store Container")
      h[:link]  = url_for_only_path(:controller => 'cloud_object_store_container',
                          :action     => 'show',
                          :id         => object_store_container)
    end
    h
  end
end<commit_msg>Fix rubocop warnings in CloudObjectStoreObjectHelper::TextualSummary<commit_after>module CloudObjectStoreObjectHelper::TextualSummary
  include TextualMixins::TextualGroupTags

  def textual_group_properties
    TextualGroup.new(_("Properties"), %i(key content_length last_modified etag))
  end

  def textual_group_relationships
    TextualGroup.new(_("Relationships"), %i(parent_ems_cloud ems cloud_tenant cloud_object_store_container))
  end

  def textual_parent_ems_cloud
    textual_link(@record.ext_management_system.try(:parent_manager), :label => _("Parent Cloud Provider"))
  end

  def textual_ems
    textual_link(@record.ext_management_system)
  end

  def textual_key
    @record.key
  end

  def textual_content_length
    {:label => _("Content Length"), :value => number_to_human_size(@record.content_length, :precision => 2)}
  end

  def textual_last_modified
    @record.last_modified
  end

  def textual_etag
    @record.etag
  end

  def textual_cloud_tenant
    cloud_tenant = @record.cloud_tenant if @record.respond_to?(:cloud_tenant)
    h = {:label => _('Cloud Tenant'), :icon => "pficon pficon-cloud-tenant", :value => (cloud_tenant.nil? ? "None" : cloud_tenant.name)}
    if cloud_tenant && role_allows?(:feature => "cloud_tenant_show")
      h[:title] = _("Show this Cloud Object's parent Cloud Tenant")
      h[:link]  = url_for_only_path(:controller => 'cloud_tenant', :action => 'show', :id => cloud_tenant)
    end
    h
  end

  def textual_cloud_object_store_container
    object_store_container = @record.cloud_object_store_container if @record.respond_to?(:cloud_object_store_container)
    h = {
      :label => _('Cloud Object Store Container'),
      :icon  => "ff ff-cloud-object-store",
      :value => (object_store_container.nil? ? "None" : object_store_container.key)
    }
    if object_store_container && role_allows?(:feature => "cloud_object_store_container_show")
      h[:title] = _("Show this Cloud Object's parent Cloud Object Store Container")
      h[:link]  = url_for_only_path(:controller => 'cloud_object_store_container',
                                    :action     => 'show',
                                    :id         => object_store_container)
    end
    h
  end
end
{'fraction_non_alphanumeric': 0.10815723699159283, 'fraction_numerical': 0.0004544421722335833, 'mean_word_length': 3.985277463193658, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5011298', 'n_tokens_mistral': 1391, 'n_tokens_neox': 1350, 'n_words': 277}