sinatra-assetpack 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +1 -2
- data/{HISTORY.md → CHANGELOG.md} +56 -45
- data/CONTRIBUTING.md +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +46 -45
- data/Rakefile +0 -8
- data/lib/sinatra/assetpack.rb +1 -0
- data/lib/sinatra/assetpack/builder.rb +42 -0
- data/lib/sinatra/assetpack/options.rb +49 -78
- data/lib/sinatra/assetpack/version.rb +4 -1
- data/sinatra-assetpack.gemspec +1 -1
- data/test/local_file_test.rb +11 -1
- metadata +62 -102
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e2a2068da395988d50351d523f18c6bb4cbb3372
|
4
|
+
data.tar.gz: b2be00f2e3fb9ac6212260ee0386885c49f80b22
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a5513b043a8d0e79ea4aa593594458be7c542446cae01462e6aa9ad5da58507cf6a0e3216b91ef7600f9ffa77520b5a6103bb86e97226a7fc068d172bfa1b942
|
7
|
+
data.tar.gz: 2ec358eb59ea3381386cc303f49cbc05bd71266c9d41bdd1ed44ceae01dcc95d53d9c56dd77d3b4da507ea42b9bf5c966d38fd8b921fbcdf45bf8a67757773f2
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/{HISTORY.md → CHANGELOG.md}
RENAMED
@@ -1,5 +1,15 @@
|
|
1
|
-
v0.2.
|
2
|
-
|
1
|
+
## v0.2.4 - June 8, 2013
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* Serving from absolute path. (#107)
|
5
|
+
* Cache of all assets files. (#109)
|
6
|
+
|
7
|
+
### Improvements
|
8
|
+
* Rewrote asset builder.
|
9
|
+
* Simplified & consolidated local_file_for & dyn_local_file_for.
|
10
|
+
|
11
|
+
|
12
|
+
## v0.2.3 - May 29, 2013
|
3
13
|
|
4
14
|
### Added
|
5
15
|
* Support for Rack::URLMap / url prefix (#104)
|
@@ -7,14 +17,14 @@ v0.2.3 - May 29, 2013
|
|
7
17
|
### Changed
|
8
18
|
* Use optimized MD5 file digest method. (#99)
|
9
19
|
|
10
|
-
|
11
|
-
|
20
|
+
|
21
|
+
## v0.2.2 - April 28, 2013
|
12
22
|
|
13
23
|
### Fixed
|
14
24
|
* Don't preprocess CSS data-uris. (#96)
|
15
25
|
|
16
|
-
|
17
|
-
|
26
|
+
|
27
|
+
## v0.2.1 - April 23, 2013
|
18
28
|
|
19
29
|
### Added
|
20
30
|
* New cache_dynamic_assets option for development cache. (#94)
|
@@ -22,8 +32,8 @@ v0.2.1 - April 23, 2013
|
|
22
32
|
### Fixed
|
23
33
|
* Fixed CSS preproc to keep original CSS url quotes & url fragment.
|
24
34
|
|
25
|
-
|
26
|
-
|
35
|
+
|
36
|
+
## v0.2.0 - April 20, 2013
|
27
37
|
|
28
38
|
### Changed
|
29
39
|
* Using MD5 for cache busting URI. (#91, #71)
|
@@ -34,28 +44,28 @@ v0.2.0 - April 20, 2013
|
|
34
44
|
### Fixed
|
35
45
|
* Added backports correctly for 1.8.7 support.
|
36
46
|
|
37
|
-
|
38
|
-
|
47
|
+
|
48
|
+
## v0.1.7 - March 11, 2013
|
39
49
|
|
40
50
|
### Added
|
41
51
|
|
42
52
|
* Gem is now certificate signed.
|
43
53
|
|
44
|
-
|
45
|
-
|
54
|
+
|
55
|
+
## v0.1.6 - March 1, 2013
|
46
56
|
|
47
57
|
### Fixed
|
48
58
|
|
49
59
|
* Do not use instance helpers for environment check. (#79)
|
50
60
|
|
51
|
-
|
52
|
-
|
61
|
+
|
62
|
+
## v0.1.5 - Feb 12, 2013
|
53
63
|
|
54
64
|
### Fixed
|
55
65
|
* Stylus 0.7.1 support.
|
56
66
|
|
57
|
-
|
58
|
-
|
67
|
+
|
68
|
+
## v0.1.4 - Feb 12, 2013
|
59
69
|
|
60
70
|
### Added
|
61
71
|
* Multiple asset hosts support. (#27)
|
@@ -63,32 +73,33 @@ v0.1.4 - Feb 12, 2013
|
|
63
73
|
### Fixed
|
64
74
|
* Lock stylus to 0.7.0 until 0.7.1 is supported.
|
65
75
|
|
66
|
-
|
67
|
-
|
76
|
+
|
77
|
+
## v0.1.3 - Feb 3, 2013
|
68
78
|
|
69
79
|
### Added
|
70
80
|
* JRuby 1.9 and 1.8 now supported.
|
71
81
|
|
72
82
|
### Fixed:
|
73
83
|
* Deal with assets with exact same name but extensions. (#75)
|
74
|
-
* Ruby 1.8 support (broken in previous
|
84
|
+
* Ruby 1.8 support (broken in previous
|
85
|
+
## v0.1 releases).
|
75
86
|
|
76
|
-
|
77
|
-
|
87
|
+
|
88
|
+
## v0.1.2 - Jan 20, 2013
|
78
89
|
|
79
90
|
### Added:
|
80
91
|
* Support for custom cache control headers for packed assets. (#43)
|
81
92
|
|
82
|
-
|
83
|
-
|
93
|
+
|
94
|
+
## v0.1.1 - Jan 15, 2013
|
84
95
|
|
85
96
|
### Fixed
|
86
97
|
* Added less engine support and test (#69)
|
87
98
|
* Support for fonts & other AssetPack.supported_formats file format. (#50)
|
88
99
|
* Deal with multiple static files with same name but different extensions (ex. fonts).
|
89
100
|
|
90
|
-
|
91
|
-
|
101
|
+
|
102
|
+
## v0.1.0 - Jan 14, 2013
|
92
103
|
|
93
104
|
### Changed
|
94
105
|
* Using `file` utility instead `identify` utility. (#26)
|
@@ -100,8 +111,8 @@ v0.1.0 - Jan 14, 2013
|
|
100
111
|
* Add missing depedency for development unit test. (#63)
|
101
112
|
* Deal with binary files copy (ex. images), fix errors like `"\x89" from ASCII-8BIT to UTF-8"`. (#38, #67)
|
102
113
|
|
103
|
-
|
104
|
-
|
114
|
+
|
115
|
+
## v0.0.11 - Feb 21, 2012
|
105
116
|
|
106
117
|
### Added:
|
107
118
|
* Support for 'prebuild' to build on startup.
|
@@ -119,8 +130,8 @@ v0.0.11 - Feb 21, 2012
|
|
119
130
|
### Fixed:
|
120
131
|
* Sinatra >= 1.3.0 compatibility. Use 'public_folder' in Sinatra >=1.3.0. (#25)
|
121
132
|
|
122
|
-
|
123
|
-
|
133
|
+
|
134
|
+
## v0.0.10 - Sep 18, 2011
|
124
135
|
|
125
136
|
### Added:
|
126
137
|
* Support for 'prebuild' to build on startup.
|
@@ -133,8 +144,8 @@ v0.0.10 - Sep 18, 2011
|
|
133
144
|
sources. (#12)
|
134
145
|
* Refactor Compressor into separate engine classes.
|
135
146
|
|
136
|
-
|
137
|
-
|
147
|
+
|
148
|
+
## v0.0.9 - Sep 18, 2011
|
138
149
|
|
139
150
|
### Fixed:
|
140
151
|
* Fixed a bad route terminating issue. (#9)
|
@@ -148,8 +159,8 @@ v0.0.9 - Sep 18, 2011
|
|
148
159
|
* Added .htc (IE behavior files) to the list of file formats to be served.
|
149
160
|
* Added examples.
|
150
161
|
|
151
|
-
|
152
|
-
|
162
|
+
|
163
|
+
## v0.0.8 - Sep 06, 2011
|
153
164
|
|
154
165
|
### Fixed:
|
155
166
|
* Fixed the CSS preprocessing bug that gives invalid 'url()' properties to
|
@@ -172,8 +183,8 @@ v0.0.8 - Sep 06, 2011
|
|
172
183
|
* Added .rvmrc and .sass-cache to gitignore.
|
173
184
|
* Allow overridable multiple RVM environments in tests.
|
174
185
|
|
175
|
-
|
176
|
-
|
186
|
+
|
187
|
+
## v0.0.6 - Aug 30, 2011
|
177
188
|
|
178
189
|
### Fixed:
|
179
190
|
* Redundant entries are now suppressed. (eg, when specifying
|
@@ -186,8 +197,8 @@ v0.0.6 - Aug 30, 2011
|
|
186
197
|
* Allow setting options for `js_compression` by passing a hash after it.
|
187
198
|
* Make the path parameter in `js` and `css` in the `assets` block optional.
|
188
199
|
|
189
|
-
|
190
|
-
|
200
|
+
|
201
|
+
## v0.0.5 - Aug 30, 2011
|
191
202
|
|
192
203
|
### Fixed:
|
193
204
|
* Fix build failing when it finds directories.
|
@@ -195,8 +206,8 @@ v0.0.5 - Aug 30, 2011
|
|
195
206
|
### Added:
|
196
207
|
* Added an example app in `example/`.
|
197
208
|
|
198
|
-
|
199
|
-
|
209
|
+
|
210
|
+
## v0.0.4 - Aug 30, 2011
|
200
211
|
|
201
212
|
### Fixed:
|
202
213
|
* Ruby 1.8 compatibility. Yay!
|
@@ -209,16 +220,16 @@ v0.0.4 - Aug 30, 2011
|
|
209
220
|
:closure`.
|
210
221
|
* Use simple CSS compression by default.
|
211
222
|
|
212
|
-
|
213
|
-
|
223
|
+
|
224
|
+
## v0.0.3 - Aug 30, 2011
|
214
225
|
|
215
226
|
### Added:
|
216
227
|
* Images in CSS defined in `url(...)` params are now cache-busted.
|
217
228
|
* Add support for embedded images in CSS.
|
218
229
|
* `rake assetpack:build` now also outputs images.
|
219
230
|
|
220
|
-
|
221
|
-
|
231
|
+
|
232
|
+
## v0.0.2 - Aug 29, 2011
|
222
233
|
|
223
234
|
### Added:
|
224
235
|
* Added the `img` helper.
|
@@ -227,7 +238,7 @@ v0.0.2 - Aug 29, 2011
|
|
227
238
|
### Fixed:
|
228
239
|
* The gem now installs the correct dependencies.
|
229
240
|
|
230
|
-
|
231
|
-
|
241
|
+
|
242
|
+
## v0.0.1 - Aug 29, 2011
|
232
243
|
|
233
244
|
Initial release.
|
data/CONTRIBUTING.md
CHANGED
@@ -22,6 +22,10 @@ As simple as running `bundle exec rake` command.
|
|
22
22
|
|
23
23
|
The default `rake` task is `rake test`.
|
24
24
|
|
25
|
+
If you would like to test multiple ruby version using RVM, try `rvm all do rake test`.
|
26
|
+
|
27
|
+
You may setup all ruby version quickly with `rvm all do bundle install`.
|
28
|
+
|
25
29
|
## Syntax
|
26
30
|
|
27
31
|
Follow [Ruby Styleguide](https://github.com/styleguide/ruby) by Github and existing code.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sinatra-assetpack (0.2.
|
4
|
+
sinatra-assetpack (0.2.4)
|
5
5
|
backports
|
6
6
|
jsmin
|
7
7
|
rack-test
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
Platform (>= 0.4.0)
|
16
16
|
open4
|
17
17
|
Platform (0.4.0)
|
18
|
-
backports (3.3.
|
18
|
+
backports (3.3.1)
|
19
19
|
coffee-script (2.2.0)
|
20
20
|
coffee-script-source
|
21
21
|
execjs
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# [Sinatra AssetPack](http://ricostacruz.com/sinatra-assetpack)
|
2
2
|
|
3
|
-
> The most convenient way to manage your assets in Sinatra.
|
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
|
-
[![Gem Version](https://badge.fury.io/rb/sinatra-assetpack.png)](http://
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/sinatra-assetpack.png)](http://rubygems.org/gems/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
|
|
@@ -67,7 +67,7 @@ In your layouts, use the `css` and `js` helpers:
|
|
67
67
|
```
|
68
68
|
# layout.haml
|
69
69
|
!= css :application, :media => 'screen'
|
70
|
-
!=
|
70
|
+
!= js :app
|
71
71
|
```
|
72
72
|
|
73
73
|
## Results
|
@@ -92,36 +92,36 @@ If you're on **production** mode, it serves a compressed version in the URLs you
|
|
92
92
|
|
93
93
|
## Features
|
94
94
|
|
95
|
-
* __CoffeeScript support__ Just add your coffee files in one of the paths
|
96
|
-
served (in the example, `app/js/hello.coffee`) and they will be available as JS
|
95
|
+
* __CoffeeScript support__ Just add your coffee files in one of the paths
|
96
|
+
served (in the example, `app/js/hello.coffee`) and they will be available as JS
|
97
97
|
files (`http://localhost:4567/js/hello.js`).
|
98
98
|
|
99
|
-
* __Sass/Less/SCSS support__ Works the same way. Place your dynamic CSS files
|
100
|
-
in there (say, `app/css/screen.sass`) and they will be available as CSS files
|
99
|
+
* __Sass/Less/SCSS support__ Works the same way. Place your dynamic CSS files
|
100
|
+
in there (say, `app/css/screen.sass`) and they will be available as CSS files
|
101
101
|
(`http://localhost:4567/css/screen.css`).
|
102
102
|
|
103
|
-
* __Cache busting__ the `css` and `js` helpers automatically ensures the URL
|
104
|
-
is based on when the file was last modified. The URL `/js/jquery.js` may be
|
105
|
-
translated to `/js/jquery.8237898.js` to ensure visitors always get the latest
|
103
|
+
* __Cache busting__ the `css` and `js` helpers automatically ensures the URL
|
104
|
+
is based on when the file was last modified. The URL `/js/jquery.js` may be
|
105
|
+
translated to `/js/jquery.8237898.js` to ensure visitors always get the latest
|
106
106
|
version.
|
107
107
|
|
108
|
-
* __Images support__ Image filenames in your CSS will automatically get a
|
108
|
+
* __Images support__ Image filenames in your CSS will automatically get a
|
109
109
|
cache-busting suffix (eg, `/images/icon.742958.png`).
|
110
110
|
|
111
|
-
* __Embedded images support__ You can embed images in your CSS files as
|
111
|
+
* __Embedded images support__ You can embed images in your CSS files as
|
112
112
|
`data:` URIs by simply adding `?embed` to the end of your URL.
|
113
113
|
|
114
114
|
* __No intermediate files needed__ You don't need to generate compiled files.
|
115
115
|
You can, but it's optional. Keeps your source repo clean!
|
116
116
|
|
117
|
-
* __Auto minification (with caching)__ JS and CSS files will be compressed as
|
117
|
+
* __Auto minification (with caching)__ JS and CSS files will be compressed as
|
118
118
|
needed.
|
119
119
|
|
120
120
|
* __Heroku support__ Oh yes. That's right.
|
121
121
|
|
122
122
|
## Compressors
|
123
123
|
|
124
|
-
By default, AssetPack uses [JSMin](http://rubygems.org/gems/jsmin) for JS
|
124
|
+
By default, AssetPack uses [JSMin](http://rubygems.org/gems/jsmin) for JS
|
125
125
|
compression, and simple regexes for CSS compression. You can specify other
|
126
126
|
compressors in the `assets` block:
|
127
127
|
|
@@ -171,8 +171,8 @@ gem 'sass'
|
|
171
171
|
|
172
172
|
### Sqwish CSS compression
|
173
173
|
|
174
|
-
[Sqwish](http://github.com/ded/sqwish) is a NodeJS-based CSS compressor. To use
|
175
|
-
Sqwish with AssetPack, install it using `npm install -g sqwish`. You need NodeJS
|
174
|
+
[Sqwish](http://github.com/ded/sqwish) is a NodeJS-based CSS compressor. To use
|
175
|
+
Sqwish with AssetPack, install it using `npm install -g sqwish`. You need NodeJS
|
176
176
|
and NPM installed.
|
177
177
|
|
178
178
|
``` ruby
|
@@ -184,7 +184,7 @@ assets {
|
|
184
184
|
|
185
185
|
### Google Closure compression
|
186
186
|
|
187
|
-
This uses the [Google closure compiler
|
187
|
+
This uses the [Google closure compiler
|
188
188
|
service](http://closure-compiler.appspot.com/home)
|
189
189
|
to compress your JavaScript. Available levels are:
|
190
190
|
|
@@ -201,11 +201,11 @@ assets {
|
|
201
201
|
|
202
202
|
### UglifyJS compression
|
203
203
|
|
204
|
-
This uses the [UglifyJS](https://github.com/mishoo/UglifyJS) compressor to
|
205
|
-
compress your JavaScript. You will need to install the
|
204
|
+
This uses the [UglifyJS](https://github.com/mishoo/UglifyJS) compressor to
|
205
|
+
compress your JavaScript. You will need to install the
|
206
206
|
[uglifier](http://rubygems.org/gems/uglifier) gem.
|
207
207
|
|
208
|
-
For options, refer to the [Uglifier
|
208
|
+
For options, refer to the [Uglifier
|
209
209
|
documentation](https://github.com/lautis/uglifier).
|
210
210
|
|
211
211
|
``` ruby
|
@@ -242,12 +242,12 @@ In your CSS files, `url()`'s will automatically be translated.
|
|
242
242
|
```
|
243
243
|
|
244
244
|
#### Image embedding
|
245
|
-
Want to embed images as `data:` URI's? Sure! Just add `?embed` at the end of the
|
245
|
+
Want to embed images as `data:` URI's? Sure! Just add `?embed` at the end of the
|
246
246
|
URL.
|
247
247
|
|
248
248
|
``` css
|
249
249
|
/* Original: */ .email { background: url(/images/email.png?embed); }
|
250
|
-
/* Output: */ .email { background: url(data:image/png;base64,NF8dG3I...); }
|
250
|
+
/* Output: */ .email { background: url(data:image/png;base64,NF8dG3I...); }
|
251
251
|
```
|
252
252
|
|
253
253
|
## Precompile
|
@@ -291,7 +291,7 @@ end
|
|
291
291
|
```
|
292
292
|
|
293
293
|
#### Getting options
|
294
|
-
Invoking it without a block allows you to access the options. This works for
|
294
|
+
Invoking it without a block allows you to access the options. This works for
|
295
295
|
almost all the options, with the exception for `css`, `js` and `serve`.
|
296
296
|
|
297
297
|
``` ruby
|
@@ -301,7 +301,7 @@ App.assets.js_compression #=> :yui
|
|
301
301
|
|
302
302
|
### assets.serve
|
303
303
|
|
304
|
-
Serves files from `LOCALPATH` in the URI path `PATH`. Both parameters are
|
304
|
+
Serves files from `LOCALPATH` in the URI path `PATH`. Both parameters are
|
305
305
|
required.
|
306
306
|
|
307
307
|
``` ruby
|
@@ -319,7 +319,7 @@ serve '/js', from: '/app/javascripts'
|
|
319
319
|
|
320
320
|
### assets.js\_compression<br>assets.css\_compression
|
321
321
|
|
322
|
-
Sets the compression engine to use for JavaScript or CSS. This defaults to
|
322
|
+
Sets the compression engine to use for JavaScript or CSS. This defaults to
|
323
323
|
`:jsmin` and `:simple`, respectively.
|
324
324
|
|
325
325
|
If `OPTIONS_HASH` is given as a hash, it sets options for the engine to use.
|
@@ -335,7 +335,7 @@ assets {
|
|
335
335
|
```
|
336
336
|
|
337
337
|
#### Examples
|
338
|
-
Yo seriously check this out: the first line uses Sqwish with it's defaults, and
|
338
|
+
Yo seriously check this out: the first line uses Sqwish with it's defaults, and
|
339
339
|
the second line uses Sqwish with it's magic.
|
340
340
|
|
341
341
|
``` ruby
|
@@ -347,7 +347,7 @@ assets {
|
|
347
347
|
|
348
348
|
### assets.js\_compression\_options<br>assets.css\_compression\_options
|
349
349
|
|
350
|
-
Sets the options for the compression engine to use. This is usually not needed
|
350
|
+
Sets the options for the compression engine to use. This is usually not needed
|
351
351
|
as you can already set options using `js_compression` and `css_compression`.
|
352
352
|
|
353
353
|
``` ruby
|
@@ -369,15 +369,15 @@ css_compression_options :munge => true
|
|
369
369
|
|
370
370
|
Adds packages to be used.
|
371
371
|
|
372
|
-
The `NAME` is a symbol defines the ID for that given package that you can use
|
373
|
-
for the helpers. That is, If a CSS package was defined as `css :main, [ ... ]`,
|
372
|
+
The `NAME` is a symbol defines the ID for that given package that you can use
|
373
|
+
for the helpers. That is, If a CSS package was defined as `css :main, [ ... ]`,
|
374
374
|
then you will need to use `<%= css :main %>` to render it in views.
|
375
375
|
|
376
376
|
the `URI` is a string that defines where the compressed version will be served.
|
377
377
|
It is optional. If not provided, it will default to `"/assets/name.type"` (eg:
|
378
378
|
`/assets/main.css`).
|
379
379
|
|
380
|
-
the `PATHs` is an array that defines files that will be served. Take note that
|
380
|
+
the `PATHs` is an array that defines files that will be served. Take note that
|
381
381
|
this is an array of URI paths, not local paths.
|
382
382
|
|
383
383
|
If a `PATH` contains wildcards, it will be expanded in alphabetical order.
|
@@ -394,8 +394,8 @@ assets {
|
|
394
394
|
```
|
395
395
|
|
396
396
|
#### Example
|
397
|
-
In this example, JavaScript files will be served compressed as
|
398
|
-
`/js/application.js` (default since no `URI` is given). The files will be taken
|
397
|
+
In this example, JavaScript files will be served compressed as
|
398
|
+
`/js/application.js` (default since no `URI` is given). The files will be taken
|
399
399
|
from `./app/javascripts/vendor/jquery*.js`.
|
400
400
|
|
401
401
|
``` ruby
|
@@ -417,12 +417,12 @@ Excludes any URL paths that match the given spec.
|
|
417
417
|
|
418
418
|
These files will not show up in packages, and they will not be accessible.
|
419
419
|
|
420
|
-
By default, `.*` and `_*` are ignored. The former protects folders such as
|
421
|
-
`.svn` from being accessed, and the latter protects Sass partial files from
|
420
|
+
By default, `.*` and `_*` are ignored. The former protects folders such as
|
421
|
+
`.svn` from being accessed, and the latter protects Sass partial files from
|
422
422
|
being accessed directly.
|
423
423
|
|
424
|
-
Note that this matches against URL paths, not local file paths. This means
|
425
|
-
something like `*.scss` will not work, as all stylesheet files will be compiled
|
424
|
+
Note that this matches against URL paths, not local file paths. This means
|
425
|
+
something like `*.scss` will not work, as all stylesheet files will be compiled
|
426
426
|
to `.css`.
|
427
427
|
|
428
428
|
``` ruby
|
@@ -448,7 +448,7 @@ end
|
|
448
448
|
```
|
449
449
|
|
450
450
|
#### Advanced usage
|
451
|
-
By default, `.*` and `_*` are ignored. To disable this behavior, you can use
|
451
|
+
By default, `.*` and `_*` are ignored. To disable this behavior, you can use
|
452
452
|
`clear_ignores!` before your `ignore` lines.
|
453
453
|
|
454
454
|
``` ruby
|
@@ -468,7 +468,7 @@ assets.ignored?("/css/_chrome.css") #=> true
|
|
468
468
|
### assets.prebuild
|
469
469
|
Caches the built packages on application startup.
|
470
470
|
|
471
|
-
If this is not used, the packages will be minified when they are first
|
471
|
+
If this is not used, the packages will be minified when they are first
|
472
472
|
requested. This only has an effect in the production environment (or when
|
473
473
|
Sinatra's `reload_templates` is otherwise set to false).
|
474
474
|
|
@@ -478,7 +478,7 @@ prebuild {true|false}
|
|
478
478
|
```
|
479
479
|
|
480
480
|
#### Example
|
481
|
-
In this example, the package for `:application` will be built when the
|
481
|
+
In this example, the package for `:application` will be built when the
|
482
482
|
application is started in the production environment.
|
483
483
|
|
484
484
|
``` ruby
|
@@ -530,7 +530,7 @@ end
|
|
530
530
|
### assets.cache_dynamic_assets
|
531
531
|
Caches dynamic files unless they have been modified.
|
532
532
|
|
533
|
-
Useful during development if asset compilation of all dynamic assets on each request is slow.
|
533
|
+
Useful during development if asset compilation of all dynamic assets on each request is slow.
|
534
534
|
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.
|
535
535
|
|
536
536
|
``` ruby
|
@@ -553,6 +553,7 @@ class App < Sinatra::Base
|
|
553
553
|
cache_dynamic_assets true
|
554
554
|
}
|
555
555
|
end
|
556
|
+
```
|
556
557
|
|
557
558
|
## Helpers
|
558
559
|
|
@@ -560,7 +561,7 @@ These are helpers you can use in your views.
|
|
560
561
|
|
561
562
|
### <%= css %>
|
562
563
|
|
563
|
-
Shows a CSS package named `PACKAGE`. If `OPTIONS_HASH` is given, they will we
|
564
|
+
Shows a CSS package named `PACKAGE`. If `OPTIONS_HASH` is given, they will we
|
564
565
|
passed onto the `<link>` tag to be generated as attributes.
|
565
566
|
|
566
567
|
You may specify as many packages as you need, as shown in the second usage line.
|
@@ -617,8 +618,8 @@ This example embeds the *main* package with an ID.
|
|
617
618
|
|
618
619
|
### <%= img %>
|
619
620
|
|
620
|
-
Shows an `<img>` tag from the given `SRC`. If the images is found in the asset
|
621
|
-
directories (and ImageMagick is available), `width` and `height` attributes will
|
621
|
+
Shows an `<img>` tag from the given `SRC`. If the images is found in the asset
|
622
|
+
directories (and ImageMagick is available), `width` and `height` attributes will
|
622
623
|
be added.
|
623
624
|
|
624
625
|
``` ruby
|
@@ -627,7 +628,7 @@ img 'SRC'
|
|
627
628
|
img 'SRC', OPTIONS_HASH
|
628
629
|
```
|
629
630
|
|
630
|
-
If `OPTIONS_HASH` is given, they will we passed onto the `<img>` tag to be
|
631
|
+
If `OPTIONS_HASH` is given, they will we passed onto the `<img>` tag to be
|
631
632
|
generated as attributes.
|
632
633
|
|
633
634
|
#### Example
|
@@ -672,4 +673,4 @@ Twitter : [@rstacruz](http://twitter.com/rstacruz), [@j15e](http://twitter.com/j
|
|
672
673
|
[c]: http://github.com/rstacruz/sinatra-assetpack/contributors
|
673
674
|
[sf]: http://sinefunc.com
|
674
675
|
[j15e]: http://github.com/j15e
|
675
|
-
[hookt]: http://github.com/hooktstudios
|
676
|
+
[hookt]: http://github.com/hooktstudios
|
data/Rakefile
CHANGED
@@ -1,11 +1,3 @@
|
|
1
|
-
desc "Invokes the test suite in multiple RVM environments"
|
2
|
-
task :'test!' do
|
3
|
-
# Override this by adding RVM_TEST_ENVS=".." in .rvmrc
|
4
|
-
envs = ENV['RVM_TEST_ENVS'] || '1.9.2@sinatra,1.8.7@sinatra'
|
5
|
-
puts "* Testing in the following RVM environments: #{envs.gsub(',', ', ')}"
|
6
|
-
system "rvm #{envs} rake test" or abort
|
7
|
-
end
|
8
|
-
|
9
1
|
desc "Runs tests"
|
10
2
|
task :test do
|
11
3
|
Dir['test/*_test.rb'].each { |f| load f }
|
data/lib/sinatra/assetpack.rb
CHANGED
@@ -45,6 +45,7 @@ module Sinatra
|
|
45
45
|
|
46
46
|
autoload :ClassMethods, "#{PREFIX}/assetpack/class_methods"
|
47
47
|
autoload :Options, "#{PREFIX}/assetpack/options"
|
48
|
+
autoload :Builder, "#{PREFIX}/assetpack/builder"
|
48
49
|
autoload :Helpers, "#{PREFIX}/assetpack/helpers"
|
49
50
|
autoload :HtmlHelpers, "#{PREFIX}/assetpack/html_helpers"
|
50
51
|
autoload :BusterHelpers, "#{PREFIX}/assetpack/buster_helpers"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Sinatra
|
2
|
+
module AssetPack
|
3
|
+
module Builder
|
4
|
+
def build!(&blk)
|
5
|
+
packages.each { |_, pack| build_package!(pack, &blk) }
|
6
|
+
files.each { |path, local| build_file!(path, local, &blk) }
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def build_get(path, &blk)
|
12
|
+
@session ||= Rack::Test::Session.new app
|
13
|
+
@session.get(path)
|
14
|
+
end
|
15
|
+
|
16
|
+
def build_package!(pack, &blk)
|
17
|
+
response = build_get(pack.path)
|
18
|
+
build_write(pack.path, response, &blk)
|
19
|
+
build_write(pack.production_path, response, &blk)
|
20
|
+
end
|
21
|
+
|
22
|
+
def build_file!(path, local, &blk)
|
23
|
+
response = build_get(path)
|
24
|
+
build_write(path, response, &blk)
|
25
|
+
build_write(BusterHelpers.add_cache_buster(path, local), response, &blk)
|
26
|
+
end
|
27
|
+
|
28
|
+
def build_write(path, response, &blk)
|
29
|
+
require 'fileutils'
|
30
|
+
|
31
|
+
mtime = Time.parse(response.headers['Last-Modified']) if response.headers['Last-Modified']
|
32
|
+
path = File.join(@output_path, path)
|
33
|
+
|
34
|
+
yield path if block_given?
|
35
|
+
|
36
|
+
FileUtils.mkdir_p(File.dirname(path))
|
37
|
+
File.open(path, 'wb') { |f| f.write(response.body) }
|
38
|
+
File.utime(mtime, mtime, path) if mtime
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -38,6 +38,7 @@ module Sinatra
|
|
38
38
|
# # Returns a HashArray of (local => remote)
|
39
39
|
#
|
40
40
|
class Options
|
41
|
+
include Builder
|
41
42
|
include Configurator
|
42
43
|
|
43
44
|
def initialize(app, &blk)
|
@@ -48,6 +49,7 @@ module Sinatra
|
|
48
49
|
@app = app
|
49
50
|
@js_compression = :jsmin
|
50
51
|
@css_compression = :simple
|
52
|
+
@reload_files_cache = true
|
51
53
|
|
52
54
|
begin
|
53
55
|
@output_path = app.public
|
@@ -78,16 +80,21 @@ module Sinatra
|
|
78
80
|
# DSL methods
|
79
81
|
|
80
82
|
def serve(path, options={})
|
81
|
-
raise Error
|
82
|
-
|
83
|
+
raise Error unless options[:from]
|
84
|
+
|
85
|
+
full_path = options[:from]
|
86
|
+
full_path = File.join(app.root, full_path) unless File.directory?(full_path)
|
87
|
+
return unless File.directory?(full_path)
|
83
88
|
|
84
89
|
@served[path] = options[:from]
|
90
|
+
@reload_files_cache = true
|
85
91
|
end
|
86
92
|
|
87
93
|
# Undo defaults.
|
88
94
|
def reset!
|
89
95
|
@served = Hash.new
|
90
96
|
@packages = Hash.new
|
97
|
+
@reload_files_cache = true
|
91
98
|
end
|
92
99
|
|
93
100
|
# Ignores a given path spec.
|
@@ -171,14 +178,14 @@ module Sinatra
|
|
171
178
|
end
|
172
179
|
|
173
180
|
def js_compression(name=nil, options=nil)
|
174
|
-
@js_compression = name
|
175
|
-
@js_compression_options = options
|
181
|
+
@js_compression = name unless name.nil?
|
182
|
+
@js_compression_options = options if options.is_a?(Hash)
|
176
183
|
@js_compression
|
177
184
|
end
|
178
185
|
|
179
186
|
def css_compression(name=nil, options=nil)
|
180
|
-
@css_compression = name
|
181
|
-
@css_compression_options = options
|
187
|
+
@css_compression = name unless name.nil?
|
188
|
+
@css_compression_options = options if options.is_a?(Hash)
|
182
189
|
@css_compression
|
183
190
|
end
|
184
191
|
|
@@ -187,43 +194,15 @@ module Sinatra
|
|
187
194
|
|
188
195
|
attr_reader :served
|
189
196
|
|
190
|
-
def build!(&blk)
|
191
|
-
session = Rack::Test::Session.new app
|
192
|
-
|
193
|
-
get = lambda { |path|
|
194
|
-
response = session.get(path)
|
195
|
-
out = response.body
|
196
|
-
mtime = Time.parse(response.headers['Last-Modified']) if response.headers['Last-Modified']
|
197
|
-
|
198
|
-
[ out, mtime ]
|
199
|
-
}
|
200
|
-
|
201
|
-
packages.each { |_, pack|
|
202
|
-
out, mtime = get[pack.path]
|
203
|
-
|
204
|
-
write pack.path, out, mtime, &blk
|
205
|
-
write pack.production_path, out, mtime, &blk
|
206
|
-
}
|
207
|
-
|
208
|
-
files.each { |path, local|
|
209
|
-
out, mtime = get[path]
|
210
|
-
|
211
|
-
write path, out, mtime, &blk
|
212
|
-
write BusterHelpers.add_cache_buster(path, local), out, mtime, &blk
|
213
|
-
}
|
214
|
-
end
|
215
|
-
|
216
197
|
# Caches the packages.
|
217
198
|
def cache!(&blk)
|
218
|
-
return
|
199
|
+
return if app.reload_templates
|
219
200
|
|
220
201
|
session = Rack::Test::Session.new app
|
221
202
|
packages.each { |_, pack|
|
222
|
-
yield pack.path
|
203
|
+
yield pack.path if block_given?
|
223
204
|
session.get(pack.path)
|
224
205
|
}
|
225
|
-
|
226
|
-
true
|
227
206
|
end
|
228
207
|
|
229
208
|
def served?(path)
|
@@ -232,70 +211,55 @@ module Sinatra
|
|
232
211
|
|
233
212
|
# Returns the local file for a given URI path.
|
234
213
|
# Returns nil if a file is not found.
|
235
|
-
def local_file_for(
|
236
|
-
|
214
|
+
def local_file_for(request)
|
215
|
+
request.squeeze!('/')
|
216
|
+
serve_path, from = served.detect { |path, _| request.start_with?(path) }
|
237
217
|
|
238
|
-
|
218
|
+
return if !from
|
239
219
|
|
240
|
-
|
241
|
-
|
242
|
-
path = File.join app.root, local, path
|
243
|
-
|
244
|
-
path if File.exists?(path)
|
245
|
-
end
|
220
|
+
path = File.join(expand_from(from), request.sub(serve_path, ''))
|
221
|
+
path if File.exist?(path)
|
246
222
|
end
|
247
223
|
|
248
224
|
# Returns the local file for a given URI path. (for dynamic files)
|
249
225
|
# Returns nil if a file is not found.
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
extension = File.extname(requested_file)
|
226
|
+
def dyn_local_file_for(request, from)
|
227
|
+
file = request
|
228
|
+
extension = File.extname(request)
|
254
229
|
# Remove extension
|
255
230
|
file.gsub!(/#{extension}$/, "")
|
256
231
|
# Remove cache-buster (/js/app.28389 => /js/app)
|
257
232
|
file.gsub!(/\.[a-f0-9]{32}$/, "")
|
258
|
-
|
233
|
+
|
234
|
+
matches = Dir[File.join(expand_from(from), "#{file}.*")]
|
259
235
|
|
260
236
|
# Fix for filenames with dots (can't do this with glob)
|
261
237
|
matches.select! { |f| f =~ /#{file}\.[^.]+$/ }
|
262
238
|
|
263
239
|
# Sort static file match, weighting exact file extension matches
|
264
|
-
matches.sort! do |f, _|
|
240
|
+
matches.sort! do |f, _|
|
265
241
|
(File.basename(f) == "#{file}#{extension}" || File.extname(f) == extension) ? -1 : 1
|
266
242
|
end
|
267
243
|
matches.first
|
268
244
|
end
|
269
245
|
|
270
|
-
#
|
271
|
-
def
|
272
|
-
|
246
|
+
# Returns the files as a hash.
|
247
|
+
def files(match=nil)
|
248
|
+
return @files unless @reload_files_cache
|
273
249
|
|
274
|
-
|
275
|
-
|
250
|
+
# All
|
251
|
+
# A buncha tuples
|
252
|
+
tuples = @served.map { |prefix, local_path|
|
253
|
+
path = File.expand_path(File.join(@app.root, local_path))
|
254
|
+
spec = File.join(path, '**', '*')
|
276
255
|
|
277
|
-
|
278
|
-
|
256
|
+
Dir[spec].map { |f|
|
257
|
+
[ to_uri(f, prefix, path), f ] unless File.directory?(f)
|
258
|
+
}
|
259
|
+
}.flatten.compact
|
279
260
|
|
280
|
-
|
281
|
-
|
282
|
-
end
|
283
|
-
end
|
284
|
-
|
285
|
-
# Returns the files as a hash.
|
286
|
-
def files(match=nil)
|
287
|
-
# All
|
288
|
-
# A buncha tuples
|
289
|
-
tuples = @served.map { |prefix, local_path|
|
290
|
-
path = File.expand_path(File.join(@app.root, local_path))
|
291
|
-
spec = File.join(path, '**', '*')
|
292
|
-
|
293
|
-
Dir[spec].map { |f|
|
294
|
-
[ to_uri(f, prefix, path), f ] unless File.directory?(f)
|
295
|
-
}
|
296
|
-
}.flatten.compact
|
297
|
-
|
298
|
-
Hash[*tuples]
|
261
|
+
@reload_files_cache = false
|
262
|
+
@files = Hash[*tuples]
|
299
263
|
end
|
300
264
|
|
301
265
|
# Returns an array of URI paths of those matching given globs.
|
@@ -308,7 +272,6 @@ module Sinatra
|
|
308
272
|
# wildcards that don't match anything.
|
309
273
|
#
|
310
274
|
def glob(match, options={})
|
311
|
-
|
312
275
|
match = [*match] # Force array-ness
|
313
276
|
|
314
277
|
paths = match.map { |spec|
|
@@ -358,6 +321,14 @@ module Sinatra
|
|
358
321
|
|
359
322
|
fn
|
360
323
|
end
|
324
|
+
|
325
|
+
def expand_from(from)
|
326
|
+
if from.start_with?('/')
|
327
|
+
from
|
328
|
+
else
|
329
|
+
File.join(app.root, from)
|
330
|
+
end
|
331
|
+
end
|
361
332
|
end
|
362
333
|
end
|
363
334
|
end
|
data/sinatra-assetpack.gemspec
CHANGED
@@ -2,7 +2,7 @@ require './lib/sinatra/assetpack/version'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'sinatra-assetpack'
|
5
|
-
s.version = Sinatra::AssetPack
|
5
|
+
s.version = Sinatra::AssetPack::VERSION
|
6
6
|
s.summary = %{Asset packager for Sinatra.}
|
7
7
|
s.description = %Q{Package your assets for Sinatra.}
|
8
8
|
s.authors = ['Rico Sta. Cruz']
|
data/test/local_file_test.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
require File.expand_path('../test_helper', __FILE__)
|
2
2
|
|
3
3
|
class LocalFileTest < UnitTest
|
4
|
+
|
4
5
|
class App < Main
|
6
|
+
|
7
|
+
ABS_FONTS_PATH = File.join(File.expand_path('../', __FILE__), 'app', 'app', 'fonts')
|
8
|
+
|
5
9
|
assets {
|
6
10
|
css :application, [ '/css/*.css' ]
|
7
|
-
serve '/fonts',
|
11
|
+
serve '/fonts', :from => 'app/fonts'
|
12
|
+
serve '/abs_fonts', :from => ABS_FONTS_PATH
|
8
13
|
}
|
9
14
|
end
|
10
15
|
|
@@ -18,6 +23,11 @@ class LocalFileTest < UnitTest
|
|
18
23
|
assert_equal r('app/fonts/cantarell-regular-webfont.ttf'), fn
|
19
24
|
end
|
20
25
|
|
26
|
+
test "local file for (in existing files, custom absolute serve path)" do
|
27
|
+
fn = App.assets.local_file_for '/abs_fonts/cantarell-regular-webfont.ttf'
|
28
|
+
assert_equal "#{App::ABS_FONTS_PATH}/cantarell-regular-webfont.ttf", fn
|
29
|
+
end
|
30
|
+
|
21
31
|
test "local file for (in nonexisting files)" do
|
22
32
|
fn = App.assets.local_file_for '/images/404.jpg'
|
23
33
|
assert fn.nil?
|
metadata
CHANGED
@@ -1,298 +1,258 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-assetpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rico Sta. Cruz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain:
|
12
|
-
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
dlRBOUNTQmFGWDJYdGowZEM1bzZlVzYvdldvVmVKVWNNTlgvTy9yOGxSV24y
|
35
|
-
NFdoRmtFelc5bjFSCjJDVmVaczc4QVhXVHlVMGwwZHlzd3BhdjBBY3pYZzRV
|
36
|
-
SzNZMk05b1l5Qm1kZmVtNm02MTRTT3JPRkJJR2ptRjQKa3pnRjRPMk9MKzhP
|
37
|
-
MjN3ZTRFMUx2ZlJuNWdWNzdEaWo2czlWNEhIek1CdUx3bk5iOFQrNmxPblVX
|
38
|
-
YnRpSWRkRAplOGM4aTdQbHJ6aFZKLzhzWFVKc0NreUU4ZDJNeVJ5amx4TT0K
|
39
|
-
LS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
40
|
-
date: 2013-05-29 00:00:00.000000000 Z
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDRjCCAi6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBJMRswGQYDVQQDDBJqZWFu
|
14
|
+
cGhpbGlwcGUuZG95bGUxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT
|
15
|
+
8ixkARkWA2NvbTAeFw0xMzAzMTEyMjM5MjNaFw0xNDAzMTEyMjM5MjNaMEkxGzAZ
|
16
|
+
BgNVBAMMEmplYW5waGlsaXBwZS5kb3lsZTEVMBMGCgmSJomT8ixkARkWBWdtYWls
|
17
|
+
MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
18
|
+
CgKCAQEApQtzOyMoi48Pc0BRF++BXc2ulECpOypwYqnzIdbE5+iLownixYB3KkKm
|
19
|
+
VxIlo9pYWIp5JR+Uphv/P9vKJAIjfldtlus6o8xFT0HujXyEMMbFMGHH01PvDYkx
|
20
|
+
vnMw5O6YVdtbsKvjknB4JOcOmxQAeXBunLBJk0huOLALlDW38UZF3AKNVPpR+Gst
|
21
|
+
gTZCIAPq22wB9I0HYfyCitjrMVK4jTHgjPjNNQn4BhuhkqEWr5JkVtipGCUFyl45
|
22
|
+
2ISskOPckLW/qwCq4vyjVK6JIZb2Ei9DHtip44u7KjFEX5QdvHyu81xatMmtKvYn
|
23
|
+
WWKZ/2HCdWRRiPSuHmBR/QlMlUN69QIDAQABozkwNzAJBgNVHRMEAjAAMB0GA1Ud
|
24
|
+
DgQWBBQk1vhL7od7qZLEfBssQNqzht1wwDALBgNVHQ8EBAMCBLAwDQYJKoZIhvcN
|
25
|
+
AQEFBQADggEBADglXYkTD1Btadr2ehKDOSATfLVeh9ThwZ6PeKP8bPWKOrHPbTN8
|
26
|
+
Aandvv6g6samg7p/viRwsE29MTAcfqCdFp8v35ase2PyiXrJ0QJP7r3CBo+nwGVO
|
27
|
+
hybD84/vTA9CSBaFX2Xtj0dC5o6eW6/vWoVeJUcMNX/O/r8lRWn24WhFkEzW9n1R
|
28
|
+
2CVeZs78AXWTyU0l0dyswpav0AczXg4UK3Y2M9oYyBmdfem6m614SOrOFBIGjmF4
|
29
|
+
kzgF4O2OL+8O23we4E1LvfRn5gV77Dij6s9V4HHzMBuLwnNb8T+6lOnUWbtiIddD
|
30
|
+
e8c8i7PlrzhVJ/8sXUJsCkyE8d2MyRyjlxM=
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
date: 2013-06-08 00:00:00.000000000 Z
|
41
33
|
dependencies:
|
42
34
|
- !ruby/object:Gem::Dependency
|
43
35
|
name: backports
|
44
36
|
requirement: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
37
|
requirements:
|
47
|
-
- -
|
38
|
+
- - '>='
|
48
39
|
- !ruby/object:Gem::Version
|
49
40
|
version: '0'
|
50
41
|
type: :runtime
|
51
42
|
prerelease: false
|
52
43
|
version_requirements: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
44
|
requirements:
|
55
|
-
- -
|
45
|
+
- - '>='
|
56
46
|
- !ruby/object:Gem::Version
|
57
47
|
version: '0'
|
58
48
|
- !ruby/object:Gem::Dependency
|
59
49
|
name: jsmin
|
60
50
|
requirement: !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
62
51
|
requirements:
|
63
|
-
- -
|
52
|
+
- - '>='
|
64
53
|
- !ruby/object:Gem::Version
|
65
54
|
version: '0'
|
66
55
|
type: :runtime
|
67
56
|
prerelease: false
|
68
57
|
version_requirements: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
58
|
requirements:
|
71
|
-
- -
|
59
|
+
- - '>='
|
72
60
|
- !ruby/object:Gem::Version
|
73
61
|
version: '0'
|
74
62
|
- !ruby/object:Gem::Dependency
|
75
63
|
name: rack-test
|
76
64
|
requirement: !ruby/object:Gem::Requirement
|
77
|
-
none: false
|
78
65
|
requirements:
|
79
|
-
- -
|
66
|
+
- - '>='
|
80
67
|
- !ruby/object:Gem::Version
|
81
68
|
version: '0'
|
82
69
|
type: :runtime
|
83
70
|
prerelease: false
|
84
71
|
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
72
|
requirements:
|
87
|
-
- -
|
73
|
+
- - '>='
|
88
74
|
- !ruby/object:Gem::Version
|
89
75
|
version: '0'
|
90
76
|
- !ruby/object:Gem::Dependency
|
91
77
|
name: sinatra
|
92
78
|
requirement: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
79
|
requirements:
|
95
|
-
- -
|
80
|
+
- - '>='
|
96
81
|
- !ruby/object:Gem::Version
|
97
82
|
version: '0'
|
98
83
|
type: :runtime
|
99
84
|
prerelease: false
|
100
85
|
version_requirements: !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
86
|
requirements:
|
103
|
-
- -
|
87
|
+
- - '>='
|
104
88
|
- !ruby/object:Gem::Version
|
105
89
|
version: '0'
|
106
90
|
- !ruby/object:Gem::Dependency
|
107
91
|
name: tilt
|
108
92
|
requirement: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
93
|
requirements:
|
111
|
-
- -
|
94
|
+
- - '>='
|
112
95
|
- !ruby/object:Gem::Version
|
113
96
|
version: 1.3.0
|
114
97
|
type: :runtime
|
115
98
|
prerelease: false
|
116
99
|
version_requirements: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
100
|
requirements:
|
119
|
-
- -
|
101
|
+
- - '>='
|
120
102
|
- !ruby/object:Gem::Version
|
121
103
|
version: 1.3.0
|
122
104
|
- !ruby/object:Gem::Dependency
|
123
105
|
name: coffee-script
|
124
106
|
requirement: !ruby/object:Gem::Requirement
|
125
|
-
none: false
|
126
107
|
requirements:
|
127
|
-
- -
|
108
|
+
- - '>='
|
128
109
|
- !ruby/object:Gem::Version
|
129
110
|
version: '0'
|
130
111
|
type: :development
|
131
112
|
prerelease: false
|
132
113
|
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
114
|
requirements:
|
135
|
-
- -
|
115
|
+
- - '>='
|
136
116
|
- !ruby/object:Gem::Version
|
137
117
|
version: '0'
|
138
118
|
- !ruby/object:Gem::Dependency
|
139
119
|
name: contest
|
140
120
|
requirement: !ruby/object:Gem::Requirement
|
141
|
-
none: false
|
142
121
|
requirements:
|
143
|
-
- -
|
122
|
+
- - '>='
|
144
123
|
- !ruby/object:Gem::Version
|
145
124
|
version: '0'
|
146
125
|
type: :development
|
147
126
|
prerelease: false
|
148
127
|
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
none: false
|
150
128
|
requirements:
|
151
|
-
- -
|
129
|
+
- - '>='
|
152
130
|
- !ruby/object:Gem::Version
|
153
131
|
version: '0'
|
154
132
|
- !ruby/object:Gem::Dependency
|
155
133
|
name: haml
|
156
134
|
requirement: !ruby/object:Gem::Requirement
|
157
|
-
none: false
|
158
135
|
requirements:
|
159
|
-
- -
|
136
|
+
- - '>='
|
160
137
|
- !ruby/object:Gem::Version
|
161
138
|
version: '0'
|
162
139
|
type: :development
|
163
140
|
prerelease: false
|
164
141
|
version_requirements: !ruby/object:Gem::Requirement
|
165
|
-
none: false
|
166
142
|
requirements:
|
167
|
-
- -
|
143
|
+
- - '>='
|
168
144
|
- !ruby/object:Gem::Version
|
169
145
|
version: '0'
|
170
146
|
- !ruby/object:Gem::Dependency
|
171
147
|
name: less
|
172
148
|
requirement: !ruby/object:Gem::Requirement
|
173
|
-
none: false
|
174
149
|
requirements:
|
175
|
-
- -
|
150
|
+
- - '>='
|
176
151
|
- !ruby/object:Gem::Version
|
177
152
|
version: '0'
|
178
153
|
type: :development
|
179
154
|
prerelease: false
|
180
155
|
version_requirements: !ruby/object:Gem::Requirement
|
181
|
-
none: false
|
182
156
|
requirements:
|
183
|
-
- -
|
157
|
+
- - '>='
|
184
158
|
- !ruby/object:Gem::Version
|
185
159
|
version: '0'
|
186
160
|
- !ruby/object:Gem::Dependency
|
187
161
|
name: sass
|
188
162
|
requirement: !ruby/object:Gem::Requirement
|
189
|
-
none: false
|
190
163
|
requirements:
|
191
|
-
- -
|
164
|
+
- - '>='
|
192
165
|
- !ruby/object:Gem::Version
|
193
166
|
version: '0'
|
194
167
|
type: :development
|
195
168
|
prerelease: false
|
196
169
|
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
none: false
|
198
170
|
requirements:
|
199
|
-
- -
|
171
|
+
- - '>='
|
200
172
|
- !ruby/object:Gem::Version
|
201
173
|
version: '0'
|
202
174
|
- !ruby/object:Gem::Dependency
|
203
175
|
name: stylus
|
204
176
|
requirement: !ruby/object:Gem::Requirement
|
205
|
-
none: false
|
206
177
|
requirements:
|
207
|
-
- -
|
178
|
+
- - '>='
|
208
179
|
- !ruby/object:Gem::Version
|
209
180
|
version: '0'
|
210
181
|
type: :development
|
211
182
|
prerelease: false
|
212
183
|
version_requirements: !ruby/object:Gem::Requirement
|
213
|
-
none: false
|
214
184
|
requirements:
|
215
|
-
- -
|
185
|
+
- - '>='
|
216
186
|
- !ruby/object:Gem::Version
|
217
187
|
version: '0'
|
218
188
|
- !ruby/object:Gem::Dependency
|
219
189
|
name: uglifier
|
220
190
|
requirement: !ruby/object:Gem::Requirement
|
221
|
-
none: false
|
222
191
|
requirements:
|
223
|
-
- -
|
192
|
+
- - '>='
|
224
193
|
- !ruby/object:Gem::Version
|
225
194
|
version: '0'
|
226
195
|
type: :development
|
227
196
|
prerelease: false
|
228
197
|
version_requirements: !ruby/object:Gem::Requirement
|
229
|
-
none: false
|
230
198
|
requirements:
|
231
|
-
- -
|
199
|
+
- - '>='
|
232
200
|
- !ruby/object:Gem::Version
|
233
201
|
version: '0'
|
234
202
|
- !ruby/object:Gem::Dependency
|
235
203
|
name: yui-compressor
|
236
204
|
requirement: !ruby/object:Gem::Requirement
|
237
|
-
none: false
|
238
205
|
requirements:
|
239
|
-
- -
|
206
|
+
- - '>='
|
240
207
|
- !ruby/object:Gem::Version
|
241
208
|
version: '0'
|
242
209
|
type: :development
|
243
210
|
prerelease: false
|
244
211
|
version_requirements: !ruby/object:Gem::Requirement
|
245
|
-
none: false
|
246
212
|
requirements:
|
247
|
-
- -
|
213
|
+
- - '>='
|
248
214
|
- !ruby/object:Gem::Version
|
249
215
|
version: '0'
|
250
216
|
- !ruby/object:Gem::Dependency
|
251
217
|
name: rake
|
252
218
|
requirement: !ruby/object:Gem::Requirement
|
253
|
-
none: false
|
254
219
|
requirements:
|
255
|
-
- -
|
220
|
+
- - '>='
|
256
221
|
- !ruby/object:Gem::Version
|
257
222
|
version: '0'
|
258
223
|
type: :development
|
259
224
|
prerelease: false
|
260
225
|
version_requirements: !ruby/object:Gem::Requirement
|
261
|
-
none: false
|
262
226
|
requirements:
|
263
|
-
- -
|
227
|
+
- - '>='
|
264
228
|
- !ruby/object:Gem::Version
|
265
229
|
version: '0'
|
266
230
|
- !ruby/object:Gem::Dependency
|
267
231
|
name: mocha
|
268
232
|
requirement: !ruby/object:Gem::Requirement
|
269
|
-
none: false
|
270
233
|
requirements:
|
271
|
-
- -
|
234
|
+
- - '>='
|
272
235
|
- !ruby/object:Gem::Version
|
273
236
|
version: '0'
|
274
237
|
type: :development
|
275
238
|
prerelease: false
|
276
239
|
version_requirements: !ruby/object:Gem::Requirement
|
277
|
-
none: false
|
278
240
|
requirements:
|
279
|
-
- -
|
241
|
+
- - '>='
|
280
242
|
- !ruby/object:Gem::Version
|
281
243
|
version: '0'
|
282
244
|
- !ruby/object:Gem::Dependency
|
283
245
|
name: gem-release
|
284
246
|
requirement: !ruby/object:Gem::Requirement
|
285
|
-
none: false
|
286
247
|
requirements:
|
287
|
-
- -
|
248
|
+
- - '>='
|
288
249
|
- !ruby/object:Gem::Version
|
289
250
|
version: '0'
|
290
251
|
type: :development
|
291
252
|
prerelease: false
|
292
253
|
version_requirements: !ruby/object:Gem::Requirement
|
293
|
-
none: false
|
294
254
|
requirements:
|
295
|
-
- -
|
255
|
+
- - '>='
|
296
256
|
- !ruby/object:Gem::Version
|
297
257
|
version: '0'
|
298
258
|
description: Package your assets for Sinatra.
|
@@ -304,10 +264,10 @@ extra_rdoc_files: []
|
|
304
264
|
files:
|
305
265
|
- .gitignore
|
306
266
|
- .travis.yml
|
267
|
+
- CHANGELOG.md
|
307
268
|
- CONTRIBUTING.md
|
308
269
|
- Gemfile
|
309
270
|
- Gemfile.lock
|
310
|
-
- HISTORY.md
|
311
271
|
- LICENSE.md
|
312
272
|
- README.md
|
313
273
|
- Rakefile
|
@@ -341,6 +301,7 @@ files:
|
|
341
301
|
- examples/compass/config.ru
|
342
302
|
- examples/compass/views/index.erb
|
343
303
|
- lib/sinatra/assetpack.rb
|
304
|
+
- lib/sinatra/assetpack/builder.rb
|
344
305
|
- lib/sinatra/assetpack/buster_helpers.rb
|
345
306
|
- lib/sinatra/assetpack/class_methods.rb
|
346
307
|
- lib/sinatra/assetpack/compressor.rb
|
@@ -429,26 +390,25 @@ files:
|
|
429
390
|
- test/yui_test.rb
|
430
391
|
homepage: http://github.com/rstacruz/sinatra-assetpack
|
431
392
|
licenses: []
|
393
|
+
metadata: {}
|
432
394
|
post_install_message:
|
433
395
|
rdoc_options: []
|
434
396
|
require_paths:
|
435
397
|
- lib
|
436
398
|
required_ruby_version: !ruby/object:Gem::Requirement
|
437
|
-
none: false
|
438
399
|
requirements:
|
439
|
-
- -
|
400
|
+
- - '>='
|
440
401
|
- !ruby/object:Gem::Version
|
441
402
|
version: '0'
|
442
403
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
443
|
-
none: false
|
444
404
|
requirements:
|
445
|
-
- -
|
405
|
+
- - '>='
|
446
406
|
- !ruby/object:Gem::Version
|
447
407
|
version: '0'
|
448
408
|
requirements: []
|
449
409
|
rubyforge_project:
|
450
|
-
rubygems_version:
|
410
|
+
rubygems_version: 2.0.3
|
451
411
|
signing_key:
|
452
|
-
specification_version:
|
412
|
+
specification_version: 4
|
453
413
|
summary: Asset packager for Sinatra.
|
454
414
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|