middleman 0.14.1 → 0.99.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/Rakefile +14 -18
  2. data/VERSION +1 -1
  3. data/features/automatic_image_sizes.feature +7 -7
  4. data/features/cache_buster.feature +10 -10
  5. data/features/minify_css.feature +10 -10
  6. data/features/minify_javascript.feature +6 -6
  7. data/features/step_definitions/asset_host_steps.rb +1 -0
  8. data/features/step_definitions/middleman_steps.rb +1 -1
  9. data/lib/middleman.rb +1 -18
  10. data/lib/middleman/assets.rb +33 -0
  11. data/lib/middleman/base.rb +25 -66
  12. data/lib/middleman/builder.rb +8 -4
  13. data/lib/middleman/features.rb +39 -0
  14. data/lib/middleman/features/asset_host.rb +16 -19
  15. data/lib/middleman/features/automatic_image_sizes.rb +24 -24
  16. data/lib/middleman/{fastimage.rb → features/automatic_image_sizes/fastimage.rb} +0 -0
  17. data/lib/middleman/features/cache_buster.rb +31 -38
  18. data/lib/middleman/{helpers.rb → features/default_helpers.rb} +8 -11
  19. data/lib/middleman/features/livereload.rb +19 -0
  20. data/lib/middleman/features/minify_css.rb +9 -0
  21. data/lib/middleman/features/minify_javascript.rb +15 -17
  22. data/lib/middleman/features/minify_javascript/rack.rb +31 -0
  23. data/lib/middleman/features/relative_assets.rb +29 -40
  24. data/lib/middleman/features/slickmap.rb +69 -70
  25. data/lib/middleman/features/smush_pngs.rb +8 -6
  26. data/lib/middleman/features/ugly_haml.rb +7 -0
  27. data/lib/middleman/renderers.rb +26 -0
  28. data/lib/middleman/renderers/coffee.rb +28 -0
  29. data/lib/middleman/renderers/haml.rb +2 -25
  30. data/lib/middleman/renderers/sass.rb +40 -87
  31. data/lib/middleman/template/init.rbt +30 -7
  32. data/middleman.gemspec +58 -69
  33. data/spec/builder_spec.rb +10 -4
  34. data/spec/fixtures/sample/views/stylesheets/site_scss.css.scss +1 -0
  35. data/spec/fixtures/sample/views/stylesheets/test_less.css.less +5 -0
  36. metadata +125 -113
  37. data/lib/middleman/rack/minify_css.rb +0 -25
  38. data/lib/middleman/rack/minify_javascript.rb +0 -25
  39. data/lib/middleman/rack/sprockets.rb +0 -61
  40. data/lib/middleman/renderers/builder.rb +0 -23
  41. data/lib/middleman/renderers/erb.rb +0 -24
  42. data/lib/middleman/renderers/less.rb +0 -23
  43. data/spec/fixtures/sample/public/javascripts/to-be-included.js +0 -1
  44. data/spec/fixtures/sample/views/javascripts/empty-with-include.js +0 -1
data/spec/builder_spec.rb CHANGED
@@ -42,6 +42,16 @@ describe "Builder" do
42
42
  File.read("#{@root_dir}/build/stylesheets/site.css").gsub(/\s/, "").should include("html,body,div,span,applet,object,iframe")
43
43
  end
44
44
 
45
+ it "should build less files" do
46
+ File.exists?("#{@root_dir}/build/stylesheets/test_less.css").should be_true
47
+ File.read("#{@root_dir}/build/stylesheets/test_less.css").should include("666")
48
+ end
49
+
50
+ it "should build scss files" do
51
+ File.exists?("#{@root_dir}/build/stylesheets/site_scss.css").should be_true
52
+ File.read("#{@root_dir}/build/stylesheets/site_scss.css").gsub(/\s/, "").should include("html,body,div,span,applet,object,iframe")
53
+ end
54
+
45
55
  it "should build static css files" do
46
56
  File.exists?("#{@root_dir}/build/stylesheets/static.css").should be_true
47
57
  end
@@ -49,8 +59,4 @@ describe "Builder" do
49
59
  it "should not build partial files" do
