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 +1
-30
lines changed Expand file tree Collapse file tree 2 files changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ def build_config
108
108
mod [ 'name' ] = 'almond'
109
109
mod [ 'include' ] = name
110
110
end
111
- self . rewrite_urls_in_paths self [ :build_config ]
112
111
end
113
112
self [ :build_config ]
114
113
end
@@ -150,13 +149,5 @@ def asset_allowed?(asset)
150
149
accum || ( matcher =~ asset )
151
150
end ? true : false
152
151
end
153
-
154
- def rewrite_urls_in_paths ( cfg )
155
- if cfg . has_key? 'paths'
156
- cfg [ 'paths' ] = cfg [ 'paths' ] . each_with_object ( { } ) do |( k , v ) , h |
157
- h [ k ] = ( v =~ /^https?:/ ) ? 'empty:' : v
158
- end
159
- end
160
- end
161
152
end
162
153
end
Original file line number Diff line number Diff line change @@ -85,27 +85,7 @@ def setup
85
85
assert_nil @cfg . build_config [ 'priority' ]
86
86
end
87
87
88
- test "build config should replace urls in paths with 'empty:'" do
89
- @cfg . user_config = { 'paths' =>
90
- {
91
- 'jquery' => 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js' ,
92
- 'jqueryssl' => 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'
93
- }
94
- }
95
- assert_equal 'empty:' , @cfg . build_config [ 'paths' ] [ 'jquery' ]
96
- assert_equal 'empty:' , @cfg . build_config [ 'paths' ] [ 'jqueryssl' ]
97
- end
98
-
99
- test "build_config should not modify non-urls in paths" do
100
- @cfg . user_config = { 'paths' =>
101
- {
102
- 'foo' => 'components/foo'
103
- }
104
- }
105
- assert_equal 'components/foo' , @cfg . build_config [ 'paths' ] [ 'foo' ]
106
- end
107
-
108
- ## Almond-specific tests
88
+ ## Almond tests
109
89
test "build_config with almond should accept one module" do
110
90
@cfg . loader = :almond
111
91
@cfg . user_config = { 'modules' => [ { 'name' => 'foo' } ] }
You can’t perform that action at this time.
0 commit comments