compass-import-once 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/compass/import-once/importer.rb +10 -2
- data/test/fixtures/with_globbing.scss +1 -1
- data/test/import_once_test.rb +21 -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: 9bb61a2b289f93cd201dc6df5380b69652626b61
|
4
|
+
data.tar.gz: a440cd683461a151e3de654487be0582abe9bd4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f0c3f7afec79be58870abe5236bf0a569dcfea7e434fb659ce8f0dd4ea0bf0b55dd113dc521ec8a69a3fc4e58c0f37b4077f8b1c7bb14d250e0433df7bc88e1
|
7
|
+
data.tar.gz: b5ffb065e507941bb7e28f9fded9dc6bcc38bfa54ff1089db8bbf5e4346c67814e9f633c776f63261739a27b168eebbd737de6d12d6fedf4633e58438ffbd9fb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.5
|
@@ -22,7 +22,7 @@ module Compass
|
|
22
22
|
|
23
23
|
def mtime(uri, options, *args)
|
24
24
|
if uri =~ /^\(NOT IMPORTED\) (.*)$/
|
25
|
-
File.mtime($1)
|
25
|
+
File.mtime($1) if File.exist?($1)
|
26
26
|
else
|
27
27
|
super
|
28
28
|
end
|
@@ -52,8 +52,16 @@ module Compass
|
|
52
52
|
Compass::ImportOnce.import_tracker[options[:css_filename]] ||= Set.new
|
53
53
|
end
|
54
54
|
|
55
|
+
# Giant hack to support sass-globbing.
|
56
|
+
# Need to find a better fix.
|
57
|
+
def normalize_filesystem_importers(key)
|
58
|
+
key.map do |part|
|
59
|
+
part.sub(/Glob:/, 'Sass::Importers::Filesystem:')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
55
63
|
def import_tracker_key(engine, options)
|
56
|
-
key(engine.options[:filename], options).join("|").freeze
|
64
|
+
normalize_filesystem_importers(key(engine.options[:filename], options)).join("|").freeze
|
57
65
|
end
|
58
66
|
|
59
67
|
def dummy_engine(engine, options)
|
@@ -1,2 +1,2 @@
|
|
1
|
-
@import "
|
1
|
+
@import "*_partial*";
|
2
2
|
@import "simple_partial";
|
data/test/import_once_test.rb
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
require 'test_helper'
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
|
+
# These are useful in debugging.
|
6
|
+
module Sass::Script::Functions
|
7
|
+
def filename
|
8
|
+
if @options[:filename]
|
9
|
+
Sass::Script::String.new(@options[:filename], true)
|
10
|
+
else
|
11
|
+
Sass::Script::Null.new
|
12
|
+
end
|
13
|
+
end
|
14
|
+
def importer
|
15
|
+
if @options[:importer]
|
16
|
+
Sass::Script::String.new(@options[:importer].inspect, true)
|
17
|
+
else
|
18
|
+
Sass::Script::Null.new
|
19
|
+
end
|
20
|
+
end
|
21
|
+
def importer_is_import_onced
|
22
|
+
Sass::Script::Bool.new(@options[:importer].is_a?(Compass::ImportOnce::Importer))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
5
26
|
class ImportOnceTest < Test::Unit::TestCase
|
6
27
|
FIXTURES_DIR = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures")
|
7
28
|
Dir.glob(File.join(FIXTURES_DIR, "**", "*.scss")).each do |scss_file|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass-import-once
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Eppstein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|