Sha256: f5b345d76d95de441d1c99f636fa461c8ef8e25b090f2c0854101661b818cc22

Contents?: true

Size: 783 Bytes

Versions: 12

Compression:

Stored size: 783 Bytes

Contents

# Sprockets 2.x constructs the path where assets are compiled to like this:
#
#   Rails.root + "public/assets"
#
# Rails.root is always the path to _this_ project, Houston Core.
#
# Sprockets 3.x constructs the path where assets are compiled to like this:
#
#  Rails.public_path + "assets"
#
# This is more desirable because Houston can configure the public path
# to be relative to the root of the instance of Houston. So we backport
# that change to Sprockets here.

require "sprockets/rails/task"

module Patches
  module SprocketsOutputPathForAssets
    def output
      if app
        File.join(app.paths["public"].first, app.config.assets.prefix)
      else
        super
      end
    end
  end
end

Sprockets::Rails::Task.send :prepend, Patches::SprocketsOutputPathForAssets

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
houston-core-0.6.3 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.6.2 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.6.1 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.6.0 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.6 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.5 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.4 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.3 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.2 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.1 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.0 lib/patches/sprockets_output_path_for_assets.rb
houston-core-0.5.0.beta1 lib/patches/sprockets_output_path_for_assets.rb