compass-import-once 1.0.1 → 1.0.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
@@ -2,8 +2,6 @@ module Compass
2
2
  module ImportOnce
3
3
  # Any importer object that is extended with this module will get the import once behavior.
4
4
  module Importer
5
- DUMMY_FILENAME = "import_once_dummy_engine".freeze
6
-
7
5
  def find_relative(uri, base, options)
8
6
  uri, force_import = handle_force_import(uri)
9
7
  maybe_replace_with_dummy_engine(super(uri, base, options), options, force_import)
@@ -16,13 +14,21 @@ module Compass
16
14
 
17
15
  # ensure that all dummy engines share the same sass cache entry.
18
16
  def key(uri, options)
19
- if uri == DUMMY_FILENAME
17
+ if uri =~ /^\(NOT IMPORTED\)/
20
18
  ["(import-once)", "dummy_engine"]
21
19
  else
22
20
  super
23
21
  end
24
22
  end
25
23
 
24
+ def mtime(uri, options)
25
+ if uri =~ /^\(NOT IMPORTED\) (.*)$/
26
+ File.mtime($1)
27
+ else
28
+ super
29
+ end
30
+ end
31
+
26
32
  protected
27
33
 
28
34
  # any uri that ends with an exclamation mark will be forced to import
@@ -52,7 +58,7 @@ module Compass
52
58
  end
53
59
 
54
60
  def dummy_engine(engine, options)
55
- new_options = engine.options.merge(:filename => DUMMY_FILENAME)
61
+ new_options = engine.options.merge(:filename => "(NOT IMPORTED) #{engine.options[:filename]}" )
56
62
  Sass::Engine.new("", new_options)
57
63
  end
58
64
 
metadata CHANGED
@@ -1,61 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: compass-import-once
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 1
10
- version: 1.0.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Chris Eppstein
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-12-11 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-12-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: bundler
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 9
29
- segments:
30
- - 1
31
- - 3
32
- version: "1.3"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
33
22
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rake
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
39
25
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :development
48
- version_requirements: *id002
49
- description: Changes the behavior of Sass's @import directive to only import a file once.
50
- email:
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Changes the behavior of Sass's @import directive to only import a file
47
+ once.
48
+ email:
51
49
  - chris@eppsteins.net
52
50
  executables: []
53
-
54
51
  extensions: []
55
-
56
52
  extra_rdoc_files: []
57
-
58
- files:
53
+ files:
59
54
  - .gitignore
60
55
  - Gemfile
61
56
  - LICENSE.txt
@@ -70,38 +65,29 @@ files:
70
65
  - lib/compass/import-once/importer.rb
71
66
  - lib/compass/import-once/version.rb
72
67
  homepage: https://github.com/chriseppstein/compass/tree/master/import-once
73
- licenses:
68
+ licenses:
74
69
  - MIT
75
70
  post_install_message:
76
71
  rdoc_options: []
77
-
78
- require_paths:
72
+ require_paths:
79
73
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
74
+ required_ruby_version: !ruby/object:Gem::Requirement
81
75
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
89
- required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
81
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
98
86
  requirements: []
99
-
100
87
  rubyforge_project:
101
- rubygems_version: 1.8.15
88
+ rubygems_version: 1.8.23
102
89
  signing_key:
103
90
  specification_version: 3
104
91
  summary: Speed up your Sass compilation by making @import only import each file once.
105
92
  test_files: []
106
-
107
93
  has_rdoc: