sinatra-assetpack 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Gemfile.lock +1 -1
- data/HISTORY.md +6 -0
- data/README.md +73 -91
- data/Rakefile +7 -2
- data/examples/compass/.gitignore +3 -1
- data/examples/compass/Gemfile +5 -0
- data/examples/compass/app.rb +1 -1
- data/lib/sinatra/assetpack/class_methods.rb +5 -3
- data/lib/sinatra/assetpack/css.rb +13 -6
- data/lib/sinatra/assetpack/options.rb +19 -0
- data/lib/sinatra/assetpack/version.rb +1 -1
- data/sinatra-assetpack.gemspec +11 -8
- data/test/cache_dynamic_assets_test.rb +30 -0
- metadata +21 -20
- metadata.gz.sig +0 -0
- data/docsrc/style.css +0 -32
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTQ5N2NkZjU4Mzk5NzIyY2UzMzAyZjZiM2QzNzBkZWQwNDc1NzA3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWEyMWYzZTIzNWYxZjliZTQ3MjljMzRiZWJjZGU5YzZkYWRjZTA2OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODlmZDgzMTE0MmRiZmJmMjc3NjJhOTc2OWJhMzIwNmIyYWRjNmYxZWE1ZGI5
|
10
|
+
YTU0Y2EyNGI4MjViZDQ5ZWUyNThlNzFiN2MzNjY2NGQ0YzQ5MGI2MmRkYjk4
|
11
|
+
M2Q1NGVlZmUxZGJiNjY5ZWUwMGExNTI2Y2JlYzFmMDRjNTY0YjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzgwMDA5YWJmNjkyMTBiNjAzYjYxYjU4YTVmMDY5MmI2OWI2NGQzYTUwZDA2
|
14
|
+
MTkyZWVkNWUyZWNiNTQ0ZDM2YWE1NGIzZmE3YjBlY2FiMDI0OWZiMWNjZTRk
|
15
|
+
MTFhMTRmNjdlMGI5YzM5ZjQ2MjdiZmVjZjdlZmNkMTg2MjgwNDY=
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -1,85 +1,75 @@
|
|
1
1
|
# [Sinatra AssetPack](http://ricostacruz.com/sinatra-assetpack)
|
2
2
|
|
3
|
-
>
|
3
|
+
> The most convenient way to manage your assets in Sinatra.
|
4
4
|
|
5
5
|
[![Build Status](https://travis-ci.org/rstacruz/sinatra-assetpack.png?branch=master)](https://travis-ci.org/rstacruz/sinatra-assetpack)
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/sinatra-assetpack.png)](http://badge.fury.io/rb/sinatra-assetpack)
|
7
7
|
[![Dependency Status](https://gemnasium.com/rstacruz/sinatra-assetpack.png)](https://gemnasium.com/rstacruz/sinatra-assetpack)
|
8
8
|
[![Code Climate](https://codeclimate.com/github/rstacruz/sinatra-assetpack.png)](https://codeclimate.com/github/rstacruz/sinatra-assetpack)
|
9
9
|
|
10
|
-
|
11
|
-
------------
|
12
|
-
|
13
|
-
This is *the* most convenient way to set up your CSS/JS (and images) in a
|
14
|
-
[Sinatra](http://sinatrarb.com) app. Seriously. No need for crappy routes to
|
15
|
-
render Sass or whatever. No-siree!
|
16
|
-
|
17
|
-
1. Drop your assets into `/app` like so (you can configure directories don't worry):
|
18
|
-
* JavaScript/CoffeeScript files in `/app/js`
|
19
|
-
* CSS/Sass/Less/CSS files in `/app/css`
|
20
|
-
* Images into `/app/images`
|
21
|
-
3. Add `register Sinatra::AssetPack` and set up options to your app (see below).
|
22
|
-
4. Use `<%= js :app %>` and `<%= css :application %>` to your layouts. Use these instead of
|
23
|
-
messy *script* and *link* tags.
|
24
|
-
5. BOOM! You're in business baby!
|
25
|
-
|
26
|
-
Installation
|
27
|
-
------------
|
28
|
-
|
29
|
-
Add to your `Gemfile` :
|
10
|
+
## Installation
|
30
11
|
|
31
12
|
``` ruby
|
13
|
+
# Gemfile
|
32
14
|
gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
|
33
15
|
```
|
34
16
|
|
17
|
+
## Setup
|
35
18
|
|
36
|
-
|
37
|
-
-----
|
38
|
-
|
39
|
-
Install the plugin and add some options. (Feel free to omit the *Optional*
|
40
|
-
items, they're listed here for posterity):
|
19
|
+
Register the extension and set your assets configuration.
|
41
20
|
|
42
21
|
``` ruby
|
43
22
|
require 'sinatra/assetpack'
|
44
23
|
|
45
24
|
class App < Sinatra::Base
|
46
|
-
set :root, File.dirname(__FILE__)
|
25
|
+
set :root, File.dirname(__FILE__) # You must set app root
|
26
|
+
|
47
27
|
register Sinatra::AssetPack
|
48
28
|
|
49
29
|
assets {
|
50
|
-
serve '/js', from: 'app/js' #
|
51
|
-
serve '/css', from: 'app/css' #
|
52
|
-
serve '/images', from: 'app/images' #
|
30
|
+
serve '/js', from: 'app/js' # Default
|
31
|
+
serve '/css', from: 'app/css' # Default
|
32
|
+
serve '/images', from: 'app/images' # Default
|
53
33
|
|
54
34
|
# The second parameter defines where the compressed version will be served.
|
55
35
|
# (Note: that parameter is optional, AssetPack will figure it out.)
|
56
36
|
js :app, '/js/app.js', [
|
57
37
|
'/js/vendor/**/*.js',
|
58
|
-
'/js/
|
38
|
+
'/js/lib/**/*.js'
|
59
39
|
]
|
60
40
|
|
61
41
|
css :application, '/css/application.css', [
|
62
42
|
'/css/screen.css'
|
63
43
|
]
|
64
44
|
|
65
|
-
js_compression :jsmin
|
66
|
-
css_compression :
|
45
|
+
js_compression :jsmin # :jsmin | :yui | :closure | :uglify
|
46
|
+
css_compression :simple # :simple | :sass | :yui | :sqwish
|
67
47
|
}
|
68
48
|
end
|
69
49
|
```
|
70
50
|
|
51
|
+
## Usage
|
52
|
+
|
53
|
+
1. Drop your assets into `/app/css`, `/app/js`, `/app/images`.
|
54
|
+
2. Add `register Sinatra::AssetPack` (see setup options).
|
55
|
+
3. Use `<%= js :app %>` and `<%= css :application %>` in your layout.
|
56
|
+
4. You now have proper assets management!
|
57
|
+
|
71
58
|
#### Using in layouts
|
72
59
|
In your layouts, use the `css` and `js` helpers:
|
73
|
-
*(Use haml? Great! Use `!= css :youreawesome` instead.)*
|
74
60
|
|
75
61
|
``` erb
|
62
|
+
# layout.erb
|
76
63
|
<%= css :application, :media => 'screen' %>
|
77
64
|
<%= js :app %>
|
78
65
|
```
|
66
|
+
```
|
67
|
+
# layout.haml
|
68
|
+
!= css :application, :media => 'screen'
|
69
|
+
!= css :app
|
70
|
+
```
|
79
71
|
|
80
|
-
|
81
|
-
And then what?
|
82
|
-
--------------
|
72
|
+
## Results
|
83
73
|
|
84
74
|
#### Development mode
|
85
75
|
If you're on **development** mode, it serves each of the files as so:
|
@@ -99,8 +89,7 @@ If you're on **production** mode, it serves a compressed version in the URLs you
|
|
99
89
|
<script type='text/javascript' src='/js/app.589491.js'></script>
|
100
90
|
```
|
101
91
|
|
102
|
-
Features
|
103
|
-
--------
|
92
|
+
## Features
|
104
93
|
|
105
94
|
* __CoffeeScript support__ Just add your coffee files in one of the paths
|
106
95
|
served (in the example, `app/js/hello.coffee`) and they will be available as JS
|
@@ -129,8 +118,7 @@ Features
|
|
129
118
|
|
130
119
|
* __Heroku support__ Oh yes. That's right.
|
131
120
|
|
132
|
-
Compressors
|
133
|
-
-----------
|
121
|
+
## Compressors
|
134
122
|
|
135
123
|
By default, AssetPack uses [JSMin](http://rubygems.org/gems/jsmin) for JS
|
136
124
|
compression, and simple regexes for CSS compression. You can specify other
|
@@ -145,8 +133,7 @@ assets {
|
|
145
133
|
|
146
134
|
### YUI Compressor
|
147
135
|
|
148
|
-
This uses Yahoo's Java-powered YUI compressor.
|
149
|
-
YUI compressor gem (`gem install yui-compressor`).
|
136
|
+
This uses Yahoo's Java-powered YUI compressor.
|
150
137
|
|
151
138
|
``` ruby
|
152
139
|
assets {
|
@@ -157,9 +144,7 @@ assets {
|
|
157
144
|
}
|
158
145
|
```
|
159
146
|
|
160
|
-
__Note:__ This depends on the `yui-compressor` gem
|
161
|
-
(`gem install yui-compressor`) If you use Bundler, you will need to add it to
|
162
|
-
your Gemfile as well.
|
147
|
+
__Note:__ This depends on the `yui-compressor` gem :
|
163
148
|
|
164
149
|
``` ruby
|
165
150
|
# Gemfile
|
@@ -168,8 +153,7 @@ gem 'yui-compressor', :require => 'yui/compressor'
|
|
168
153
|
|
169
154
|
### SASS compression
|
170
155
|
|
171
|
-
|
172
|
-
the CSS files as Scss files and uses Sass's `:output => :compressed`.
|
156
|
+
This treats the CSS files as Scss files and uses Sass's `:output => :compressed`.
|
173
157
|
|
174
158
|
``` ruby
|
175
159
|
assets {
|
@@ -177,9 +161,7 @@ assets {
|
|
177
161
|
}
|
178
162
|
```
|
179
163
|
|
180
|
-
__Note:__ This depends on the `sass` gem
|
181
|
-
install sass`). If you use Bundler, you will need to add it to your Gemfile as
|
182
|
-
well.
|
164
|
+
__Note:__ This depends on the `sass` gem :
|
183
165
|
|
184
166
|
``` ruby
|
185
167
|
# Gemfile
|
@@ -232,21 +214,14 @@ assets {
|
|
232
214
|
}
|
233
215
|
```
|
234
216
|
|
235
|
-
__Note:__ This depends on the `uglifier` gem
|
236
|
-
add it. For Heroku support, you will need to add the `therubyracer-heroku` gem
|
237
|
-
as well.
|
217
|
+
__Note:__ This depends on the `uglifier` gem :
|
238
218
|
|
239
219
|
``` ruby
|
240
220
|
# Gemfile
|
241
221
|
gem 'uglifier'
|
242
|
-
|
243
|
-
# If you're on Heroku:
|
244
|
-
gem "therubyracer-heroku", "0.8.1.pre3", :require => false
|
245
222
|
```
|
246
223
|
|
247
|
-
|
248
|
-
Images
|
249
|
-
------
|
224
|
+
## Images
|
250
225
|
|
251
226
|
To show images, use the `img` helper.
|
252
227
|
This automatically adds width, height, and a cache buster thingie.
|
@@ -274,10 +249,7 @@ URL.
|
|
274
249
|
/* Output: */ .email { background: url(data:image/png;base64,NF8dG3I...); }
|
275
250
|
```
|
276
251
|
|
277
|
-
|
278
|
-
------------------------
|
279
|
-
|
280
|
-
Actually, you don't need to—this is optional! But add this to your `Rakefile`:
|
252
|
+
## Precompile
|
281
253
|
|
282
254
|
``` ruby
|
283
255
|
# Rakefile
|
@@ -293,10 +265,10 @@ Now invoke the `assetpack:build` Rake task. This will create files in `/public`.
|
|
293
265
|
$ rake assetpack:build
|
294
266
|
|
295
267
|
|
296
|
-
|
297
|
-
-------------
|
268
|
+
## Settings
|
298
269
|
|
299
270
|
#### Assets block
|
271
|
+
|
300
272
|
All configuration happens in the `assets` block. You may invoke it in 2 ways:
|
301
273
|
|
302
274
|
``` ruby
|
@@ -554,9 +526,34 @@ class App < Sinatra::Base
|
|
554
526
|
end
|
555
527
|
```
|
556
528
|
|
529
|
+
### assets.cache_dynamic_assets
|
530
|
+
Caches dynamic files unless they have been modified.
|
531
|
+
|
532
|
+
Useful during development if asset compilation of all dynamic assets on each request is slow.
|
533
|
+
If set to true, dynamic assets will be compiled on the initial asset request, but only be re-compiled when the asset's mtime changes.
|
534
|
+
|
535
|
+
``` ruby
|
536
|
+
# Usage:
|
537
|
+
cache_dynamic_assets {true|false}
|
538
|
+
```
|
539
|
+
|
540
|
+
#### Example
|
541
|
+
In this example, all dynamic files will be compiled on first request, but later requests will be served from a cache unless the file is modified
|
542
|
+
|
543
|
+
``` ruby
|
544
|
+
class App < Sinatra::Base
|
545
|
+
assets {
|
546
|
+
js_compression :closure
|
547
|
+
|
548
|
+
js :application, [
|
549
|
+
'/js/vendor/jquery.*.js',
|
550
|
+
'/js/vendor/jquery.js'
|
551
|
+
]
|
552
|
+
cache_dynamic_assets true
|
553
|
+
}
|
554
|
+
end
|
557
555
|
|
558
|
-
|
559
|
-
----------------------
|
556
|
+
## Helpers
|
560
557
|
|
561
558
|
These are helpers you can use in your views.
|
562
559
|
|
@@ -642,36 +639,21 @@ This example renders an image with an alt tag.
|
|
642
639
|
<img src='/images/icon.834782.png' width='24' height='24' alt='Icon' />`
|
643
640
|
```
|
644
641
|
|
645
|
-
|
646
|
-
---------------------
|
642
|
+
## Compass
|
647
643
|
|
648
|
-
|
649
|
-
but you can
|
644
|
+
AssetPack doesn't have built-in [Compass](http://compass-style.org)
|
645
|
+
support, but you can include it easily with
|
646
|
+
[Sinatra Support](https://github.com/sinefunc/sinatra-support/).
|
650
647
|
|
651
|
-
|
652
|
-
to generate image [sprites][compsprite], see the [Compass example
|
653
|
-
application.][compex]
|
648
|
+
See also the [Compass example application.][compass]
|
654
649
|
|
655
|
-
[
|
656
|
-
[compsprite]: http://compass-style.org/reference/compass/utilities/sprites/
|
657
|
-
|
658
|
-
``` ruby
|
659
|
-
# gem install sinatra/support
|
660
|
-
Encoding.default_external = 'utf-8'
|
661
|
-
require 'sinatra/support'
|
662
|
-
|
663
|
-
class Main
|
664
|
-
register Sinatra::CompassSupport
|
665
|
-
end
|
666
|
-
```
|
650
|
+
[compass]: https://github.com/rstacruz/sinatra-assetpack/tree/master/examples/compass
|
667
651
|
|
668
|
-
Contributing
|
669
|
-
------------
|
652
|
+
## Contributing
|
670
653
|
|
671
654
|
See [CONTRIBUTING.md](https://github.com/rstacruz/sinatra-assetpack/blob/master/CONTRIBUTING.md) for details on contributing and running test.
|
672
655
|
|
673
|
-
Acknowledgements
|
674
|
-
----------------
|
656
|
+
## Acknowledgements
|
675
657
|
|
676
658
|
© 2011-2013, Rico Sta. Cruz. Released under the [MIT
|
677
659
|
License](http://www.opensource.org/licenses/mit-license.php).
|
data/Rakefile
CHANGED
@@ -15,10 +15,15 @@ task :default => :test
|
|
15
15
|
|
16
16
|
gh = "rstacruz/sinatra-assetpack"
|
17
17
|
namespace :doc do
|
18
|
-
# http://github.com/rstacruz/reacco
|
19
18
|
desc "Builds the documentation into doc/"
|
20
19
|
task :build do
|
21
|
-
system "
|
20
|
+
system "curl -X POST
|
21
|
+
-d name=sinatra-assetpack
|
22
|
+
-d google_analytics=UA-20473929-1
|
23
|
+
-d travis=1
|
24
|
+
-d color=#777799
|
25
|
+
--data-urlencode content@README.md
|
26
|
+
http://documentup.com/compiled > doc/index.html".gsub!(/\s+/, ' ')
|
22
27
|
end
|
23
28
|
|
24
29
|
# http://github.com/rstacruz/git-update-ghpages
|
data/examples/compass/.gitignore
CHANGED
data/examples/compass/app.rb
CHANGED
@@ -86,9 +86,11 @@ module Sinatra
|
|
86
86
|
not_found unless AssetPack.tilt_formats[format] == fmt
|
87
87
|
|
88
88
|
@template_cache.fetch(fn) {
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
settings.assets.fetch_dynamic_asset(fn) {
|
90
|
+
out = render format.to_sym, File.read(fn)
|
91
|
+
out = asset_filter_css(out) if fmt == 'css'
|
92
|
+
out
|
93
|
+
}
|
92
94
|
}
|
93
95
|
end
|
94
96
|
end
|
@@ -1,23 +1,30 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
1
3
|
module Sinatra
|
2
4
|
module AssetPack
|
3
5
|
module Css
|
4
6
|
def self.preproc(str, assets)
|
5
|
-
str.gsub(/url\(["']?(.*?)["']
|
6
|
-
|
7
|
-
file
|
7
|
+
str.gsub(/url\((["']?)(.*?)(["']?)\)/) { |url|
|
8
|
+
css_url = URI.parse($2)
|
9
|
+
file = css_url.path
|
10
|
+
options = css_url.query
|
8
11
|
local = assets.local_file_for file
|
9
12
|
|
10
13
|
url = if local
|
11
14
|
if options.to_s.include?('embed')
|
12
15
|
to_data_uri(local)
|
13
16
|
else
|
14
|
-
HtmlHelpers.get_file_uri(file, assets)
|
17
|
+
url = HtmlHelpers.get_file_uri(file, assets)
|
18
|
+
serve = URI(url)
|
19
|
+
serve.query = css_url.query
|
20
|
+
serve.fragment = css_url.fragment
|
21
|
+
serve.to_s
|
15
22
|
end
|
16
23
|
else
|
17
|
-
|
24
|
+
$2
|
18
25
|
end
|
19
26
|
|
20
|
-
"url(#{url})"
|
27
|
+
"url(#{$1}#{url}#{$3})"
|
21
28
|
}
|
22
29
|
end
|
23
30
|
|
@@ -57,6 +57,7 @@ module Sinatra
|
|
57
57
|
|
58
58
|
@js_compression_options = Hash.new
|
59
59
|
@css_compression_options = Hash.new
|
60
|
+
@dynamic_asset_cache = Hash.new
|
60
61
|
|
61
62
|
@ignored = Array.new
|
62
63
|
|
@@ -159,6 +160,7 @@ module Sinatra
|
|
159
160
|
attrib :css_compression_options # Hash
|
160
161
|
|
161
162
|
attrib :prebuild # Bool
|
163
|
+
attrib :cache_dynamic_assets # Bool
|
162
164
|
|
163
165
|
def expires(*args)
|
164
166
|
if args.empty?
|
@@ -323,6 +325,23 @@ module Sinatra
|
|
323
325
|
Hash[*tuples.flatten]
|
324
326
|
end
|
325
327
|
|
328
|
+
# Fetches the contents of a dynamic asset. If `cache_dynamic_assets` is set,
|
329
|
+
# check file mtime and potentially return contents from cache instead of re-compiling.
|
330
|
+
# Yields to a block to compile & render the asset.
|
331
|
+
def fetch_dynamic_asset(path)
|
332
|
+
return yield unless cache_dynamic_assets
|
333
|
+
|
334
|
+
mtime = File.mtime(path)
|
335
|
+
cached_mtime, contents = @dynamic_asset_cache[path]
|
336
|
+
|
337
|
+
if cached_mtime.nil? || mtime != cached_mtime
|
338
|
+
@dynamic_asset_cache[path] = [mtime, yield]
|
339
|
+
@dynamic_asset_cache[path][1]
|
340
|
+
else
|
341
|
+
contents
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
326
345
|
private
|
327
346
|
# Returns a URI for a given file
|
328
347
|
# path = '/projects/x/app/css'
|
data/sinatra-assetpack.gemspec
CHANGED
@@ -13,20 +13,23 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.cert_chain = ['certs/j15e.pem']
|
14
14
|
s.signing_key = File.expand_path('~/.gem/private_key.pem') if $0 =~ /gem\z/
|
15
15
|
|
16
|
-
s.add_dependency "
|
17
|
-
s.add_dependency "sinatra"
|
16
|
+
s.add_dependency "backports"
|
18
17
|
s.add_dependency "jsmin"
|
19
18
|
s.add_dependency "rack-test"
|
20
|
-
s.add_dependency "
|
19
|
+
s.add_dependency "sinatra"
|
20
|
+
s.add_dependency "tilt", ">= 1.3.0"
|
21
21
|
|
22
|
-
|
23
|
-
s.add_development_dependency "sass"
|
24
|
-
s.add_development_dependency "haml"
|
22
|
+
# Supported preprocessors
|
25
23
|
s.add_development_dependency "coffee-script"
|
26
24
|
s.add_development_dependency "contest"
|
27
|
-
s.add_development_dependency "
|
25
|
+
s.add_development_dependency "haml"
|
26
|
+
s.add_development_dependency "less"
|
27
|
+
s.add_development_dependency "sass"
|
28
28
|
s.add_development_dependency "stylus"
|
29
29
|
s.add_development_dependency "uglifier"
|
30
|
+
s.add_development_dependency "yui-compressor"
|
31
|
+
|
32
|
+
# For tests
|
30
33
|
s.add_development_dependency "rake"
|
31
|
-
s.add_development_dependency "
|
34
|
+
s.add_development_dependency "mocha"
|
32
35
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path('../test_helper', __FILE__)
|
2
|
+
|
3
|
+
class CacheDynamicAssetTest < UnitTest
|
4
|
+
class App < Main
|
5
|
+
set :reload_templates, true
|
6
|
+
end
|
7
|
+
|
8
|
+
def app
|
9
|
+
App
|
10
|
+
end
|
11
|
+
|
12
|
+
test "served from cache" do
|
13
|
+
app.assets.cache_dynamic_assets = true
|
14
|
+
Sinatra::AssetPack::Css.stubs(:preproc).times(1)
|
15
|
+
get '/css/screen.css'
|
16
|
+
get '/css/screen.css'
|
17
|
+
get '/css/screen.css'
|
18
|
+
assert last_response.status == 200
|
19
|
+
end
|
20
|
+
|
21
|
+
test "not served from cache when disable" do
|
22
|
+
app.assets.cache_dynamic_assets = false
|
23
|
+
Sinatra::AssetPack::Css.stubs(:preproc).times(3)
|
24
|
+
get '/css/screen.css'
|
25
|
+
get '/css/screen.css'
|
26
|
+
get '/css/screen.css'
|
27
|
+
assert last_response.status == 200
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-assetpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rico Sta. Cruz
|
@@ -36,24 +36,24 @@ cert_chain:
|
|
36
36
|
MjN3ZTRFMUx2ZlJuNWdWNzdEaWo2czlWNEhIek1CdUx3bk5iOFQrNmxPblVX
|
37
37
|
YnRpSWRkRAplOGM4aTdQbHJ6aFZKLzhzWFVKc0NreUU4ZDJNeVJ5amx4TT0K
|
38
38
|
LS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
39
|
-
date: 2013-04-
|
39
|
+
date: 2013-04-23 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: backports
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: jsmin
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rack-test
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ! '>='
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: sinatra
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ! '>='
|
@@ -95,21 +95,21 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: tilt
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ! '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.3.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.3.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: coffee-script
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: contest
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: less
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ! '>='
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: sass
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ! '>='
|
@@ -179,7 +179,7 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
182
|
+
name: stylus
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
185
|
- - ! '>='
|
@@ -193,7 +193,7 @@ dependencies:
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
196
|
+
name: uglifier
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - ! '>='
|
@@ -207,7 +207,7 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: yui-compressor
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - ! '>='
|
@@ -235,7 +235,7 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: mocha
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ! '>='
|
@@ -264,7 +264,6 @@ files:
|
|
264
264
|
- README.md
|
265
265
|
- Rakefile
|
266
266
|
- certs/j15e.pem
|
267
|
-
- docsrc/style.css
|
268
267
|
- examples/basic/.gitignore
|
269
268
|
- examples/basic/Rakefile
|
270
269
|
- examples/basic/app.rb
|
@@ -278,6 +277,7 @@ files:
|
|
278
277
|
- examples/classic/app.rb
|
279
278
|
- examples/classic/css/screen.scss
|
280
279
|
- examples/compass/.gitignore
|
280
|
+
- examples/compass/Gemfile
|
281
281
|
- examples/compass/Rakefile
|
282
282
|
- examples/compass/app.rb
|
283
283
|
- examples/compass/app/css/main.scss
|
@@ -352,6 +352,7 @@ files:
|
|
352
352
|
- test/asset_host_test.rb
|
353
353
|
- test/build_test.rb
|
354
354
|
- test/buster_helpers_test.rb
|
355
|
+
- test/cache_dynamic_assets_test.rb
|
355
356
|
- test/cache_test.rb
|
356
357
|
- test/combined_test.rb
|
357
358
|
- test/compressed_test.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/docsrc/style.css
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
section.features {
|
2
|
-
background: #f6f6ff;
|
3
|
-
overflow: hidden; }
|
4
|
-
|
5
|
-
h2 {
|
6
|
-
font-size: 26pt; }
|
7
|
-
|
8
|
-
section.features h2 {
|
9
|
-
font-size: 32pt; }
|
10
|
-
|
11
|
-
section.features ul {
|
12
|
-
max-width: none;
|
13
|
-
margin-left: 0;
|
14
|
-
padding-left: 0;
|
15
|
-
width: 100%; }
|
16
|
-
|
17
|
-
section.features li {
|
18
|
-
list-style-type: none;
|
19
|
-
width: 420px;
|
20
|
-
float: left; margin-right: 40px; }
|
21
|
-
|
22
|
-
section.features li:nth-child(odd) {
|
23
|
-
clear: both; }
|
24
|
-
|
25
|
-
section.features li>p>strong {
|
26
|
-
font-family: shanti, sans-serif;
|
27
|
-
font-weight: normal;
|
28
|
-
font-size: 1.2em;
|
29
|
-
text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.1);
|
30
|
-
display: block;
|
31
|
-
margin-bottom: 5px;
|
32
|
-
color: #88a; }
|