@@ -106,50 +106,6 @@ def files
106
106
@data [ 'files' ] ||= { }
107
107
end
108
108
109
- # Deprecated: Compile logical path matching filter into a proc that can be
110
- # passed to logical_paths.select(&proc).
111
- #
112
- # compile_match_filter(proc { |logical_path|
113
- # File.extname(logical_path) == '.js'
114
- # })
115
- #
116
- # compile_match_filter(/application.js/)
117
- #
118
- # compile_match_filter("foo/*.js")
119
- #
120
- # Returns a Proc or raise a TypeError.
121
- def self . compile_match_filter ( filter )
122
- # If the filter is already a proc, great nothing to do.
123
- if filter . respond_to? ( :call )
124
- filter
125
- # If the filter is a regexp, wrap it in a proc that tests it against the
126
- # logical path.
127
- elsif filter . is_a? ( Regexp )
128
- proc { |logical_path | filter . match ( logical_path ) }
129
- elsif filter . is_a? ( String )
130
- # If its an absolute path, detect the matching full filename
131
- if PathUtils . absolute_path? ( filter )
132
- proc { |logical_path , filename | filename == filter . to_s }
133
- else
134
- # Otherwise do an fnmatch against the logical path.
135
- proc { |logical_path | File . fnmatch ( filter . to_s , logical_path ) }
136
- end
137
- else
138
- raise TypeError , "unknown filter type: #{ filter . inspect } "
139
- end
140
- end
141
-
142
- # Deprecated: Filter logical paths in environment. Useful for selecting what
143
- # files you want to compile.
144
- #
145
- # Returns an Enumerator.
146
- def filter_logical_paths ( *args )
147
- filters = args . flatten . map { |arg | self . class . compile_match_filter ( arg ) }
148
- environment . cached . logical_paths . select do |a , b |
149
- filters . any? { |f | f . call ( a , b ) }
150
- end
151
- end
152
-
153
109
# Public: Find all assets matching pattern set in environment.
154
110
#
155
111
# Returns Enumerator of Assets.
@@ -174,9 +130,6 @@ def find(*args)
174
130
nil
175
131
end
176
132
177
- # Deprecated alias.
178
- alias_method :find_logical_paths , :filter_logical_paths
179
-
180
133
# Compile and write asset to directory. The asset is written to a
181
134
# fingerprinted filename like
182
135
# `application-2e8e9a7c6b0aafa0c9bdeec90ea30213.js`. An entry is
0 commit comments