Sha256: 51895866dfe1dcbcb003a2a300d5725ddd69a2dd56ff8e05f34559f12bcc7dd5

Contents?: true

Size: 773 Bytes

Versions: 8

Compression:

Stored size: 773 Bytes

Contents

module Firehose
  # Deal with bundling Sprocket assets into environments (like Rails or Sprockets)
  module Assets
    def self.path(*segs)
      File.join File.expand_path('../../assets', __FILE__), segs
    end

    module Sprockets
      # Drop flash and javascript paths to Firehose assets into a sprockets environment.
      def self.configure(env)
        env.append_path Firehose::Assets.path('flash')
        env.append_path Firehose::Assets.path('javascripts')
        env
      end

      # Try to automatically configure Sprockets if its detected in the project.
      def self.auto_detect
        if defined? ::Sprockets and ::Sprockets.respond_to? :append_path
          Firehose::Assets::Sprockets.configure ::Sprockets
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
firehose-1.1.0 lib/firehose/assets.rb
firehose-1.0.0 lib/firehose/assets.rb
firehose-0.2.alpha.10 lib/firehose/assets.rb
firehose-0.2.alpha.9 lib/firehose/assets.rb
firehose-0.2.alpha.8 lib/firehose/assets.rb
firehose-0.2.alpha.7 lib/firehose/assets.rb
firehose-0.2.alpha.6 lib/firehose/assets.rb
firehose-0.2.alpha.5 lib/firehose/assets.rb