50
60
  File.exists?("#{@root_dir}/build/_partial.html").should be_false
51
61
  end
52
-
53
- it "should combine javascript" do
54
- File.read("#{@root_dir}/build/javascripts/empty-with-include.js").should include("combo")
55
- end
56
62
  end
@@ -0,0 +1 @@
1
+ @import "compass/reset";
@@ -0,0 +1,5 @@
1
+ @brand_color: #666666;
2
+
3
+ #header {
4
+ color: @brand_color;
5
+ }
metadata CHANGED
@@ -1,12 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 961916764
5
+ prerelease: true
5
6
  segments:
6
7
  - 0
7
- - 14
8
- - 1
9
- version: 0.14.1
8
+ - 99
9
+ - 0
10
+ - pre
11
+ version: 0.99.0.pre
10
12
  platform: ruby
11
13
  authors:
12
14
  - Thomas Reynolds
@@ -14,253 +16,256 @@ autorequire:
14
16
  bindir: bin
15
17
  cert_chain: []
16
18
 
17
- date: 2010-08-06 00:00:00 -07:00
19
+ date: 2010-09-05 00:00:00 -07:00
18
20
  default_executable:
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: rack
22
24
  prerelease: false
23
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - ">="
28
+ - - ~>
26
29
  - !ruby/object:Gem::Version
30
+ hash: 15
27
31
  segments:
32
+ - 1
28
33
  - 0
29
- version: "0"
34
+ version: "1.0"
30
35
  type: :runtime
31
36
  version_requirements: *id001
32
37
  - !ruby/object:Gem::Dependency
33
38
  name: thin
34
39
  prerelease: false
35
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
36
42
  requirements:
37
- - - ">="
43
+ - - ~>
38
44
  - !ruby/object:Gem::Version
45
+ hash: 31
39
46
  segments:
47
+ - 1
48
+ - 2
40
49
  - 0
41
- version: "0"
50
+ version: 1.2.0
42
51
  type: :runtime
43
52
  version_requirements: *id002
44
53
  - !ruby/object:Gem::Dependency
45
54
  name: shotgun
46
55
  prerelease: false
47
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
48
58
  requirements:
49
- - - ">="
59
+ - - ~>
50
60
  - !ruby/object:Gem::Version
61
+ hash: 63
51
62
  segments:
52
63
  - 0
53
64
  - 8
54
- version: "0.8"
65
+ - 0
66
+ version: 0.8.0
55
67
  type: :runtime
56
68
  version_requirements: *id003
57
69
  - !ruby/object:Gem::Dependency
58
70
  name: templater
59
71
  prerelease: false
60
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
61
74
  requirements:
62
- - - ">="
75
+ - - ~>
63
76
  - !ruby/object:Gem::Version
77
+ hash: 23
64
78
  segments:
79
+ - 1
65
80
  - 0
66
- version: "0"
81
+ - 0
82
+ version: 1.0.0
67
83
  type: :runtime
68
84
  version_requirements: *id004
69
85
  - !ruby/object:Gem::Dependency
70
- name: sprockets
86
+ name: sinatra
71
87
  prerelease: false
72
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
73
90
  requirements:
74
- - - ">="
91
+ - - ~>
75
92
  - !ruby/object:Gem::Version
93
+ hash: 15
76
94
  segments:
95
+ - 1
77
96
  - 0
78
- version: "0"
97
+ version: "1.0"
79
98
  type: :runtime
80
99
  version_requirements: *id005
81
100
  - !ruby/object:Gem::Dependency
82
- name: sinatra
101
+ name: sinatra-content-for
83
102
  prerelease: false
84
103
  requirement: &id006 !ruby/object:Gem::Requirement
104
+ none: false
85
105
  requirements:
86
- - - ">="
106
+ - - ~>
87
107
  - !ruby/object:Gem::Version
108
+ hash: 23
88
109
  segments:
89
- - 1
90
110
  - 0
91
- version: "1.0"
111
+ - 2
112
+ - 0
113
+ version: 0.2.0
92
114
  type: :runtime
93
115
  version_requirements: *id006
