sprockets-sass 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Appraisals +16 -12
- data/Rakefile +3 -3
- data/gemfiles/compass-0.12.gemfile +1 -1
- data/gemfiles/sprockets-2.4.gemfile +7 -0
- data/lib/sprockets-sass.rb +1 -1
- data/lib/sprockets/sass.rb +9 -8
- data/lib/sprockets/sass/cache_store.rb +1 -1
- data/lib/sprockets/sass/compressor.rb +22 -0
- data/lib/sprockets/sass/functions.rb +8 -8
- data/lib/sprockets/sass/importer.rb +38 -19
- data/lib/sprockets/sass/sass_template.rb +7 -3
- data/lib/sprockets/sass/scss_template.rb +1 -1
- data/lib/sprockets/sass/version.rb +1 -1
- data/spec/spec_helper.rb +5 -5
- data/spec/sprockets-sass_spec.rb +167 -125
- data/spec/support/be_fresh_matcher.rb +2 -2
- data/sprockets-sass.gemspec +18 -18
- metadata +87 -88
data/.gitignore
CHANGED
data/Appraisals
CHANGED
@@ -1,23 +1,27 @@
|
|
1
|
-
appraise
|
2
|
-
gem
|
1
|
+
appraise 'sprockets-2.0' do
|
2
|
+
gem 'sprockets', '~> 2.0.0'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise
|
6
|
-
gem
|
5
|
+
appraise 'sprockets-2.1' do
|
6
|
+
gem 'sprockets', '~> 2.1.0'
|
7
7
|
end
|
8
8
|
|
9
|
-
appraise
|
10
|
-
gem
|
9
|
+
appraise 'sprockets-2.2' do
|
10
|
+
gem 'sprockets', '~> 2.2.0'
|
11
11
|
end
|
12
12
|
|
13
|
-
appraise
|
14
|
-
gem
|
13
|
+
appraise 'sprockets-2.3' do
|
14
|
+
gem 'sprockets', '~> 2.3.0'
|
15
15
|
end
|
16
16
|
|
17
|
-
appraise
|
18
|
-
gem
|
17
|
+
appraise 'sprockets-2.4' do
|
18
|
+
gem 'sprockets', '~> 2.4.0'
|
19
19
|
end
|
20
20
|
|
21
|
-
appraise
|
22
|
-
gem
|
21
|
+
appraise 'compass-0.11' do
|
22
|
+
gem 'compass', '~> 0.11.0'
|
23
|
+
end
|
24
|
+
|
25
|
+
appraise 'compass-0.12' do
|
26
|
+
gem 'compass', '~> 0.12.0'
|
23
27
|
end
|
data/Rakefile
CHANGED
data/lib/sprockets-sass.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require 'sprockets/sass'
|
data/lib/sprockets/sass.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require 'sprockets/sass/version'
|
2
|
+
require 'sprockets/sass/sass_template'
|
3
|
+
require 'sprockets/sass/scss_template'
|
4
|
+
require 'sprockets/engines'
|
5
5
|
|
6
6
|
module Sprockets
|
7
7
|
module Sass
|
8
|
-
autoload :CacheStore,
|
9
|
-
autoload :
|
8
|
+
autoload :CacheStore, 'sprockets/sass/cache_store'
|
9
|
+
autoload :Compressor, 'sprockets/sass/compressor'
|
10
|
+
autoload :Importer, 'sprockets/sass/importer'
|
10
11
|
|
11
12
|
class << self
|
12
13
|
# Global configuration for `Sass::Engine` instances.
|
@@ -22,6 +23,6 @@ module Sprockets
|
|
22
23
|
@add_sass_functions = true
|
23
24
|
end
|
24
25
|
|
25
|
-
register_engine
|
26
|
-
register_engine
|
26
|
+
register_engine '.sass', Sass::SassTemplate
|
27
|
+
register_engine '.scss', Sass::ScssTemplate
|
27
28
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'sass'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
module Sass
|
5
|
+
class Compressor
|
6
|
+
# Compresses the given CSS using Sass::Engine's
|
7
|
+
# :compressed output style.
|
8
|
+
def compress(css)
|
9
|
+
if css.count("\n") > 2
|
10
|
+
::Sass::Engine.new(css,
|
11
|
+
:syntax => :scss,
|
12
|
+
:cache => false,
|
13
|
+
:read_cache => false,
|
14
|
+
:style => :compressed
|
15
|
+
).render
|
16
|
+
else
|
17
|
+
css
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'sass'
|
2
2
|
|
3
3
|
module Sprockets
|
4
4
|
module Sass
|
@@ -19,10 +19,10 @@ module Sprockets
|
|
19
19
|
options = {}
|
20
20
|
end
|
21
21
|
|
22
|
-
if kind &&
|
23
|
-
::Sass::Script::String.new
|
22
|
+
if kind && sprockets_context.respond_to?("#{kind}_path")
|
23
|
+
::Sass::Script::String.new sprockets_context.send("#{kind}_path", source.value), :string
|
24
24
|
else
|
25
|
-
::Sass::Script::String.new
|
25
|
+
::Sass::Script::String.new sprockets_context.asset_path(source.value, map_options(options)).to_s, :string
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -49,7 +49,7 @@ module Sprockets
|
|
49
49
|
# background: url(image-path("image.jpg", $digest: true)); // background: url("/assets/image-27a8f1f96afd8d4c67a59eb9447f45bd.jpg");
|
50
50
|
#
|
51
51
|
def image_path(source, options = {})
|
52
|
-
::Sass::Script::String.new
|
52
|
+
::Sass::Script::String.new sprockets_context.image_path(source.value, map_options(options)).to_s, :string
|
53
53
|
end
|
54
54
|
|
55
55
|
# Using Sprockets::Helpers#image_path, return the url CSS
|
@@ -82,17 +82,17 @@ module Sprockets
|
|
82
82
|
# background: asset-data-uri("image.jpg"); // background: url(data:image/jpeg;base64,...);
|
83
83
|
#
|
84
84
|
def asset_data_uri(source)
|
85
|
-
::Sass::Script::String.new "url(#{
|
85
|
+
::Sass::Script::String.new "url(#{sprockets_context.asset_data_uri(source.value)})"
|
86
86
|
end
|
87
87
|
|
88
88
|
protected
|
89
89
|
|
90
90
|
# Returns a reference to the Sprocket's context through
|
91
91
|
# the importer.
|
92
|
-
def
|
92
|
+
def sprockets_context # :nodoc:
|
93
93
|
options[:importer].context
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
# Returns an options hash where the keys are symbolized
|
97
97
|
# and the values are unwrapped Sass literals.
|
98
98
|
def map_options(options = {}) # :nodoc:
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'sass/importers/base'
|
2
|
+
require 'pathname'
|
3
3
|
|
4
4
|
module Sprockets
|
5
5
|
module Sass
|
@@ -19,13 +19,13 @@ module Sprockets
|
|
19
19
|
if path =~ GLOB
|
20
20
|
engine_from_glob(path, base_path, options)
|
21
21
|
else
|
22
|
-
engine_from_path(path, options)
|
22
|
+
engine_from_path(path, base_path, options)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
# @see Sass::Importers::Base#find
|
27
27
|
def find(path, options)
|
28
|
-
engine_from_path(path, options)
|
28
|
+
engine_from_path(path, nil, options)
|
29
29
|
end
|
30
30
|
|
31
31
|
# @see Sass::Importers::Base#mtime
|
@@ -51,8 +51,8 @@ module Sprockets
|
|
51
51
|
protected
|
52
52
|
|
53
53
|
# Create a Sass::Engine from the given path.
|
54
|
-
def engine_from_path(path, options)
|
55
|
-
pathname = resolve(path) or return nil
|
54
|
+
def engine_from_path(path, base_path, options)
|
55
|
+
pathname = resolve(path, base_path) or return nil
|
56
56
|
context.depend_on pathname
|
57
57
|
::Sass::Engine.new evaluate(pathname), options.merge(
|
58
58
|
:filename => pathname.to_s,
|
@@ -64,7 +64,7 @@ module Sprockets
|
|
64
64
|
# Create a Sass::Engine that will handle importing
|
65
65
|
# a glob of files.
|
66
66
|
def engine_from_glob(glob, base_path, options)
|
67
|
-
imports = resolve_glob(glob, base_path).inject(
|
67
|
+
imports = resolve_glob(glob, base_path).inject('') do |imports, path|
|
68
68
|
context.depend_on path
|
69
69
|
relative_path = path.relative_path_from Pathname.new(context.root_path)
|
70
70
|
imports << %(@import "#{relative_path}";\n)
|
@@ -80,18 +80,11 @@ module Sprockets
|
|
80
80
|
# Finds an asset from the given path. This is where
|
81
81
|
# we make Sprockets behave like Sass, and import partial
|
82
82
|
# style paths.
|
83
|
-
def resolve(path)
|
84
|
-
path
|
85
|
-
|
86
|
-
# First look for the normal path
|
87
|
-
context.resolve(path) { |found| return found if context.asset_requirable?(found) }
|
88
|
-
|
89
|
-
# Then look for the partial-style version
|
90
|
-
unless path.basename.to_s =~ /^_/
|
91
|
-
partial = path.dirname.join "_#{path.basename}"
|
92
|
-
context.resolve(partial) { |found| return found if context.asset_requirable?(found) }
|
83
|
+
def resolve(path, base_path)
|
84
|
+
possible_files(path, base_path).each do |file|
|
85
|
+
context.resolve(file) { |found| return found if context.asset_requirable?(found) }
|
93
86
|
end
|
94
|
-
|
87
|
+
|
95
88
|
nil
|
96
89
|
end
|
97
90
|
|
@@ -105,9 +98,35 @@ module Sprockets
|
|
105
98
|
end
|
106
99
|
end
|
107
100
|
|
101
|
+
# Returns all of the possible paths (including partial variations)
|
102
|
+
# to attempt to resolve with the given path.
|
103
|
+
def possible_files(path, base_path)
|
104
|
+
path = Pathname.new(path)
|
105
|
+
base_path = Pathname.new(base_path).dirname
|
106
|
+
root_path = Pathname.new(context.root_path)
|
107
|
+
paths = [ path, partialize_path(path) ]
|
108
|
+
|
109
|
+
# Add the relative path from the root, if necessary
|
110
|
+
if path.relative? && base_path != root_path && path.to_s !~ /\A\.\//
|
111
|
+
relative_path = base_path.relative_path_from(root_path).join path
|
112
|
+
|
113
|
+
paths.unshift(relative_path, partialize_path(relative_path))
|
114
|
+
end
|
115
|
+
|
116
|
+
paths.compact
|
117
|
+
end
|
118
|
+
|
119
|
+
# Returns the partialized version of the given path.
|
120
|
+
# Returns nil if the path is already to a partial.
|
121
|
+
def partialize_path(path)
|
122
|
+
if path.basename.to_s !~ /\A_/
|
123
|
+
Pathname.new path.to_s.sub(/([^\/]+)\Z/, '_\1')
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
108
127
|
# Returns the Sass syntax of the given path.
|
109
128
|
def syntax(path)
|
110
|
-
path.to_s.include?(
|
129
|
+
path.to_s.include?('.sass') ? :sass : :scss
|
111
130
|
end
|
112
131
|
|
113
132
|
# Returns the string to be passed to the Sass engine. We use
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require
|
1
|
+
require 'tilt'
|
2
2
|
|
3
3
|
module Sprockets
|
4
4
|
module Sass
|
5
5
|
class SassTemplate < Tilt::SassTemplate
|
6
|
-
self.default_mime_type =
|
6
|
+
self.default_mime_type = 'text/css'
|
7
7
|
|
8
8
|
# A reference to the current Sprockets context
|
9
9
|
attr_reader :context
|
@@ -18,7 +18,7 @@ module Sprockets
|
|
18
18
|
super
|
19
19
|
|
20
20
|
if Sass.add_sass_functions
|
21
|
-
require
|
21
|
+
require 'sprockets/sass/functions'
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -38,6 +38,10 @@ module Sprockets
|
|
38
38
|
@output ||= begin
|
39
39
|
@context = context
|
40
40
|
::Sass::Engine.new(data, sass_options).render
|
41
|
+
rescue ::Sass::SyntaxError => e
|
42
|
+
# Annotates exception message with parse line number
|
43
|
+
context.__LINE__ = e.sass_backtrace.first[:line]
|
44
|
+
raise e
|
41
45
|
end
|
42
46
|
end
|
43
47
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require 'sprockets'
|
2
|
+
require 'sprockets-sass'
|
3
|
+
require 'sprockets-helpers'
|
4
|
+
require 'compass'
|
5
|
+
require 'construct'
|
6
6
|
|
7
7
|
Compass.configuration do |compass|
|
8
8
|
compass.line_comments = false
|
data/spec/sprockets-sass_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Sprockets::Sass do
|
4
4
|
before :each do
|
5
5
|
@root = create_construct
|
6
|
-
@assets = @root.directory
|
6
|
+
@assets = @root.directory 'assets'
|
7
7
|
@env = Sprockets::Environment.new @root.to_s
|
8
8
|
@env.append_path @assets.to_s
|
9
9
|
end
|
@@ -12,170 +12,202 @@ describe Sprockets::Sass do
|
|
12
12
|
@root.destroy!
|
13
13
|
end
|
14
14
|
|
15
|
-
it
|
16
|
-
@assets.file
|
17
|
-
@assets.file
|
18
|
-
asset = @env[
|
15
|
+
it 'processes scss files normally' do
|
16
|
+
@assets.file 'main.css.scss', '//= require dep'
|
17
|
+
@assets.file 'dep.css.scss', 'body { color: blue; }'
|
18
|
+
asset = @env['main.css']
|
19
19
|
asset.to_s.should == "body {\n color: blue; }\n"
|
20
20
|
end
|
21
21
|
|
22
|
-
it
|
23
|
-
@assets.file
|
24
|
-
@assets.file
|
25
|
-
asset = @env[
|
22
|
+
it 'processes sass files normally' do
|
23
|
+
@assets.file 'main.css.sass', '//= require dep'
|
24
|
+
@assets.file 'dep.css.sass', "body\n color: blue"
|
25
|
+
asset = @env['main.css']
|
26
26
|
asset.to_s.should == "body {\n color: blue; }\n"
|
27
27
|
end
|
28
28
|
|
29
|
-
it
|
30
|
-
@assets.file
|
31
|
-
@assets.file
|
32
|
-
asset = @env[
|
29
|
+
it 'imports standard files' do
|
30
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
31
|
+
@assets.file 'dep.css.scss', '$color: blue;'
|
32
|
+
asset = @env['main.css']
|
33
33
|
asset.to_s.should == "body {\n color: blue; }\n"
|
34
34
|
end
|
35
35
|
|
36
|
-
it
|
37
|
-
@assets.file
|
38
|
-
@assets.file
|
39
|
-
asset = @env[
|
36
|
+
it 'imports partials' do
|
37
|
+
@assets.file 'main.css.scss', %(@import "_dep";\nbody { color: $color; })
|
38
|
+
@assets.file '_dep.css.scss', '$color: blue;'
|
39
|
+
asset = @env['main.css']
|
40
40
|
asset.to_s.should == "body {\n color: blue; }\n"
|
41
41
|
end
|
42
42
|
|
43
|
-
it
|
44
|
-
@assets.file
|
45
|
-
@assets.file
|
46
|
-
asset = @env[
|
43
|
+
it 'imports other syntax' do
|
44
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
45
|
+
@assets.file 'dep.sass', "$color: blue\nhtml\n height: 100%"
|
46
|
+
asset = @env['main.css']
|
47
47
|
asset.to_s.should == "html {\n height: 100%; }\n\nbody {\n color: blue; }\n"
|
48
48
|
end
|
49
49
|
|
50
|
-
it
|
51
|
-
@assets.file
|
52
|
-
@assets.file
|
53
|
-
@assets.file
|
54
|
-
asset = @env[
|
50
|
+
it 'imports files with the correct content type' do
|
51
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
52
|
+
@assets.file 'dep.js', 'var app = {};'
|
53
|
+
@assets.file '_dep.css.scss', '$color: blue;'
|
54
|
+
asset = @env['main.css']
|
55
55
|
asset.to_s.should == "body {\n color: blue; }\n"
|
56
56
|
end
|
57
57
|
|
58
|
-
it
|
59
|
-
@assets.file
|
60
|
-
@assets.file
|
61
|
-
@assets.file
|
62
|
-
asset = @env[
|
58
|
+
it 'imports files with directives' do
|
59
|
+
@assets.file 'main.css.scss', %(@import "dep";)
|
60
|
+
@assets.file 'dep.css', "/*\n *= require subdep\n */"
|
61
|
+
@assets.file 'subdep.css.scss', "$color: blue;\nbody { color: $color; }"
|
62
|
+
asset = @env['main.css']
|
63
63
|
asset.to_s.should include("body {\n color: blue; }\n")
|
64
64
|
end
|
65
65
|
|
66
|
-
it
|
67
|
-
@assets.file
|
68
|
-
@assets.file
|
69
|
-
asset = @env[
|
66
|
+
it 'imports files with additional processors' do
|
67
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
68
|
+
@assets.file 'dep.css.scss.erb', "$color: <%= 'blue' %>;"
|
69
|
+
asset = @env['main.css']
|
70
70
|
asset.to_s.should == "body {\n color: blue; }\n"
|
71
71
|
end
|
72
72
|
|
73
|
-
it
|
74
|
-
@assets.file
|
75
|
-
@assets.file
|
76
|
-
|
73
|
+
it 'imports relative files' do
|
74
|
+
@assets.file 'folder/main.css.scss', %(@import "./dep-1";\n@import "./subfolder/dep-2";\nbody { background-color: $background-color; color: $color; })
|
75
|
+
@assets.file 'folder/dep-1.css.scss', '$background-color: red;'
|
76
|
+
@assets.file 'folder/subfolder/dep-2.css.scss', '$color: blue;'
|
77
|
+
asset = @env['folder/main.css']
|
78
|
+
asset.to_s.should == "body {\n background-color: red;\n color: blue; }\n"
|
79
|
+
end
|
80
|
+
|
81
|
+
it 'imports relative partials' do
|
82
|
+
@assets.file 'folder/main.css.scss', %(@import "./dep-1";\n@import "./subfolder/dep-2";\nbody { background-color: $background-color; color: $color; })
|
83
|
+
@assets.file 'folder/_dep-1.css.scss', '$background-color: red;'
|
84
|
+
@assets.file 'folder/subfolder/_dep-2.css.scss', '$color: blue;'
|
85
|
+
asset = @env['folder/main.css']
|
86
|
+
asset.to_s.should == "body {\n background-color: red;\n color: blue; }\n"
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'imports relative files without preceding ./' do
|
90
|
+
@assets.file 'folder/main.css.scss', %(@import "dep-1";\n@import "subfolder/dep-2";\nbody { background-color: $background-color; color: $color; })
|
91
|
+
@assets.file 'folder/dep-1.css.scss', '$background-color: red;'
|
92
|
+
@assets.file 'folder/subfolder/dep-2.css.scss', '$color: blue;'
|
93
|
+
asset = @env['folder/main.css']
|
94
|
+
asset.to_s.should == "body {\n background-color: red;\n color: blue; }\n"
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'imports relative partials without preceding ./' do
|
98
|
+
@assets.file 'folder/main.css.scss', %(@import "dep-1";\n@import "subfolder/dep-2";\nbody { background-color: $background-color; color: $color; })
|
99
|
+
@assets.file 'folder/_dep-1.css.scss', '$background-color: red;'
|
100
|
+
@assets.file 'folder/subfolder/_dep-2.css.scss', '$color: blue;'
|
101
|
+
asset = @env['folder/main.css']
|
102
|
+
asset.to_s.should == "body {\n background-color: red;\n color: blue; }\n"
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'imports files relative to root' do
|
106
|
+
@assets.file 'folder/main.css.scss', %(@import "dep";\nbody { color: $color; })
|
107
|
+
@assets.file 'dep.css.scss', '$color: blue;'
|
108
|
+
asset = @env['folder/main.css']
|
77
109
|
asset.to_s.should == "body {\n color: blue; }\n"
|
78
110
|
end
|
79
111
|
|
80
|
-
it
|
81
|
-
@assets.file
|
82
|
-
@assets.file
|
83
|
-
asset = @env[
|
112
|
+
it 'imports partials relative to root' do
|
113
|
+
@assets.file 'folder/main.css.scss', %(@import "dep";\nbody { color: $color; })
|
114
|
+
@assets.file '_dep.css.scss', '$color: blue;'
|
115
|
+
asset = @env['folder/main.css']
|
84
116
|
asset.to_s.should == "body {\n color: blue; }\n"
|
85
117
|
end
|
86
118
|
|
87
|
-
it
|
88
|
-
@assets.file
|
89
|
-
@assets.file
|
90
|
-
@assets.file
|
91
|
-
asset = @env[
|
119
|
+
it 'shares Sass environment with other imports' do
|
120
|
+
@assets.file 'main.css.scss', %(@import "dep-1";\n@import "dep-2";)
|
121
|
+
@assets.file '_dep-1.scss', '$color: blue;'
|
122
|
+
@assets.file '_dep-2.scss', 'body { color: $color; }'
|
123
|
+
asset = @env['main.css']
|
92
124
|
asset.to_s.should == "body {\n color: blue; }\n"
|
93
125
|
end
|
94
126
|
|
95
|
-
it
|
96
|
-
vendor = @root.directory
|
127
|
+
it 'imports files from the assets load path' do
|
128
|
+
vendor = @root.directory 'vendor'
|
97
129
|
@env.append_path vendor.to_s
|
98
130
|
|
99
|
-
@assets.file
|
100
|
-
vendor.file
|
101
|
-
asset = @env[
|
131
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
132
|
+
vendor.file 'dep.css.scss', '$color: blue;'
|
133
|
+
asset = @env['main.css']
|
102
134
|
asset.to_s.should == "body {\n color: blue; }\n"
|
103
135
|
end
|
104
136
|
|
105
|
-
it
|
137
|
+
it 'allows global Sass configuration' do
|
106
138
|
Sprockets::Sass.options[:style] = :compact
|
107
|
-
@assets.file
|
139
|
+
@assets.file 'main.css.scss', "body {\n color: blue;\n}"
|
108
140
|
|
109
|
-
asset = @env[
|
141
|
+
asset = @env['main.css']
|
110
142
|
asset.to_s.should == "body { color: blue; }\n"
|
111
143
|
Sprockets::Sass.options.delete(:style)
|
112
144
|
end
|
113
145
|
|
114
|
-
it
|
115
|
-
vendor = @root.directory
|
146
|
+
it 'imports files from the Sass load path' do
|
147
|
+
vendor = @root.directory 'vendor'
|
116
148
|
Sprockets::Sass.options[:load_paths] = [ vendor.to_s ]
|
117
149
|
|
118
|
-
@assets.file
|
119
|
-
vendor.file
|
120
|
-
asset = @env[
|
150
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
151
|
+
vendor.file 'dep.scss', '$color: blue;'
|
152
|
+
asset = @env['main.css']
|
121
153
|
asset.to_s.should == "body {\n color: blue; }\n"
|
122
154
|
Sprockets::Sass.options.delete(:load_paths)
|
123
155
|
end
|
124
156
|
|
125
|
-
it
|
126
|
-
@assets.file
|
157
|
+
it 'works with the Compass framework' do
|
158
|
+
@assets.file 'main.css.scss', %(@import "compass/css3";\nbutton { @include border-radius(5px); })
|
127
159
|
|
128
|
-
asset = @env[
|
129
|
-
asset.to_s.should include(
|
160
|
+
asset = @env['main.css']
|
161
|
+
asset.to_s.should include('border-radius: 5px;')
|
130
162
|
end
|
131
163
|
|
132
|
-
it
|
133
|
-
@assets.file
|
134
|
-
@assets.file
|
135
|
-
@assets.file
|
136
|
-
asset = @env[
|
164
|
+
it 'imports globbed files' do
|
165
|
+
@assets.file 'main.css.scss', %(@import "folder/*";\nbody { color: $color; background: $bg-color; })
|
166
|
+
@assets.file 'folder/dep-1.css.scss', '$color: blue;'
|
167
|
+
@assets.file 'folder/dep-2.css.scss', '$bg-color: red;'
|
168
|
+
asset = @env['main.css']
|
137
169
|
asset.to_s.should == "body {\n color: blue;\n background: red; }\n"
|
138
170
|
end
|
139
171
|
|
140
|
-
it
|
141
|
-
@assets.file
|
142
|
-
dep = @assets.file
|
172
|
+
it 'adds dependencies when imported' do
|
173
|
+
@assets.file 'main.css.scss', %(@import "dep";\nbody { color: $color; })
|
174
|
+
dep = @assets.file 'dep.css.scss', '$color: blue;'
|
143
175
|
|
144
|
-
asset = @env[
|
176
|
+
asset = @env['main.css']
|
145
177
|
asset.should be_fresh(@env)
|
146
178
|
|
147
179
|
mtime = Time.now + 1
|
148
|
-
dep.open(
|
180
|
+
dep.open('w') { |f| f.write '$color: red;' }
|
149
181
|
dep.utime mtime, mtime
|
150
182
|
|
151
183
|
asset.should_not be_fresh(@env)
|
152
184
|
end
|
153
185
|
|
154
|
-
it
|
155
|
-
@assets.file
|
156
|
-
@assets.file
|
157
|
-
dep = @assets.file
|
186
|
+
it 'adds dependencies from assets when imported' do
|
187
|
+
@assets.file 'main.css.scss', %(@import "dep-1";\nbody { color: $color; })
|
188
|
+
@assets.file 'dep-1.css.scss', %(@import "dep-2";\n)
|
189
|
+
dep = @assets.file 'dep-2.css.scss', '$color: blue;'
|
158
190
|
|
159
|
-
asset = @env[
|
191
|
+
asset = @env['main.css']
|
160
192
|
asset.should be_fresh(@env)
|
161
193
|
|
162
194
|
mtime = Time.now + 1
|
163
|
-
dep.open(
|
195
|
+
dep.open('w') { |f| f.write '$color: red;' }
|
164
196
|
dep.utime mtime, mtime
|
165
197
|
|
166
198
|
asset.should_not be_fresh(@env)
|
167
199
|
end
|
168
200
|
|
169
|
-
it
|
170
|
-
@assets.file
|
171
|
-
@assets.file
|
172
|
-
dep = @assets.file
|
201
|
+
it 'adds dependencies when imported from a glob' do
|
202
|
+
@assets.file 'main.css.scss', %(@import "folder/*";\nbody { color: $color; background: $bg-color; })
|
203
|
+
@assets.file 'folder/_dep-1.scss', '$color: blue;'
|
204
|
+
dep = @assets.file 'folder/_dep-2.scss', '$bg-color: red;'
|
173
205
|
|
174
|
-
asset = @env[
|
206
|
+
asset = @env['main.css']
|
175
207
|
asset.should be_fresh(@env)
|
176
208
|
|
177
209
|
mtime = Time.now + 1
|
178
|
-
dep.open(
|
210
|
+
dep.open('w') { |f| f.write "$bg-color: white;" }
|
179
211
|
dep.utime mtime, mtime
|
180
212
|
|
181
213
|
asset.should_not be_fresh(@env)
|
@@ -185,63 +217,73 @@ describe Sprockets::Sass do
|
|
185
217
|
cache = {}
|
186
218
|
@env.cache = cache
|
187
219
|
|
188
|
-
@assets.file
|
220
|
+
@assets.file 'main.css.scss', %($color: blue;\nbody { color: $color; })
|
189
221
|
|
190
222
|
@env['main.css'].to_s
|
191
223
|
sass_cache = cache.keys.detect { |key| key =~ /main\.css\.scss/ }
|
192
224
|
sass_cache.should_not be_nil
|
193
225
|
end
|
194
226
|
|
195
|
-
it
|
196
|
-
@assets.file
|
197
|
-
@assets.file
|
198
|
-
@assets.file
|
199
|
-
@assets.file
|
200
|
-
@assets.file
|
227
|
+
it 'adds the #asset_path helper' do
|
228
|
+
@assets.file 'asset_path.css.scss', %(body { background: url(asset-path("image.jpg")); })
|
229
|
+
@assets.file 'asset_url.css.scss', %(body { background: asset-url("image.jpg"); })
|
230
|
+
@assets.file 'asset_path_options.css.scss', %(body { background: url(asset-path("image.jpg", $digest: true, $prefix: "/themes")); })
|
231
|
+
@assets.file 'asset_url_options.css.scss', %(body { background: asset-url("image.jpg", $digest: true, $prefix: "/themes"); })
|
232
|
+
@assets.file 'image.jpg'
|
201
233
|
|
202
|
-
@env[
|
203
|
-
@env[
|
204
|
-
@env[
|
205
|
-
@env[
|
234
|
+
@env['asset_path.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
235
|
+
@env['asset_url.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
236
|
+
@env['asset_path_options.css'].to_s.should =~ %r(body \{\n background: url\("/themes/image-[0-9a-f]+.jpg"\); \}\n)
|
237
|
+
@env['asset_url_options.css'].to_s.should =~ %r(body \{\n background: url\("/themes/image-[0-9a-f]+.jpg"\); \}\n)
|
206
238
|
end
|
207
239
|
|
208
|
-
it
|
209
|
-
@assets.file
|
210
|
-
@assets.file
|
211
|
-
@assets.file
|
212
|
-
@assets.file
|
213
|
-
@assets.file
|
240
|
+
it 'adds the #image_path helper' do
|
241
|
+
@assets.file 'image_path.css.scss', %(body { background: url(image-path("image.jpg")); })
|
242
|
+
@assets.file 'image_url.css.scss', %(body { background: image-url("image.jpg"); })
|
243
|
+
@assets.file 'image_path_options.css.scss', %(body { background: url(image-path("image.jpg", $digest: true, $prefix: "/themes")); })
|
244
|
+
@assets.file 'image_url_options.css.scss', %(body { background: image-url("image.jpg", $digest: true, $prefix: "/themes"); })
|
245
|
+
@assets.file 'image.jpg'
|
214
246
|
|
215
|
-
@env[
|
216
|
-
@env[
|
217
|
-
@env[
|
218
|
-
@env[
|
247
|
+
@env['image_path.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
248
|
+
@env['image_url.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
249
|
+
@env['image_path_options.css'].to_s.should =~ %r(body \{\n background: url\("/themes/image-[0-9a-f]+.jpg"\); \}\n)
|
250
|
+
@env['image_url_options.css'].to_s.should =~ %r(body \{\n background: url\("/themes/image-[0-9a-f]+.jpg"\); \}\n)
|
219
251
|
end
|
220
252
|
|
221
|
-
it
|
222
|
-
@assets.file
|
223
|
-
@assets.file
|
253
|
+
it 'adds the #asset_data_uri helper' do
|
254
|
+
@assets.file 'asset_data_uri.css.scss', %(body { background: asset-data-uri("image.jpg"); })
|
255
|
+
@assets.file 'image.jpg', File.read('spec/fixtures/image.jpg')
|
224
256
|
|
225
|
-
@env[
|
257
|
+
@env['asset_data_uri.css'].to_s.should == %(body {\n background: url(data:image/jpeg;base64,%2F9j%2F4AAQSkZJRgABAgAAZABkAAD%2F7AARRHVja3kAAQAEAAAAPAAA%2F%2B4ADkFkb2JlAGTAAAAAAf%2FbAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f%2F8AAEQgAAQABAwERAAIRAQMRAf%2FEAEoAAQAAAAAAAAAAAAAAAAAAAAgBAQAAAAAAAAAAAAAAAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAARAQAAAAAAAAAAAAAAAAAAAAD%2F2gAMAwEAAhEDEQA%2FACoD%2F9k%3D); }\n)
|
226
258
|
end
|
227
259
|
|
228
260
|
it "mirrors Compass's #image_url helper" do
|
229
|
-
@assets.file
|
230
|
-
@assets.file
|
231
|
-
@assets.file
|
232
|
-
@assets.file
|
261
|
+
@assets.file 'image_path.css.scss', %(body { background: url(image-url("image.jpg", true)); })
|
262
|
+
@assets.file 'image_url.css.scss', %(body { background: image-url("image.jpg", false); })
|
263
|
+
@assets.file 'cache_buster.css.scss', %(body { background: image-url("image.jpg", false, true); })
|
264
|
+
@assets.file 'image.jpg'
|
233
265
|
|
234
|
-
@env[
|
235
|
-
@env[
|
236
|
-
@env[
|
266
|
+
@env['image_path.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
267
|
+
@env['image_url.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
268
|
+
@env['cache_buster.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
237
269
|
end
|
238
270
|
|
239
271
|
it "mirrors Sass::Rails's #asset_path helpers" do
|
240
|
-
@assets.file
|
241
|
-
@assets.file
|
242
|
-
@assets.file
|
272
|
+
@assets.file 'asset_path.css.scss', %(body { background: url(asset-path("image.jpg", image)); })
|
273
|
+
@assets.file 'asset_url.css.scss', %(body { background: asset-url("icon.jpg", image); })
|
274
|
+
@assets.file 'image.jpg'
|
243
275
|
|
244
|
-
@env[
|
245
|
-
@env[
|
276
|
+
@env['asset_path.css'].to_s.should == %(body {\n background: url("/assets/image.jpg"); }\n)
|
277
|
+
@env['asset_url.css'].to_s.should == %(body {\n background: url("/images/icon.jpg"); }\n)
|
278
|
+
end
|
279
|
+
|
280
|
+
it "compresses css" do
|
281
|
+
css = <<-CSS
|
282
|
+
div {
|
283
|
+
color: red;
|
284
|
+
}
|
285
|
+
CSS
|
286
|
+
|
287
|
+
Sprockets::Sass::Compressor.new.compress(css).should == "div{color:red}\n"
|
246
288
|
end
|
247
289
|
end
|
@@ -8,10 +8,10 @@ RSpec::Matchers.define :be_fresh do |env|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
failure_message_for_should do |env|
|
11
|
-
|
11
|
+
'expected asset to be fresh'
|
12
12
|
end
|
13
13
|
|
14
14
|
failure_message_for_should_not do |env|
|
15
|
-
|
15
|
+
'expected asset to be stale'
|
16
16
|
end
|
17
17
|
end
|
data/sprockets-sass.gemspec
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path(
|
3
|
-
require
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'sprockets/sass/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
6
|
+
s.name = 'sprockets-sass'
|
7
7
|
s.version = Sprockets::Sass::VERSION
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
8
|
+
s.authors = ['Pete Browne']
|
9
|
+
s.email = ['me@petebrowne.com']
|
10
|
+
s.homepage = 'http://github.com/petebrowne/sprockets-sass'
|
11
11
|
s.summary = %q{Better Sass integration with Sprockets 2.0}
|
12
12
|
s.description = %q{When using Sprockets 2.0 with Sass you will eventually run into a pretty big issue. `//= require` directives will not allow Sass mixins, variables, etc. to be shared between files. So you'll try to use `@import`, and that'll also blow up in your face. `sprockets-sass` fixes all of this by creating a Sass::Importer that is Sprockets aware.}
|
13
13
|
|
14
|
-
s.rubyforge_project =
|
14
|
+
s.rubyforge_project = 'sprockets-sass'
|
15
15
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
-
s.executables = `git ls-files -- bin/*`.split(
|
19
|
-
s.require_paths = [
|
18
|
+
s.executables = `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.add_dependency
|
22
|
-
s.add_dependency
|
23
|
-
s.add_development_dependency
|
24
|
-
s.add_development_dependency
|
25
|
-
s.add_development_dependency
|
26
|
-
s.add_development_dependency
|
27
|
-
s.add_development_dependency
|
28
|
-
s.add_development_dependency
|
29
|
-
s.add_development_dependency
|
21
|
+
s.add_dependency 'sprockets', '~> 2.0'
|
22
|
+
s.add_dependency 'tilt', '~> 1.1'
|
23
|
+
s.add_development_dependency 'appraisal', '~> 0.4'
|
24
|
+
s.add_development_dependency 'rspec', '~> 2.6'
|
25
|
+
s.add_development_dependency 'test-construct', '~> 1.2'
|
26
|
+
s.add_development_dependency 'sprockets-helpers', '~> 0.3'
|
27
|
+
s.add_development_dependency 'sass', '~> 3.1'
|
28
|
+
s.add_development_dependency 'compass', '~> 0.11'
|
29
|
+
s.add_development_dependency 'rake'
|
30
30
|
end
|
metadata
CHANGED
@@ -1,126 +1,126 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-sass
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.7.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Pete Browne
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-04-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: sprockets
|
17
|
-
requirement:
|
16
|
+
requirement: &-1072935398 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
|
-
requirements:
|
18
|
+
requirements:
|
20
19
|
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements:
|
26
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *-1072935398
|
25
|
+
- !ruby/object:Gem::Dependency
|
27
26
|
name: tilt
|
28
|
-
requirement:
|
27
|
+
requirement: &-1072935738 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
|
-
requirements:
|
29
|
+
requirements:
|
31
30
|
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version:
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.1'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *-1072935738
|
36
|
+
- !ruby/object:Gem::Dependency
|
38
37
|
name: appraisal
|
39
|
-
requirement:
|
38
|
+
requirement: &-1072936198 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
|
-
requirements:
|
40
|
+
requirements:
|
42
41
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version:
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.4'
|
45
44
|
type: :development
|
46
45
|
prerelease: false
|
47
|
-
version_requirements:
|
48
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *-1072936198
|
47
|
+
- !ruby/object:Gem::Dependency
|
49
48
|
name: rspec
|
50
|
-
requirement:
|
49
|
+
requirement: &-1072936978 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
|
-
requirements:
|
51
|
+
requirements:
|
53
52
|
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version:
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.6'
|
56
55
|
type: :development
|
57
56
|
prerelease: false
|
58
|
-
version_requirements:
|
59
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *-1072936978
|
58
|
+
- !ruby/object:Gem::Dependency
|
60
59
|
name: test-construct
|
61
|
-
requirement:
|
60
|
+
requirement: &-1072937558 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
|
-
requirements:
|
62
|
+
requirements:
|
64
63
|
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version:
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.2'
|
67
66
|
type: :development
|
68
67
|
prerelease: false
|
69
|
-
version_requirements:
|
70
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *-1072937558
|
69
|
+
- !ruby/object:Gem::Dependency
|
71
70
|
name: sprockets-helpers
|
72
|
-
requirement:
|
71
|
+
requirement: &-1072938048 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
|
-
requirements:
|
73
|
+
requirements:
|
75
74
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version:
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.3'
|
78
77
|
type: :development
|
79
78
|
prerelease: false
|
80
|
-
version_requirements:
|
81
|
-
- !ruby/object:Gem::Dependency
|
79
|
+
version_requirements: *-1072938048
|
80
|
+
- !ruby/object:Gem::Dependency
|
82
81
|
name: sass
|
83
|
-
requirement:
|
82
|
+
requirement: &-1072938558 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
|
-
requirements:
|
84
|
+
requirements:
|
86
85
|
- - ~>
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version:
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3.1'
|
89
88
|
type: :development
|
90
89
|
prerelease: false
|
91
|
-
version_requirements:
|
92
|
-
- !ruby/object:Gem::Dependency
|
90
|
+
version_requirements: *-1072938558
|
91
|
+
- !ruby/object:Gem::Dependency
|
93
92
|
name: compass
|
94
|
-
requirement:
|
93
|
+
requirement: &-1072939588 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
|
-
requirements:
|
95
|
+
requirements:
|
97
96
|
- - ~>
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version:
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0.11'
|
100
99
|
type: :development
|
101
100
|
prerelease: false
|
102
|
-
version_requirements:
|
103
|
-
- !ruby/object:Gem::Dependency
|
101
|
+
version_requirements: *-1072939588
|
102
|
+
- !ruby/object:Gem::Dependency
|
104
103
|
name: rake
|
105
|
-
requirement:
|
104
|
+
requirement: &-1072796628 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version:
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
111
110
|
type: :development
|
112
111
|
prerelease: false
|
113
|
-
version_requirements:
|
114
|
-
description: When using Sprockets 2.0 with Sass you will eventually run into a pretty
|
115
|
-
|
112
|
+
version_requirements: *-1072796628
|
113
|
+
description: When using Sprockets 2.0 with Sass you will eventually run into a pretty
|
114
|
+
big issue. `//= require` directives will not allow Sass mixins, variables, etc.
|
115
|
+
to be shared between files. So you'll try to use `@import`, and that'll also blow
|
116
|
+
up in your face. `sprockets-sass` fixes all of this by creating a Sass::Importer
|
117
|
+
that is Sprockets aware.
|
118
|
+
email:
|
116
119
|
- me@petebrowne.com
|
117
120
|
executables: []
|
118
|
-
|
119
121
|
extensions: []
|
120
|
-
|
121
122
|
extra_rdoc_files: []
|
122
|
-
|
123
|
-
files:
|
123
|
+
files:
|
124
124
|
- .gitignore
|
125
125
|
- Appraisals
|
126
126
|
- Gemfile
|
@@ -133,9 +133,11 @@ files:
|
|
133
133
|
- gemfiles/sprockets-2.1.gemfile
|
134
134
|
- gemfiles/sprockets-2.2.gemfile
|
135
135
|
- gemfiles/sprockets-2.3.gemfile
|
136
|
+
- gemfiles/sprockets-2.4.gemfile
|
136
137
|
- lib/sprockets-sass.rb
|
137
138
|
- lib/sprockets/sass.rb
|
138
139
|
- lib/sprockets/sass/cache_store.rb
|
140
|
+
- lib/sprockets/sass/compressor.rb
|
139
141
|
- lib/sprockets/sass/functions.rb
|
140
142
|
- lib/sprockets/sass/importer.rb
|
141
143
|
- lib/sprockets/sass/sass_template.rb
|
@@ -148,38 +150,35 @@ files:
|
|
148
150
|
- sprockets-sass.gemspec
|
149
151
|
homepage: http://github.com/petebrowne/sprockets-sass
|
150
152
|
licenses: []
|
151
|
-
|
152
153
|
post_install_message:
|
153
154
|
rdoc_options: []
|
154
|
-
|
155
|
-
require_paths:
|
155
|
+
require_paths:
|
156
156
|
- lib
|
157
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
158
|
none: false
|
159
|
-
requirements:
|
160
|
-
- -
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
|
163
|
-
segments:
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
segments:
|
164
164
|
- 0
|
165
|
-
|
166
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
hash: 393589807
|
166
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
segments:
|
168
|
+
requirements:
|
169
|
+
- - ! '>='
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
segments:
|
173
173
|
- 0
|
174
|
-
|
174
|
+
hash: 393589807
|
175
175
|
requirements: []
|
176
|
-
|
177
176
|
rubyforge_project: sprockets-sass
|
178
|
-
rubygems_version: 1.8.
|
177
|
+
rubygems_version: 1.8.11
|
179
178
|
signing_key:
|
180
179
|
specification_version: 3
|
181
180
|
summary: Better Sass integration with Sprockets 2.0
|
182
|
-
test_files:
|
181
|
+
test_files:
|
183
182
|
- spec/fixtures/image.jpg
|
184
183
|
- spec/spec_helper.rb
|
185
184
|
- spec/sprockets-sass_spec.rb
|