middleman-sprockets 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -1
- data/features/sass_globs.feature +9 -0
- data/features/support/env.rb +2 -0
- data/fixtures/glob-app/config.rb +0 -0
- data/fixtures/glob-app/source/stylesheets/main.css.scss +1 -0
- data/fixtures/glob-app/source/stylesheets/module1/_i-am-mod.scss +3 -0
- data/fixtures/glob-app/source/stylesheets/module2/_derp.sass +2 -0
- data/fixtures/glob-app/source/stylesheets/shared/3rd-party/bootstrap.sass +2 -0
- data/fixtures/glob-app/source/stylesheets/shared/shared.scss +3 -0
- data/fixtures/sprockets-app/source/index.html.erb +6 -0
- data/lib/middleman-sprockets/extension.rb +3 -0
- data/lib/middleman-sprockets/sass.rb +19 -7
- data/lib/middleman-sprockets/version.rb +1 -1
- data/middleman-sprockets.gemspec +2 -2
- metadata +25 -9
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
source :rubygems
|
2
2
|
|
3
|
-
git "git://github.com/middleman/middleman.git" do
|
3
|
+
git "git://github.com/middleman/middleman.git", :branch => "3.0-stable" do
|
4
4
|
gem "middleman"
|
5
5
|
gem "middleman-core"
|
6
6
|
gem "middleman-more"
|
@@ -13,6 +13,8 @@ group :development do
|
|
13
13
|
gem "rake", "~> 0.9.2"
|
14
14
|
gem "rdoc", "~> 3.9"
|
15
15
|
gem "yard", "~> 0.8.0"
|
16
|
+
gem "pry"
|
17
|
+
gem "pry-debugger"
|
16
18
|
end
|
17
19
|
|
18
20
|
group :test do
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Feature: Sass should glob partials like sass-rails
|
2
|
+
|
3
|
+
Scenario: Sass globbing should work
|
4
|
+
Given the Server is running at "glob-app"
|
5
|
+
When I go to "/stylesheets/main.css"
|
6
|
+
Then I should see "module1"
|
7
|
+
And I should see "module2"
|
8
|
+
And I should see "shared-root"
|
9
|
+
And I should see "bootstrap"
|
data/features/support/env.rb
CHANGED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "**/*";
|
@@ -100,6 +100,9 @@ module Middleman::Sprockets
|
|
100
100
|
app.js_assets_paths.each do |p|
|
101
101
|
append_path p
|
102
102
|
end if app.respond_to?(:js_assets_paths)
|
103
|
+
|
104
|
+
# Stylus support
|
105
|
+
::Stylus.setup(self, app.styl) if defined?(::Stylus)
|
103
106
|
end
|
104
107
|
|
105
108
|
# Override Sprockets' default digest function to *not*
|
@@ -35,6 +35,7 @@ module Middleman
|
|
35
35
|
|
36
36
|
# A SassTemplate for Sprockets/Tilt which outputs debug messages
|
37
37
|
class SassPlusCSSFilenameTemplate < ::Sprockets::Sass::SassTemplate
|
38
|
+
self.default_mime_type = 'text/css'
|
38
39
|
|
39
40
|
# Add exception messaging
|
40
41
|
# @param [Class] context
|
@@ -49,21 +50,32 @@ module Middleman
|
|
49
50
|
end
|
50
51
|
|
51
52
|
protected
|
53
|
+
def cache_store
|
54
|
+
nil
|
55
|
+
end
|
56
|
+
|
52
57
|
# Change Sass path, for url functions, to the build folder if we're building
|
53
58
|
# @return [Hash]
|
54
59
|
def sass_options
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
orig = super
|
61
|
+
|
62
|
+
if context && context.app
|
63
|
+
location_of_sass_file = File.expand_path(context.app.source, context.app.root)
|
64
|
+
|
65
|
+
parts = basename.split('.')
|
66
|
+
parts.pop
|
67
|
+
css_filename = File.join(location_of_sass_file, context.app.css_dir, parts.join("."))
|
68
|
+
|
69
|
+
orig.merge(:css_filename => css_filename)
|
70
|
+
end
|
71
|
+
|
72
|
+
orig
|
62
73
|
end
|
63
74
|
end
|
64
75
|
|
65
76
|
# SCSS version of the above template
|
66
77
|
class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate
|
78
|
+
self.default_mime_type = 'text/css'
|
67
79
|
|
68
80
|
# Define the expected syntax for the template
|
69
81
|
# @return [Symbol]
|
data/middleman-sprockets.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency("middleman-more", "
|
21
|
+
s.add_dependency("middleman-more", [">= 3.0.1"])
|
22
22
|
s.add_dependency("sprockets", ["~> 2.1", "< 2.5"])
|
23
|
-
s.add_dependency("sprockets-sass", ["~> 0.
|
23
|
+
s.add_dependency("sprockets-sass", ["~> 0.9.0"])
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,14 +9,14 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-more
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 3.0.1
|
22
22
|
type: :runtime
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.0.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
59
|
+
version: 0.9.0
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -64,7 +64,7 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: 0.9.0
|
68
68
|
description: Sprockets support for Middleman
|
69
69
|
email:
|
70
70
|
- me@tdreyno.com
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- Rakefile
|
81
81
|
- features/asset_hash.feature
|
82
82
|
- features/jst.feature
|
83
|
+
- features/sass_globs.feature
|
83
84
|
- features/sass_partials.feature
|
84
85
|
- features/sprockets.feature
|
85
86
|
- features/sprockets_gems.feature
|
@@ -112,6 +113,12 @@ files:
|
|
112
113
|
- fixtures/asset-paths-app/config.rb
|
113
114
|
- fixtures/asset-paths-app/derp/javascripts/vendored_js.js
|
114
115
|
- fixtures/asset-paths-app/source/javascripts/vendored_include.js
|
116
|
+
- fixtures/glob-app/config.rb
|
117
|
+
- fixtures/glob-app/source/stylesheets/main.css.scss
|
118
|
+
- fixtures/glob-app/source/stylesheets/module1/_i-am-mod.scss
|
119
|
+
- fixtures/glob-app/source/stylesheets/module2/_derp.sass
|
120
|
+
- fixtures/glob-app/source/stylesheets/shared/3rd-party/bootstrap.sass
|
121
|
+
- fixtures/glob-app/source/stylesheets/shared/shared.scss
|
115
122
|
- fixtures/preview-app/config.rb
|
116
123
|
- fixtures/preview-app/source/content.html.erb
|
117
124
|
- fixtures/preview-app/source/layout.erb
|
@@ -129,6 +136,7 @@ files:
|
|
129
136
|
- fixtures/sprockets-app/.sass-cache/be37f3d65d619a3996ff80c3e286084336419f31/sprockets_base1.css.scssc
|
130
137
|
- fixtures/sprockets-app/.sass-cache/be37f3d65d619a3996ff80c3e286084336419f31/sprockets_base2.css.scssc
|
131
138
|
- fixtures/sprockets-app/config.rb
|
139
|
+
- fixtures/sprockets-app/source/index.html.erb
|
132
140
|
- fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss
|
133
141
|
- fixtures/sprockets-app/source/library/css/plain.css
|
134
142
|
- fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
|
@@ -173,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
181
|
version: '0'
|
174
182
|
segments:
|
175
183
|
- 0
|
176
|
-
hash:
|
184
|
+
hash: 315379021838969558
|
177
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
186
|
none: false
|
179
187
|
requirements:
|
@@ -182,16 +190,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
190
|
version: '0'
|
183
191
|
segments:
|
184
192
|
- 0
|
185
|
-
hash:
|
193
|
+
hash: 315379021838969558
|
186
194
|
requirements: []
|
187
195
|
rubyforge_project: middleman-sprockets
|
188
|
-
rubygems_version: 1.8.
|
196
|
+
rubygems_version: 1.8.24
|
189
197
|
signing_key:
|
190
198
|
specification_version: 3
|
191
199
|
summary: Sprockets support for Middleman
|
192
200
|
test_files:
|
193
201
|
- features/asset_hash.feature
|
194
202
|
- features/jst.feature
|
203
|
+
- features/sass_globs.feature
|
195
204
|
- features/sass_partials.feature
|
196
205
|
- features/sprockets.feature
|
197
206
|
- features/sprockets_gems.feature
|
@@ -224,6 +233,12 @@ test_files:
|
|
224
233
|
- fixtures/asset-paths-app/config.rb
|
225
234
|
- fixtures/asset-paths-app/derp/javascripts/vendored_js.js
|
226
235
|
- fixtures/asset-paths-app/source/javascripts/vendored_include.js
|
236
|
+
- fixtures/glob-app/config.rb
|
237
|
+
- fixtures/glob-app/source/stylesheets/main.css.scss
|
238
|
+
- fixtures/glob-app/source/stylesheets/module1/_i-am-mod.scss
|
239
|
+
- fixtures/glob-app/source/stylesheets/module2/_derp.sass
|
240
|
+
- fixtures/glob-app/source/stylesheets/shared/3rd-party/bootstrap.sass
|
241
|
+
- fixtures/glob-app/source/stylesheets/shared/shared.scss
|
227
242
|
- fixtures/preview-app/config.rb
|
228
243
|
- fixtures/preview-app/source/content.html.erb
|
229
244
|
- fixtures/preview-app/source/layout.erb
|
@@ -241,6 +256,7 @@ test_files:
|
|
241
256
|
- fixtures/sprockets-app/.sass-cache/be37f3d65d619a3996ff80c3e286084336419f31/sprockets_base1.css.scssc
|
242
257
|
- fixtures/sprockets-app/.sass-cache/be37f3d65d619a3996ff80c3e286084336419f31/sprockets_base2.css.scssc
|
243
258
|
- fixtures/sprockets-app/config.rb
|
259
|
+
- fixtures/sprockets-app/source/index.html.erb
|
244
260
|
- fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss
|
245
261
|
- fixtures/sprockets-app/source/library/css/plain.css
|
246
262
|
- fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss
|