middleman-inline-style 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4658b2e7babe5a8d760d418175f036866be3cc98
|
4
|
+
data.tar.gz: cecb20126587c0689ee935d1c2e4b7775398eb4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af3262c45695faf44bbb67188c0253b6b67b8c12e25cdb03e9a69b61ed3aa26a09b783917b9aa8c46df84b6b8a37c3d9d60a2c90ead66eef217b556d1cab539b
|
7
|
+
data.tar.gz: bf359e6aa8d02ce76b7aaacccbe9c04946212f59a1d3304552dc4ff9a3668ef5d37bb362df8ca7e8aeebd9bed6421ac03f9904e5026a1c2aba4f3035eb661c08
|
@@ -2,7 +2,7 @@ require "inline-style"
|
|
2
2
|
|
3
3
|
module MiddlemanInlineStyle::Rack
|
4
4
|
class Middleware
|
5
|
-
# @param [Hash] opts
|
5
|
+
# @param [Hash] opts Middleware options
|
6
6
|
#
|
7
7
|
# @option opts [String] :stylesheets_path (env['DOCUMENT_ROOT'])
|
8
8
|
# Stylesheets root path or app's public directory where the stylesheets are to be found
|
@@ -26,11 +26,11 @@ module MiddlemanInlineStyle::Rack
|
|
26
26
|
return response unless @paths === env['PATH_INFO']
|
27
27
|
|
28
28
|
status, headers, body = response
|
29
|
-
return response unless headers['Content-Type'].start_with?('text/html')
|
29
|
+
return response unless headers['Content-Type'] == nil or headers['Content-Type'].start_with?('text/html')
|
30
30
|
newbody = []
|
31
31
|
body.each { |str| newbody << str }
|
32
32
|
newbody = newbody.join('')
|
33
|
-
newbody = InlineStyle.process(newbody, {:stylesheets_path =>
|
33
|
+
newbody = InlineStyle.process(newbody, {:stylesheets_path => "./build/"}.merge(@opts))
|
34
34
|
headers['Content-Length'] = Rack::Utils.bytesize(newbody).to_s
|
35
35
|
[status, headers, [newbody]]
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-inline-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trenton Broughton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|