middleman-more 3.0.6 → 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/features/stylus.feature +55 -0
- data/fixtures/stylus-preview-app/config.rb +0 -0
- data/fixtures/stylus-preview-app/source/content.html.erb +1 -0
- data/fixtures/stylus-preview-app/source/layout.erb +1 -0
- data/fixtures/stylus-preview-app/source/stylesheets/_partial.styl +2 -0
- data/fixtures/stylus-preview-app/source/stylesheets/_partial2.css.styl +2 -0
- data/fixtures/stylus-preview-app/source/stylesheets/main.css.styl +4 -0
- data/fixtures/stylus-preview-app/source/stylesheets/main2.css.styl +4 -0
- data/fixtures/stylus-preview-app/source/stylesheets/plain.css.styl +2 -0
- data/lib/middleman-more/extensions/automatic_image_sizes.rb +5 -1
- metadata +25 -7
@@ -0,0 +1,55 @@
|
|
1
|
+
@nojava
|
2
|
+
Feature: Stylus Updates and Partials
|
3
|
+
Scenario: The preview server should update stylesheets when Stylus changes
|
4
|
+
Given the Server is running at "stylus-preview-app"
|
5
|
+
And the file "source/stylesheets/plain.css.styl" has the contents
|
6
|
+
"""
|
7
|
+
red
|
8
|
+
color: #f0f0f0
|
9
|
+
"""
|
10
|
+
When I go to "/stylesheets/plain.css"
|
11
|
+
Then I should see "color: #f0f0f0;"
|
12
|
+
And the file "source/stylesheets/plain.css.styl" has the contents
|
13
|
+
"""
|
14
|
+
red
|
15
|
+
color: #0f0f0f
|
16
|
+
"""
|
17
|
+
When I go to "/stylesheets/plain.css"
|
18
|
+
Then I should see "color: #0f0f0f;"
|
19
|
+
|
20
|
+
Scenario: The preview server should update stylesheets when Stylus partials change
|
21
|
+
Given the Server is running at "stylus-preview-app"
|
22
|
+
And the file "source/stylesheets/main.css.styl" has the contents
|
23
|
+
"""
|
24
|
+
@import '_partial'
|
25
|
+
|
26
|
+
red
|
27
|
+
color: #f0f0f0
|
28
|
+
"""
|
29
|
+
And the file "source/stylesheets/_partial.styl" has the contents
|
30
|
+
"""
|
31
|
+
body
|
32
|
+
font-size: 14px
|
33
|
+
"""
|
34
|
+
When I go to "/stylesheets/main.css"
|
35
|
+
Then I should see "color: #f0f0f0;"
|
36
|
+
And I should see "font-size: 14px;"
|
37
|
+
And the file "source/stylesheets/main.css.styl" has the contents
|
38
|
+
"""
|
39
|
+
@import '_partial'
|
40
|
+
|
41
|
+
red
|
42
|
+
color: #0f0f0f
|
43
|
+
"""
|
44
|
+
And the file "source/stylesheets/_partial.styl" has the contents
|
45
|
+
"""
|
46
|
+
body
|
47
|
+
font-size: 18px
|
48
|
+
"""
|
49
|
+
When I go to "/stylesheets/main.css"
|
50
|
+
Then I should see "color: #0f0f0f;"
|
51
|
+
And I should see "font-size: 18px"
|
52
|
+
|
53
|
+
Scenario: Stylus partials should work when building
|
54
|
+
Given a successfully built app at "stylus-preview-app"
|
55
|
+
Then the file "build/stylesheets/main.css" should contain "font-size: 18px"
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Hola Mundo
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -30,7 +30,11 @@ module Middleman
|
|
30
30
|
# @param [Hash] params
|
31
31
|
# @return [String]
|
32
32
|
def image_tag(path, params={})
|
33
|
-
|
33
|
+
params[:supported_extensions] ||= %w(.png .jpg .jpeg .bmp .gif)
|
34
|
+
|
35
|
+
if !params.has_key?(:width) && !params.has_key?(:height) && !path.include?("://") &&
|
36
|
+
params[:supported_extensions].include?(File.extname(path).downcase)
|
37
|
+
|
34
38
|
params[:alt] ||= ""
|
35
39
|
|
36
40
|
real_path = path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-more
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: middleman-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.0.
|
22
|
+
version: 3.0.7
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - '='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 3.0.
|
30
|
+
version: 3.0.7
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: uglifier
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- features/scss-support.feature
|
243
243
|
- features/sitemap_traversal.feature
|
244
244
|
- features/slim.feature
|
245
|
+
- features/stylus.feature
|
245
246
|
- features/support/env.rb
|
246
247
|
- features/twitter-bootstrap-compile.feature
|
247
248
|
- features/wildcard_page_helper.feature
|
@@ -481,6 +482,14 @@ files:
|
|
481
482
|
- fixtures/scss-app/config.rb
|
482
483
|
- fixtures/scss-app/source/stylesheets/layout.css.sass
|
483
484
|
- fixtures/scss-app/source/stylesheets/site_scss.css.scss
|
485
|
+
- fixtures/stylus-preview-app/config.rb
|
486
|
+
- fixtures/stylus-preview-app/source/content.html.erb
|
487
|
+
- fixtures/stylus-preview-app/source/layout.erb
|
488
|
+
- fixtures/stylus-preview-app/source/stylesheets/_partial.styl
|
489
|
+
- fixtures/stylus-preview-app/source/stylesheets/_partial2.css.styl
|
490
|
+
- fixtures/stylus-preview-app/source/stylesheets/main.css.styl
|
491
|
+
- fixtures/stylus-preview-app/source/stylesheets/main2.css.styl
|
492
|
+
- fixtures/stylus-preview-app/source/stylesheets/plain.css.styl
|
484
493
|
- fixtures/traversal-app/config.rb
|
485
494
|
- fixtures/traversal-app/source/directory-indexed.html.erb
|
486
495
|
- fixtures/traversal-app/source/directory-indexed/sibling.html.erb
|
@@ -632,7 +641,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
632
641
|
version: '0'
|
633
642
|
segments:
|
634
643
|
- 0
|
635
|
-
hash:
|
644
|
+
hash: 4377871555131630904
|
636
645
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
637
646
|
none: false
|
638
647
|
requirements:
|
@@ -641,10 +650,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
641
650
|
version: '0'
|
642
651
|
segments:
|
643
652
|
- 0
|
644
|
-
hash:
|
653
|
+
hash: 4377871555131630904
|
645
654
|
requirements: []
|
646
655
|
rubyforge_project:
|
647
|
-
rubygems_version: 1.8.
|
656
|
+
rubygems_version: 1.8.24
|
648
657
|
signing_key:
|
649
658
|
specification_version: 3
|
650
659
|
summary: Hand-crafted frontend development
|
@@ -689,6 +698,7 @@ test_files:
|
|
689
698
|
- features/scss-support.feature
|
690
699
|
- features/sitemap_traversal.feature
|
691
700
|
- features/slim.feature
|
701
|
+
- features/stylus.feature
|
692
702
|
- features/support/env.rb
|
693
703
|
- features/twitter-bootstrap-compile.feature
|
694
704
|
- features/wildcard_page_helper.feature
|
@@ -928,6 +938,14 @@ test_files:
|
|
928
938
|
- fixtures/scss-app/config.rb
|
929
939
|
- fixtures/scss-app/source/stylesheets/layout.css.sass
|
930
940
|
- fixtures/scss-app/source/stylesheets/site_scss.css.scss
|
941
|
+
- fixtures/stylus-preview-app/config.rb
|
942
|
+
- fixtures/stylus-preview-app/source/content.html.erb
|
943
|
+
- fixtures/stylus-preview-app/source/layout.erb
|
944
|
+
- fixtures/stylus-preview-app/source/stylesheets/_partial.styl
|
945
|
+
- fixtures/stylus-preview-app/source/stylesheets/_partial2.css.styl
|
946
|
+
- fixtures/stylus-preview-app/source/stylesheets/main.css.styl
|
947
|
+
- fixtures/stylus-preview-app/source/stylesheets/main2.css.styl
|
948
|
+
- fixtures/stylus-preview-app/source/stylesheets/plain.css.styl
|
931
949
|
- fixtures/traversal-app/config.rb
|
932
950
|
- fixtures/traversal-app/source/directory-indexed.html.erb
|
933
951
|
- fixtures/traversal-app/source/directory-indexed/sibling.html.erb
|