<commit_before>require 'ubiquo_media'

config.after_initialize do
  UbiquoMedia::Connectors.load!
end

Ubiquo::Plugin.register(:ubiquo_media, directory, config) do |config|
  config.add :assets_elements_per_page
  config.add_inheritance :assets_elements_per_page, :elements_per_page
  config.add :media_selector_list_size, 3
  config.add :assets_access_control, lambda{
    access_control :DEFAULT => 'media_management'
  }
  config.add :assets_permit, lambda{
   permit?('media_management')
  }
  config.add :assets_string_filter_enabled, true
  config.add :assets_tags_filter_enabled, true
  config.add :assets_asset_types_filter_enabled, true
  config.add :assets_asset_visibility_filter_enabled, true
  config.add :assets_date_filter_enabled, true
  config.add :assets_default_order_field, 'assets.id'
  config.add :assets_default_sort_order, 'desc'
  config.add :asset_types_icons, { :doc => "icon_doc.png",
                                   :video => "icon_video.png",
                                   :audio => "icon_audio.png",
                                   :flash => "icon_flash.png",
                                   :other => "icon_other.png" }
  config.add :mime_types, { :image => ["image"],
                            :video => ["video"],
                            :doc => ["text"],
                            :audio => ["audio"],
                            :flash => ["swf", "x-shockwave-flash"] }
  config.add :media_styles_list, { :thumb => "100x100>" }<commit_msg>Add more options for mime_types hash<commit_after>require 'ubiquo_media'

config.after_initialize do
  UbiquoMedia::Connectors.load!
end

Ubiquo::Plugin.register(:ubiquo_media, directory, config) do |config|
  config.add :assets_elements_per_page
  config.add_inheritance :assets_elements_per_page, :elements_per_page
  config.add :media_selector_list_size, 3
  config.add :assets_access_control, lambda{
    access_control :DEFAULT => 'media_management'
  }
  config.add :assets_permit, lambda{
   permit?('media_management')
  }
  config.add :assets_string_filter_enabled, true
  config.add :assets_tags_filter_enabled, true
  config.add :assets_asset_types_filter_enabled, true
  config.add :assets_asset_visibility_filter_enabled, true
  config.add :assets_date_filter_enabled, true
  config.add :assets_default_order_field, 'assets.id'
  config.add :assets_default_sort_order, 'desc'
  config.add :asset_types_icons, { :doc => "icon_doc.png",
                                   :video => "icon_video.png",
                                   :audio => "icon_audio.png",
                                   :flash => "icon_flash.png",
                                   :other => "icon_other.png" }
  config.add :mime_types, { :image => ["image"],
                            :video => ["video"],
                            :doc => ["text", "pdf", "msword"],
                            :audio => ["audio"],
                            :flash => ["swf", "x-shockwave-flash"] }
  config.add :media_styles_list, { :thumb => "100x100>" }
{'fraction_non_alphanumeric': 0.11667765326301911, 'fraction_numerical': 0.004614370468029005, 'mean_word_length': 2.570588235294118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6459028', 'n_tokens_mistral': 932, 'n_tokens_neox': 909, 'n_words': 165}