94
116
  - !ruby/object:Gem::Dependency
95
- name: sinatra-content-for
117
+ name: rack-test
96
118
  prerelease: false
97
119
  requirement: &id007 !ruby/object:Gem::Requirement
120
+ none: false
98
121
  requirements:
99
- - - ">="
122
+ - - ~>
100
123
  - !ruby/object:Gem::Version
124
+ hash: 11
101
125
  segments:
102
126
  - 0
103
- version: "0"
127
+ - 5
128
+ - 0
129
+ version: 0.5.0
104
130
  type: :runtime
105
131
  version_requirements: *id007
106
132
  - !ruby/object:Gem::Dependency
107
- name: less
133
+ name: yui-compressor
108
134
  prerelease: false
109
135
  requirement: &id008 !ruby/object:Gem::Requirement
136
+ none: false
110
137
  requirements:
111
- - - ">="
138
+ - - ~>
112
139
  - !ruby/object:Gem::Version
140
+ hash: 59
113
141
  segments:
114
142
  - 0
115
- version: "0"
143
+ - 9
144
+ - 0
145
+ version: 0.9.0
116
146
  type: :runtime
117
147
  version_requirements: *id008
118
148
  - !ruby/object:Gem::Dependency
119
- name: builder
149
+ name: haml
120
150
  prerelease: false
121
151
  requirement: &id009 !ruby/object:Gem::Requirement
152
+ none: false
122
153
  requirements:
123
- - - ">="
154
+ - - ~>
124
155
  - !ruby/object:Gem::Version
156
+ hash: 7
125
157
  segments:
158
+ - 3
126
159
  - 0
127
- version: "0"
160
+ version: "3.0"
128
161
  type: :runtime
129
162
  version_requirements: *id009
130
163
  - !ruby/object:Gem::Dependency
131
- name: rack-test
164
+ name: compass
132
165
  prerelease: false
133
166
  requirement: &id010 !ruby/object:Gem::Requirement
167
+ none: false
134
168
  requirements:
135
- - - ">="
169
+ - - ~>
136
170
  - !ruby/object:Gem::Version
171
+ hash: 55
137
172
  segments:
138
173
  - 0
139
- version: "0"
174
+ - 10
175
+ - 0
176
+ version: 0.10.0
140
177
  type: :runtime
141
178
  version_requirements: *id010
142
179
  - !ruby/object:Gem::Dependency
143
- name: yui-compressor
180
+ name: json_pure
144
181
  prerelease: false
145
182
  requirement: &id011 !ruby/object:Gem::Requirement
183
+ none: false
146
184
  requirements:
147
- - - ">="
185
+ - - ~>
148
186
  - !ruby/object:Gem::Version
187
+ hash: 7
149
188
  segments:
189
+ - 1
190
+ - 4
150
191
  - 0
151
- version: "0"
192
+ version: 1.4.0
152
193
  type: :runtime
153
194
  version_requirements: *id011
154
195
  - !ruby/object:Gem::Dependency
155
- name: haml
196
+ name: smusher
156
197
  prerelease: false
157
198
  requirement: &id012 !ruby/object:Gem::Requirement
199
+ none: false
158
200
  requirements:
159
- - - ">="
201
+ - - ~>
160
202
  - !ruby/object:Gem::Version
203
+ hash: 5
161
204
  segments:
162
- - 3
163
205
  - 0
164
- version: "3.0"
206
+ - 4
207
+ - 5
208
+ version: 0.4.5
165
209
  type: :runtime
166
210
  version_requirements: *id012
167
211
  - !ruby/object:Gem::Dependency
168
- name: compass
212
+ name: compass-slickmap
169
213
  prerelease: false
170
214
  requirement: &id013 !ruby/object:Gem::Requirement
215
+ none: false
171
216
  requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- segments:
