sprockets 2.3.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprockets might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/LICENSE +2 -2
- data/README.md +332 -115
- data/bin/sprockets +8 -0
- data/lib/rake/sprocketstask.rb +25 -13
- data/lib/sprockets/asset.rb +143 -205
- data/lib/sprockets/autoload/closure.rb +7 -0
- data/lib/sprockets/autoload/coffee_script.rb +7 -0
- data/lib/sprockets/autoload/eco.rb +7 -0
- data/lib/sprockets/autoload/ejs.rb +7 -0
- data/lib/sprockets/autoload/sass.rb +7 -0
- data/lib/sprockets/autoload/uglifier.rb +7 -0
- data/lib/sprockets/autoload/yui.rb +7 -0
- data/lib/sprockets/autoload.rb +11 -0
- data/lib/sprockets/base.rb +49 -257
- data/lib/sprockets/bower.rb +58 -0
- data/lib/sprockets/bundle.rb +65 -0
- data/lib/sprockets/cache/file_store.rb +165 -14
- data/lib/sprockets/cache/memory_store.rb +66 -0
- data/lib/sprockets/cache/null_store.rb +46 -0
- data/lib/sprockets/cache.rb +234 -0
- data/lib/sprockets/cached_environment.rb +69 -0
- data/lib/sprockets/closure_compressor.rb +53 -0
- data/lib/sprockets/coffee_script_processor.rb +25 -0
- data/lib/sprockets/coffee_script_template.rb +6 -0
- data/lib/sprockets/compressing.rb +74 -0
- data/lib/sprockets/configuration.rb +83 -0
- data/lib/sprockets/context.rb +125 -131
- data/lib/sprockets/dependencies.rb +73 -0
- data/lib/sprockets/digest_utils.rb +156 -0
- data/lib/sprockets/directive_processor.rb +209 -211
- data/lib/sprockets/eco_processor.rb +32 -0
- data/lib/sprockets/eco_template.rb +3 -35
- data/lib/sprockets/ejs_processor.rb +31 -0
- data/lib/sprockets/ejs_template.rb +3 -34
- data/lib/sprockets/encoding_utils.rb +258 -0
- data/lib/sprockets/engines.rb +45 -38
- data/lib/sprockets/environment.rb +17 -67
- data/lib/sprockets/erb_processor.rb +30 -0
- data/lib/sprockets/erb_template.rb +6 -0
- data/lib/sprockets/errors.rb +6 -13
- data/lib/sprockets/file_reader.rb +15 -0
- data/lib/sprockets/http_utils.rb +115 -0
- data/lib/sprockets/jst_processor.rb +35 -19
- data/lib/sprockets/legacy.rb +314 -0
- data/lib/sprockets/legacy_proc_processor.rb +35 -0
- data/lib/sprockets/legacy_tilt_processor.rb +29 -0
- data/lib/sprockets/loader.rb +176 -0
- data/lib/sprockets/manifest.rb +179 -98
- data/lib/sprockets/manifest_utils.rb +45 -0
- data/lib/sprockets/mime.rb +114 -32
- data/lib/sprockets/path_dependency_utils.rb +85 -0
- data/lib/sprockets/path_digest_utils.rb +47 -0
- data/lib/sprockets/path_utils.rb +282 -0
- data/lib/sprockets/paths.rb +81 -0
- data/lib/sprockets/processing.rb +157 -189
- data/lib/sprockets/processor_utils.rb +103 -0
- data/lib/sprockets/resolve.rb +208 -0
- data/lib/sprockets/sass_cache_store.rb +19 -15
- data/lib/sprockets/sass_compressor.rb +59 -0
- data/lib/sprockets/sass_functions.rb +2 -0
- data/lib/sprockets/sass_importer.rb +2 -29
- data/lib/sprockets/sass_processor.rb +285 -0
- data/lib/sprockets/sass_template.rb +4 -44
- data/lib/sprockets/server.rb +109 -84
- data/lib/sprockets/transformers.rb +145 -0
- data/lib/sprockets/uglifier_compressor.rb +63 -0
- data/lib/sprockets/uri_utils.rb +190 -0
- data/lib/sprockets/utils.rb +193 -44
- data/lib/sprockets/version.rb +1 -1
- data/lib/sprockets/yui_compressor.rb +65 -0
- data/lib/sprockets.rb +144 -53
- metadata +248 -238
- data/lib/sprockets/asset_attributes.rb +0 -126
- data/lib/sprockets/bundled_asset.rb +0 -79
- data/lib/sprockets/caching.rb +0 -96
- data/lib/sprockets/charset_normalizer.rb +0 -41
- data/lib/sprockets/index.rb +0 -99
- data/lib/sprockets/processed_asset.rb +0 -152
- data/lib/sprockets/processor.rb +0 -32
- data/lib/sprockets/safety_colons.rb +0 -28
- data/lib/sprockets/scss_template.rb +0 -13
- data/lib/sprockets/static_asset.rb +0 -57
- data/lib/sprockets/trail.rb +0 -90
metadata
CHANGED
@@ -1,305 +1,315 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 3
|
9
|
-
- 2
|
10
|
-
version: 2.3.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Sam Stephenson
|
14
8
|
- Joshua Peek
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
23
|
-
name: hike
|
24
|
-
prerelease: false
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 11
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 2
|
34
|
-
version: "1.2"
|
35
|
-
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: multi_json
|
39
|
-
prerelease: false
|
40
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 15
|
46
|
-
segments:
|
47
|
-
- 1
|
48
|
-
- 0
|
49
|
-
version: "1.0"
|
50
|
-
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2015-04-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
53
15
|
name: rack
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 15
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 0
|
64
|
-
version: "1.0"
|
65
|
-
type: :runtime
|
66
|
-
version_requirements: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: tilt
|
69
|
-
prerelease: false
|
70
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
|
-
requirements:
|
73
|
-
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
hash: 13
|
76
|
-
segments:
|
77
|
-
- 1
|
78
|
-
- 1
|
79
|
-
version: "1.1"
|
80
|
-
- - "!="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
hash: 27
|
83
|
-
segments:
|
84
|
-
- 1
|
85
|
-
- 3
|
86
|
-
- 0
|
87
|
-
version: 1.3.0
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.0'
|
88
21
|
type: :runtime
|
89
|
-
version_requirements: *id004
|
90
|
-
- !ruby/object:Gem::Dependency
|
91
|
-
name: coffee-script
|
92
22
|
prerelease: false
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: closure-compiler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.1'
|
103
35
|
type: :development
|
104
|
-
|
105
|
-
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.1'
|
42
|
+
- !ruby/object:Gem::Dependency
|
106
43
|
name: coffee-script-source
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.6'
|
49
|
+
type: :development
|
107
50
|
prerelease: false
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.6'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: coffee-script
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.2'
|
119
63
|
type: :development
|
120
|
-
version_requirements: *id006
|
121
|
-
- !ruby/object:Gem::Dependency
|
122
|
-
name: eco
|
123
64
|
prerelease: false
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.2'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: eco
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.0'
|
134
77
|
type: :development
|
135
|
-
version_requirements: *id007
|
136
|
-
- !ruby/object:Gem::Dependency
|
137
|
-
name: ejs
|
138
78
|
prerelease: false
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: ejs
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.0'
|
149
91
|
type: :development
|
150
|
-
|
151
|
-
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '1.0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
152
99
|
name: execjs
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '2.0'
|
105
|
+
type: :development
|
153
106
|
prerelease: false
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '2.0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: minitest
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '5.0'
|
164
119
|
type: :development
|
165
|
-
version_requirements: *id009
|
166
|
-
- !ruby/object:Gem::Dependency
|
167
|
-
name: json
|
168
120
|
prerelease: false
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '5.0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: nokogiri
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '1.3'
|
178
133
|
type: :development
|
179
|
-
version_requirements: *id010
|
180
|
-
- !ruby/object:Gem::Dependency
|
181
|
-
name: rack-test
|
182
134
|
prerelease: false
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '1.3'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rack-test
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0.6'
|
192
147
|
type: :development
|
193
|
-
version_requirements: *id011
|
194
|
-
- !ruby/object:Gem::Dependency
|
195
|
-
name: rake
|
196
148
|
prerelease: false
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0.6'
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: rake
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - "~>"
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '10.0'
|
206
161
|
type: :development
|
207
|
-
|
208
|
-
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '10.0'
|
168
|
+
- !ruby/object:Gem::Dependency
|
209
169
|
name: sass
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - "~>"
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '3.1'
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - "~>"
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '3.1'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: uglifier
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - "~>"
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '2.3'
|
189
|
+
type: :development
|
210
190
|
prerelease: false
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - "~>"
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '2.3'
|
196
|
+
- !ruby/object:Gem::Dependency
|
197
|
+
name: yui-compressor
|
198
|
+
requirement: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - "~>"
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0.12'
|
221
203
|
type: :development
|
222
|
-
|
223
|
-
|
224
|
-
|
204
|
+
prerelease: false
|
205
|
+
version_requirements: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - "~>"
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0.12'
|
210
|
+
description: Sprockets is a Rack-based asset packaging system that concatenates and
|
211
|
+
serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.
|
212
|
+
email:
|
225
213
|
- sstephenson@gmail.com
|
226
214
|
- josh@joshpeek.com
|
227
|
-
executables:
|
215
|
+
executables:
|
228
216
|
- sprockets
|
229
217
|
extensions: []
|
230
|
-
|
231
218
|
extra_rdoc_files: []
|
232
|
-
|
233
|
-
files:
|
234
|
-
- README.md
|
219
|
+
files:
|
235
220
|
- LICENSE
|
221
|
+
- README.md
|
222
|
+
- bin/sprockets
|
236
223
|
- lib/rake/sprocketstask.rb
|
224
|
+
- lib/sprockets.rb
|
237
225
|
- lib/sprockets/asset.rb
|
238
|
-
- lib/sprockets/
|
226
|
+
- lib/sprockets/autoload.rb
|
227
|
+
- lib/sprockets/autoload/closure.rb
|
228
|
+
- lib/sprockets/autoload/coffee_script.rb
|
229
|
+
- lib/sprockets/autoload/eco.rb
|
230
|
+
- lib/sprockets/autoload/ejs.rb
|
231
|
+
- lib/sprockets/autoload/sass.rb
|
232
|
+
- lib/sprockets/autoload/uglifier.rb
|
233
|
+
- lib/sprockets/autoload/yui.rb
|
239
234
|
- lib/sprockets/base.rb
|
240
|
-
- lib/sprockets/
|
235
|
+
- lib/sprockets/bower.rb
|
236
|
+
- lib/sprockets/bundle.rb
|
237
|
+
- lib/sprockets/cache.rb
|
241
238
|
- lib/sprockets/cache/file_store.rb
|
242
|
-
- lib/sprockets/
|
243
|
-
- lib/sprockets/
|
239
|
+
- lib/sprockets/cache/memory_store.rb
|
240
|
+
- lib/sprockets/cache/null_store.rb
|
241
|
+
- lib/sprockets/cached_environment.rb
|
242
|
+
- lib/sprockets/closure_compressor.rb
|
243
|
+
- lib/sprockets/coffee_script_processor.rb
|
244
|
+
- lib/sprockets/coffee_script_template.rb
|
245
|
+
- lib/sprockets/compressing.rb
|
246
|
+
- lib/sprockets/configuration.rb
|
244
247
|
- lib/sprockets/context.rb
|
248
|
+
- lib/sprockets/dependencies.rb
|
249
|
+
- lib/sprockets/digest_utils.rb
|
245
250
|
- lib/sprockets/directive_processor.rb
|
251
|
+
- lib/sprockets/eco_processor.rb
|
246
252
|
- lib/sprockets/eco_template.rb
|
253
|
+
- lib/sprockets/ejs_processor.rb
|
247
254
|
- lib/sprockets/ejs_template.rb
|
255
|
+
- lib/sprockets/encoding_utils.rb
|
248
256
|
- lib/sprockets/engines.rb
|
249
257
|
- lib/sprockets/environment.rb
|
258
|
+
- lib/sprockets/erb_processor.rb
|
259
|
+
- lib/sprockets/erb_template.rb
|
250
260
|
- lib/sprockets/errors.rb
|
251
|
-
- lib/sprockets/
|
261
|
+
- lib/sprockets/file_reader.rb
|
262
|
+
- lib/sprockets/http_utils.rb
|
252
263
|
- lib/sprockets/jst_processor.rb
|
264
|
+
- lib/sprockets/legacy.rb
|
265
|
+
- lib/sprockets/legacy_proc_processor.rb
|
266
|
+
- lib/sprockets/legacy_tilt_processor.rb
|
267
|
+
- lib/sprockets/loader.rb
|
253
268
|
- lib/sprockets/manifest.rb
|
269
|
+
- lib/sprockets/manifest_utils.rb
|
254
270
|
- lib/sprockets/mime.rb
|
255
|
-
- lib/sprockets/
|
271
|
+
- lib/sprockets/path_dependency_utils.rb
|
272
|
+
- lib/sprockets/path_digest_utils.rb
|
273
|
+
- lib/sprockets/path_utils.rb
|
274
|
+
- lib/sprockets/paths.rb
|
256
275
|
- lib/sprockets/processing.rb
|
257
|
-
- lib/sprockets/
|
258
|
-
- lib/sprockets/
|
276
|
+
- lib/sprockets/processor_utils.rb
|
277
|
+
- lib/sprockets/resolve.rb
|
259
278
|
- lib/sprockets/sass_cache_store.rb
|
279
|
+
- lib/sprockets/sass_compressor.rb
|
280
|
+
- lib/sprockets/sass_functions.rb
|
260
281
|
- lib/sprockets/sass_importer.rb
|
282
|
+
- lib/sprockets/sass_processor.rb
|
261
283
|
- lib/sprockets/sass_template.rb
|
262
|
-
- lib/sprockets/scss_template.rb
|
263
284
|
- lib/sprockets/server.rb
|
264
|
-
- lib/sprockets/
|
265
|
-
- lib/sprockets/
|
285
|
+
- lib/sprockets/transformers.rb
|
286
|
+
- lib/sprockets/uglifier_compressor.rb
|
287
|
+
- lib/sprockets/uri_utils.rb
|
266
288
|
- lib/sprockets/utils.rb
|
267
289
|
- lib/sprockets/version.rb
|
268
|
-
- lib/sprockets.rb
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
290
|
+
- lib/sprockets/yui_compressor.rb
|
291
|
+
homepage: https://github.com/rails/sprockets
|
292
|
+
licenses:
|
293
|
+
- MIT
|
294
|
+
metadata: {}
|
274
295
|
post_install_message:
|
275
296
|
rdoc_options: []
|
276
|
-
|
277
|
-
require_paths:
|
297
|
+
require_paths:
|
278
298
|
- lib
|
279
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
-
|
281
|
-
requirements:
|
299
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
300
|
+
requirements:
|
282
301
|
- - ">="
|
283
|
-
- !ruby/object:Gem::Version
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
version: "0"
|
288
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
|
-
none: false
|
290
|
-
requirements:
|
302
|
+
- !ruby/object:Gem::Version
|
303
|
+
version: 1.9.3
|
304
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
305
|
+
requirements:
|
291
306
|
- - ">="
|
292
|
-
- !ruby/object:Gem::Version
|
293
|
-
|
294
|
-
segments:
|
295
|
-
- 0
|
296
|
-
version: "0"
|
307
|
+
- !ruby/object:Gem::Version
|
308
|
+
version: '0'
|
297
309
|
requirements: []
|
298
|
-
|
299
310
|
rubyforge_project: sprockets
|
300
|
-
rubygems_version:
|
311
|
+
rubygems_version: 2.4.5
|
301
312
|
signing_key:
|
302
|
-
specification_version:
|
313
|
+
specification_version: 4
|
303
314
|
summary: Rack-based asset packaging system
|
304
315
|
test_files: []
|
305
|
-
|
@@ -1,126 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
|
3
|
-
module Sprockets
|
4
|
-
# `AssetAttributes` is a wrapper similar to `Pathname` that provides
|
5
|
-
# some helper accessors.
|
6
|
-
#
|
7
|
-
# These methods should be considered internalish.
|
8
|
-
class AssetAttributes
|
9
|
-
attr_reader :environment, :pathname
|
10
|
-
|
11
|
-
def initialize(environment, path)
|
12
|
-
@environment = environment
|
13
|
-
@pathname = path.is_a?(Pathname) ? path : Pathname.new(path.to_s)
|
14
|
-
end
|
15
|
-
|
16
|
-
# Returns paths search the load path for.
|
17
|
-
def search_paths
|
18
|
-
paths = [pathname.to_s]
|
19
|
-
|
20
|
-
if pathname.basename(extensions.join).to_s != 'index'
|
21
|
-
path_without_extensions = extensions.inject(pathname) { |p, ext| p.sub(ext, '') }
|
22
|
-
index_path = path_without_extensions.join("index#{extensions.join}").to_s
|
23
|
-
paths << index_path
|
24
|
-
end
|
25
|
-
|
26
|
-
paths
|
27
|
-
end
|
28
|
-
|
29
|
-
# Reverse guess logical path for fully expanded path.
|
30
|
-
#
|
31
|
-
# This has some known issues. For an example if a file is
|
32
|
-
# shaddowed in the path, but is required relatively, its logical
|
33
|
-
# path will be incorrect.
|
34
|
-
def logical_path
|
35
|
-
if root_path = environment.paths.detect { |path| pathname.to_s[path] }
|
36
|
-
path = pathname.to_s.sub("#{root_path}/", '')
|
37
|
-
path = pathname.relative_path_from(Pathname.new(root_path)).to_s
|
38
|
-
path = engine_extensions.inject(path) { |p, ext| p.sub(ext, '') }
|
39
|
-
path = "#{path}#{engine_format_extension}" unless format_extension
|
40
|
-
path
|
41
|
-
else
|
42
|
-
raise FileOutsidePaths, "#{pathname} isn't in paths: #{environment.paths.join(', ')}"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# Returns `Array` of extension `String`s.
|
47
|
-
#
|
48
|
-
# "foo.js.coffee"
|
49
|
-
# # => [".js", ".coffee"]
|
50
|
-
#
|
51
|
-
def extensions
|
52
|
-
@extensions ||= @pathname.basename.to_s.scan(/\.[^.]+/)
|
53
|
-
end
|
54
|
-
|
55
|
-
# Returns the format extension.
|
56
|
-
#
|
57
|
-
# "foo.js.coffee"
|
58
|
-
# # => ".js"
|
59
|
-
#
|
60
|
-
def format_extension
|
61
|
-
extensions.reverse.detect { |ext|
|
62
|
-
@environment.mime_types(ext) && !@environment.engines(ext)
|
63
|
-
}
|
64
|
-
end
|
65
|
-
|
66
|
-
# Returns an `Array` of engine extensions.
|
67
|
-
#
|
68
|
-
# "foo.js.coffee.erb"
|
69
|
-
# # => [".coffee", ".erb"]
|
70
|
-
#
|
71
|
-
def engine_extensions
|
72
|
-
exts = extensions
|
73
|
-
|
74
|
-
if offset = extensions.index(format_extension)
|
75
|
-
exts = extensions[offset+1..-1]
|
76
|
-
end
|
77
|
-
|
78
|
-
exts.select { |ext| @environment.engines(ext) }
|
79
|
-
end
|
80
|
-
|
81
|
-
# Returns engine classes.
|
82
|
-
def engines
|
83
|
-
engine_extensions.map { |ext| @environment.engines(ext) }
|
84
|
-
end
|
85
|
-
|
86
|
-
# Returns all processors to run on the path.
|
87
|
-
def processors
|
88
|
-
environment.preprocessors(content_type) +
|
89
|
-
engines.reverse +
|
90
|
-
environment.postprocessors(content_type)
|
91
|
-
end
|
92
|
-
|
93
|
-
# Returns the content type for the pathname. Falls back to `application/octet-stream`.
|
94
|
-
def content_type
|
95
|
-
@content_type ||= begin
|
96
|
-
if format_extension.nil?
|
97
|
-
engine_content_type || 'application/octet-stream'
|
98
|
-
else
|
99
|
-
@environment.mime_types(format_extension) ||
|
100
|
-
engine_content_type ||
|
101
|
-
'application/octet-stream'
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
private
|
107
|
-
# Returns implicit engine content type.
|
108
|
-
#
|
109
|
-
# `.coffee` files carry an implicit `application/javascript`
|
110
|
-
# content type.
|
111
|
-
def engine_content_type
|
112
|
-
engines.reverse.each do |engine|
|
113
|
-
if engine.respond_to?(:default_mime_type) && engine.default_mime_type
|
114
|
-
return engine.default_mime_type
|
115
|
-
end
|
116
|
-
end
|
117
|
-
nil
|
118
|
-
end
|
119
|
-
|
120
|
-
def engine_format_extension
|
121
|
-
if content_type = engine_content_type
|
122
|
-
environment.extension_for_mime_type(content_type)
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|