juicer 1.0.2 → 1.0.3

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.0.3 / 2010-04-15
2
+ * Update YUI Compressor installer to find the download link in YUI's updated markup
3
+ Pacthed by Olle Jonsson (http://ollehost.dk/blog/)
4
+ * Make stylesheet merger properly handle quoted URLs, fixes GH issue 20
5
+
1
6
  == 1.0.2 / 2010-03-19
2
7
  * Don't add multiple cache busters
3
8
 
data/Readme.rdoc CHANGED
@@ -7,6 +7,7 @@ Christian Johansen (http://www.cjohansen.no) and contributors:
7
7
  * Pavel Valodzka (http://github.com/valodzka)
8
8
  * Daniel Stockman (http://evocateur.org/)
9
9
  * Aaron Suggs (http://ktheory.com)
10
+ * Olle Jonsson (http://ollehost.dk/blog/)
10
11
 
11
12
  == DESCRIPTION:
12
13
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
data/lib/juicer.rb CHANGED
@@ -3,7 +3,7 @@ require "logger"
3
3
  module Juicer
4
4
 
5
5
  # :stopdoc:
6
- VERSION = '1.0.2'
6
+ VERSION = '1.0.3'
7
7
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
8
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
9
  LOGGER = Logger.new(STDOUT)
@@ -60,8 +60,9 @@ module Juicer
60
60
  def latest
61
61
  return @latest if @latest
62
62
  webpage = Nokogiri::HTML(open(@website))
63
- @latest = (webpage / "//h2[@id='yuicompressor']/../../../..//a")[0].get_attribute("href").match(/(\d\.\d\.\d)/)[1]
63
+ @latest = (webpage / "h3#yuicompressor + ul li a:last").text.match(/(\d\.\d\.\d)/)[1]
64
64
  end
65
+
65
66
  end
66
67
  end
67
68
  end
@@ -58,8 +58,9 @@ module Juicer
58
58
 
59
59
  content.scan(/url\([\s"']*([^\)"'\s]*)[\s"']*\)/m).uniq.collect do |url|
60
60
  url = url.first
61
+ puts "URL: #{url}"
61
62
  path = resolve_path(url, dir)
62
- content.gsub!(/\(#{url}\)/m, "(#{path})") unless path == url
63
+ content.gsub!(/\([\s"']*#{url}[\s"']*\)/m, "(#{path})") unless path == url
63
64
  end
64
65
 
65
66
  content
data/test/data/b2.css ADDED
@@ -0,0 +1,5 @@
1
+ @import url("d1.css");
2
+
3
+ html {
4
+ background: red;
5
+ }
@@ -3,11 +3,11 @@ body {
3
3
  }
4
4
 
5
5
  h1 {
6
- background: url(../a1.css) 0 0 no-repeat;
6
+ background: url('../a1.css') 0 0 no-repeat;
7
7
  }
8
8
 
9
9
  h2 {
10
- background: url(2.gif) no-repeat;
10
+ background: url("2.gif") no-repeat;
11
11
  }
12
12
 
13
13
  p {
@@ -8,22 +8,17 @@
8
8
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
9
9
  <link rel="icon" href="/favicon.ico" type="image/x-icon">
10
10
  <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0/build/reset-fonts-grids/reset-fonts-grids.css">
11
- <link rel="stylesheet" type="text/css" href="/assets/skin/yuilib-11.30.2009.css">
12
- <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yuiloader-dom-event/yuiloader-dom-event.js&3.0.0/build/yui/yui-min.js&3.0.0/build/loader/loader-min.js&3.0.0/build/oop/oop-min.js&3.0.0/build/dom/dom-min.js&3.0.0/build/event-custom/event-custom-base-min.js&3.0.0/build/event/event-base-min.js&3.0.0/build/pluginhost/pluginhost-min.js&3.0.0/build/node/node-min.js&3.0.0/build/event/event-delegate-min.js"></script>
11
+ <link rel="stylesheet" type="text/css" href="/assets/skin/yuilib-04.02.2010.css">
12
+ <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.0r4/build/yuiloader-dom-event/yuiloader-dom-event.js&3.1.0/build/yui/yui-min.js&3.1.0/build/loader/loader-min.js&3.1.0/build/oop/oop-min.js&3.1.0/build/dom/dom-min.js&3.1.0/build/event-custom/event-custom-base-min.js&3.1.0/build/event/event-base-min.js&3.1.0/build/pluginhost/pluginhost-min.js&3.1.0/build/node/node-min.js&3.1.0/build/event/event-delegate-min.js"></script>
13
13
  <script>
14
14
  var YUIConfig = {
15
15
  baseyui2: 'http://yui.yahooapis.com/2.8.0r4/build/',
16
- base: 'http://yui.yahooapis.com/3.0.0/build/',
17
- debug: false,
16
+ base: 'http://yui.yahooapis.com/3.1.0/build/',
17
+ debug: false//,
18
18
  //filter: 'DEBUG',
19
- combine: true
19
+ //combine: false
20
20
  };
21
21
  </script>
22
- <style>
23
- #downloads tr.hide {
24
- display: none;
25
- }
26
- </style>
27
22
  </head>
28
23
  <body>
29
24
  <div id="wrap">
@@ -48,23 +43,18 @@ var YUIConfig = {
48
43
  <li><a href="/" title="Home">Home</a></li>
49
44
  <li><a href="/gallery" title="Gallery">Gallery</a></li>
50
45
  <li><a href="/forum" title="Forums">Forums</a></li>
51
- <li><a href="/projects/yui2/wiki">YUI 2.x</a></li>
52
- <li><a href="/projects/yui3/wiki">YUI 3.x</a></li>
53
- <li><a href="/projects/yuicompressor/wiki">YUICompressor</a></li>
54
- <li><a href="/projects/yuidoc/wiki">YUIDoc</a></li>
46
+ <li><a href="/projects/yui2/">YUI 2</a></li>
47
+ <li><a href="/projects/yui3/">YUI 3</a></li>
48
+ <li><a href="/projects/yuicompressor/">YUI Compressor</a></li>
49
+ <li><a href="/projects/yuidoc/">YUI Doc</a></li>
55
50
  <li><a href="/projects" class="more">More</a></li>
56
51
  </ul>
57
52
 
58
53
  <div id="sections" class="clearfix">
59
54
  <ul class="clearfix">
60
-
61
- <!-- <div id="subnav" class="navtabs clearfix">
62
- <ul> -->
63
- <li><a href="/forum/ucp.php?mode=register">Register</a></li>
55
+ <li><a href="/forum/ucp.php?mode=register">Register</a></li>
64
56
  <li><a href="/forum/ucp.php?mode=login&redirect=/downloads/">Login</a></li>
65
- <!-- </ul>
66
- </div> -->
67
- </ul>
57
+ </ul>
68
58
  </div>
69
59
  </div>
70
60
  <div id="bd">
@@ -74,218 +64,71 @@ var YUIConfig = {
74
64
 
75
65
 
76
66
 
77
-
78
- <h1><a href="http://feeds.feedburner.com/YuiDownloads"><img src="/assets/rss.png"></a> YUI Downloads</h1>
67
+ <h1>All YUI Downloads</h1>
79
68
 
80
69
  <div id="downloads">
81
- <table id="yui2_downloads">
82
- <thead>
83
- <tr class="odd">
84
- <th class="release"><h2 id="yui2">YUI 2.x</h2></th>
85
- <th class="date">Date</th>
86
- <th class="md5">MD5</th>
87
- </tr>
88
- </thead>
89
- <tbody>
90
- <tr class="even">
91
- <td><a href="yui2/yui_2.8.0r4.zip" title="Version 2.8.0r4">Version 2.8.0r4</a></td>
92
- <td>09/14/2009</td>
93
- <td><em class="md5">9528eeab1bc4291eea329bccc9caa5de</em></td>
94
- </tr>
95
- <tr class="odd">
96
- <td><a href="yui2/yui_2.7.0b.zip" title="Version 2.7.0b">Version 2.7.0b</a></td>
97
- <td>02/19/2009</td>
98
- <td><em class="md5">90778a161ce9108a23a590e5198b8116</em></td>
99
- </tr>
100
- <tr class="even">
101
- <td><a href="yui2/yui_2.6.0.zip" title="Version 2.6.0">Version 2.6.0</a></td>
102
- <td>10/01/2008</td>
103
- <td><em class="md5">41bed4b882c9148cebff5dd1a0dd8727</em></td>
104
- </tr>
105
- <tr class="odd hide">
106
- <td><a href="yui2/yui_2.5.2.zip" title="Version 2.5.2">Version 2.5.2</a></td>
107
- <td>05/28/2008</td>
108
- <td><em class="md5">eaadfcbcb651c50092bb679266aa3c20</em></td>
109
- </tr>
110
- <tr class="even hide">
111
- <td><a href="yui2/yui_2.5.1.zip" title="Version 2.5.1">Version 2.5.1</a></td>
112
- <td>03/19/2008</td>
113
- <td><em class="md5">7416914904daa7d953583483db67609c</em></td>
114
- </tr>
115
- <tr class="odd hide">
116
- <td><a href="yui2/yui_2.5.0.zip" title="Version 2.5.0">Version 2.5.0</a></td>
117
- <td>02/20/2008</td>
118
- <td><em class="md5">85d26357f8413de437318a9e2333dfce</em></td>
119
- </tr>
120
- <tr class="even hide">
121
- <td><a href="yui2/yui_2.4.1.zip" title="Version 2.4.1">Version 2.4.1</a></td>
122
- <td>12/19/2007</td>
123
- <td><em class="md5">2a4b302cd94a6612b2799717eecdbfdb</em></td>
124
- </tr>
125
- <tr class="odd hide">
126
- <td><a href="yui2/yui_2.4.0.zip" title="Version 2.4.0">Version 2.4.0</a></td>
127
- <td>12/04/2007</td>
128
- <td><em class="md5">749ff89f77b4cf9e5ec330e60b507776</em></td>
129
- </tr>
130
- <tr class="even hide">
131
- <td><a href="yui2/yui_2.3.1.zip" title="Version 2.3.1">Version 2.3.1</a></td>
132
- <td>09/19/2007</td>
133
- <td><em class="md5">172ad5e3fa4c3e9424b29fb2fd854fb6</em></td>
134
- </tr>
135
- <tr class="odd hide">
136
- <td><a href="yui2/yui_2.3.0.zip" title="Version 2.3.0">Version 2.3.0</a></td>
137
- <td>07/30/2007</td>
138
- <td><em class="md5">d085f77a00c4b4e30c0c748dd4680f60</em></td>
139
- </tr>
140
- <tr class="even hide">
141
- <td><a href="yui2/yui_2.2.2.zip" title="Version 2.2.2">Version 2.2.2</a></td>
142
- <td>04/18/2007</td>
143
- <td><em class="md5">79483d2f16f597d46f92257744b46406</em></td>
144
- </tr>
145
- <tr class="odd hide">
146
- <td><a href="yui2/yui_2.2.0a.zip" title="Version 2.2.0a">Version 2.2.0a</a></td>
147
- <td>02/22/2007</td>
148
- <td><em class="md5">a4ebf4e3c8413079edd0abaca99d8cb3</em></td>
149
- </tr>
150
- <tr class="even hide">
151
- <td><a href="yui2/yui_0.12.2.zip" title="Version 0.12.2">Version 0.12.2</a></td>
152
- <td>01/08/2007</td>
153
- <td><em class="md5">312c580eb5368b5cae11cba6c1d325bb</em></td>
154
- </tr>
155
- <tr class="odd hide">
156
- <td><a href="yui2/yui_0.11.4.zip" title="Version 0.11.4">Version 0.11.4</a></td>
157
- <td>09/26/2006</td>
158
- <td><em class="md5">8c8e7a3d9c770b82d57546d5fb60ef34</em></td>
159
- </tr>
160
- <tr class="even hide">
161
- <td><a href="yui2/yui_0.10.0.zip" title="Version 0.10.0">Version 0.10.0</a></td>
162
- <td>06/27/2006</td>
163
- <td><em class="md5">4a631c55506e0814b174af3e81f8c94b</em></td>
164
- </tr>
165
- <tr class="show_more_yui2"><td colspan="3"><a href="?show=yui2" class="show_hidden" id="yui2_show_hidden">[Show older files]</a></td></tr> </tbody>
166
- </table>
167
- <table>
168
- <thead>
169
- <tr class="odd">
170
- <th class="release"><h2 id="yui3">YUI 3.x</h2></th>
171
- <th class="date">Date</th>
172
- <th class="md5">MD5</th>
173
- </tr>
174
- </thead>
175
- <tbody>
176
- <tr class="even">
177
- <td><a href="yui3/yui_3.0.0.zip">3.0.0</a></td><td>09/29/2009</td><td><em class="md5">da4b9cd0e92204a2b7c27a3a3686cec5</em></td>
178
- </tr>
179
- <tr class="odd">
180
- <td><a href="yui3/yui_3.0.0b1.zip">3.0.0 Beta 1</a></td><td>06/24/2009</td><td><em class="md5">36921bfc07adce63dd3c9cb62dceb4fd</em></td>
181
- </tr>
182
- <tr class="even">
183
- <td><a href="yui3/yui_3.0.0pr2.zip">Preview Release 2</a></td><td>12/09/2008</td><td><em class="md5">9e5d0fe289454ca11586d904142530d1</em></td>
184
- </tr>
185
- <tr class="odd">
186
- <td><a href="yui3/yui_3.0.0pr1.zip">Preview Release 1</a></td><td>08/13/2008</td><td><em class="md5">a7f6c1237d89ca7d85afaf0978e55bfb</em></td>
187
- </tr>
188
- </tbody>
189
- </table>
190
- <table>
191
- <thead>
192
- <tr class="odd">
193
- <th class="release"><h2 id="yuidoc">YUI Doc</h2></th>
194
- <th class="date">Date</th>
195
- <th class="md5">MD5</th>
196
- </tr>
197
- </thead>
198
- <tbody>
199
- <tr class="even">
200
- <td><a href="yuidoc/yuidoc_1.0.0b1.zip">1.0.0b1</a></td><td>12/08/2008</td><td><em class="md5">cd5545d2dec8f7afe3d18e793538162c</em></td>
201
- </tr>
202
- </tbody>
203
- </table>
204
- <table>
205
- <thead>
206
- <tr class="odd">
207
- <th class="release"><h2 id="builder">YUI Builder</h2></th>
208
- <th class="date">Date</th>
209
- <th class="md5">MD5</th>
210
- </tr>
211
- </thead>
212
- <tbody>
213
- <tr class="even">
214
- <td><a href="builder/builder_1.0.0b1.zip">1.0.0b1</a></td><td>03/10/2009</td><td><em class="md5">aa21f55cffd83ea2f02f2c0fb87265ae</em></td>
215
- </tr>
216
- </tbody>
217
- </table>
218
- <table>
219
- <thead>
220
- <tr class="odd">
221
- <th class="release"><h2 id="yuicompressor">YUI Compressor</h2></th>
222
- <th class="date">Date</th>
223
- <th class="md5">MD5</th>
224
- </tr>
225
- </thead>
226
- <tbody>
227
- <tr class="even">
228
- <td><a href="yuicompressor/yuicompressor-2.4.2.zip">2.4.2</a></td><td>06/10/2009</td><td><em class="md5">2a526a9aedfe2affceed1e1c3f9c0579</em></td>
229
- </tr>
230
- </tbody>
231
- </table>
232
- <table>
233
- <thead>
234
- <tr class="odd">
235
- <th class="release"><h2 id="phploader">YUI PHP Loader</h2></th>
236
- <th class="date">Date</th>
237
- <th class="md5">MD5</th>
238
- </tr>
239
- </thead>
240
- <tbody>
241
- <tr class="even">
242
- <td><a href="phploader/yuiphploader-1.0.0b2.zip">1.0.0b2</a></td><td>12/02/2009</td><td><em class="md5">963292134958e2a60aa5473cb148db3b</em></td>
243
- </tr>
244
- <tr class="odd">
245
- <td><a href="phploader/yuiphploader-1.0.0b1.zip">1.0.0b1</a></td><td>09/09/2009</td><td><em class="md5">f141af403d076abaf98be362658a61e1</em></td>
246
- </tr>
247
- </tbody>
248
- </table>
70
+ <ul>
71
+ <li><h3 id="yui3">YUI 3</h3>
72
+ <ul>
73
+ <li><a href="/downloads/download.php?file=9c36ac648283d656c4a4bab4991e14a6" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=9c36ac648283d656c4a4bab4991e14a6" title="3.1.0 - 03/31/2010 - 9c36ac648283d656c4a4bab4991e14a6">3.1.0</a><em>03/31/2010</em><strong title="9c36ac648283d656c4a4bab4991e14a6">MD5: 9c36ac648</strong></li><li><a href="/downloads/download.php?file=da4b9cd0e92204a2b7c27a3a3686cec5" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=da4b9cd0e92204a2b7c27a3a3686cec5" title="3.0.0 - 09/29/2009 - da4b9cd0e92204a2b7c27a3a3686cec5">3.0.0</a><em>09/29/2009</em><strong title="da4b9cd0e92204a2b7c27a3a3686cec5">MD5: da4b9cd0e</strong></li><li class="hidden"><a href="/downloads/download.php?file=36921bfc07adce63dd3c9cb62dceb4fd" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=36921bfc07adce63dd3c9cb62dceb4fd" title="3.0.0 Beta1 - 06/24/2009 - 36921bfc07adce63dd3c9cb62dceb4fd">3.0.0 Beta1</a><em>06/24/2009</em><strong title="36921bfc07adce63dd3c9cb62dceb4fd">MD5: 36921bfc0</strong></li><li class="hidden"><a href="/downloads/download.php?file=9e5d0fe289454ca11586d904142530d1" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=9e5d0fe289454ca11586d904142530d1" title="3.0.0 PR2 - 12/09/2008 - 9e5d0fe289454ca11586d904142530d1">3.0.0 PR2</a><em>12/09/2008</em><strong title="9e5d0fe289454ca11586d904142530d1">MD5: 9e5d0fe28</strong></li><li class="hidden"><a href="/downloads/download.php?file=a7f6c1237d89ca7d85afaf0978e55bfb" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=a7f6c1237d89ca7d85afaf0978e55bfb" title="3.0.0 PR1 - 08/13/2008 - a7f6c1237d89ca7d85afaf0978e55bfb">3.0.0 PR1</a><em>08/13/2008</em><strong title="a7f6c1237d89ca7d85afaf0978e55bfb">MD5: a7f6c1237</strong></li><li><a href="?show=yui3" class="show-more" title="Show more download files.">Show more files.</a></li></ul></li>
74
+ <li><h3 id="yui2">YUI 2</h3>
75
+ <ul>
76
+ <li><a href="/downloads/download.php?file=9528eeab1bc4291eea329bccc9caa5de" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=9528eeab1bc4291eea329bccc9caa5de" title="2.8.0 - 09/14/2009 - 9528eeab1bc4291eea329bccc9caa5de">2.8.0</a><em>09/14/2009</em><strong title="9528eeab1bc4291eea329bccc9caa5de">MD5: 9528eeab1</strong></li><li><a href="/downloads/download.php?file=90778a161ce9108a23a590e5198b8116" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=90778a161ce9108a23a590e5198b8116" title="2.7.0 - 02/18/2009 - 90778a161ce9108a23a590e5198b8116">2.7.0</a><em>02/18/2009</em><strong title="90778a161ce9108a23a590e5198b8116">MD5: 90778a161</strong></li><li class="hidden"><a href="/downloads/download.php?file=41bed4b882c9148cebff5dd1a0dd8727" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=41bed4b882c9148cebff5dd1a0dd8727" title="2.6.0 - 10/01/2008 - 41bed4b882c9148cebff5dd1a0dd8727">2.6.0</a><em>10/01/2008</em><strong title="41bed4b882c9148cebff5dd1a0dd8727">MD5: 41bed4b88</strong></li><li class="hidden"><a href="/downloads/download.php?file=eaadfcbcb651c50092bb679266aa3c20" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=eaadfcbcb651c50092bb679266aa3c20" title="2.5.2 - 05/28/2008 - eaadfcbcb651c50092bb679266aa3c20">2.5.2</a><em>05/28/2008</em><strong title="eaadfcbcb651c50092bb679266aa3c20">MD5: eaadfcbcb</strong></li><li class="hidden"><a href="/downloads/download.php?file=7416914904daa7d953583483db67609c" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=7416914904daa7d953583483db67609c" title="2.5.1 - 03/19/2008 - 7416914904daa7d953583483db67609c">2.5.1</a><em>03/19/2008</em><strong title="7416914904daa7d953583483db67609c">MD5: 741691490</strong></li><li class="hidden"><a href="/downloads/download.php?file=85d26357f8413de437318a9e2333dfce" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=85d26357f8413de437318a9e2333dfce" title="2.5.0 - 02/20/2008 - 85d26357f8413de437318a9e2333dfce">2.5.0</a><em>02/20/2008</em><strong title="85d26357f8413de437318a9e2333dfce">MD5: 85d26357f</strong></li><li class="hidden"><a href="/downloads/download.php?file=2a4b302cd94a6612b2799717eecdbfdb" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=2a4b302cd94a6612b2799717eecdbfdb" title="2.4.1 - 12/19/2007 - 2a4b302cd94a6612b2799717eecdbfdb">2.4.1</a><em>12/19/2007</em><strong title="2a4b302cd94a6612b2799717eecdbfdb">MD5: 2a4b302cd</strong></li><li class="hidden"><a href="/downloads/download.php?file=749ff89f77b4cf9e5ec330e60b507776" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=749ff89f77b4cf9e5ec330e60b507776" title="2.4.0 - 12/04/2007 - 749ff89f77b4cf9e5ec330e60b507776">2.4.0</a><em>12/04/2007</em><strong title="749ff89f77b4cf9e5ec330e60b507776">MD5: 749ff89f7</strong></li><li class="hidden"><a href="/downloads/download.php?file=172ad5e3fa4c3e9424b29fb2fd854fb6" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=172ad5e3fa4c3e9424b29fb2fd854fb6" title="2.3.1 - 09/19/2007 - 172ad5e3fa4c3e9424b29fb2fd854fb6">2.3.1</a><em>09/19/2007</em><strong title="172ad5e3fa4c3e9424b29fb2fd854fb6">MD5: 172ad5e3f</strong></li><li class="hidden"><a href="/downloads/download.php?file=d085f77a00c4b4e30c0c748dd4680f60" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=d085f77a00c4b4e30c0c748dd4680f60" title="2.3.0 - 07/30/2007 - d085f77a00c4b4e30c0c748dd4680f60">2.3.0</a><em>07/30/2007</em><strong title="d085f77a00c4b4e30c0c748dd4680f60">MD5: d085f77a0</strong></li><li class="hidden"><a href="/downloads/download.php?file=79483d2f16f597d46f92257744b46406" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=79483d2f16f597d46f92257744b46406" title="2.2.2 - 04/18/2007 - 79483d2f16f597d46f92257744b46406">2.2.2</a><em>04/18/2007</em><strong title="79483d2f16f597d46f92257744b46406">MD5: 79483d2f1</strong></li><li class="hidden"><a href="/downloads/download.php?file=a4ebf4e3c8413079edd0abaca99d8cb3" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=a4ebf4e3c8413079edd0abaca99d8cb3" title="2.2.0 - 02/22/2007 - a4ebf4e3c8413079edd0abaca99d8cb3">2.2.0</a><em>02/22/2007</em><strong title="a4ebf4e3c8413079edd0abaca99d8cb3">MD5: a4ebf4e3c</strong></li><li><a href="?show=yui2" class="show-more" title="Show more download files.">Show more files.</a></li></ul></li>
77
+ <li><h3 id="builder">YUI Build Tool</h3>
78
+ <ul>
79
+ <li><a href="/downloads/download.php?file=aa21f55cffd83ea2f02f2c0fb87265ae" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=aa21f55cffd83ea2f02f2c0fb87265ae" title="1.0.0b1 - 03/10/2009 - aa21f55cffd83ea2f02f2c0fb87265ae">1.0.0b1</a><em>03/10/2009</em><strong title="aa21f55cffd83ea2f02f2c0fb87265ae">MD5: aa21f55cf</strong></li></ul></li>
80
+ <li><h3 id="phploader">YUI PHP Loader</h3>
81
+ <ul>
82
+ <li><a href="/downloads/download.php?file=963292134958e2a60aa5473cb148db3b" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=963292134958e2a60aa5473cb148db3b" title="1.0.0b2 - 12/02/2009 - 963292134958e2a60aa5473cb148db3b">1.0.0b2</a><em>12/02/2009</em><strong title="963292134958e2a60aa5473cb148db3b">MD5: 963292134</strong></li><li><a href="/downloads/download.php?file=f141af403d076abaf98be362658a61e1" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=f141af403d076abaf98be362658a61e1" title="1.0.0b1 - 09/09/2009 - f141af403d076abaf98be362658a61e1">1.0.0b1</a><em>09/09/2009</em><strong title="f141af403d076abaf98be362658a61e1">MD5: f141af403</strong></li></ul></li>
83
+ <li><h3 id="yuicompressor">YUI Compressor</h3>
84
+ <ul>
85
+ <li><a href="/downloads/download.php?file=2a526a9aedfe2affceed1e1c3f9c0579" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=2a526a9aedfe2affceed1e1c3f9c0579" title="2.4.2 - 06/10/2009 - 2a526a9aedfe2affceed1e1c3f9c0579">2.4.2</a><em>06/10/2009</em><strong title="2a526a9aedfe2affceed1e1c3f9c0579">MD5: 2a526a9ae</strong></li></ul></li>
86
+ <li><h3 id="yuidoc">YUI Doc</h3>
87
+ <ul>
88
+ <li><a href="/downloads/download.php?file=cd5545d2dec8f7afe3d18e793538162c" class="icon"><img src="/assets/archive_zip.png"></a> <a href="/downloads/download.php?file=cd5545d2dec8f7afe3d18e793538162c" title="1.0.0b1 - 12/05/2008 - cd5545d2dec8f7afe3d18e793538162c">1.0.0b1</a><em>12/05/2008</em><strong title="cd5545d2dec8f7afe3d18e793538162c">MD5: cd5545d2d</strong></li></ul></li>
89
+ </ul>
249
90
  </div>
250
-
91
+ <script src="/assets/download-min.js"></script>
251
92
  </div>
252
93
  </div>
253
94
  <div class="yui-b secondary sidebar">
254
- <div class="mod">
95
+ <div id="site-notice" class="bubble-note">
96
+ YUI 3.1.0 is now available, <a href="http://www.yuiblog.com/blog/2010/03/31/announcing-yui-3-1-0/">visit YUI Blog</a> for more information.
97
+ </div><div class="mod">
255
98
  <div class="hd"><h4><a href="/forum/recent.php">Recent Forums Posts</a></h4></div>
256
99
  <div class="bd">
257
100
  <ul>
258
101
  <li>
259
- <h5><a href="/forum/viewtopic.php?p=8069#p8069">Tooltips on Hover over TabView Tabs</a></h5>
260
- <cite class="author">Craig Cassata</cite> <cite class="date">Jan 20th</cite>
102
+ <h5><a href="/forum/viewtopic.php?p=11417#p11417">Direct link to tabs</a></h5>
103
+ <cite class="author"><img src="http://www.gravatar.com/avatar/b82c5d778260c134db7f6a5fc7c2c21b?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> Dream Team</cite> <cite class="date">Apr 15th</cite>
261
104
  </li>
262
105
  <li>
263
- <h5><a href="/forum/viewtopic.php?p=8068#p8068">TreeView - configure setDynamicLoad()</a></h5>
264
- <cite class="author">koalabruder</cite> <cite class="date">Jan 20th</cite>
106
+ <h5><a href="/forum/viewtopic.php?p=11416#p11416">Re: Easy YUI Compressor for Windows.</a></h5>
107
+ <cite class="author"><img src="http://www.gravatar.com/avatar/4771a4a77a5c90d84a4168d27d08024b?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> hani</cite> <cite class="date">Apr 15th</cite>
265
108
  </li>
266
109
  <li>
267
- <h5><a href="/forum/viewtopic.php?p=8067#p8067">Re: Prevent onclick from inside mousedown event?</a></h5>
268
- <cite class="author">Adam Moore</cite> <cite class="date">Jan 20th</cite>
110
+ <h5><a href="/forum/viewtopic.php?p=11415#p11415">Re: Easy YUI Compressor for Windows.</a></h5>
111
+ <cite class="author"><img src="http://www.gravatar.com/avatar/3cb68a0b4204139bd4747f7803f440c4?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> royce</cite> <cite class="date">Apr 14th</cite>
269
112
  </li>
270
113
  <li>
271
- <h5><a href="/forum/viewtopic.php?p=8066#p8066">Re: Datatable &quot;grays out&quot; after updating a column's data.</a></h5>
272
- <cite class="author">Satyam</cite> <cite class="date">Jan 20th</cite>
114
+ <h5><a href="/forum/viewtopic.php?p=11414#p11414">Re: Integration of RTE into XForms</a></h5>
115
+ <cite class="author"><img src="http://www.gravatar.com/avatar/c2d8dcb414ae7efa4aaae037625bebbf?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> Claudius Teodorescu</cite> <cite class="date">Apr 14th</cite>
273
116
  </li>
274
117
  <li>
275
- <h5><a href="/forum/viewtopic.php?p=8065#p8065">Re: Datatable &quot;grays out&quot; after updating a column's data.</a></h5>
276
- <cite class="author">Lonnie Broadnax</cite> <cite class="date">Jan 20th</cite>
118
+ <h5><a href="/forum/viewtopic.php?p=11413#p11413">Re: YuiLoader and css flicker</a></h5>
119
+ <cite class="author"><img src="http://www.gravatar.com/avatar/4479397d42c17503323ae88bf8932e42?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> Adam Moore</cite> <cite class="date">Apr 14th</cite>
277
120
  </li>
278
121
  <li>
279
- <h5><a href="/forum/viewtopic.php?p=8064#p8064">Re: Datatable &quot;grays out&quot; after updating a column's data.</a></h5>
280
- <cite class="author">Lonnie Broadnax</cite> <cite class="date">Jan 20th</cite>
122
+ <h5><a href="/forum/viewtopic.php?p=11412#p11412">YuiLoader and css flicker</a></h5>
123
+ <cite class="author"><img src="http://www.gravatar.com/avatar/6c65bf90850933eb9a5222e5740f49ef?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> David McArdle</cite> <cite class="date">Apr 14th</cite>
281
124
  </li>
282
125
  <li>
283
- <h5><a href="/forum/viewtopic.php?p=8063#p8063">Re: AutoComplete doesn't ignore keydown events for shift keys</a></h5>
284
- <cite class="author">Luke Smith</cite> <cite class="date">Jan 20th</cite>
126
+ <h5><a href="/forum/viewtopic.php?p=11411#p11411">Re: Client Side Filtering on JSON data</a></h5>
127
+ <cite class="author"><img src="http://www.gravatar.com/avatar/e5f7bcbb12686b89c17e2d80d5573ccf?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> Jean Charles</cite> <cite class="date">Apr 14th</cite>
285
128
  </li>
286
129
  <li>
287
- <h5><a href="/forum/viewtopic.php?p=8062#p8062">Re: Cross domain file upload issue</a></h5>
288
- <cite class="author">Alex Led</cite> <cite class="date">Jan 20th</cite>
130
+ <h5><a href="/forum/viewtopic.php?p=11410#p11410">removing nodes by setting innerHTML=&quot;&quot; - removing listeners?</a></h5>
131
+ <cite class="author"><img src="http://www.gravatar.com/avatar/6eb0d06190c46a6d8ec340b342f74c26?s=14&d=http://yuilibrary.com/assets/gravatar-14.png"> kevin furze</cite> <cite class="date">Apr 14th</cite>
289
132
  </li>
290
133
  </ul>
291
134
 
@@ -295,31 +138,31 @@ var YUIConfig = {
295
138
  <div class="hd"><h4>Recent <a href="http://yuiblog.com">YUI Blog</a> Posts</h4></div>
296
139
  <div class="bd">
297
140
 
298
- <!-- Auto-generated Sidebar (Wed, 20 Jan 2010 23:03:01 +0000) -->
141
+ <!-- Auto-generated Sidebar (Thu, 15 Apr 2010 07:30:01 +0000) -->
299
142
  <ul>
300
143
  <li>
301
- <h5><a href="http://www.yuiblog.com/blog/2010/01/19/in-the-wild-for-january-19-2010/">In the Wild for January 19, 2010</a></h5>
302
- <cite class="author">Eric Miraglia</cite> <cite class="date">Jan 19th</cite>
144
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/14/treeble-using-nested-yui-2-datasources-for-row-expansion/">Treeble: Using Nested YUI 2 DataSources for Row Expansion</a></h5>
145
+ <cite class="author">John Lindal</cite> <cite class="date">Apr 14th</cite>
303
146
  </li>
304
147
  <li>
305
- <h5><a href="http://www.yuiblog.com/blog/2010/01/08/in-the-wild-for-january-10-2010/">In the Wild for January 10, 2010</a></h5>
306
- <cite class="author">Eric Miraglia</cite> <cite class="date">Jan 8th</cite>
148
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/13/yui4java-a-new-java-to-javascript-translator-using-yui-2/">yui4java: A New Java-to-JavaScript Translator Using YUI 2</a></h5>
149
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Apr 13th</cite>
307
150
  </li>
308
151
  <li>
309
- <h5><a href="http://www.yuiblog.com/blog/2010/01/07/more-code-reuse-patterns-in-yui3/">More code reuse patterns in YUI3</a></h5>
310
- <cite class="author">Stoyan Stefanov</cite> <cite class="date">Jan 7th</cite>
152
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/12/vitalist/">Implementation Focus: Vitalist, a Getting Things Done (GTD) Web App Built with YUI 2</a></h5>
153
+ <cite class="author">Matt Berg</cite> <cite class="date">Apr 12th</cite>
311
154
  </li>
312
155
  <li>
313
- <h5><a href="http://www.yuiblog.com/blog/2010/01/06/inheritance-patterns-in-yui-3/">Inheritance Patterns in YUI 3</a></h5>
314
- <cite class="author">Stoyan Stefanov</cite> <cite class="date">Jan 6th</cite>
156
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/09/in-the-wild-for-april-9-2010/">In the Wild for April 9, 2010</a></h5>
157
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Apr 9th</cite>
315
158
  </li>
316
159
  <li>
317
- <h5><a href="http://www.yuiblog.com/blog/2010/01/05/crockford-at-accu/">Crockford delivering “State and Future of JavaScript” talk at ACCU in Mountain View on January 13</a></h5>
318
- <cite class="author">Eric Miraglia</cite> <cite class="date">Jan 5th</cite>
160
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/09/node-js-yui-3-dom-manipulation-oh-my/">Node.js, YUI 3 & Dom Manipulation… Oh My!</a></h5>
161
+ <cite class="author">Dav Glass</cite> <cite class="date">Apr 9th</cite>
319
162
  </li>
320
163
  <li>
321
- <h5><a href="http://www.yuiblog.com/blog/2010/01/05/enterprise-web-developer/">Implementation Focus: Enterprise Web Developer, a Python/YUI Framework</a></h5>
322
- <cite class="author">Rob Tweed</cite> <cite class="date">Jan 5th</cite>
164
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/08/introducing-yui-open-hours/">Introducing YUI Open Hours</a></h5>
165
+ <cite class="author">Luke Smith</cite> <cite class="date">Apr 8th</cite>
323
166
  </li>
324
167
  </ul>
325
168
 
@@ -328,21 +171,46 @@ var YUIConfig = {
328
171
  </div>
329
172
  </div>
330
173
  <div class="mod">
331
- <div class="hd"><h4>Online Users</h4></div>
174
+ <div class="hd"><h4>Latest <a href="http://developer.yahoo.com/yui/theater">YUI Theater</a> Videos</h4></div>
332
175
  <div class="bd">
333
- <ul>
176
+
177
+ <!-- Auto-generated Sidebar (Thu, 15 Apr 2010 07:30:01 +0000) -->
178
+ <ul>
179
+ <li>
180
+ <h5><a href="http://www.yuiblog.com/blog/2010/04/08/video-crockonjs-5/">YUI Theater — Douglas Crockford: “Crockford on JavaScript — Part 5: The End of All Things” (94 min.)</a></h5>
181
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Apr 8th</cite>
182
+ </li>
183
+ <li>
184
+ <h5><a href="http://www.yuiblog.com/blog/2010/03/09/video-crockonjs-4/">YUI Theater — Douglas Crockford: “Crockford on JavaScript — Episode IV: The Metamorphosis of Ajax” (93 min.)</a></h5>
185
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Mar 9th</cite>
186
+ </li>
334
187
  <li>
335
- <h5><a href="/forum/memberlist.php?mode=viewprofile&amp;u=906">paolo nesti poggi</a></h5>
188
+ <h5><a href="http://www.yuiblog.com/blog/2010/02/26/video-plh-nextweb/">YUI Theater — Philippe Le Hégaret: “The Next Open Web Platform” (52 min.)</a></h5>
189
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Feb 26th</cite>
336
190
  </li>
337
191
  <li>
338
- <h5><a href="/forum/memberlist.php?mode=viewprofile&amp;u=5327">FiZ</a></h5>
192
+ <h5><a href="http://www.yuiblog.com/blog/2010/02/24/video-crockonjs-3/">YUI Theater — Douglas Crockford: “Crockford on JavaScript — Act III: Function the Ultimate (73 min.)”</a></h5>
193
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Feb 24th</cite>
339
194
  </li>
340
195
  <li>
341
- <h5><a href="/forum/memberlist.php?mode=viewprofile&amp;u=54">Dav Glass</a></h5>
196
+ <h5><a href="http://www.yuiblog.com/blog/2010/02/11/video-heilmann-yql/">YUI Theater — Christian Heilmann: “YQL and YUI: Building Blocks for Quick Applications” (48 min.) [English and German versions available]</a></h5>
197
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Feb 11th</cite>
342
198
  </li>
343
199
  <li>
344
- <h5><a href="/forum/memberlist.php?mode=viewprofile&amp;u=58">Adam Moore</a></h5>
200
+ <h5><a href="http://www.yuiblog.com/blog/2010/02/09/video-crockonjs-2/">YUI Theater — Douglas Crockford: “Crockford on JavaScript — Chapter 2: And Then There Was JavaScript” (90 min.)</a></h5>
201
+ <cite class="author">Eric Miraglia</cite> <cite class="date">Feb 9th</cite>
345
202
  </li>
203
+ </ul>
204
+
205
+ <!-- End Auto-generated Sidebar -->
206
+
207
+ </div>
208
+ </div>
209
+ <div class="mod">
210
+ <div class="hd"><h4>Online Users</h4></div>
211
+ <div class="bd">
212
+ <ul>
213
+ <li><img src="http://www.gravatar.com/avatar/f9c6936e3a1c4e3d7995817d1f9baf9e?s=16&d=http://yuilibrary.com/assets/gravatar-16.png"> <a href="/forum/memberlist.php?mode=viewprofile&amp;u=57">Eric Miraglia</a></li>
346
214
  </ul>
347
215
 
348
216
  </div>
@@ -358,10 +226,10 @@ var YUIConfig = {
358
226
  <h5>YUI Projects</h5>
359
227
  <ul>
360
228
  <li><a href="/downloads">All YUI Downloads</a></li>
361
- <li><a href="/projects/yui2">YUI 2.x</a></li>
362
- <li><a href="/projects/yui3">YUI 3.x</a></li>
363
- <li><a href="/projects/yuidoc">YUIDoc</a></li>
364
- <li><a href="/projects/yuicompressor">YUICompressor</a></li>
229
+ <li><a href="/projects/yui2">YUI 2</a></li>
230
+ <li><a href="/projects/yui3">YUI 3</a></li>
231
+ <li><a href="/projects/yuidoc">YUI Doc</a></li>
232
+ <li><a href="/projects/yuicompressor">YUI Compressor</a></li>
365
233
  <li class="more"><a href="/projects/yuilibrary">YUILibrary.com</a></li>
366
234
  <li class="more"><a href="/projects/builder">YUI Build Tool</a></li>
367
235
  <li class="more"><a href="/projects/phploader">YUI PHP Loader</a></li>
@@ -376,6 +244,7 @@ var YUIConfig = {
376
244
  <li><a href="/contrib">Contribute to YUI</a></li>
377
245
  <li><a href="/forum/stats">Forum Stats</a></li>
378
246
  <li><a href="/gallery/stats">Gallery Stats</a></li>
247
+ <li><a href="/calendar">YUI Calendar</a></li>
379
248
  </ul>
380
249
  </div>
381
250
  </div>
@@ -383,8 +252,8 @@ var YUIConfig = {
383
252
  <div class="yui-u first">
384
253
  <h5>Contribute</h5>
385
254
  <ul>
386
- <li><a href="http://developer.yahoo.com/yui/articles/reportingbugs/" class="ext-link" title="Submit a Bug"><span class="icon">Submit a Bug</span></a></li>
387
- <li><a href="http://developer.yahoo.com/yui/articles/reportingbugs/" class="ext-link" title="Request a Feature"><span class="icon">Request a Feature</span></a></li>
255
+ <li><a href="/projects/yuilibrary/wiki/Process/FilingATicket">Submit a Bug</a></li>
256
+ <li><a href="/projects/yuilibrary/wiki/Process/FilingATicket">Request a Feature</a></li>
388
257
  <li><a href="http://developer.yahoo.com/yui/community/contribute.html" class="ext-link" title="Write Code"><span class="icon">Write Code</span></a></li>
389
258
  <li><a href="/team">Meet the Team</a></li>
390
259
  </ul>
@@ -412,14 +281,5 @@ var YUIConfig = {
412
281
  </div>
413
282
  <script type="text/javascript" src="http://track2.mybloglog.com/js/jsserv.php?mblID=2008112513433661"></script>
414
283
  <script type="text/javascript" src="/assets/more-09.17.2009.js"></script>
415
- <script>
416
- YUI(YUIConfig).use('node', function(Y) {
417
- Y.on('click', function(e) {
418
- e.halt();
419
- Y.all('#yui2_downloads tr').removeClass('hide');
420
- e.target.get('parentNode.parentNode').setStyle('display', 'none');
421
- }, '#yui2_show_hidden');
422
- });
423
- </script>
424
284
  </body>
425
285
  </html>
data/test/test_helper.rb CHANGED
@@ -94,6 +94,7 @@ module Juicer
94
94
  mkfile(@dir, 'b.js', "/**\n * @depends a.js\n */\n\n/* Dette er b.css */")
95
95
  mkfile(@dir, 'a1.css', "@import\t'b1.css';\n@import 'c1.css';\nbody {\n width: 800px;\n}\n")
96
96
  mkfile(@dir, 'b1.css', "@import url('d1.css');\n\nhtml {\n background: red;\n}\n")
97
+ mkfile(@dir, 'b2.css', "@import url(\"d1.css\");\n\nhtml {\n background: red;\n}\n")
97
98
  mkfile(@dir, 'c1.css', "h1 {\n font-size: 12px;\n}\n")
98
99
  mkfile(@dir, 'd1.css', "h2 {\n font-size: 10px;\n}\n")
99
100
  mkfile(@dir, 'ok.js', "function hey() {\n return \"Hey\";\n}\n")
@@ -111,11 +112,11 @@ body {
111
112
  }
112
113
 
113
114
  h1 {
114
- background: url(../a1.css) 0 0 no-repeat;
115
+ background: url('../a1.css') 0 0 no-repeat;
115
116
  }
116
117
 
117
118
  h2 {
118
- background: url(2.gif) no-repeat;
119
+ background: url("2.gif") no-repeat;
119
120
  }
120
121
 
121
122
  p {
@@ -6,7 +6,7 @@ end
6
6
 
7
7
  class TestCommandUtil < Test::Unit::TestCase
8
8
 
9
- CSS_FILES = %w{a.css a1.css b.css b1.css c1.css d1.css path_test.css path_test2.css}
9
+ CSS_FILES = %w{a.css a1.css b.css b1.css b2.css c1.css d1.css path_test.css path_test2.css}
10
10
  JS_FILES = %w{a.js}
11
11
  ALL_FILES = (CSS_FILES + JS_FILES).sort
12
12
 
@@ -15,11 +15,11 @@ class TestStylesheetMerger < Test::Unit::TestCase
15
15
  Dir.chdir(@cwd)
16
16
  end
17
17
 
18
- def test_init
19
- Juicer::Merger::StylesheetMerger.publicize_methods do
20
- assert_equal Juicer::CssDependencyResolver, @file_merger.dependency_resolver.class
21
- end
22
- end
18
+ def test_init
19
+ Juicer::Merger::StylesheetMerger.publicize_methods do
20
+ assert_equal Juicer::CssDependencyResolver, @file_merger.dependency_resolver.class
21
+ end
22
+ end
23
23
 
24
24
  def test_merge
25
25
  Juicer::Merger::StylesheetMerger.publicize_methods do
@@ -39,10 +39,11 @@ class TestStylesheetMerger < Test::Unit::TestCase
39
39
  assert_equal 2, @file_merger.files.length
40
40
  end
41
41
 
42
- def test_save
43
- a_css = path('a.css')
44
- b_css = path('b.css')
45
- merged = <<EOF
42
+ context "saving files" do
43
+ should "merge files and strip @includes" do
44
+ a_css = path('a.css')
45
+ b_css = path('b.css')
46
+ merged = <<EOF
46
47
  /* Dette er b.css */
47
48
 
48
49
 
@@ -51,24 +52,49 @@ class TestStylesheetMerger < Test::Unit::TestCase
51
52
 
52
53
  EOF
53
54
 
54
- @file_merger << a_css
55
- ios = StringIO.new
56
- @file_merger.save(ios)
57
- assert_equal merged, ios.string
55
+ @file_merger << a_css
56
+ ios = StringIO.new
57
+ @file_merger.save(ios)
58
+ assert_equal merged, ios.string
59
+
60
+ output_file = path('test_out.css')
61
+ @file_merger.save(output_file)
62
+
63
+ assert_equal merged, IO.read(output_file)
64
+ end
65
+
66
+ should "strip @includes for quoted urls" do
67
+ css = path('b2.css')
58
68
 
59
- output_file = path('test_out.css')
60
- @file_merger.save(output_file)
69
+ merged = <<EOF
70
+ h2 {
71
+ font-size: 10px;
72
+ }
61
73
 
62
- assert_equal merged, IO.read(output_file)
74
+
75
+
76
+ html {
77
+ background: red;
78
+ }
79
+
80
+ EOF
81
+
82
+ @file_merger << css
83
+ ios = StringIO.new
84
+ @file_merger.save(ios)
85
+ assert_equal merged, ios.string
86
+ end
63
87
  end
64
88
 
65
- def test_included_files_should_have_referenced_relative_urls_rereferenced
66
- @file_merger << path("path_test.css")
67
- ios = StringIO.new
68
- @file_merger.save(ios)
69
- files = ios.string.scan(/url\(([^\)]*)\)/).collect { |f| f.first }.uniq.sort
89
+ context "resolving paths" do
90
+ should "re-reference relative paths" do
91
+ @file_merger << path("path_test.css")
92
+ ios = StringIO.new
93
+ @file_merger.save(ios)
94
+ files = ios.string.scan(/url\(([^\)]*)\)/).collect { |f| f.first }.uniq.sort
70
95
 
71
- assert_equal "a1.css::css/2.gif::images/1.png", files.join("::")
96
+ assert_equal "a1.css::css/2.gif::images/1.png", files.join("::")
97
+ end
72
98
  end
73
99
 
74
100
  def test_resolve_path_should_leave_absolute_urls
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 3
9
+ version: 1.0.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - Christian Johansen
@@ -9,79 +14,101 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-19 00:00:00 +01:00
17
+ date: 2010-04-15 00:00:00 +02:00
13
18
  default_executable: juicer
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: shoulda
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 10
30
+ - 2
23
31
  version: 2.10.2
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: mocha
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 9
44
+ - 8
33
45
  version: 0.9.8
34
- version:
46
+ type: :development
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: fakefs
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
40
52
  requirements:
41
53
  - - ">="
42
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ - 2
58
+ - 1
43
59
  version: 0.2.1
44
- version:
60
+ type: :development
61
+ version_requirements: *id003
45
62
  - !ruby/object:Gem::Dependency
46
63
  name: jeweler
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
50
66
  requirements:
51
67
  - - ">="
52
68
  - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ - 2
72
+ - 1
53
73
  version: 0.2.1
54
- version:
74
+ type: :development
75
+ version_requirements: *id004
55
76
  - !ruby/object:Gem::Dependency
56
77
  name: cmdparse
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
60
80
  requirements:
61
81
  - - ">="
62
82
  - !ruby/object:Gem::Version
83
+ segments:
84
+ - 0
63
85
  version: "0"
64
- version:
86
+ type: :runtime
87
+ version_requirements: *id005
65
88
  - !ruby/object:Gem::Dependency
66
89
  name: nokogiri
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
90
+ prerelease: false
91
+ requirement: &id006 !ruby/object:Gem::Requirement
70
92
  requirements:
71
93
  - - ">="
72
94
  - !ruby/object:Gem::Version
95
+ segments:
96
+ - 0
73
97
  version: "0"
74
- version:
98
+ type: :runtime
99
+ version_requirements: *id006
75
100
  - !ruby/object:Gem::Dependency
76
101
  name: rubyzip
77
- type: :runtime
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
102
+ prerelease: false
103
+ requirement: &id007 !ruby/object:Gem::Requirement
80
104
  requirements:
81
105
  - - ">="
82
106
  - !ruby/object:Gem::Version
107
+ segments:
108
+ - 0
83
109
  version: "0"
84
- version:
110
+ type: :runtime
111
+ version_requirements: *id007
85
112
  description: Resolve dependencies, merge and minify CSS and JavaScript files with Juicer - the command line tool for frontend engineers
86
113
  email: christian@cjohansen.no
87
114
  executables:
@@ -146,6 +173,7 @@ files:
146
173
  - test/data/b.css
147
174
  - test/data/b.js
148
175
  - test/data/b1.css
176
+ - test/data/b2.css
149
177
  - test/data/c1.css
150
178
  - test/data/css/2.gif
151
179
  - test/data/css/test.css
@@ -210,18 +238,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
238
  requirements:
211
239
  - - ">="
212
240
  - !ruby/object:Gem::Version
241
+ segments:
242
+ - 0
213
243
  version: "0"
214
- version:
215
244
  required_rubygems_version: !ruby/object:Gem::Requirement
216
245
  requirements:
217
246
  - - ">="
218
247
  - !ruby/object:Gem::Version
248
+ segments:
249
+ - 0
219
250
  version: "0"
220
- version:
221
251
  requirements: []
222
252
 
223
253
  rubyforge_project: juicer
224
- rubygems_version: 1.3.5
254
+ rubygems_version: 1.3.6
225
255
  signing_key:
226
256
  specification_version: 3
227
257
  summary: Command line tool for CSS and JavaScript developers