sinatra-asset-pipeline 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/lib/sinatra/asset_pipeline.rb +2 -2
- data/lib/sinatra/asset_pipeline/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7570689dc1ac35fd9c35ccce99f95b14ce4de1
|
4
|
+
data.tar.gz: 32071fd8865f7d141243413dd0af9d8a1da751d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec11ea6526ef93f640cca3d622b4450356e7557f9449ff0fcd28c1504008039098e957badedc7fc867cb280abb01179fd9ef7d0132dcd8f3e5a883620faee01b
|
7
|
+
data.tar.gz: 810030b86d659c3672030d8c903cf074cb10408ce405a7371a43aeeb69c144e6b8b3bf409ff8b6bef3ca1cdffc6324aa8fac4b480f1634dd54d71ce93ee73b41
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
Sinatra Asset Pipeline [](https://travis-ci.org/kalasjocke/sinatra-asset-pipeline)
|
2
|
+
======================
|
2
3
|
|
3
4
|
An asset pipeline implementation for Sinatra based on [Sprockets](https://github.com/sstephenson/sprockets) with support for CoffeeScript, SASS, SCSS, LESS, ERB as well as CSS (SASS, YUI) and JavaScript (uglifier, YUI, Closure) minification.
|
4
5
|
|
@@ -21,6 +22,12 @@ require './app'
|
|
21
22
|
Sinatra::AssetPipeline::Task.define! App
|
22
23
|
```
|
23
24
|
|
25
|
+
If your application runs Sinatra in classic style you can define your Rake task as follows:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
Sinatra::AssetPipeline::Task.define! Sinatra::Application
|
29
|
+
```
|
30
|
+
|
24
31
|
Now, when everything is in place you can precompile assets located in `assets/<asset-type>` with:
|
25
32
|
|
26
33
|
```bash
|
@@ -68,7 +75,7 @@ class App < Sinatra::Base
|
|
68
75
|
# Use another host for serving assets
|
69
76
|
set :assets_host, '<id>.cloudfront.net'
|
70
77
|
|
71
|
-
# Serve assets using this protocol
|
78
|
+
# Serve assets using this protocol (http, :https, :relative)
|
72
79
|
set :assets_protocol, :http
|
73
80
|
|
74
81
|
# CSS minification
|
@@ -22,7 +22,7 @@ module Sinatra
|
|
22
22
|
|
23
23
|
app.configure do
|
24
24
|
app.assets_prefix.each do |prefix|
|
25
|
-
paths = Dir[File.join(prefix, '*')]
|
25
|
+
paths = Dir[File.join(app.root, prefix, '*')]
|
26
26
|
paths.each { |path| app.sprockets.append_path path }
|
27
27
|
end
|
28
28
|
|
@@ -41,7 +41,7 @@ module Sinatra
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
app.configure :production do
|
44
|
+
app.configure :staging, :production do
|
45
45
|
app.sprockets.css_compressor = app.assets_css_compressor unless app.assets_css_compressor.nil?
|
46
46
|
app.sprockets.js_compressor = app.assets_js_compressor unless app.assets_js_compressor.nil?
|
47
47
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-asset-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joakim Ekberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|