<commit_before>require 'sprockets'
require 'sprockets-sass'
require 'sprockets-helpers'

module Sinatra
  module AssetPipeline
    def self.registered(app)
      app.set_default :sprockets, Sprockets::Environment.new
      app.set_default :assets_precompile, %w(app.js app.css *.png *.jpg *.svg *.eot *.ttf *.woff)
      app.set_default :assets_prefix, %w(assets vendor/assets)
      app.set_default :assets_path, -> { File.join(public_folder, "assets") }
      app.set_default :assets_protocol, :http
      app.set_default :assets_css_compressor, :none
      app.set_default :assets_js_compressor, :none

      app.set :static, true
      app.set :assets_digest, true
      app.set :static_cache_control, [:public, :max_age => 60 * 60 * 24 * 365]

      app.configure do
        app.assets_prefix.each do |prefix|
          Dir[File.join prefix, "*"].each { |path| app.sprockets.append_path path }
        end
        Sprockets::Helpers.configure do |config|
          config.environment = app.sprockets
          config.digest = app.assets_digest
        end
      end

      app.configure :staging, :production do<commit_msg>Show that we're dealing with paths when dealing with sprockets<commit_after>require 'sprockets'
require 'sprockets-sass'
require 'sprockets-helpers'

module Sinatra
  module AssetPipeline
    def self.registered(app)
      app.set_default :sprockets, Sprockets::Environment.new
      app.set_default :assets_precompile, %w(app.js app.css *.png *.jpg *.svg *.eot *.ttf *.woff)
      app.set_default :assets_prefix, %w(assets vendor/assets)
      app.set_default :assets_path, -> { File.join(public_folder, "assets") }
      app.set_default :assets_protocol, :http
      app.set_default :assets_css_compressor, :none
      app.set_default :assets_js_compressor, :none

      app.set :static, true
      app.set :assets_digest, true
      app.set :static_cache_control, [:public, :max_age => 60 * 60 * 24 * 365]

      app.configure do
        app.assets_prefix.each do |prefix|
          paths = Dir[File.join(prefix, '*')]
          paths.each { |path| app.sprockets.append_path path }
        end

        Sprockets::Helpers.configure do |config|
          config.environment = app.sprockets
          config.digest = app.assets_digest
        end
      end

      app.configure :staging, :production do
{'fraction_non_alphanumeric': 0.10896610896610896, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 3.0137693631669533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3370723', 'n_tokens_mistral': 794, 'n_tokens_neox': 748, 'n_words': 170}