stylo 0.8.5 → 0.8.6
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.
@@ -41,10 +41,6 @@ When /^css combining is disabled$/ do
|
|
41
41
|
Stylo::Config.options[:css_combining_enabled] = false
|
42
42
|
end
|
43
43
|
|
44
|
-
#Given /^javascript compression is enabled$/ do
|
45
|
-
# Stylo::Config.options[:javascript_minifying_enabled] = true
|
46
|
-
#end
|
47
|
-
|
48
44
|
Given /^javascript minifying is disabled$/ do
|
49
45
|
Stylo::Config.options[:js_minifying_enabled] = false
|
50
46
|
end
|
@@ -60,3 +56,7 @@ end
|
|
60
56
|
Given /^css minifying is disabled$/ do
|
61
57
|
Stylo::Config.options[:css_minifying_enabled] = false
|
62
58
|
end
|
59
|
+
|
60
|
+
Given /^"([^"]*)" is excluded from css minifying$/ do |stylesheet_file|
|
61
|
+
Stylo::Config.options[:css_minifying_exclusions] = [stylesheet_file]
|
62
|
+
end
|
@@ -59,3 +59,10 @@ Feature: Stylesheet serving
|
|
59
59
|
And "child.css" is located at "stylesheets" in the asset location
|
60
60
|
When a request is made for "stylesheets/child.css"
|
61
61
|
Then the response body should look like "minified_child.css"
|
62
|
+
|
63
|
+
Scenario: Stylesheet minification exclusiong
|
64
|
+
Given css minifying is enabled
|
65
|
+
And "child.css" is located at "stylesheets" in the asset location
|
66
|
+
And "/stylesheets/child.css" is excluded from css minifying
|
67
|
+
When a request is made for "stylesheets/child.css"
|
68
|
+
Then the response body should look like "child.css"
|
data/lib/stylo/config.rb
CHANGED
@@ -2,7 +2,7 @@ module Stylo
|
|
2
2
|
module PipelineSteps
|
3
3
|
class StylesheetMinifying
|
4
4
|
def call(response)
|
5
|
-
if Config.options[:css_minifying_enabled] and response.extension == '.css' and response.has_content?
|
5
|
+
if Config.options[:css_minifying_enabled] and !Config::options[:css_minifying_exclusions].include?(response.path) and response.extension == '.css' and response.has_content?
|
6
6
|
minified = CssMinifier.minify(response.body)
|
7
7
|
response.set_body minified, :css
|
8
8
|
end
|
data/lib/stylo/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stylo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 51
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 6
|
10
|
+
version: 0.8.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Wagg
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-26 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
requirements: []
|
176
176
|
|
177
177
|
rubyforge_project: stylo
|
178
|
-
rubygems_version: 1.
|
178
|
+
rubygems_version: 1.4.2
|
179
179
|
signing_key:
|
180
180
|
specification_version: 3
|
181
181
|
summary: A javascript and css combining/minifying rack middleware
|