sassc-rails 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sassc/rails/railtie.rb +3 -6
- data/lib/sassc/rails/version.rb +1 -1
- data/test/sassc_rails_test.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f86f8627a626d3e1a913a0edae7ea5ed78b694
|
4
|
+
data.tar.gz: 251373d5cbe880216d251a11cd454fd49032a853
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474481aa93fe80123d2068e1e574c9f8897b44fb0ebae5b53269af3508c8fa55417b1375f725538e5d6fe6e13560c4ec0d6e1bfccce87d1c8980b5dee6a21ebe
|
7
|
+
data.tar.gz: a515b1c0d0f95b46921c4c729a047d0d8f7badef05d932255f13a7dce560847296c781838a8755795a06bc07592bb21f1f32f94a5b1345c0686fb57271509811
|
data/lib/sassc/rails/railtie.rb
CHANGED
@@ -24,12 +24,6 @@ module SassC::Rails
|
|
24
24
|
# Remove the sass middleware if it gets inadvertently enabled by applications.
|
25
25
|
config.after_initialize do |app|
|
26
26
|
app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
|
27
|
-
|
28
|
-
if app.assets
|
29
|
-
# do this after initialize so sass-rails doesn't interfere with us
|
30
|
-
app.assets.register_engine '.sass', SassC::Rails::SassTemplate
|
31
|
-
app.assets.register_engine '.scss', SassC::Rails::ScssTemplate
|
32
|
-
end
|
33
27
|
end
|
34
28
|
|
35
29
|
initializer :setup_sass, group: :all do |app|
|
@@ -52,6 +46,9 @@ module SassC::Rails
|
|
52
46
|
class_attribute :sass_config
|
53
47
|
self.sass_config = app.config.sass
|
54
48
|
end
|
49
|
+
|
50
|
+
app.assets.register_engine '.sass', SassC::Rails::SassTemplate
|
51
|
+
app.assets.register_engine '.scss', SassC::Rails::ScssTemplate
|
55
52
|
end
|
56
53
|
end
|
57
54
|
|
data/lib/sassc/rails/version.rb
CHANGED
data/test/sassc_rails_test.rb
CHANGED
@@ -32,16 +32,26 @@ class SassRailsTest < MiniTest::Unit::TestCase
|
|
32
32
|
def initialize!
|
33
33
|
Rails.env = "test"
|
34
34
|
@app.initialize!
|
35
|
+
handle_sass_rails
|
35
36
|
end
|
36
37
|
|
37
38
|
def initialize_dev!
|
38
39
|
Rails.env = "development"
|
39
40
|
@app.initialize!
|
41
|
+
handle_sass_rails
|
40
42
|
end
|
41
43
|
|
42
44
|
def initialize_prod!
|
43
45
|
Rails.env = "production"
|
44
46
|
@app.initialize!
|
47
|
+
handle_sass_rails
|
48
|
+
end
|
49
|
+
|
50
|
+
def handle_sass_rails
|
51
|
+
if defined?(Sass::Rails)
|
52
|
+
Rails.application.assets.register_engine '.sass', SassC::Rails::SassTemplate
|
53
|
+
Rails.application.assets.register_engine '.scss', SassC::Rails::ScssTemplate
|
54
|
+
end
|
45
55
|
end
|
46
56
|
|
47
57
|
def test_setup_works
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Boland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|