def load_scripts!
      scripts_dir = File.expand_path @config['blur']['scripts_dir']
      script_file_paths = Dir.glob File.join scripts_dir, '*.rb'

      # Sort the script file paths by file name so they load by alphabetical
      # order.
      #
      # This will make it possible to create a script called '10_database.rb'
      # which will be loaded before '20_settings.rb' and non-numeric prefixes
      # will be loaded after that.
      script_file_paths = script_file_paths.sort do |a, b|
        File.basename(a) <=> File.basename(b)
      end

      script_file_paths.each { |script_path| load_script_file script_path }

      initialize_superscripts

      emit :scripts_loaded
    end
def load_scripts!
      scripts_dir = File.expand_path @config['blur']['scripts_dir']
      script_file_paths = Dir.glob File.join scripts_dir, '*.rb'

      # Sort the script file paths by file name so they load by alphabetical
      # order.
      #
      # This will make it possible to create a script called '10_database.rb'
      # which will be loaded before '20_settings.rb' and non-numeric prefixes
      # will be loaded after that.
      script_file_paths = script_file_paths.sort do |a, b|
        File.basename(a) <=> File.basename(b)
      end

      script_file_paths.each { |script_path| load_script_file script_path }

      initialize_superscripts

      emit :scripts_loaded
    end
Loads all scripts in the script directory.