sprockets-sass 1.3.1 → 2.0.0.beta2
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 +7 -0
- data/.reek +12 -0
- data/.rspec +1 -0
- data/.rubocop.yml +77 -0
- data/.travis.yml +14 -0
- data/Appraisals +32 -15
- data/Gemfile +5 -0
- data/README.md +41 -4
- data/Rakefile +15 -3
- data/gemfiles/compass_0.11.gemfile +1 -1
- data/gemfiles/sass_3.1.gemfile +1 -1
- data/gemfiles/sass_3.3.gemfile +8 -0
- data/gemfiles/sass_3.4.gemfile +8 -0
- data/gemfiles/sprockets_2.10.gemfile +1 -1
- data/gemfiles/sprockets_2.11.gemfile +1 -1
- data/gemfiles/sprockets_2.2.gemfile +1 -1
- data/gemfiles/sprockets_2.3.gemfile +1 -1
- data/gemfiles/sprockets_2.4.gemfile +1 -1
- data/gemfiles/sprockets_2.5.gemfile +1 -1
- data/gemfiles/sprockets_2.6.gemfile +1 -1
- data/gemfiles/sprockets_2.7.gemfile +1 -1
- data/gemfiles/sprockets_2.8.gemfile +1 -1
- data/gemfiles/sprockets_2.9.gemfile +1 -1
- data/gemfiles/sprockets_3.7.gemfile +9 -0
- data/gemfiles/sprockets_4.0.gemfile +10 -0
- data/gemfiles/sprockets_4.0_beta2.gemfile +9 -0
- data/lib/sprockets/sass/functions.rb +24 -159
- data/lib/sprockets/sass/registration.rb +126 -0
- data/lib/sprockets/sass/utils.rb +115 -0
- data/lib/sprockets/sass/v2/cache_store.rb +26 -0
- data/lib/sprockets/sass/v2/compressor.rb +31 -0
- data/lib/sprockets/sass/v2/functions.rb +142 -0
- data/lib/sprockets/sass/v2/importer.rb +209 -0
- data/lib/sprockets/sass/v2/sass_template.rb +221 -0
- data/lib/sprockets/sass/v2/scss_template.rb +14 -0
- data/lib/sprockets/sass/v3/cache_store.rb +28 -0
- data/lib/sprockets/sass/v3/compressor.rb +97 -0
- data/lib/sprockets/sass/v3/functions.rb +12 -0
- data/lib/sprockets/sass/v3/importer.rb +224 -0
- data/lib/sprockets/sass/v3/sass_template.rb +37 -0
- data/lib/sprockets/sass/v3/scss_template.rb +15 -0
- data/lib/sprockets/sass/v4/cache_store.rb +11 -0
- data/lib/sprockets/sass/v4/compressor.rb +11 -0
- data/lib/sprockets/sass/v4/functions.rb +12 -0
- data/lib/sprockets/sass/v4/importer.rb +109 -0
- data/lib/sprockets/sass/v4/sass_template.rb +27 -0
- data/lib/sprockets/sass/v4/scss_template.rb +16 -0
- data/lib/sprockets/sass/version.rb +2 -1
- data/lib/sprockets/sass.rb +37 -12
- data/lib/sprockets-sass.rb +1 -0
- data/spec/custom_importer_spec.rb +4 -6
- data/spec/importer_spec.rb +44 -0
- data/spec/spec_helper.rb +39 -3
- data/spec/sprockets-sass_spec.rb +102 -62
- data/spec/support/be_fresh_matcher.rb +12 -8
- data/spec/support/dummy_importer.rb +1 -1
- data/spec/support/fail_postprocessor.rb +23 -0
- data/spec/support/fake_engine.rb +50 -0
- data/spec/support/sass_template.rb +11 -0
- data/spec/support/test_registration.rb +11 -0
- data/sprockets-sass.gemspec +28 -9
- metadata +100 -97
- data/gemfiles/compass_0.12.gemfile +0 -7
- data/gemfiles/sass_3.2.gemfile +0 -7
- data/gemfiles/sprockets_2.0.gemfile +0 -7
- data/gemfiles/sprockets_2.1.gemfile +0 -9
- data/lib/sprockets/sass/cache_store.rb +0 -27
- data/lib/sprockets/sass/compressor.rb +0 -22
- data/lib/sprockets/sass/importer.rb +0 -142
- data/lib/sprockets/sass/sass_template.rb +0 -115
- data/lib/sprockets/sass/scss_template.rb +0 -12
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class FailPostProcessor
|
|
2
|
+
def initialize(filename, &block)
|
|
3
|
+
@filename = filename
|
|
4
|
+
@source = block.call
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def render(context, empty_hash_wtf)
|
|
8
|
+
self.class.run(@filename, @source, context)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.run(filename, source, context)
|
|
12
|
+
source.gsub /@import/, 'fail engine'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.call(input)
|
|
16
|
+
filename = input[:filename]
|
|
17
|
+
source = input[:data]
|
|
18
|
+
context = input[:environment].context_class.new(input)
|
|
19
|
+
|
|
20
|
+
result = run(filename, source, context)
|
|
21
|
+
context.metadata.merge(data: result)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Sprockets
|
|
2
|
+
module Sass
|
|
3
|
+
class FakeEngine
|
|
4
|
+
VERSION = '1'
|
|
5
|
+
|
|
6
|
+
def self.default_mime_type
|
|
7
|
+
'text/xyx'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# Public: Return singleton instance with default options.
|
|
11
|
+
#
|
|
12
|
+
# Returns SassProcessor object.
|
|
13
|
+
def self.instance
|
|
14
|
+
@instance ||= new
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.call(input)
|
|
18
|
+
instance.call(input)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
attr_accessor :has_been_used
|
|
22
|
+
attr_reader :context
|
|
23
|
+
|
|
24
|
+
def initialize(*_args, &block)
|
|
25
|
+
@has_been_used = false
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def call(input)
|
|
29
|
+
@context = input[:environment].context_class.new(input)
|
|
30
|
+
run
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def render(context, _empty_hash_wtf)
|
|
34
|
+
@context = context
|
|
35
|
+
run
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def run
|
|
39
|
+
@has_been_used = true
|
|
40
|
+
result = ""
|
|
41
|
+
if context.respond_to?(:metadata)
|
|
42
|
+
context.metadata.merge(data: result, sass_dependencies: Set.new([]))
|
|
43
|
+
else
|
|
44
|
+
result
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
data/sprockets-sass.gemspec
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
|
3
4
|
require 'sprockets/sass/version'
|
|
4
5
|
|
|
5
6
|
Gem::Specification.new do |s|
|
|
@@ -8,24 +9,42 @@ Gem::Specification.new do |s|
|
|
|
8
9
|
s.authors = ['Pete Browne']
|
|
9
10
|
s.email = ['me@petebrowne.com']
|
|
10
11
|
s.homepage = 'http://github.com/petebrowne/sprockets-sass'
|
|
11
|
-
s.summary =
|
|
12
|
-
s.description =
|
|
12
|
+
s.summary = 'Better Sass integration with Sprockets 2.0'
|
|
13
|
+
s.description = "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
14
|
|
|
14
15
|
s.rubyforge_project = 'sprockets-sass'
|
|
15
16
|
|
|
17
|
+
# usually the license needs to be specified in gemspec also as a standard
|
|
18
|
+
s.licenses = ['MIT']
|
|
19
|
+
|
|
20
|
+
# This is needed so that on rubygems.org we can see the actual date
|
|
21
|
+
# of the published version due to changes in Rubygems repo over the last year(2015 - 2016)
|
|
22
|
+
s.date = Date.today
|
|
23
|
+
|
|
24
|
+
# usually the platform needs to be specified also, to avoid people trying to install this gem on wrong platform
|
|
25
|
+
s.platform = Gem::Platform::RUBY
|
|
26
|
+
|
|
27
|
+
s.required_ruby_version = '>= 2.0'
|
|
28
|
+
s.required_rubygems_version = '>= 2.0'
|
|
29
|
+
s.metadata = {
|
|
30
|
+
'source_url' => s.homepage,
|
|
31
|
+
'issue_tracker' => "#{s.homepage}/issues"
|
|
32
|
+
}
|
|
33
|
+
|
|
16
34
|
s.files = `git ls-files`.split("\n")
|
|
17
35
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
18
|
-
s.executables = `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }
|
|
36
|
+
s.executables = `git ls-files -- bin/*`.split('\n').map { |f| File.basename(f) }
|
|
19
37
|
s.require_paths = ['lib']
|
|
20
38
|
|
|
21
|
-
s.add_dependency 'sprockets', '
|
|
22
|
-
|
|
23
|
-
s.add_development_dependency '
|
|
24
|
-
s.add_development_dependency 'rspec', '~> 2.13'
|
|
39
|
+
s.add_dependency 'sprockets', '>= 2.0', '< 4.0'
|
|
40
|
+
|
|
41
|
+
s.add_development_dependency 'rspec', '~> 3.5'
|
|
25
42
|
s.add_development_dependency 'test_construct', '~> 2.0'
|
|
26
43
|
s.add_development_dependency 'sprockets-helpers', '~> 1.0'
|
|
27
44
|
s.add_development_dependency 'sass', '~> 3.3'
|
|
28
45
|
s.add_development_dependency 'compass', '~> 1.0.0.alpha.19'
|
|
29
|
-
s.add_development_dependency 'rake'
|
|
30
46
|
s.add_development_dependency 'pry'
|
|
47
|
+
|
|
48
|
+
s.add_development_dependency 'appraisal', '~> 2.1', '>= 2.1'
|
|
49
|
+
s.add_development_dependency 'rake', '>= 10.5', '>= 10.5'
|
|
31
50
|
end
|
metadata
CHANGED
|
@@ -1,176 +1,153 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sprockets-sass
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 2.0.0.beta2
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Pete Browne
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: sprockets
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
|
-
- -
|
|
17
|
+
- - ">="
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '2.0'
|
|
22
|
-
|
|
23
|
-
prerelease: false
|
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
|
-
requirements:
|
|
27
|
-
- - ~>
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '2.0'
|
|
30
|
-
- !ruby/object:Gem::Dependency
|
|
31
|
-
name: tilt
|
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
|
-
requirements:
|
|
35
|
-
- - ~>
|
|
20
|
+
- - "<"
|
|
36
21
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: '
|
|
22
|
+
version: '4.0'
|
|
38
23
|
type: :runtime
|
|
39
24
|
prerelease: false
|
|
40
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
26
|
requirements:
|
|
43
|
-
- -
|
|
27
|
+
- - ">="
|
|
44
28
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: '
|
|
46
|
-
-
|
|
47
|
-
name: appraisal
|
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
|
-
requirements:
|
|
51
|
-
- - ~>
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0.5'
|
|
54
|
-
type: :development
|
|
55
|
-
prerelease: false
|
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
|
-
requirements:
|
|
59
|
-
- - ~>
|
|
29
|
+
version: '2.0'
|
|
30
|
+
- - "<"
|
|
60
31
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0
|
|
32
|
+
version: '4.0'
|
|
62
33
|
- !ruby/object:Gem::Dependency
|
|
63
34
|
name: rspec
|
|
64
35
|
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
none: false
|
|
66
36
|
requirements:
|
|
67
|
-
- - ~>
|
|
37
|
+
- - "~>"
|
|
68
38
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: '
|
|
39
|
+
version: '3.5'
|
|
70
40
|
type: :development
|
|
71
41
|
prerelease: false
|
|
72
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
-
none: false
|
|
74
43
|
requirements:
|
|
75
|
-
- - ~>
|
|
44
|
+
- - "~>"
|
|
76
45
|
- !ruby/object:Gem::Version
|
|
77
|
-
version: '
|
|
46
|
+
version: '3.5'
|
|
78
47
|
- !ruby/object:Gem::Dependency
|
|
79
48
|
name: test_construct
|
|
80
49
|
requirement: !ruby/object:Gem::Requirement
|
|
81
|
-
none: false
|
|
82
50
|
requirements:
|
|
83
|
-
- - ~>
|
|
51
|
+
- - "~>"
|
|
84
52
|
- !ruby/object:Gem::Version
|
|
85
53
|
version: '2.0'
|
|
86
54
|
type: :development
|
|
87
55
|
prerelease: false
|
|
88
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
-
none: false
|
|
90
57
|
requirements:
|
|
91
|
-
- - ~>
|
|
58
|
+
- - "~>"
|
|
92
59
|
- !ruby/object:Gem::Version
|
|
93
60
|
version: '2.0'
|
|
94
61
|
- !ruby/object:Gem::Dependency
|
|
95
62
|
name: sprockets-helpers
|
|
96
63
|
requirement: !ruby/object:Gem::Requirement
|
|
97
|
-
none: false
|
|
98
64
|
requirements:
|
|
99
|
-
- - ~>
|
|
65
|
+
- - "~>"
|
|
100
66
|
- !ruby/object:Gem::Version
|
|
101
67
|
version: '1.0'
|
|
102
68
|
type: :development
|
|
103
69
|
prerelease: false
|
|
104
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
71
|
requirements:
|
|
107
|
-
- - ~>
|
|
72
|
+
- - "~>"
|
|
108
73
|
- !ruby/object:Gem::Version
|
|
109
74
|
version: '1.0'
|
|
110
75
|
- !ruby/object:Gem::Dependency
|
|
111
76
|
name: sass
|
|
112
77
|
requirement: !ruby/object:Gem::Requirement
|
|
113
|
-
none: false
|
|
114
78
|
requirements:
|
|
115
|
-
- - ~>
|
|
79
|
+
- - "~>"
|
|
116
80
|
- !ruby/object:Gem::Version
|
|
117
81
|
version: '3.3'
|
|
118
82
|
type: :development
|
|
119
83
|
prerelease: false
|
|
120
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
none: false
|
|
122
85
|
requirements:
|
|
123
|
-
- - ~>
|
|
86
|
+
- - "~>"
|
|
124
87
|
- !ruby/object:Gem::Version
|
|
125
88
|
version: '3.3'
|
|
126
89
|
- !ruby/object:Gem::Dependency
|
|
127
90
|
name: compass
|
|
128
91
|
requirement: !ruby/object:Gem::Requirement
|
|
129
|
-
none: false
|
|
130
92
|
requirements:
|
|
131
|
-
- - ~>
|
|
93
|
+
- - "~>"
|
|
132
94
|
- !ruby/object:Gem::Version
|
|
133
95
|
version: 1.0.0.alpha.19
|
|
134
96
|
type: :development
|
|
135
97
|
prerelease: false
|
|
136
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
none: false
|
|
138
99
|
requirements:
|
|
139
|
-
- - ~>
|
|
100
|
+
- - "~>"
|
|
140
101
|
- !ruby/object:Gem::Version
|
|
141
102
|
version: 1.0.0.alpha.19
|
|
142
103
|
- !ruby/object:Gem::Dependency
|
|
143
|
-
name:
|
|
104
|
+
name: pry
|
|
144
105
|
requirement: !ruby/object:Gem::Requirement
|
|
145
|
-
none: false
|
|
146
106
|
requirements:
|
|
147
|
-
- -
|
|
107
|
+
- - ">="
|
|
148
108
|
- !ruby/object:Gem::Version
|
|
149
109
|
version: '0'
|
|
150
110
|
type: :development
|
|
151
111
|
prerelease: false
|
|
152
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
-
none: false
|
|
154
113
|
requirements:
|
|
155
|
-
- -
|
|
114
|
+
- - ">="
|
|
156
115
|
- !ruby/object:Gem::Version
|
|
157
116
|
version: '0'
|
|
158
117
|
- !ruby/object:Gem::Dependency
|
|
159
|
-
name:
|
|
118
|
+
name: appraisal
|
|
160
119
|
requirement: !ruby/object:Gem::Requirement
|
|
161
|
-
none: false
|
|
162
120
|
requirements:
|
|
163
|
-
- -
|
|
121
|
+
- - "~>"
|
|
164
122
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '
|
|
123
|
+
version: '2.1'
|
|
124
|
+
- - ">="
|
|
125
|
+
- !ruby/object:Gem::Version
|
|
126
|
+
version: '2.1'
|
|
166
127
|
type: :development
|
|
167
128
|
prerelease: false
|
|
168
129
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
|
-
none: false
|
|
170
130
|
requirements:
|
|
171
|
-
- -
|
|
131
|
+
- - "~>"
|
|
172
132
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: '
|
|
133
|
+
version: '2.1'
|
|
134
|
+
- - ">="
|
|
135
|
+
- !ruby/object:Gem::Version
|
|
136
|
+
version: '2.1'
|
|
137
|
+
- !ruby/object:Gem::Dependency
|
|
138
|
+
name: rake
|
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
|
140
|
+
requirements:
|
|
141
|
+
- - ">="
|
|
142
|
+
- !ruby/object:Gem::Version
|
|
143
|
+
version: '10.5'
|
|
144
|
+
type: :development
|
|
145
|
+
prerelease: false
|
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
147
|
+
requirements:
|
|
148
|
+
- - ">="
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '10.5'
|
|
174
151
|
description: When using Sprockets 2.0 with Sass you will eventually run into a pretty
|
|
175
152
|
big issue. `//= require` directives will not allow Sass mixins, variables, etc.
|
|
176
153
|
to be shared between files. So you'll try to use `@import`, and that'll also blow
|
|
@@ -182,18 +159,20 @@ executables: []
|
|
|
182
159
|
extensions: []
|
|
183
160
|
extra_rdoc_files: []
|
|
184
161
|
files:
|
|
185
|
-
- .gitignore
|
|
162
|
+
- ".gitignore"
|
|
163
|
+
- ".reek"
|
|
164
|
+
- ".rspec"
|
|
165
|
+
- ".rubocop.yml"
|
|
166
|
+
- ".travis.yml"
|
|
186
167
|
- Appraisals
|
|
187
168
|
- Gemfile
|
|
188
169
|
- LICENSE
|
|
189
170
|
- README.md
|
|
190
171
|
- Rakefile
|
|
191
172
|
- gemfiles/compass_0.11.gemfile
|
|
192
|
-
- gemfiles/compass_0.12.gemfile
|
|
193
173
|
- gemfiles/sass_3.1.gemfile
|
|
194
|
-
- gemfiles/sass_3.
|
|
195
|
-
- gemfiles/
|
|
196
|
-
- gemfiles/sprockets_2.1.gemfile
|
|
174
|
+
- gemfiles/sass_3.3.gemfile
|
|
175
|
+
- gemfiles/sass_3.4.gemfile
|
|
197
176
|
- gemfiles/sprockets_2.10.gemfile
|
|
198
177
|
- gemfiles/sprockets_2.11.gemfile
|
|
199
178
|
- gemfiles/sprockets_2.2.gemfile
|
|
@@ -204,56 +183,80 @@ files:
|
|
|
204
183
|
- gemfiles/sprockets_2.7.gemfile
|
|
205
184
|
- gemfiles/sprockets_2.8.gemfile
|
|
206
185
|
- gemfiles/sprockets_2.9.gemfile
|
|
186
|
+
- gemfiles/sprockets_3.7.gemfile
|
|
187
|
+
- gemfiles/sprockets_4.0.gemfile
|
|
188
|
+
- gemfiles/sprockets_4.0_beta2.gemfile
|
|
207
189
|
- lib/sprockets-sass.rb
|
|
208
190
|
- lib/sprockets/sass.rb
|
|
209
|
-
- lib/sprockets/sass/cache_store.rb
|
|
210
|
-
- lib/sprockets/sass/compressor.rb
|
|
211
191
|
- lib/sprockets/sass/functions.rb
|
|
212
|
-
- lib/sprockets/sass/
|
|
213
|
-
- lib/sprockets/sass/
|
|
214
|
-
- lib/sprockets/sass/
|
|
192
|
+
- lib/sprockets/sass/registration.rb
|
|
193
|
+
- lib/sprockets/sass/utils.rb
|
|
194
|
+
- lib/sprockets/sass/v2/cache_store.rb
|
|
195
|
+
- lib/sprockets/sass/v2/compressor.rb
|
|
196
|
+
- lib/sprockets/sass/v2/functions.rb
|
|
197
|
+
- lib/sprockets/sass/v2/importer.rb
|
|
198
|
+
- lib/sprockets/sass/v2/sass_template.rb
|
|
199
|
+
- lib/sprockets/sass/v2/scss_template.rb
|
|
200
|
+
- lib/sprockets/sass/v3/cache_store.rb
|
|
201
|
+
- lib/sprockets/sass/v3/compressor.rb
|
|
202
|
+
- lib/sprockets/sass/v3/functions.rb
|
|
203
|
+
- lib/sprockets/sass/v3/importer.rb
|
|
204
|
+
- lib/sprockets/sass/v3/sass_template.rb
|
|
205
|
+
- lib/sprockets/sass/v3/scss_template.rb
|
|
206
|
+
- lib/sprockets/sass/v4/cache_store.rb
|
|
207
|
+
- lib/sprockets/sass/v4/compressor.rb
|
|
208
|
+
- lib/sprockets/sass/v4/functions.rb
|
|
209
|
+
- lib/sprockets/sass/v4/importer.rb
|
|
210
|
+
- lib/sprockets/sass/v4/sass_template.rb
|
|
211
|
+
- lib/sprockets/sass/v4/scss_template.rb
|
|
215
212
|
- lib/sprockets/sass/version.rb
|
|
216
213
|
- spec/custom_importer_spec.rb
|
|
217
214
|
- spec/fixtures/image.jpg
|
|
215
|
+
- spec/importer_spec.rb
|
|
218
216
|
- spec/spec_helper.rb
|
|
219
217
|
- spec/sprockets-sass_spec.rb
|
|
220
218
|
- spec/support/be_fresh_matcher.rb
|
|
221
219
|
- spec/support/dummy_importer.rb
|
|
220
|
+
- spec/support/fail_postprocessor.rb
|
|
221
|
+
- spec/support/fake_engine.rb
|
|
222
|
+
- spec/support/sass_template.rb
|
|
223
|
+
- spec/support/test_registration.rb
|
|
222
224
|
- sprockets-sass.gemspec
|
|
223
225
|
homepage: http://github.com/petebrowne/sprockets-sass
|
|
224
|
-
licenses:
|
|
226
|
+
licenses:
|
|
227
|
+
- MIT
|
|
228
|
+
metadata:
|
|
229
|
+
source_url: http://github.com/petebrowne/sprockets-sass
|
|
230
|
+
issue_tracker: http://github.com/petebrowne/sprockets-sass/issues
|
|
225
231
|
post_install_message:
|
|
226
232
|
rdoc_options: []
|
|
227
233
|
require_paths:
|
|
228
234
|
- lib
|
|
229
235
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
|
-
none: false
|
|
231
236
|
requirements:
|
|
232
|
-
- -
|
|
237
|
+
- - ">="
|
|
233
238
|
- !ruby/object:Gem::Version
|
|
234
|
-
version: '0'
|
|
235
|
-
segments:
|
|
236
|
-
- 0
|
|
237
|
-
hash: 3609052118708628923
|
|
239
|
+
version: '2.0'
|
|
238
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
|
-
none: false
|
|
240
241
|
requirements:
|
|
241
|
-
- -
|
|
242
|
+
- - ">="
|
|
242
243
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '0'
|
|
244
|
-
segments:
|
|
245
|
-
- 0
|
|
246
|
-
hash: 3609052118708628923
|
|
244
|
+
version: '2.0'
|
|
247
245
|
requirements: []
|
|
248
246
|
rubyforge_project: sprockets-sass
|
|
249
|
-
rubygems_version:
|
|
247
|
+
rubygems_version: 2.4.5.1
|
|
250
248
|
signing_key:
|
|
251
|
-
specification_version:
|
|
249
|
+
specification_version: 4
|
|
252
250
|
summary: Better Sass integration with Sprockets 2.0
|
|
253
251
|
test_files:
|
|
254
252
|
- spec/custom_importer_spec.rb
|
|
255
253
|
- spec/fixtures/image.jpg
|
|
254
|
+
- spec/importer_spec.rb
|
|
256
255
|
- spec/spec_helper.rb
|
|
257
256
|
- spec/sprockets-sass_spec.rb
|
|
258
257
|
- spec/support/be_fresh_matcher.rb
|
|
259
258
|
- spec/support/dummy_importer.rb
|
|
259
|
+
- spec/support/fail_postprocessor.rb
|
|
260
|
+
- spec/support/fake_engine.rb
|
|
261
|
+
- spec/support/sass_template.rb
|
|
262
|
+
- spec/support/test_registration.rb
|
data/gemfiles/sass_3.2.gemfile
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
require 'sass'
|
|
2
|
-
|
|
3
|
-
module Sprockets
|
|
4
|
-
module Sass
|
|
5
|
-
class CacheStore < ::Sass::CacheStores::Base
|
|
6
|
-
attr_reader :environment
|
|
7
|
-
|
|
8
|
-
def initialize(environment)
|
|
9
|
-
@environment = environment
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def _store(key, version, sha, contents)
|
|
13
|
-
environment.send :cache_set, "sass/#{key}", { :version => version, :sha => sha, :contents => contents }
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def _retrieve(key, version, sha)
|
|
17
|
-
if obj = environment.send(:cache_get, "sass/#{key}")
|
|
18
|
-
return unless obj[:version] == version
|
|
19
|
-
return unless obj[:sha] == sha
|
|
20
|
-
obj[:obj]
|
|
21
|
-
else
|
|
22
|
-
nil
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|