haml-edge 3.1.73 → 3.1.74
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/exec.rb +7 -7
- data/lib/haml/util.rb +37 -0
- data/lib/sass/cache_store.rb +213 -0
- data/lib/sass/callbacks.rb +14 -0
- data/lib/sass/engine.rb +98 -15
- data/lib/sass/error.rb +4 -1
- data/lib/sass/importers/base.rb +138 -0
- data/lib/sass/importers/filesystem.rb +121 -0
- data/lib/sass/importers.rb +22 -0
- data/lib/sass/plugin/compiler.rb +351 -0
- data/lib/sass/plugin/configuration.rb +114 -212
- data/lib/sass/plugin/merb.rb +24 -13
- data/lib/sass/plugin/rails.rb +16 -7
- data/lib/sass/plugin/staleness_checker.rb +55 -33
- data/lib/sass/plugin.rb +25 -173
- data/lib/sass/script/node.rb +3 -3
- data/lib/sass/selector/simple.rb +1 -1
- data/lib/sass/tree/import_node.rb +44 -22
- data/lib/sass/tree/node.rb +17 -2
- data/lib/sass.rb +43 -0
- data/test/haml/util_test.rb +32 -0
- data/test/sass/cache_test.rb +67 -0
- data/test/sass/engine_test.rb +47 -16
- data/test/sass/importer_test.rb +82 -0
- data/test/sass/plugin_test.rb +21 -15
- data/test/sass/test_helper.rb +5 -0
- metadata +12 -3
- data/lib/sass/files.rb +0 -160
@@ -2,220 +2,122 @@
|
|
2
2
|
# so that we can load it independently in Rails 3,
|
3
3
|
# where the full plugin stuff is lazy-loaded.
|
4
4
|
|
5
|
-
require 'sass/callbacks'
|
6
|
-
|
7
5
|
module Sass
|
8
6
|
module Plugin
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
124
|
-
#
|
125
|
-
# @return [{Symbol => Object}]
|
126
|
-
attr_reader :options
|
127
|
-
|
128
|
-
# Sets the options hash.
|
129
|
-
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
130
|
-
#
|
131
|
-
# @param value [{Symbol => Object}] The options hash
|
132
|
-
def options=(value)
|
133
|
-
@options.merge!(value)
|
134
|
-
end
|
135
|
-
|
136
|
-
# Non-destructively modifies \{#options} so that default values are properly set.
|
137
|
-
#
|
138
|
-
# @param additional_options [{Symbol => Object}] An options hash with which to merge \{#options}
|
139
|
-
# @return [{Symbol => Object}] The modified options hash
|
140
|
-
def engine_options(additional_options = {})
|
141
|
-
opts = options.dup.merge(additional_options)
|
142
|
-
opts[:load_paths] = load_paths(opts)
|
143
|
-
opts
|
144
|
-
end
|
145
|
-
|
146
|
-
# Adds a new template-location/css-location mapping.
|
147
|
-
# This means that Sass/SCSS files in `template_location`
|
148
|
-
# will be compiled to CSS files in `css_location`.
|
149
|
-
#
|
150
|
-
# This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
151
|
-
# since the option can be in multiple formats.
|
152
|
-
#
|
153
|
-
# Note that this method will change `options[:template_location]`
|
154
|
-
# to be in the Array format.
|
155
|
-
# This means that even if `options[:template_location]`
|
156
|
-
# had previously been a Hash or a String,
|
157
|
-
# it will now be an Array.
|
158
|
-
#
|
159
|
-
# @param template_location [String] The location where Sass/SCSS files will be.
|
160
|
-
# @param css_location [String] The location where compiled CSS files will go.
|
161
|
-
def add_template_location(template_location, css_location = options[:css_location])
|
162
|
-
normalize_template_location!
|
163
|
-
template_location_array << [template_location, css_location]
|
164
|
-
end
|
165
|
-
|
166
|
-
# Removes a template-location/css-location mapping.
|
167
|
-
# This means that Sass/SCSS files in `template_location`
|
168
|
-
# will no longer be compiled to CSS files in `css_location`.
|
169
|
-
#
|
170
|
-
# This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
171
|
-
# since the option can be in multiple formats.
|
172
|
-
#
|
173
|
-
# Note that this method will change `options[:template_location]`
|
174
|
-
# to be in the Array format.
|
175
|
-
# This means that even if `options[:template_location]`
|
176
|
-
# had previously been a Hash or a String,
|
177
|
-
# it will now be an Array.
|
178
|
-
#
|
179
|
-
# @param template_location [String]
|
180
|
-
# The location where Sass/SCSS files were,
|
181
|
-
# which is now going to be ignored.
|
182
|
-
# @param css_location [String]
|
183
|
-
# The location where compiled CSS files went, but will no longer go.
|
184
|
-
# @return [Boolean]
|
185
|
-
# Non-`nil` if the given mapping already existed and was removed,
|
186
|
-
# or `nil` if nothing was changed.
|
187
|
-
def remove_template_location(template_location, css_location = options[:css_location])
|
188
|
-
normalize_template_location!
|
189
|
-
template_location_array.delete([template_location, css_location])
|
190
|
-
end
|
191
|
-
|
192
|
-
# Returns the template locations configured for Sass
|
193
|
-
# as an array of `[template_location, css_location]` pairs.
|
194
|
-
# See the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
195
|
-
# for details.
|
196
|
-
#
|
197
|
-
# @return [Array<(String, String)>]
|
198
|
-
# An array of `[template_location, css_location]` pairs.
|
199
|
-
def template_location_array
|
200
|
-
old_template_location = options[:template_location]
|
201
|
-
normalize_template_location!
|
202
|
-
options[:template_location]
|
203
|
-
ensure
|
204
|
-
options[:template_location] = old_template_location
|
205
|
-
end
|
206
|
-
|
207
|
-
private
|
208
|
-
|
209
|
-
def normalize_template_location!
|
210
|
-
return if options[:template_location].is_a?(Array)
|
211
|
-
options[:template_location] =
|
212
|
-
case options[:template_location]
|
213
|
-
when nil
|
214
|
-
css_location = options[:css_location] || './public/stylesheets'
|
215
|
-
[[File.join(css_location, 'sass'), css_location]]
|
216
|
-
when String; [[options[:template_location], options[:css_location]]]
|
217
|
-
else; options[:template_location].to_a
|
218
|
-
end
|
7
|
+
module Configuration
|
8
|
+
|
9
|
+
# Returns the default options for a {Sass::Plugin::Compiler}.
|
10
|
+
#
|
11
|
+
# @return [{Symbol => Object}]
|
12
|
+
def default_options
|
13
|
+
@default_options ||= {
|
14
|
+
:css_location => './public/stylesheets',
|
15
|
+
:always_update => false,
|
16
|
+
:always_check => true,
|
17
|
+
:full_exception => true,
|
18
|
+
:cache_location => ".sass-cache"
|
19
|
+
}.freeze
|
20
|
+
end
|
21
|
+
|
22
|
+
# Resets the options and {Sass::Callbacks::InstanceMethods#clear_callbacks! clears all callbacks}.
|
23
|
+
def reset!
|
24
|
+
@options = nil
|
25
|
+
clear_callbacks!
|
26
|
+
end
|
27
|
+
|
28
|
+
# An options hash.
|
29
|
+
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
30
|
+
#
|
31
|
+
# @return [{Symbol => Object}]
|
32
|
+
def options
|
33
|
+
@options ||= default_options.dup
|
34
|
+
@options[:cache_store] ||= Sass::FileCacheStore.new(@options[:cache_location])
|
35
|
+
@options
|
36
|
+
end
|
37
|
+
|
38
|
+
# Sets the options hash.
|
39
|
+
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
40
|
+
# See {Sass::Plugin::Configuration#reset!}
|
41
|
+
# @deprecated Instead, modify the options hash in-place.
|
42
|
+
# @param value [{Symbol => Object}] The options hash
|
43
|
+
def options=(value)
|
44
|
+
Haml::Util.haml_warn("Setting Sass::Plugin.options is deprecated " +
|
45
|
+
"and will be removed in a future release.")
|
46
|
+
options.merge!(value)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Adds a new template-location/css-location mapping.
|
50
|
+
# This means that Sass/SCSS files in `template_location`
|
51
|
+
# will be compiled to CSS files in `css_location`.
|
52
|
+
#
|
53
|
+
# This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
54
|
+
# since the option can be in multiple formats.
|
55
|
+
#
|
56
|
+
# Note that this method will change `options[:template_location]`
|
57
|
+
# to be in the Array format.
|
58
|
+
# This means that even if `options[:template_location]`
|
59
|
+
# had previously been a Hash or a String,
|
60
|
+
# it will now be an Array.
|
61
|
+
#
|
62
|
+
# @param template_location [String] The location where Sass/SCSS files will be.
|
63
|
+
# @param css_location [String] The location where compiled CSS files will go.
|
64
|
+
def add_template_location(template_location, css_location = options[:css_location])
|
65
|
+
normalize_template_location!
|
66
|
+
template_location_array << [template_location, css_location]
|
67
|
+
end
|
68
|
+
|
69
|
+
# Removes a template-location/css-location mapping.
|
70
|
+
# This means that Sass/SCSS files in `template_location`
|
71
|
+
# will no longer be compiled to CSS files in `css_location`.
|
72
|
+
#
|
73
|
+
# This is preferred over manually manipulating the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
74
|
+
# since the option can be in multiple formats.
|
75
|
+
#
|
76
|
+
# Note that this method will change `options[:template_location]`
|
77
|
+
# to be in the Array format.
|
78
|
+
# This means that even if `options[:template_location]`
|
79
|
+
# had previously been a Hash or a String,
|
80
|
+
# it will now be an Array.
|
81
|
+
#
|
82
|
+
# @param template_location [String]
|
83
|
+
# The location where Sass/SCSS files were,
|
84
|
+
# which is now going to be ignored.
|
85
|
+
# @param css_location [String]
|
86
|
+
# The location where compiled CSS files went, but will no longer go.
|
87
|
+
# @return [Boolean]
|
88
|
+
# Non-`nil` if the given mapping already existed and was removed,
|
89
|
+
# or `nil` if nothing was changed.
|
90
|
+
def remove_template_location(template_location, css_location = options[:css_location])
|
91
|
+
normalize_template_location!
|
92
|
+
template_location_array.delete([template_location, css_location])
|
93
|
+
end
|
94
|
+
|
95
|
+
# Returns the template locations configured for Sass
|
96
|
+
# as an array of `[template_location, css_location]` pairs.
|
97
|
+
# See the {file:SASS_REFERENCE.md#template_location-option `:template_location` option}
|
98
|
+
# for details.
|
99
|
+
#
|
100
|
+
# @return [Array<(String, String)>]
|
101
|
+
# An array of `[template_location, css_location]` pairs.
|
102
|
+
def template_location_array
|
103
|
+
old_template_location = options[:template_location]
|
104
|
+
normalize_template_location!
|
105
|
+
options[:template_location]
|
106
|
+
ensure
|
107
|
+
options[:template_location] = old_template_location
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
|
112
|
+
def normalize_template_location!
|
113
|
+
return if options[:template_location].is_a?(Array)
|
114
|
+
options[:template_location] =
|
115
|
+
case options[:template_location]
|
116
|
+
when nil; [[File.join(options[:css_location], 'sass'), options[:css_location]]]
|
117
|
+
when String; [[options[:template_location], options[:css_location]]]
|
118
|
+
else; options[:template_location].to_a
|
119
|
+
end
|
120
|
+
end
|
219
121
|
end
|
220
122
|
end
|
221
123
|
end
|
data/lib/sass/plugin/merb.rb
CHANGED
@@ -1,21 +1,32 @@
|
|
1
1
|
unless defined?(Sass::MERB_LOADED)
|
2
2
|
Sass::MERB_LOADED = true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Sass::Plugin::Configuration
|
5
|
+
# Different default options in a m envirionment.
|
6
|
+
def default_options
|
7
|
+
@default_options ||= begin
|
8
|
+
version = Merb::VERSION.split('.').map { |n| n.to_i }
|
9
|
+
if version[0] <= 0 && version[1] < 5
|
10
|
+
root = MERB_ROOT
|
11
|
+
env = MERB_ENV
|
12
|
+
else
|
13
|
+
root = Merb.root.to_s
|
14
|
+
env = Merb.environment
|
15
|
+
end
|
16
|
+
|
17
|
+
{
|
18
|
+
:always_update => false,
|
19
|
+
:template_location => root + '/public/stylesheets/sass',
|
20
|
+
:css_location => root + '/public/stylesheets',
|
21
|
+
:cache_location => root + '/tmp/sass-cache',
|
22
|
+
:always_check => env != "production",
|
23
|
+
:quiet => env != "production",
|
24
|
+
:full_exception => env != "production"
|
25
|
+
}.freeze
|
26
|
+
end
|
27
|
+
end
|
11
28
|
end
|
12
29
|
|
13
|
-
Sass::Plugin.options.merge!(:template_location => root + '/public/stylesheets/sass',
|
14
|
-
:css_location => root + '/public/stylesheets',
|
15
|
-
:cache_location => root + '/tmp/sass-cache',
|
16
|
-
:always_check => env != "production",
|
17
|
-
:quiet => env != "production",
|
18
|
-
:full_exception => env != "production")
|
19
30
|
config = Merb::Plugins.config[:sass] || Merb::Plugins.config["sass"] || {}
|
20
31
|
|
21
32
|
if defined? config.symbolize_keys!
|
data/lib/sass/plugin/rails.rb
CHANGED
@@ -1,13 +1,22 @@
|
|
1
1
|
unless defined?(Sass::RAILS_LOADED)
|
2
2
|
Sass::RAILS_LOADED = true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Sass::Plugin::Configuration
|
5
|
+
# Different default options in a rails envirionment.
|
6
|
+
def default_options
|
7
|
+
@default_options ||= {
|
8
|
+
:always_update => false,
|
9
|
+
:template_location => Haml::Util.rails_root + '/public/stylesheets/sass',
|
10
|
+
:css_location => Haml::Util.rails_root + '/public/stylesheets',
|
11
|
+
:cache_location => Haml::Util.rails_root + '/tmp/sass-cache',
|
12
|
+
:always_check => Haml::Util.rails_env == "development",
|
13
|
+
:quiet => Haml::Util.rails_env != "production",
|
14
|
+
:full_exception => Haml::Util.rails_env != "production"
|
15
|
+
}.freeze
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
Sass::Plugin.options.reverse_merge!(Sass::Plugin.default_options)
|
11
20
|
|
12
21
|
if defined?(ActionController::Metal)
|
13
22
|
# Rails >= 3.0
|
@@ -6,8 +6,9 @@ module Sass
|
|
6
6
|
#
|
7
7
|
# * A class-level dependency cache which stores @import paths for each file.
|
8
8
|
# This is a long-lived cache that is reused by every StalenessChecker instance.
|
9
|
-
# *
|
10
|
-
#
|
9
|
+
# * Three short-lived instance-level caches, one for file mtimes,
|
10
|
+
# one for whether a file is stale during this particular run.
|
11
|
+
# and one for the parse tree for a file.
|
11
12
|
# These are only used by a single StalenessChecker instance.
|
12
13
|
#
|
13
14
|
# Usage:
|
@@ -26,19 +27,24 @@ module Sass
|
|
26
27
|
@dependencies_cache = {}
|
27
28
|
|
28
29
|
class << self
|
30
|
+
# TODO: attach this to a compiler instance.
|
29
31
|
# @private
|
30
32
|
attr_accessor :dependencies_cache
|
31
33
|
end
|
32
34
|
|
33
35
|
# Creates a new StalenessChecker
|
34
36
|
# for checking the staleness of several stylesheets at once.
|
35
|
-
|
37
|
+
#
|
38
|
+
# @param options [{Symbol => Object}]
|
39
|
+
# See {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
|
40
|
+
def initialize(options)
|
36
41
|
@dependencies = self.class.dependencies_cache
|
37
42
|
|
38
43
|
# Entries in the following instance-level caches are never explicitly expired.
|
39
44
|
# Instead they are supposed to automaticaly go out of scope when a series of staleness checks
|
40
45
|
# (this instance of StalenessChecker was created for) is finished.
|
41
|
-
@mtimes, @dependencies_stale = {}, {}
|
46
|
+
@mtimes, @dependencies_stale, @parse_trees = {}, {}, {}
|
47
|
+
@options = Sass::Engine.normalize_options(options)
|
42
48
|
end
|
43
49
|
|
44
50
|
# Returns whether or not a given CSS file is out of date
|
@@ -48,9 +54,15 @@ module Sass
|
|
48
54
|
# @param template_file [String] The location of the Sass or SCSS template
|
49
55
|
# that is compiled to `css_file`.
|
50
56
|
def stylesheet_needs_update?(css_file, template_file)
|
51
|
-
template_file
|
57
|
+
template_file = File.expand_path(template_file)
|
58
|
+
begin
|
59
|
+
css_mtime = File.mtime(css_file).to_i
|
60
|
+
rescue Errno::ENOENT
|
61
|
+
return true
|
62
|
+
end
|
52
63
|
|
53
|
-
|
64
|
+
dependency_updated?(css_mtime).call(
|
65
|
+
template_file, @options[:filesystem_importer].new("."))
|
54
66
|
end
|
55
67
|
|
56
68
|
# Returns whether or not a given CSS file is out of date
|
@@ -64,13 +76,13 @@ module Sass
|
|
64
76
|
# @param template_file [String] The location of the Sass or SCSS template
|
65
77
|
# that is compiled to `css_file`.
|
66
78
|
def self.stylesheet_needs_update?(css_file, template_file)
|
67
|
-
new.stylesheet_needs_update?(css_file, template_file)
|
79
|
+
new(Plugin.engine_options).stylesheet_needs_update?(css_file, template_file)
|
68
80
|
end
|
69
81
|
|
70
82
|
private
|
71
83
|
|
72
|
-
def dependencies_stale?(
|
73
|
-
timestamps = @dependencies_stale[
|
84
|
+
def dependencies_stale?(uri, importer, css_mtime)
|
85
|
+
timestamps = @dependencies_stale[[uri, importer]] ||= {}
|
74
86
|
timestamps.each_pair do |checked_css_mtime, is_stale|
|
75
87
|
if checked_css_mtime <= css_mtime && !is_stale
|
76
88
|
return false
|
@@ -78,45 +90,55 @@ module Sass
|
|
78
90
|
return true
|
79
91
|
end
|
80
92
|
end
|
81
|
-
timestamps[css_mtime] = dependencies(
|
93
|
+
timestamps[css_mtime] = dependencies(uri, importer).any?(&dependency_updated?(css_mtime))
|
94
|
+
rescue Sass::SyntaxError
|
95
|
+
# If there's an error finding dependencies, default to recompiling.
|
96
|
+
true
|
82
97
|
end
|
83
98
|
|
84
|
-
def mtime(
|
85
|
-
@mtimes[
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
99
|
+
def mtime(uri, importer)
|
100
|
+
@mtimes[[uri, importer]] ||=
|
101
|
+
begin
|
102
|
+
mtime = importer.mtime(uri, @options)
|
103
|
+
if mtime.nil?
|
104
|
+
@dependencies.delete([uri, importer])
|
105
|
+
DELETED
|
106
|
+
else
|
107
|
+
mtime.to_i
|
108
|
+
end
|
109
|
+
end
|
91
110
|
end
|
92
111
|
|
93
|
-
def dependencies(
|
94
|
-
stored_mtime, dependencies = @dependencies[
|
112
|
+
def dependencies(uri, importer)
|
113
|
+
stored_mtime, dependencies = @dependencies[[uri, importer]]
|
95
114
|
|
96
|
-
if !stored_mtime || stored_mtime < mtime(
|
97
|
-
|
115
|
+
if !stored_mtime || stored_mtime < mtime(uri, importer)
|
116
|
+
dependencies = compute_dependencies(uri, importer)
|
117
|
+
@dependencies[[uri, importer]] = [mtime(uri, importer), dependencies]
|
98
118
|
end
|
99
119
|
|
100
120
|
dependencies
|
101
121
|
end
|
102
122
|
|
103
123
|
def dependency_updated?(css_mtime)
|
104
|
-
lambda do |
|
105
|
-
|
106
|
-
|
107
|
-
rescue Sass::SyntaxError
|
108
|
-
# If there's an error finding depenencies, default to recompiling.
|
109
|
-
true
|
110
|
-
end
|
124
|
+
lambda do |uri, importer|
|
125
|
+
mtime(uri, importer) > css_mtime ||
|
126
|
+
dependencies_stale?(uri, importer, css_mtime)
|
111
127
|
end
|
112
128
|
end
|
113
129
|
|
114
|
-
def compute_dependencies(
|
115
|
-
|
116
|
-
|
130
|
+
def compute_dependencies(uri, importer)
|
131
|
+
tree(uri, importer).grep(Tree::ImportNode) do |n|
|
132
|
+
next if n.css_import?
|
133
|
+
file = n.imported_file
|
134
|
+
key = [file.options[:filename], file.options[:importer]]
|
135
|
+
@parse_trees[key] = file.to_tree
|
136
|
+
key
|
117
137
|
end.compact
|
118
|
-
|
119
|
-
|
138
|
+
end
|
139
|
+
|
140
|
+
def tree(uri, importer)
|
141
|
+
@parse_trees[[uri, importer]] ||= importer.find(uri, @options).to_tree
|
120
142
|
end
|
121
143
|
end
|
122
144
|
end
|