175
- - 0
176
- - 10
177
- version: "0.10"
178
- type: :runtime
179
- version_requirements: *id013
180
- - !ruby/object:Gem::Dependency
181
- name: fancy-buttons
182
- prerelease: false
183
- requirement: &id014 !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- segments:
188
- - 0
189
- version: "0"
190
- type: :runtime
191
- version_requirements: *id014
192
- - !ruby/object:Gem::Dependency
193
- name: json_pure
194
- prerelease: false
195
- requirement: &id015 !ruby/object:Gem::Requirement
196
- requirements:
197
- - - ">="
198
- - !ruby/object:Gem::Version
199
- segments:
200
- - 0
201
- version: "0"
202
- type: :runtime
203
- version_requirements: *id015
204
- - !ruby/object:Gem::Dependency
205
- name: smusher
206
- prerelease: false
207
- requirement: &id016 !ruby/object:Gem::Requirement
208
- requirements:
209
- - - ">="
217
+ - - ~>
210
218
  - !ruby/object:Gem::Version
219
+ hash: 19
211
220
  segments:
212
221
  - 0
213
- version: "0"
214
- type: :runtime
215
- version_requirements: *id016
216
- - !ruby/object:Gem::Dependency
217
- name: compass-slickmap
218
- prerelease: false
219
- requirement: &id017 !ruby/object:Gem::Requirement
220
- requirements:
221
- - - ">="
222
- - !ruby/object:Gem::Version
223
- segments:
222
+ - 3
224
223
  - 0
225
- version: "0"
224
+ version: 0.3.0
226
225
  type: :runtime
227
- version_requirements: *id017
226
+ version_requirements: *id013
228
227
  - !ruby/object:Gem::Dependency
229
228
  name: rspec
230
229
  prerelease: false
231
- requirement: &id018 !ruby/object:Gem::Requirement
230
+ requirement: &id014 !ruby/object:Gem::Requirement
231
+ none: false
232
232
  requirements:
233
233
  - - ">="
234
234
  - !ruby/object:Gem::Version
235
+ hash: 3
235
236
  segments:
236
237
  - 0
237
238
  version: "0"
238
239
  type: :development
239
- version_requirements: *id018
240
+ version_requirements: *id014
240
241
  - !ruby/object:Gem::Dependency
241
242
  name: cucumber
242
243
  prerelease: false
243
- requirement: &id019 !ruby/object:Gem::Requirement
244
+ requirement: &id015 !ruby/object:Gem::Requirement
245
+ none: false
244
246
  requirements:
245
247
  - - ">="
246
248
  - !ruby/object:Gem::Version
249
+ hash: 3
247
250
  segments:
248
251
  - 0
249
252
  version: "0"
250
253
  type: :development
251
- version_requirements: *id019
254
+ version_requirements: *id015
252
255
  - !ruby/object:Gem::Dependency
253
256
  name: jeweler
254
257
  prerelease: false
255
- requirement: &id020 !ruby/object:Gem::Requirement
258
+ requirement: &id016 !ruby/object:Gem::Requirement
259
+ none: false
256
260
  requirements:
257
261
  - - ">="
258
262
  - !ruby/object:Gem::Version
263
+ hash: 3
259
264
  segments:
260
265
  - 0
261
266
  version: "0"
262
267
  type: :development
263
- version_requirements: *id020
268
+ version_requirements: *id016
264
269
  description:
265
270
  email: tdreyno@gmail.com
266
271
  executables:
@@ -296,26 +301,27 @@ files:
296
301
  - features/step_definitions/middleman_steps.rb
297
302
  - features/step_definitions/page_layout_steps.rb
298
303
  - lib/middleman.rb
304
+ - lib/middleman/assets.rb
299
305
  - lib/middleman/base.rb
300
306
  - lib/middleman/builder.rb
301
307
  - lib/middleman/config.ru
302
- - lib/middleman/fastimage.rb
308
+ - lib/middleman/features.rb
303
309
  - lib/middleman/features/asset_host.rb
304
310
  - lib/middleman/features/automatic_image_sizes.rb
311
+ - lib/middleman/features/automatic_image_sizes/fastimage.rb
305
312
  - lib/middleman/features/cache_buster.rb
313
+ - lib/middleman/features/default_helpers.rb
314
+ - lib/middleman/features/livereload.rb
306
315
  - lib/middleman/features/minify_css.rb
307
316
  - lib/middleman/features/minify_javascript.rb
