sprockets 2.11.3 → 3.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +296 -0
  3. data/LICENSE +2 -2
  4. data/README.md +235 -242
  5. data/bin/sprockets +1 -0
  6. data/lib/rake/sprocketstask.rb +5 -4
  7. data/lib/sprockets/asset.rb +143 -210
  8. data/lib/sprockets/autoload/closure.rb +7 -0
  9. data/lib/sprockets/autoload/coffee_script.rb +7 -0
  10. data/lib/sprockets/autoload/eco.rb +7 -0
  11. data/lib/sprockets/autoload/ejs.rb +7 -0
  12. data/lib/sprockets/autoload/sass.rb +7 -0
  13. data/lib/sprockets/autoload/uglifier.rb +7 -0
  14. data/lib/sprockets/autoload/yui.rb +7 -0
  15. data/lib/sprockets/autoload.rb +11 -0
  16. data/lib/sprockets/base.rb +56 -393
  17. data/lib/sprockets/bower.rb +58 -0
  18. data/lib/sprockets/bundle.rb +69 -0
  19. data/lib/sprockets/cache/file_store.rb +168 -14
  20. data/lib/sprockets/cache/memory_store.rb +66 -0
  21. data/lib/sprockets/cache/null_store.rb +46 -0
  22. data/lib/sprockets/cache.rb +236 -0
  23. data/lib/sprockets/cached_environment.rb +69 -0
  24. data/lib/sprockets/closure_compressor.rb +35 -10
  25. data/lib/sprockets/coffee_script_processor.rb +25 -0
  26. data/lib/sprockets/coffee_script_template.rb +17 -0
  27. data/lib/sprockets/compressing.rb +44 -23
  28. data/lib/sprockets/configuration.rb +83 -0
  29. data/lib/sprockets/context.rb +86 -144
  30. data/lib/sprockets/dependencies.rb +73 -0
  31. data/lib/sprockets/deprecation.rb +90 -0
  32. data/lib/sprockets/digest_utils.rb +180 -0
  33. data/lib/sprockets/directive_processor.rb +207 -211
  34. data/lib/sprockets/eco_processor.rb +32 -0
  35. data/lib/sprockets/eco_template.rb +9 -30
  36. data/lib/sprockets/ejs_processor.rb +31 -0
  37. data/lib/sprockets/ejs_template.rb +9 -29
  38. data/lib/sprockets/encoding_utils.rb +261 -0
  39. data/lib/sprockets/engines.rb +53 -35
  40. data/lib/sprockets/environment.rb +17 -64
  41. data/lib/sprockets/erb_processor.rb +30 -0
  42. data/lib/sprockets/erb_template.rb +11 -0
  43. data/lib/sprockets/errors.rb +4 -13
  44. data/lib/sprockets/file_reader.rb +15 -0
  45. data/lib/sprockets/http_utils.rb +117 -0
  46. data/lib/sprockets/jst_processor.rb +35 -15
  47. data/lib/sprockets/legacy.rb +330 -0
  48. data/lib/sprockets/legacy_proc_processor.rb +35 -0
  49. data/lib/sprockets/legacy_tilt_processor.rb +29 -0
  50. data/lib/sprockets/loader.rb +325 -0
  51. data/lib/sprockets/manifest.rb +202 -127
  52. data/lib/sprockets/manifest_utils.rb +45 -0
  53. data/lib/sprockets/mime.rb +112 -31
  54. data/lib/sprockets/path_dependency_utils.rb +85 -0
  55. data/lib/sprockets/path_digest_utils.rb +47 -0
  56. data/lib/sprockets/path_utils.rb +287 -0
  57. data/lib/sprockets/paths.rb +42 -19
  58. data/lib/sprockets/processing.rb +178 -126
  59. data/lib/sprockets/processor_utils.rb +180 -0
  60. data/lib/sprockets/resolve.rb +211 -0
  61. data/lib/sprockets/sass_cache_store.rb +22 -17
  62. data/lib/sprockets/sass_compressor.rb +39 -15
  63. data/lib/sprockets/sass_functions.rb +2 -70
  64. data/lib/sprockets/sass_importer.rb +2 -29
  65. data/lib/sprockets/sass_processor.rb +292 -0
  66. data/lib/sprockets/sass_template.rb +12 -53
  67. data/lib/sprockets/server.rb +129 -84
  68. data/lib/sprockets/transformers.rb +145 -0
  69. data/lib/sprockets/uglifier_compressor.rb +39 -12
  70. data/lib/sprockets/unloaded_asset.rb +137 -0
  71. data/lib/sprockets/uri_tar.rb +98 -0
  72. data/lib/sprockets/uri_utils.rb +188 -0
  73. data/lib/sprockets/utils/gzip.rb +67 -0
  74. data/lib/sprockets/utils.rb +210 -44
  75. data/lib/sprockets/version.rb +1 -1
  76. data/lib/sprockets/yui_compressor.rb +39 -11
  77. data/lib/sprockets.rb +142 -81
  78. metadata +100 -80
  79. data/lib/sprockets/asset_attributes.rb +0 -137
  80. data/lib/sprockets/bundled_asset.rb +0 -78
  81. data/lib/sprockets/caching.rb +0 -96
  82. data/lib/sprockets/charset_normalizer.rb +0 -41
  83. data/lib/sprockets/index.rb +0 -100
  84. data/lib/sprockets/processed_asset.rb +0 -152
  85. data/lib/sprockets/processor.rb +0 -32
  86. data/lib/sprockets/safety_colons.rb +0 -28
  87. data/lib/sprockets/scss_template.rb +0 -13
  88. data/lib/sprockets/static_asset.rb +0 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 92a457a4b3e0eb70d84a01ffb4631434724d2d2d
