sinatra-assetpack 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -1
- data.tar.gz.sig +0 -0
- data/.travis.yml +0 -3
- data/CHANGELOG.md +98 -196
- data/Gemfile.lock +1 -1
- data/UPGRADING +17 -0
- data/lib/sinatra/assetpack/helpers.rb +1 -1
- data/lib/sinatra/assetpack/options.rb +6 -3
- data/lib/sinatra/assetpack/version.rb +1 -1
- data/sinatra-assetpack.gemspec +5 -0
- data/test/app/app.rb +5 -1
- data/test/app/app/packages/a_package/package.coffee +1 -0
- data/test/headers_test.rb +3 -3
- data/test/unit_test.rb +3 -1
- metadata +23 -5
- metadata.gz.sig +0 -0
- data/test/app/app/packages/a_package/package.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36980bbe81aa1db5f97f6fcedb9cd0d3d18a917c
|
4
|
+
data.tar.gz: b051cfbb48584c044bd4145a9dd91a4941b7b864
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6482f3a6d2dbbc4608c4c8a7fa711f90b8836da96aa58935cc452e5a4e6cdee0e9702bc893f1c726fc8ec08c691a3aa84469877032d37edf9f9a8c124989d29
|
7
|
+
data.tar.gz: 0031c2f116f04cf2bc388fa819216db737401bd759c08894a3a4bf44fcfe0ab0c73ff0f20951532c5cc4fac05f16471004809c7ddbfbf251bf3dc160275233bb
|
checksums.yaml.gz.sig
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,283 +1,185 @@
|
|
1
|
-
## v0.3.
|
1
|
+
## v0.3.1 - August 1, 2013
|
2
2
|
|
3
|
-
|
4
|
-
* Remove automatic image tag width/height (#121)
|
3
|
+
* Fix : Use Tilt mappings when sorting candidates for dynamic requests. (#122)
|
5
4
|
|
6
|
-
|
7
|
-
* Tilt issue #206 workaround (#125)
|
5
|
+
## v0.3.0 - July 30, 2013
|
8
6
|
|
9
|
-
|
10
|
-
*
|
11
|
-
*
|
7
|
+
* Change: Remove automatic image tag width/height (#121)
|
8
|
+
* Change: Drop support for ruby 1.8.
|
9
|
+
* Fix: Tilt issue #206 workaround (#125)
|
10
|
+
* Improvement: Improve DSL error reporting (#124)
|
11
|
+
* Improvement: Add filename option to templates render. (#126)
|
12
12
|
|
13
13
|
## v0.2.8 - June 25, 2013
|
14
14
|
|
15
|
-
|
16
|
-
* CSS preprocessing should not rewriting external url or not served assets. (#116)
|
15
|
+
* Fix: CSS preprocessing should not rewriting external url or not served assets. (#116)
|
17
16
|
|
18
17
|
## v0.2.7 - June 22, 2013
|
19
18
|
|
20
|
-
|
21
|
-
*
|
22
|
-
|
23
|
-
### Improvements
|
24
|
-
* Removed contest development dependency.
|
25
|
-
* Rewrote glob method with reduced complexity.
|
19
|
+
* Fix: Change glob matching behaviour to match Dir#glob. (#108)
|
20
|
+
* Improvement: Removed contest development dependency.
|
21
|
+
* Improvement: Rewrote glob method with reduced complexity.
|
26
22
|
|
27
23
|
## v0.2.6 - June 18, 2013
|
28
24
|
|
29
|
-
|
30
|
-
*
|
31
|
-
|
32
|
-
### Improvements
|
33
|
-
* Removed backports runtime dependency (#114)
|
34
|
-
* Removed test dependencies included as development dependency.
|
25
|
+
* Fix : Issue with quote wrapped data URIs. (#113)
|
26
|
+
* Improvement: Removed backports runtime dependency (#114)
|
27
|
+
* Improvement: Removed test dependencies included as development dependency.
|
35
28
|
|
36
29
|
## v0.2.5 - June 11, 2013
|
37
30
|
|
38
|
-
|
39
|
-
* Fixed an issue with Last-Modified headers & packaged asssets. (#111)
|
31
|
+
* Fix: Issue with Last-Modified headers & packaged asssets. (#111)
|
40
32
|
|
41
33
|
## v0.2.4 - June 8, 2013
|
42
34
|
|
43
|
-
|
44
|
-
*
|
45
|
-
*
|
46
|
-
|
47
|
-
### Improvements
|
48
|
-
* Rewrote asset builder.
|
49
|
-
* Simplified & consolidated local_file_for & dyn_local_file_for.
|
50
|
-
|
35
|
+
* Feature: Serving from absolute path. (#107)
|
36
|
+
* Feature: Cache of all assets files. (#109)
|
37
|
+
* Improvement: Rewrote asset builder.
|
38
|
+
* Improvement: Simplified & consolidated local_file_for & dyn_local_file_for.
|
51
39
|
|
52
40
|
## v0.2.3 - May 29, 2013
|
53
41
|
|
54
|
-
|
55
|
-
* Support for Rack::URLMap / url prefix (#104)
|
56
|
-
|
57
|
-
### Changed
|
58
|
-
* Use optimized MD5 file digest method. (#99)
|
59
|
-
|
42
|
+
* Change: Use optimized MD5 file digest method. (#99)
|
43
|
+
* New: Support for Rack::URLMap / url prefix (#104)
|
60
44
|
|
61
45
|
## v0.2.2 - April 28, 2013
|
62
46
|
|
63
|
-
|
64
|
-
* Don't preprocess CSS data-uris. (#96)
|
65
|
-
|
47
|
+
* Fix: Don't preprocess CSS data-uris. (#96)
|
66
48
|
|
67
49
|
## v0.2.1 - April 23, 2013
|
68
50
|
|
69
|
-
|
70
|
-
*
|
71
|
-
|
72
|
-
### Fixed
|
73
|
-
* Fixed CSS preproc to keep original CSS url quotes & url fragment.
|
74
|
-
|
51
|
+
* New option: cache_dynamic_assets option for development cache. (#94)
|
52
|
+
* Fix: CSS preproc to keep original CSS url quotes & url fragment.
|
75
53
|
|
76
54
|
## v0.2.0 - April 20, 2013
|
77
55
|
|
78
|
-
|
79
|
-
*
|
80
|
-
|
81
|
-
### Added
|
82
|
-
* Add :simple compression for javascript. (#87)
|
83
|
-
|
84
|
-
### Fixed
|
85
|
-
* Added backports correctly for 1.8.7 support.
|
86
|
-
|
56
|
+
* Change: Using MD5 for cache busting URI. (#91, #71)
|
57
|
+
* Feature: Add :simple compression for javascript. (#87)
|
58
|
+
* Fix: Added backports correctly for 1.8.7 support.
|
87
59
|
|
88
60
|
## v0.1.7 - March 11, 2013
|
89
61
|
|
90
|
-
|
91
|
-
|
92
|
-
* Gem is now certificate signed.
|
93
|
-
|
62
|
+
* Change: Gem is now certificate signed.
|
94
63
|
|
95
64
|
## v0.1.6 - March 1, 2013
|
96
65
|
|
97
|
-
|
98
|
-
|
99
|
-
* Do not use instance helpers for environment check. (#79)
|
100
|
-
|
66
|
+
* Fix: Do not use instance helpers for environment check. (#79)
|
101
67
|
|
102
68
|
## v0.1.5 - Feb 12, 2013
|
103
69
|
|
104
|
-
|
105
|
-
* Stylus 0.7.1 support.
|
106
|
-
|
70
|
+
* Fix: Stylus 0.7.1 support.
|
107
71
|
|
108
72
|
## v0.1.4 - Feb 12, 2013
|
109
73
|
|
110
|
-
|
111
|
-
*
|
112
|
-
|
113
|
-
### Fixed
|
114
|
-
* Lock stylus to 0.7.0 until 0.7.1 is supported.
|
115
|
-
|
74
|
+
* Feature: Multiple asset hosts support. (#27)
|
75
|
+
* Fix: Lock stylus to 0.7.0 until 0.7.1 is supported.
|
116
76
|
|
117
77
|
## v0.1.3 - Feb 3, 2013
|
118
78
|
|
119
|
-
|
120
|
-
*
|
121
|
-
|
122
|
-
### Fixed:
|
123
|
-
* Deal with assets with exact same name but extensions. (#75)
|
124
|
-
* Ruby 1.8 support (broken in previous
|
125
|
-
## v0.1 releases).
|
126
|
-
|
79
|
+
* Feature: JRuby 1.9 and 1.8 now supported.
|
80
|
+
* Fix: Deal with assets with exact same name but extensions. (#75)
|
81
|
+
* Fix: Ruby 1.8 support (broken in previous v0.1 releases).
|
127
82
|
|
128
83
|
## v0.1.2 - Jan 20, 2013
|
129
84
|
|
130
|
-
|
131
|
-
* Support for custom cache control headers for packed assets. (#43)
|
132
|
-
|
85
|
+
* Feature : Support for custom cache control headers for packed assets. (#43)
|
133
86
|
|
134
87
|
## v0.1.1 - Jan 15, 2013
|
135
88
|
|
136
|
-
|
137
|
-
*
|
138
|
-
*
|
139
|
-
* Deal with multiple static files with same name but different extensions (ex. fonts).
|
140
|
-
|
89
|
+
* Fix: Added less engine support and test (#69)
|
90
|
+
* Fix: Support for fonts & other AssetPack.supported_formats file format. (#50)
|
91
|
+
* Fix: Deal with multiple static files with same name but different extensions (ex. fonts).
|
141
92
|
|
142
93
|
## v0.1.0 - Jan 14, 2013
|
143
94
|
|
144
|
-
|
145
|
-
*
|
146
|
-
|
147
|
-
|
148
|
-
*
|
149
|
-
*
|
150
|
-
* Deal with character encoding issues in ruby 1.8. (#51)
|
151
|
-
* Add missing depedency for development unit test. (#63)
|
152
|
-
* Deal with binary files copy (ex. images), fix errors like `"\x89" from ASCII-8BIT to UTF-8"`. (#38, #67)
|
153
|
-
|
95
|
+
* Change: Using `file` utility instead `identify` utility. (#26)
|
96
|
+
* Fix: Deal with different encodings in combined assets. (#47)
|
97
|
+
* Fix: Serve files with dots in name. (#32, #66)
|
98
|
+
* Fix: Deal with character encoding issues in ruby 1.8. (#51)
|
99
|
+
* Fix: Add missing depedency for development unit test. (#63)
|
100
|
+
* Fix: Deal with binary files copy (ex. images), fix errors like `"\x89" from ASCII-8BIT to UTF-8"`. (#38, #67)
|
154
101
|
|
155
102
|
## v0.0.11 - Feb 21, 2012
|
156
103
|
|
157
|
-
|
158
|
-
* Support for
|
159
|
-
*
|
160
|
-
* Implement
|
161
|
-
*
|
162
|
-
*
|
163
|
-
|
164
|
-
|
165
|
-
*
|
166
|
-
*
|
167
|
-
* Use regular expression route matcher instead of splat pattern for Padrino compatibility. (#19)
|
168
|
-
* Made `link` and `script` tags (generated by helpers) be more HTML5-like.
|
169
|
-
|
170
|
-
### Fixed:
|
171
|
-
* Sinatra >= 1.3.0 compatibility. Use 'public_folder' in Sinatra >=1.3.0. (#25)
|
172
|
-
|
104
|
+
* Feature: Support for 'prebuild' to build on startup.
|
105
|
+
* Feature: Support for SVG files.
|
106
|
+
* Feature: Implement UglifyJS support. (#18)
|
107
|
+
* Feature: Implement ignored files. (#17)
|
108
|
+
* Feature: Added support classic-style Sinatra apps. (#22)
|
109
|
+
* Change: Built files from 'rake assetpack:build' now match the mtimes of their sources. (#12)
|
110
|
+
* Change: Update the readme with a note on SASS compression.
|
111
|
+
* Change: Use regular expression route matcher instead of splat pattern for Padrino compatibility. (#19)
|
112
|
+
* Change: Made `link` and `script` tags (generated by helpers) be more HTML5-like.
|
113
|
+
* Fix: Sinatra >= 1.3.0 compatibility. Use 'public_folder' in Sinatra >=1.3.0. (#25)
|
173
114
|
|
174
115
|
## v0.0.10 - Sep 18, 2011
|
175
116
|
|
176
|
-
|
177
|
-
*
|
178
|
-
*
|
179
|
-
*
|
180
|
-
*
|
181
|
-
|
182
|
-
### Changed:
|
183
|
-
* Built files from 'rake assetpack:build' now match the mtimes of their
|
184
|
-
sources. (#12)
|
185
|
-
* Refactor Compressor into separate engine classes.
|
186
|
-
|
117
|
+
* Feature: Support for 'prebuild' to build on startup.
|
118
|
+
* Feature: Add UglifyJS support via `js_compression :uglify`. (#18)
|
119
|
+
* Feature: Ignore '.*' and '_*' files. (#17)
|
120
|
+
* Feature: Allow specifying of files to be ignored. (#17)
|
121
|
+
* Change: Built files from 'rake assetpack:build' now match the mtimes of their sources. (#12)
|
122
|
+
* Change: Refactor Compressor into separate engine classes.Fi:
|
187
123
|
|
188
124
|
## v0.0.9 - Sep 18, 2011
|
189
125
|
|
190
|
-
|
191
|
-
*
|
192
|
-
*
|
193
|
-
|
194
|
-
|
195
|
-
* Use Sinatra's `template_cache`. This makes AssetPack honor Sinatra's
|
196
|
-
`reload_templates` setting. (#15)
|
197
|
-
|
198
|
-
### Added:
|
199
|
-
* Added .htc (IE behavior files) to the list of file formats to be served.
|
200
|
-
* Added examples.
|
201
|
-
|
126
|
+
* Fix: bad route terminating issue. (#9)
|
127
|
+
* Fix: Rake task when the main App class is in a module. (#11)
|
128
|
+
* Feature: Added .htc (IE behavior files) to the list of file formats to be served.
|
129
|
+
* Change: Use Sinatra's `template_cache`. This makes AssetPack honor Sinatra's`reload_templates` setting. (#15)
|
130
|
+
* Change: Added examples.
|
202
131
|
|
203
132
|
## v0.0.8 - Sep 06, 2011
|
204
133
|
|
205
|
-
|
206
|
-
*
|
207
|
-
|
208
|
-
|
209
|
-
### Added:
|
210
|
-
* Allow adding CSS/JS files that don't exist. (#8)
|
211
|
-
* Support any Tilt-compatible CSS or JS engine. (#5)
|
212
|
-
|
213
|
-
### Changed:
|
214
|
-
* Default to '/assets/x.js' then using assets.css without a path. Inspiration
|
134
|
+
* Fix: CSS preprocessing bug that gives invalid 'url()' properties to non-existing images. (#1)
|
135
|
+
* Feature: Allow adding CSS/JS files that don't exist. (#8)
|
136
|
+
* Feature: Support any Tilt-compatible CSS or JS engine. (#5)
|
137
|
+
* Change: Default to '/assets/x.js' then using assets.css without a path. Inspiration
|
215
138
|
from Jammit.
|
216
|
-
* Ask browsers to cache assets for 1 month.
|
217
|
-
|
218
|
-
|
219
|
-
*
|
220
|
-
*
|
221
|
-
*
|
222
|
-
*
|
223
|
-
* Added .rvmrc and .sass-cache to gitignore.
|
224
|
-
* Allow overridable multiple RVM environments in tests.
|
225
|
-
|
139
|
+
* Change: Ask browsers to cache assets for 1 month.
|
140
|
+
* Misc: Add a note on the ImageMagick requirement.
|
141
|
+
* Misc: Stop the 'img' helper from invoking ImageMagick more times than it needs to.
|
142
|
+
* Misc: Make "rake test!" abort when it encounters an error.
|
143
|
+
* Misc: Stylus tests to stub stylus compilation.
|
144
|
+
* Misc: Added .rvmrc and .sass-cache to gitignore.
|
145
|
+
* Misc: Allow overridable multiple RVM environments in tests.
|
226
146
|
|
227
147
|
## v0.0.6 - Aug 30, 2011
|
228
148
|
|
229
|
-
|
230
|
-
* Redundant entries are now suppressed. (eg, when specifying
|
149
|
+
* Fix: Redundant entries are now suppressed. (eg, when specifying
|
231
150
|
`['vendor/jquery.js', 'vendor/*.js']`)
|
232
|
-
|
233
|
-
|
234
|
-
* Allow
|
235
|
-
*
|
236
|
-
*
|
237
|
-
* Allow setting options for `js_compression` by passing a hash after it.
|
238
|
-
* Make the path parameter in `js` and `css` in the `assets` block optional.
|
239
|
-
|
151
|
+
* Feature: Allow a parameter to the block in the `assets` configuration block.
|
152
|
+
* Feature: Update README with lots of info.
|
153
|
+
* Feature: Allow multiple packages in the js and css helpers. (eg, `css :base, :login`)
|
154
|
+
* Feature: Allow setting options for `js_compression` by passing a hash after it.
|
155
|
+
* Feature: Make the path parameter in `js` and `css` in the `assets` block optional.
|
240
156
|
|
241
157
|
## v0.0.5 - Aug 30, 2011
|
242
158
|
|
243
|
-
|
244
|
-
*
|
245
|
-
|
246
|
-
### Added:
|
247
|
-
* Added an example app in `example/`.
|
248
|
-
|
159
|
+
* Fix: build failing when it finds directories.
|
160
|
+
* Misc: Added an example app in `example/`.
|
249
161
|
|
250
162
|
## v0.0.4 - Aug 30, 2011
|
251
163
|
|
252
|
-
|
253
|
-
*
|
254
|
-
*
|
255
|
-
*
|
256
|
-
|
257
|
-
|
258
|
-
* the config format for `js_compression` and family. In your `assets` block,
|
259
|
-
you now have to use `js_compression :closure` instead of `js_compression =
|
260
|
-
:closure`.
|
261
|
-
* Use simple CSS compression by default.
|
164
|
+
* Fix: Ruby 1.8 compatibility. Yay!
|
165
|
+
* Fix: Fixed images always being square.
|
166
|
+
* Fix: Assets are now ordered properly.
|
167
|
+
* Change: the config format for `js_compression` and family. In your `assets` block,
|
168
|
+
you now have to use `js_compression :closure` instead of `js_compression = :closure`.
|
169
|
+
* Change: Use simple CSS compression by default.
|
262
170
|
|
263
171
|
|
264
172
|
## v0.0.3 - Aug 30, 2011
|
265
173
|
|
266
|
-
|
267
|
-
*
|
268
|
-
*
|
269
|
-
* `rake assetpack:build` now also outputs images.
|
270
|
-
|
174
|
+
* Feature: Images in CSS defined in `url(...)` params are now cache-busted.
|
175
|
+
* Feature: Add support for embedded images in CSS.
|
176
|
+
* Feature: `rake assetpack:build` now also outputs images.
|
271
177
|
|
272
178
|
## v0.0.2 - Aug 29, 2011
|
273
179
|
|
274
|
-
|
275
|
-
* Added
|
276
|
-
*
|
277
|
-
|
278
|
-
### Fixed:
|
279
|
-
* The gem now installs the correct dependencies.
|
280
|
-
|
180
|
+
* Feature: Added the `img` helper.
|
181
|
+
* Feature: Added support for filetypes used in @font-face.
|
182
|
+
* Fix: The gem now installs the correct dependencies.
|
281
183
|
|
282
184
|
## v0.0.1 - Aug 29, 2011
|
283
185
|
|
data/Gemfile.lock
CHANGED
data/UPGRADING
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
##################################################
|
2
|
+
# NOTE FOR UPGRADING FROM PRE-3.0.0 VERSION #
|
3
|
+
##################################################
|
4
|
+
|
5
|
+
Please note that sinatra-assetpack `img` helper method
|
6
|
+
no more set the image width and height because this default
|
7
|
+
behavior is not desirable with most recent CSS techniques
|
8
|
+
regarding high resolutions images for "retina" displays
|
9
|
+
ans "responsive" design CSS using for exemple width:100%.
|
10
|
+
|
11
|
+
<img src="retina.jpg" width="1200" height="600">
|
12
|
+
|
13
|
+
Is now simply this (unless you explicity set them) :
|
14
|
+
|
15
|
+
<img src="retina.jpg">
|
16
|
+
|
17
|
+
See https://github.com/rstacruz/sinatra-assetpack/pull/121
|
@@ -230,7 +230,7 @@ module Sinatra
|
|
230
230
|
# Returns the local file for a given URI path. (for dynamic files)
|
231
231
|
# Returns nil if a file is not found.
|
232
232
|
def dyn_local_file_for(request, from)
|
233
|
-
file = request
|
233
|
+
file = request.dup
|
234
234
|
extension = File.extname(request)
|
235
235
|
# Remove extension
|
236
236
|
file.gsub!(/#{extension}$/, "")
|
@@ -243,8 +243,11 @@ module Sinatra
|
|
243
243
|
matches = matches.select { |f| f =~ /#{file}\.[^.]+$/ }
|
244
244
|
|
245
245
|
# Sort static file match, weighting exact file extension matches
|
246
|
-
|
247
|
-
|
246
|
+
# first, then registered Tilt formats
|
247
|
+
matches.sort! do |candidate, _|
|
248
|
+
cfmt = File.extname(candidate)[1..-1]
|
249
|
+
efmt = extension[1..-1]
|
250
|
+
(cfmt == efmt or AssetPack.tilt_formats[cfmt] == efmt) ? -1 : 1
|
248
251
|
end
|
249
252
|
matches.first
|
250
253
|
end
|
data/sinatra-assetpack.gemspec
CHANGED
@@ -13,6 +13,11 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.executables = Dir['bin/*'].map { |f| File.basename(f) }
|
14
14
|
s.cert_chain = ['certs/j15e.pem']
|
15
15
|
s.signing_key = File.expand_path('~/.gem/private_key.pem') if $0 =~ /gem\z/
|
16
|
+
s.required_ruby_version = '>= 1.9.2'
|
17
|
+
|
18
|
+
if File.exists?('UPGRADING')
|
19
|
+
s.post_install_message = File.read("UPGRADING")
|
20
|
+
end
|
16
21
|
|
17
22
|
s.add_dependency 'jsmin'
|
18
23
|
s.add_dependency 'rack-test'
|
data/test/app/app.rb
CHANGED
@@ -22,7 +22,7 @@ class Main < Sinatra::Base
|
|
22
22
|
serve '/fonts', :from => 'app/fonts'
|
23
23
|
serve '/packages', :from => 'app/packages'
|
24
24
|
|
25
|
-
js :
|
25
|
+
js :js_package, '/packages/js_package.js', [
|
26
26
|
'/packages/a_package/package.js',
|
27
27
|
]
|
28
28
|
|
@@ -42,6 +42,10 @@ class Main < Sinatra::Base
|
|
42
42
|
'/js/helloe.js'
|
43
43
|
]
|
44
44
|
|
45
|
+
css :css_package, '/packages/css_package.css', [
|
46
|
+
'/packages/a_package/package.css',
|
47
|
+
]
|
48
|
+
|
45
49
|
css :application, '/css/application.css', [
|
46
50
|
'/css/screen.css'
|
47
51
|
]
|
@@ -0,0 +1 @@
|
|
1
|
+
`$(function() { alert("Hello"); });`
|
data/test/headers_test.rb
CHANGED
@@ -4,18 +4,18 @@ class HeadersTest < UnitTest
|
|
4
4
|
setup do
|
5
5
|
app.set :reload_templates, true
|
6
6
|
|
7
|
-
@file = File.join(app.root, 'app', 'packages', 'a_package', 'package.
|
7
|
+
@file = File.join(app.root, 'app', 'packages', 'a_package', 'package.css')
|
8
8
|
FileUtils.touch(@file)
|
9
9
|
@httpdate = File.mtime(@file).httpdate
|
10
10
|
end
|
11
11
|
|
12
12
|
test "individual route" do
|
13
|
-
get '/packages/a_package/package.
|
13
|
+
get '/packages/a_package/package.css'
|
14
14
|
assert_equal @httpdate, last_response.headers['Last-Modified']
|
15
15
|
end
|
16
16
|
|
17
17
|
test "package route" do
|
18
|
-
get '/packages/
|
18
|
+
get '/packages/css_package.6797d3f2e04e2638eb9c460de099fcff.css'
|
19
19
|
assert_equal @httpdate, last_response.headers['Last-Modified']
|
20
20
|
end
|
21
21
|
end
|
data/test/unit_test.rb
CHANGED
@@ -46,8 +46,10 @@ class AppTest < UnitTest
|
|
46
46
|
end
|
47
47
|
|
48
48
|
test 'returns file of requested type when mixed type assets of varying extension are present' do
|
49
|
-
get '/packages/
|
49
|
+
get '/packages/js_package.ec69e2cf66b1b2162f928a339e3c162e.js'
|
50
50
|
assert body.include? 'function(){alert("Hello");'
|
51
|
+
get '/packages/css_package.6797d3f2e04e2638eb9c460de099fcff.css'
|
52
|
+
assert body.include? '.hi{color:red;}'
|
51
53
|
end
|
52
54
|
|
53
55
|
test 'static css' do
|
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.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rico Sta. Cruz
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
kzgF4O2OL+8O23we4E1LvfRn5gV77Dij6s9V4HHzMBuLwnNb8T+6lOnUWbtiIddD
|
31
31
|
e8c8i7PlrzhVJ/8sXUJsCkyE8d2MyRyjlxM=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2013-
|
33
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: jsmin
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- LICENSE.md
|
203
203
|
- README.md
|
204
204
|
- Rakefile
|
205
|
+
- UPGRADING
|
205
206
|
- certs/j15e.pem
|
206
207
|
- examples/basic/.gitignore
|
207
208
|
- examples/basic/Rakefile
|
@@ -286,8 +287,8 @@ files:
|
|
286
287
|
- test/app/app/js_glob/a/b/c2/hola.js
|
287
288
|
- test/app/app/js_glob/a/lvl2.js
|
288
289
|
- test/app/app/js_glob/lvl1.js
|
290
|
+
- test/app/app/packages/a_package/package.coffee
|
289
291
|
- test/app/app/packages/a_package/package.css
|
290
|
-
- test/app/app/packages/a_package/package.js
|
291
292
|
- test/app/app/packages/a_package/package.png
|
292
293
|
- test/app/app/views/index.haml
|
293
294
|
- test/app/config.ru
|
@@ -326,7 +327,24 @@ homepage: http://github.com/rstacruz/sinatra-assetpack
|
|
326
327
|
licenses:
|
327
328
|
- MIT
|
328
329
|
metadata: {}
|
329
|
-
post_install_message:
|
330
|
+
post_install_message: |-
|
331
|
+
##################################################
|
332
|
+
# NOTE FOR UPGRADING FROM PRE-3.0.0 VERSION #
|
333
|
+
##################################################
|
334
|
+
|
335
|
+
Please note that sinatra-assetpack `img` helper method
|
336
|
+
no more set the image width and height because this default
|
337
|
+
behavior is not desirable with most recent CSS techniques
|
338
|
+
regarding high resolutions images for "retina" displays
|
339
|
+
ans "responsive" design CSS using for exemple width:100%.
|
340
|
+
|
341
|
+
<img src="retina.jpg" width="1200" height="600">
|
342
|
+
|
343
|
+
Is now simply this (unless you explicity set them) :
|
344
|
+
|
345
|
+
<img src="retina.jpg">
|
346
|
+
|
347
|
+
See https://github.com/rstacruz/sinatra-assetpack/pull/121
|
330
348
|
rdoc_options: []
|
331
349
|
require_paths:
|
332
350
|
- lib
|
@@ -334,7 +352,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
334
352
|
requirements:
|
335
353
|
- - '>='
|
336
354
|
- !ruby/object:Gem::Version
|
337
|
-
version:
|
355
|
+
version: 1.9.2
|
338
356
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
339
357
|
requirements:
|
340
358
|
- - '>='
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
$(function() { alert("Hello"); });
|