<commit_before>module Spider
    
    class Home
        attr_reader :path
        
        def initialize(path)
            @path = path
        end
        
        def controller
            require 'spiderfw/controller/home_controller'
            Spider::HomeController
        end
        
        def route_apps
            Spider.route_apps
        end
        
        def load_apps(*args)
            Spider.load_apps(*args)
        end
        
    end
    
    
end<commit_msg>Home#list_apps<commit_after>require 'pathname'

module Spider

    class Home
        attr_reader :path

        def initialize(path)
            @path = path
        end

        def controller
            require 'spiderfw/controller/home_controller'
            Spider::HomeController
        end

        def route_apps
            Spider.route_apps
        end

        def load_apps(*args)
            Spider.load_apps(*args)
        end

        def list_apps
            apps_dir = Pathname.new(Spider.paths[:apps])
            apps = []
            Dir.glob("#{Spider.paths[:apps]}/**/_init.rb").each do |path|
                dir = Pathname.new(File.dirname(path))
                apps << dir.relative_path_from(apps_dir).to_s
            end
            apps
        end

    end


end
{'fraction_non_alphanumeric': 0.07081712062256809, 'fraction_numerical': 0.0, 'mean_word_length': 1.3171171171171172, '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': '4585063', 'n_tokens_mistral': 358, 'n_tokens_neox': 345, 'n_words': 70}