This repository was archived by the owner on Mar 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,6 @@ def module_name_for(mod)
158
158
def get_binding
159
159
return binding ( )
160
160
end
161
-
162
- def asset_allowed? ( logical_path )
163
- logical_path_patterns . reduce ( false ) do |accum , pattern |
164
- accum || !!( pattern . match ( logical_path ) )
165
- end
166
- end
167
161
end
168
162
end
169
163
end
Original file line number Diff line number Diff line change @@ -98,12 +98,13 @@ OS X Homebrew users can use 'brew install node'.
98
98
original_cache = requirejs . env . cache
99
99
requirejs . env . cache = nil
100
100
101
- js_ext = requirejs . env . mime_types [ "application/javascript" ] [ :extensions ] . first
102
-
103
- requirejs . env . logical_paths do | logical_path , physical_path |
104
- next \
105
- if ! requirejs . config . asset_allowed? ( logical_path )
101
+ if :: Sprockets :: VERSION . split ( "." , - 1 ) [ 0 ] . to_i >= 3
102
+ js_ext = requirejs . env . mime_types [ "application/javascript" ] [ :extensions ] . first
103
+ else
104
+ js_ext = requirejs . env . extension_for_mime_type ( "application/javascript" )
105
+ end
106
106
107
+ requirejs . env . each_logical_path ( requirejs . config . logical_path_patterns ) do |logical_path |
107
108
m = ::Requirejs ::Rails ::Config ::BOWER_PATH_PATTERN . match ( logical_path )
108
109
109
110
if !m
You can’t perform that action at this time.
0 commit comments