4
- data.tar.gz: 5fc9b324ba6359844ff7aae3b939dfa1280d6802
2
+ SHA256:
3
+ metadata.gz: 46e0f0a150aa8333d2a1d2663167b6f20c1e77db067cea7b545f75927f770807
4
+ data.tar.gz: 5acd5cb5c64e240dd8180e91f34620195fa1433e625ee48a132fdae58be71ba5
5
5
  SHA512:
6
- metadata.gz: 465dba63f0800fc7478858e0c3fdf98f5ca2d35f0c179d1bf2af6278f8813320303f6b762b9748c2d5ecc790e82a8058a8be200317cbd1521a62ab5d6181ab8c
7
- data.tar.gz: b3d7d6657eae4938d75e1e88a26991d57cab783216ba5455227d2a5f6dc9590dfc32adf7271ff0946dc212c543e295c04347bc438fd684052841db83e1fe25ba
6
+ metadata.gz: 97a06eb2e0767903da7bcda387211d881f3b98d57269a8abed5045e277db5f133f381c4f8fd23fcccf45a4032c85309841abba13b9218a52b21121a5a9bfc02a
7
+ data.tar.gz: 1d9c8d75bab64c366473226cc61806cd64c1951a67d90cc1220c1474e6a02cc5003b2dffb1b6324abefb7e7c8b292145635ac0bed6ae947a35393d67acd3c40e
data/CHANGELOG.md ADDED
@@ -0,0 +1,296 @@
1
+ **3.7.2** (June 19, 2018)
2
+
3
+ * Security release for [CVE-2018-3760](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760).
4
+
5
+ **3.7.1** (December 19, 2016)
6
+
7
+ * Ruby 2.4 support for Sprockets 3.
8
+
9
+ **3.7.0** (July 21, 2016)
10
+
11
+ * Deprecated interfaces now emit deprecation warnings #345
12
+
13
+ **3.6.3** (July 1, 2016)
14
+
15
+ * Faster asset lookup in large directories #336
16
+ * Faster PathUtils.match_path_extname https://github.com/rails/sprockets/commit/697269cf81e5261fdd7072e32bd489403027fd7e
17
+ * Fixed uglifier comment stripping #326
18
+ * Error messages now show load path info #313
19
+
20
+ **3.6.2** (June 21, 2016)
21
+
22
+ * More performance improvements.
23
+
24
+ **3.6.1** (June 17, 2016)
25
+
26
+ * Some performance improvements.
27
+
28
+ **3.6.0** (April 6, 2016)
29
+
30
+ * Add `Manifest#find_sources` to return the source of the compiled assets.
31
+ * Fix the list of compressable mime types.
32
+ * Improve performance of the `FileStore` cache.
33
+
34
+ **3.5.2** (December 8, 2015)
35
+
36
+ * Fix JRuby bug with concurrent-ruby.
37
+ * Fix disabling gzip generation in cached environments.
38
+
39
+ **3.5.1** (December 5, 2015)
40
+
41
+ * Fix gzip asset generation for assets already on disk.
42
+
43
+ **3.5.0** (December 3, 2015)
44
+
45
+ * Reintroduce Gzip file generation for non-binary assets.
46
+
47
+ **3.4.1** (November 25, 2015)
48
+
49
+ * PathUtils::Entries will no longer error on an empty directory.
50
+
51
+ **3.4.0** (October 5, 2015)
52
+
53
+ * Expose method to override the sass cache in the SassProcessor.
54
+
55
+ **3.3.5** (September 25, 2015)
56
+
57
+ * Fix bug related to absolute path being reintroduced into history cache #141.
58
+
59
+ **3.3.4** (September 1, 2015)
60
+
61
+ * Relative cache contents now work with windows.
62
+
63
+ **3.3.3** (August 21, 2015)
64
+
65
+ * Remove more absolute paths from cache contents.
66
+
67
+ **3.3.2** (August 19, 2015)
68
+
69
+ * Fix cache contents to use relative paths instead of absolute paths.
70
+
71
+ **3.3.1** (August 15, 2015)
72
+
73
+ * Fix legacy Tilt integration when locals is required argument.
74
+
75
+ **3.3.0** (August 12, 2015)
76
+
77
+ * Change internal cache key to use relative asset paths instead of absolute paths.
78
+
79
+ **3.2.0** (June 2, 2015)
80
+
81
+ * Updated SRI integrity to align with spec changes
82
+ * Deprecated Manifest integrity attribute
83
+ * Cleanup concatenating JS sources with newlines
84
+
85
+ **3.1.0** (May 10, 2015)
86
+
87
+ * Removed "index" logical path normalization. Asset#logical_path is always the
88
+ full logical path to the index file.
89
+ * Fixed static asset mtimes
90
+ * Fix manifest cleanup by age
91
+ * Removed redundant minifier level cache
92
+ * Updated SRI format according to spec changes
93
+
94
+ **3.0.3** (April 27, 2015)
95
+
96
+ * Fix static asset mtime fallback
97
+ * Only warn when specified asset version can not be loaded.
98
+
99
+ **3.0.2** (April 22, 2015)
100
+
101
+ * Ensure legacy Tilt handlers return String class data. Fixes issues with Haml
102
+ Tilt handler.
103
+ * Type check and improve error messages raised on bad processor returned results.
104
+ * Improve error message for relative paths not under load path.
105
+ * Changed HTML encoding fallback from ISO-8859-1 to default external.
106
+ * Avoid falling back to 0 mtimes which may cause warnings with tar
107
+
108
+ **3.0.1** (April 14, 2015)
109
+
110
+ * Fixed `Context#depend_on` with paths outside the load path
111
+
112
+ **3.0.0** (April 12, 2015)
113
+
114
+ [Guide to upgrading from Sprockets 2.x to 3.x](https://github.com/rails/sprockets/blob/3.x/UPGRADING.md)
115
+
116
+ * New processor API. Tilt interface is deprecated.
117
+ * Improved file store caching backend.
118
+ * MIME Types now accept charset custom charset detecters. Improves support for UTF-16/32 files.
119
+ * Environment#version no longer affects asset digests. Only used for busting the asset cache.
120
+ * Removed builtin support for LESS.
121
+ * Removed `//= include` directive support.
122
+ * Deprecated `BundledAsset#to_a`. Use `BundledAsset#included` to access debugging subcomponents.
123
+ * Support circular dependencies. For parity with ES6 modules.
124
+ * Manifest compilation will no longer generate .gz files by default. [Mixing
125
+ Content-Encoding and ETags is just a bad
126
+ idea](https://issues.apache.org/bugzilla/show_bug.cgi?id=39727)
127
+ * Added linked or referenced assets. When an asset is compiled, any of its links will be compiled as well.
128
+ * Introduce some limitations around enumerating all logical paths. 4.x will deprecate it and favor linked manifests for compliation.
129
+ * Add Asset integrity attribute for Subresource Integrity
130
+ * Default digest changed to SHA256. Configuring `digest_class` is deprecated.
131
+ * Rename `Asset#digest` to `Asset#hexdigest`. `Asset#digest` is deprecated and will
132
+ return a raw byte String in 4.x.
133
+ * Added transitional compatibility flag to `Environment#resolve(path, compat: true)`. 2.x mode operates with `compat: true` and 4.x with `compat: false`
134
+ * `manifest-abc123.json` renamed to `.sprockets-abc123.json`
135
+
136
+ **2.12.3** (October 28, 2014)
137
+
138
+ * Security: Fix directory traversal bug in development mode server.
139
+
140
+ **2.12.2** (September 5, 2014)
141
+
142
+ * Ensure internal asset lookups calls are still restricted to load paths within
143
+ asset compiles. Though, you should not depend on internal asset resolves to be
144
+ completely restricted for security reasons. Assets themselves should be
145
+ considered full scripting environments with filesystem access.
146
+
147
+ **2.12.1** (April 17, 2014)
148
+
149
+ * Fix making manifest target directory when its different than the output directory.
150
+
151
+ **2.12.0** (March 13, 2014)
152
+
153
+ * Avoid context reference in SassImporter hack so its Marshallable. Fixes
154
+ issues with Sass 3.3.x.
155
+
156
+ **2.11.0** (February 19, 2014)
157
+
158
+ * Cache store must now be an LRU implementation.
159
+ * Default digest changed to SHA1. To continue using MD5.
160
+ `env.digest_class = Digest::MD5`.
161
+
162
+ **2.10.0** (May 24, 2013)
163
+
164
+ * Support for `bower.json`
165
+
166
+ **2.9.3** (April 20, 2013)
167
+
168
+ * Fixed sass caching bug
169
+
170
+ **2.9.2** (April 8, 2013)
171
+
172
+ * Improve file freshness check performance
173
+ * Directive processor encoding fixes
174
+
175
+ **2.9.1** (April 6, 2013)
176
+
177
+ * Support for Uglifier 2.x
178
+
179
+ **2.9.0** (February 25, 2013)
180
+
181
+ * Write out gzipped variants of bundled assets.
182
+
183
+ **2.8.2** (December 10, 2012)
184
+
185
+ * Fixed top level Sass constant references
186
+ * Fixed manifest logger when environment is disabled
187
+
188
+ **2.8.1** (October 31, 2012)
189
+
190
+ * Fixed Sass importer bug
191
+
192
+ **2.8.0** (October 16, 2012)
193
+
194
+ * Allow manifest location to be separated from output directory
195
+ * Pass logical path and absolute path to each_logical_path iterator
196
+
197
+ **2.7.0** (October 10, 2012)
198
+
199
+ * Added --css-compressor and --js-compressor command line flags
200
+ * Added css/js compressor shorthand
201
+ * Change default manifest.json filename to be a randomized manifest-16HEXBYTES.json
202
+ * Allow nil environment to be passed to manifest
203
+ * Allow manifest instance to be set on rake task
204
+
205
+ **2.6.0** (September 19, 2012)
206
+
207
+ * Added bower component.json require support
208
+
209
+ **2.5.0** (September 4, 2012)
210
+
211
+ * Fixed Ruby 2.0 RegExp warning
212
+ * Provide stubbed implementation of context *_path helpers
213
+ * Add SassCompressor
214
+
215
+ **2.4.5** (July 10, 2012)
216
+
217
+ * Tweaked some logger levels
218
+
219
+ **2.4.4** (July 2, 2012)
220
+
221
+ * Canonicalize logical path extensions
222
+ * Check absolute paths passed to depend_on
223
+
224
+ **2.4.3** (May 16, 2012)
225
+
226
+ * Exposed :sprockets in sass options
227
+ * Include dependency paths in asset mtime
228
+
229
+ **2.4.2** (May 7, 2012)
230
+
231
+ * Fixed MultiJson feature detect
232
+
233
+ **2.4.1** (April 26, 2012)
234
+
235
+ * Fixed MultiJson API change
236
+ * Fixed gzip mtime
237
+
238
+ **2.4.0** (March 27, 2012)
239
+
240
+ * Added global path registry
241
+ * Added global processor registry
242
+
243
+ **2.3.2** (March 26, 2012)
244
+
245
+ * Fix Context#logical_path with dots
246
+
247
+ **2.3.1** (February 11, 2012)
248
+
249
+ * Added bytesize to manifest
250
+ * Added Asset#bytesize alias
251
+ * Security: Check path for forbidden access after unescaping
252
+
253
+ **2.3.0** (January 16, 2012)
254
+
255
+ * Added special Sass importer that automatically tracks any `@import`ed files.
256
+
257
+ **2.2.0** (January 10, 2012)
258
+
259
+ * Added `sprockets` command line utility.
260
+ * Added rake/sprocketstask.
261
+ * Added json manifest log of compiled assets.
262
+ * Added `stub` directive that allows you to exclude files from the bundle.
263
+ * Added per environment external encoding (Environment#default_external_encoding). Defaults to UTF-8. Fixes issues where LANG is not set correctly and Rubys default external is set to ASCII.
264
+
265
+ **2.1.2** (November 20, 2011)
266
+
267
+ * Disabled If-Modified-Since server checks. Fixes some browser caching issues when serving the asset body only. If-None-Match caching is sufficient.
268
+
269
+ **2.1.1** (November 18, 2011)
270
+
271
+ * Fix windows absolute path check bug.
272
+
273
+ **2.1.0** (November 11, 2011)
274
+
275
+ * Directive comment lines are now turned into empty lines instead of removed. This way line numbers in
276
+ CoffeeScript syntax errors are correct.
277
+ * Performance and caching bug fixes.
278
+
279
+ **2.0.3** (October 17, 2011)
280
+
281
+ * Detect format extensions from right to left.
282
+ * Make JST namespace configurable.
283
+
284
+ **2.0.2** (October 4, 2011)
285
+
286
+ * Fixed loading stale cache from bundler gems.
287
+
288
+ **2.0.1** (September 30, 2011)
289
+
290
+ * Fixed bug with fingerprinting file names with multiple dots.
291
+ * Decode URIs as default internal.
292
+ * Fix symlinked asset directories.
293
+
294
+ **2.0.0** (August 29, 2011)
295
+
296
+ * Initial public release.
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
- Copyright (c) 2011 Sam Stephenson
2
- Copyright (c) 2011 Joshua Peek
1
+ Copyright (c) 2014 Sam Stephenson
2
+ Copyright (c) 2014 Joshua Peek
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
5
5
  a copy of this software and associated documentation files (the