317
+ - lib/middleman/features/minify_javascript/rack.rb
308
318
  - lib/middleman/features/relative_assets.rb
309
319
  - lib/middleman/features/slickmap.rb
310
320
  - lib/middleman/features/smush_pngs.rb
311
- - lib/middleman/helpers.rb
312
- - lib/middleman/rack/minify_css.rb
313
- - lib/middleman/rack/minify_javascript.rb
314
- - lib/middleman/rack/sprockets.rb
315
- - lib/middleman/renderers/builder.rb
316
- - lib/middleman/renderers/erb.rb
321
+ - lib/middleman/features/ugly_haml.rb
322
+ - lib/middleman/renderers.rb
323
+ - lib/middleman/renderers/coffee.rb
317
324
  - lib/middleman/renderers/haml.rb
318
- - lib/middleman/renderers/less.rb
319
325
  - lib/middleman/renderers/sass.rb
320
326
  - lib/middleman/template/init.rbt
321
327
  - lib/middleman/template/views/index.html.haml
@@ -326,7 +332,6 @@ files:
326
332
  - spec/builder_spec.rb
327
333
  - spec/fixtures/sample/init.rb
328
334
  - spec/fixtures/sample/public/images/blank.gif
329
- - spec/fixtures/sample/public/javascripts/to-be-included.js
330
335
  - spec/fixtures/sample/public/static.html
331
336
  - spec/fixtures/sample/public/stylesheets/auto-css.css
332
337
  - spec/fixtures/sample/public/stylesheets/static.css
@@ -342,7 +347,6 @@ files:
342
347
  - spec/fixtures/sample/views/index.html.haml
343
348
  - spec/fixtures/sample/views/inline-css.html.haml
344
349
  - spec/fixtures/sample/views/inline-js.html.haml
345
- - spec/fixtures/sample/views/javascripts/empty-with-include.js
346
350
  - spec/fixtures/sample/views/layout.haml
347
351
  - spec/fixtures/sample/views/maruku.html.maruku
348
352
  - spec/fixtures/sample/views/page-classes.html.haml
@@ -350,6 +354,8 @@ files:
350
354
  - spec/fixtures/sample/views/stylesheets/asset_host.css.sass
351
355
  - spec/fixtures/sample/views/stylesheets/relative_assets.css.sass
352
356
  - spec/fixtures/sample/views/stylesheets/site.css.sass
357
+ - spec/fixtures/sample/views/stylesheets/site_scss.css.scss
358
+ - spec/fixtures/sample/views/stylesheets/test_less.css.less
353
359
  - spec/helpers_spec.rb
354
360
  - spec/spec_helper.rb
355
361
  has_rdoc: true
@@ -362,28 +368,34 @@ rdoc_options:
362
368
  require_paths:
363
369
  - lib
364
370
  required_ruby_version: !ruby/object:Gem::Requirement
371
+ none: false
365
372
  requirements:
366
373
  - - ">="
367
374
  - !ruby/object:Gem::Version
375
+ hash: 3
368
376
  segments:
369
377
  - 0
370
378
  version: "0"
371
379
  required_rubygems_version: !ruby/object:Gem::Requirement
380
+ none: false
372
381
  requirements:
373
- - - ">="
382
+ - - ">"
374
383
  - !ruby/object:Gem::Version
384
+ hash: 25
375
385
  segments:
376
- - 0
377
- version: "0"
386
+ - 1
387
+ - 3
388
+ - 1
389
+ version: 1.3.1
378
390
  requirements: []
379
391
 
380
392
  rubyforge_project: middleman
381
- rubygems_version: 1.3.6
393
+ rubygems_version: 1.3.7
382
394
  signing_key:
383
395
  specification_version: 3
384
396
  summary: A static site generator utilizing Haml, Sass and providing YUI compression and cache busting
385
397
  test_files:
386
- - spec/spec_helper.rb
387
398
  - spec/builder_spec.rb
388
- - spec/helpers_spec.rb
389
399
  - spec/fixtures/sample/init.rb
400
+ - spec/helpers_spec.rb
401
+ - spec/spec_helper.rb