Sha256: 4acb7849bfb95a4c31cb3b672810e1a95618c9463147dbdf3113f9ebc7649ed2

Contents?: true

Size: 444 Bytes

Versions: 28

Compression:

Stored size: 444 Bytes

Contents

module Sinatra
  module AssetPack
    # The base class for all CSS/JS compression engines.
    class Engine
      # Helper for system files.
      # Usage: sys('css', string, "sqwish %f")
      # Returns stdout.
      def sys(type, str, cmd)
        t = Tempfile.new ['', ".#{type}"]
        t.write(str)
        t.close

        output = `#{cmd.gsub('%f', t.path)}`
        FileUtils.rm t

        [output, t.path]
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
sinatra-assetpack-0.3.5 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.3.3 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.3.2 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.3.1 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.3.0 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.8 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.7 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.6 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.5 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.4 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.3 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.2 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.1 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.2.0 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.1.7 lib/sinatra/assetpack/engine.rb
sundawg-sinatra-assetpack-fork-0.1.6 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.1.6 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.1.5 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.1.4 lib/sinatra/assetpack/engine.rb
sinatra-assetpack-0.1.3 lib/sinatra/assetpack/engine.rb