<commit_before>if get(:admin_mode)
  if equals?(:authentication, :devise)
    gather_gem 'activeadmin', github: 'activeadmin'
    gather_gem 'activeadmin_addons'

    after(:gem_install, :wrap_in_action => :admin_install) do
      generate "active_admin:install"

      line = "ActiveAdmin.setup do |config|"
      initializer = "config/initializers/active_admin.rb"
      gsub_file initializer, /(#{Regexp.escape(line)})/mi do |match|
        <<-HERE.gsub(/^ {11}/, '')
           class CustomFooter < ActiveAdmin::Component
             def build
               super(id: "footer")
               para "Powered by Platanus"
             end
           end\n
           ActiveAdmin.setup do |config|
             config.view_factory.footer = CustomFooter
           HERE
      end
    end
  else
    say "ActiveAdmin can't be installed because Devise isn't enabled.", :red
  end
end<commit_msg>feat(admin): add active_skin support<commit_after>if get(:admin_mode)
  if equals?(:authentication, :devise)
    gather_gem 'activeadmin', github: 'activeadmin'
    gather_gem 'activeadmin_addons'
    gather_gem 'active_skin'

    after(:gem_install, :wrap_in_action => :admin_install) do
      generate "active_admin:install"

      line = "ActiveAdmin.setup do |config|"
      initializer = "config/initializers/active_admin.rb"
      gsub_file initializer, /(#{Regexp.escape(line)})/mi do |match|
        <<-HERE.gsub(/^ {11}/, '')
           class CustomFooter < ActiveAdmin::Component
             def build
               super(id: "footer")
               para "Powered by Platanus"
             end
           end\n
           ActiveAdmin.setup do |config|
             config.view_factory.footer = CustomFooter
           HERE
      end

      line = "@import \"active_admin/base\";"
      style = "app/assets/stylesheets/active_admin.css.scss"
      gsub_file style, /(#{Regexp.escape(line)})/mi do |match|
        <<-HERE.gsub(/^ {11}/, '')
           #{line}
           $skinActiveColor: #001CEE;
           $skinHeaderBck: #002744;
           $panelHeaderBck: #002744;
           //$skinLogo: $skinHeaderBck image-url("logo_admin.png") no-repeat center center;

           @import "active_skin";
           HERE
      end
    end
  else
    say "ActiveAdmin can't be installed because Devise isn't enabled.", :red
  end
end
{'fraction_non_alphanumeric': 0.11583011583011583, 'fraction_numerical': 0.009009009009009009, 'mean_word_length': 2.3266761768901567, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '4621998', 'n_tokens_mistral': 729, 'n_tokens_neox': 708, 'n_words': 161}