rapper_lite 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/Gemfile +10 -0
  2. data/Gemfile.lock +31 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.markdown +65 -0
  5. data/Rakefile +31 -0
  6. data/VERSION +1 -0
  7. data/bin/rapper_lite +19 -0
  8. data/lib/rapper_lite/compressors.rb +109 -0
  9. data/lib/rapper_lite/config.rb +61 -0
  10. data/lib/rapper_lite/utils.rb +19 -0
  11. data/lib/rapper_lite/versioning.rb +38 -0
  12. data/lib/rapper_lite.rb +50 -0
  13. data/lib/tasks.rb +37 -0
  14. data/lib/yui/css_compressor.rb +279 -0
  15. data/rapper_lite.gemspec +141 -0
  16. data/spec/fixtures/src/simple_1.css +4 -0
  17. data/spec/fixtures/src/simple_1.js +5 -0
  18. data/spec/fixtures/src/simple_2.css +4 -0
  19. data/spec/fixtures/src/subfolder/simple_2.js +5 -0
  20. data/spec/fixtures/testcases/combination/expected/base.css +1 -0
  21. data/spec/fixtures/testcases/combination/expected/base.js +1 -0
  22. data/spec/fixtures/testcases/combination/expected/base_combined.css +1 -0
  23. data/spec/fixtures/testcases/combination/expected/base_combined.js +1 -0
  24. data/spec/fixtures/testcases/combination/rapper.yml +26 -0
  25. data/spec/fixtures/testcases/concatenation/expected/base.css +8 -0
  26. data/spec/fixtures/testcases/concatenation/expected/base.js +10 -0
  27. data/spec/fixtures/testcases/concatenation/expected/base_combined.css +12 -0
  28. data/spec/fixtures/testcases/concatenation/expected/base_combined.js +15 -0
  29. data/spec/fixtures/testcases/concatenation/rapper.yml +26 -0
  30. data/spec/fixtures/yui_css/background-position.css +2 -0
  31. data/spec/fixtures/yui_css/background-position.css.min +1 -0
  32. data/spec/fixtures/yui_css/box-model-hack.css +9 -0
  33. data/spec/fixtures/yui_css/box-model-hack.css.min +1 -0
  34. data/spec/fixtures/yui_css/bug2527974.css +9 -0
  35. data/spec/fixtures/yui_css/bug2527974.css.min +1 -0
  36. data/spec/fixtures/yui_css/bug2527991.css +19 -0
  37. data/spec/fixtures/yui_css/bug2527991.css.min +1 -0
  38. data/spec/fixtures/yui_css/bug2527998.css +4 -0
  39. data/spec/fixtures/yui_css/bug2527998.css.min +1 -0
  40. data/spec/fixtures/yui_css/bug2528034.css +5 -0
  41. data/spec/fixtures/yui_css/bug2528034.css.min +1 -0
  42. data/spec/fixtures/yui_css/charset-media.css +9 -0
  43. data/spec/fixtures/yui_css/charset-media.css.min +1 -0
  44. data/spec/fixtures/yui_css/color.css +7 -0
  45. data/spec/fixtures/yui_css/color.css.min +1 -0
  46. data/spec/fixtures/yui_css/comment.css +3 -0
  47. data/spec/fixtures/yui_css/comment.css.min +1 -0
  48. data/spec/fixtures/yui_css/concat-charset.css +15 -0
  49. data/spec/fixtures/yui_css/concat-charset.css.min +1 -0
  50. data/spec/fixtures/yui_css/decimals.css +3 -0
  51. data/spec/fixtures/yui_css/decimals.css.min +1 -0
  52. data/spec/fixtures/yui_css/dollar-header.css +7 -0
  53. data/spec/fixtures/yui_css/dollar-header.css.min +3 -0
  54. data/spec/fixtures/yui_css/font-face.css +6 -0
  55. data/spec/fixtures/yui_css/font-face.css.min +1 -0
  56. data/spec/fixtures/yui_css/ie5mac.css +5 -0
  57. data/spec/fixtures/yui_css/ie5mac.css.min +1 -0
  58. data/spec/fixtures/yui_css/media-empty-class.css +16 -0
  59. data/spec/fixtures/yui_css/media-empty-class.css.min +1 -0
  60. data/spec/fixtures/yui_css/media-multi.css +5 -0
  61. data/spec/fixtures/yui_css/media-multi.css.min +1 -0
  62. data/spec/fixtures/yui_css/media-test.css +5 -0
  63. data/spec/fixtures/yui_css/media-test.css.min +1 -0
  64. data/spec/fixtures/yui_css/opacity-filter.css +14 -0
  65. data/spec/fixtures/yui_css/opacity-filter.css.min +1 -0
  66. data/spec/fixtures/yui_css/preserve-new-line.css +6 -0
  67. data/spec/fixtures/yui_css/preserve-new-line.css.min +3 -0
  68. data/spec/fixtures/yui_css/preserve-strings.css +7 -0
  69. data/spec/fixtures/yui_css/preserve-strings.css.min +1 -0
  70. data/spec/fixtures/yui_css/preserve_string.css +7 -0
  71. data/spec/fixtures/yui_css/preserve_string.css.min +1 -0
  72. data/spec/fixtures/yui_css/pseudo-first.css +16 -0
  73. data/spec/fixtures/yui_css/pseudo-first.css.min +1 -0
  74. data/spec/fixtures/yui_css/pseudo.css +4 -0
  75. data/spec/fixtures/yui_css/pseudo.css.min +1 -0
  76. data/spec/fixtures/yui_css/special-comments.css +13 -0
  77. data/spec/fixtures/yui_css/special-comments.css.min +9 -0
  78. data/spec/fixtures/yui_css/star-underscore-hacks.css +5 -0
  79. data/spec/fixtures/yui_css/star-underscore-hacks.css.min +1 -0
  80. data/spec/fixtures/yui_css/string-in-comment.css +8 -0
  81. data/spec/fixtures/yui_css/string-in-comment.css.min +1 -0
  82. data/spec/fixtures/yui_css/zeros.css +6 -0
  83. data/spec/fixtures/yui_css/zeros.css.min +1 -0
  84. data/spec/rapper_lite_spec.rb +41 -0
  85. data/spec/spec_helper.rb +23 -0
  86. data/spec/vendor_spec.rb +23 -0
  87. metadata +203 -0
@@ -0,0 +1,279 @@
1
+ # Source: https://github.com/rhulse/ruby-css-toolkit
2
+ #
3
+ # Only minor modifications to module structure, code style, and comments have
4
+ # been made.
5
+ #
6
+ # Original license:
7
+ # =================
8
+ #
9
+ # Ruby CSS Compressor Copyright License Agreement (BSD License)
10
+ #
11
+ # Copyright (c) 2010, Richard Hulse
12
+ # All rights reserved.
13
+ #
14
+ # YUI CSS files in the test suite are Copyright (c) 2009, Yahoo! Inc. All rights reserved.
15
+ #
16
+ # Redistribution and use of this software in source and binary forms,
17
+ # with or without modification, are permitted provided that the following
18
+ # conditions are met:
19
+ #
20
+ # * Redistributions of source code must retain the above
21
+ # copyright notice, this list of conditions and the
22
+ # following disclaimer.
23
+ #
24
+ # * Redistributions in binary form must reproduce the above
25
+ # copyright notice, this list of conditions and the
26
+ # following disclaimer in the documentation and/or other
27
+ # materials provided with the distribution.
28
+ #
29
+ # * Neither the name of Yahoo! Inc. nor the names of its
30
+ # contributors may be used to endorse or promote products
31
+ # derived from this software without specific prior
32
+ # written permission of Yahoo! Inc.
33
+ #
34
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
35
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
38
+ # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
39
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
40
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
41
+ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
42
+ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
43
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
+
45
+ module YUI
46
+ # Methods for working with CSS.
47
+ class CSS
48
+
49
+ class << self
50
+
51
+ attr_reader :input_size, :output_size
52
+
53
+ # Compress CSS using the Ruby port of the YUI Compressor (by
54
+ # <a href="https://github.com/rhulse">Richard Hulse</a>).
55
+ #
56
+ # @param [String] css The CSS to be compressed.
57
+ #
58
+ # @param [Integer] line_length (optional) Number of columns to wrap to.
59
+ # Default is no wrapping.
60
+ #
61
+ # @return [String] Compressed CSS.
62
+ def compress(css, line_length=0)
63
+ @preservedTokens = []
64
+ @comments = []
65
+ @output_size = 0
66
+ @input_size = css.length
67
+
68
+ css = process_comments_and_strings(css)
69
+
70
+ # Normalize all whitespace strings to single spaces. Easier to work with that way.
71
+ css.gsub!(/\s+/, ' ')
72
+
73
+ # Remove the spaces before the things that should not have spaces before them.
74
+ # But, be careful not to turn "p :link {...}" into "p:link{...}"
75
+ # Swap out any pseudo-class colons with the token, and then swap back.
76
+ css.gsub!(/(?:^|\})[^\{:]+\s+:+[^\{]*\{/) do |match|
77
+ match.gsub(':', '___PSEUDOCLASSCOLON___')
78
+ end
79
+ css.gsub!(/\s+([!\{\};:>+\(\)\],])/, '\1')
80
+ css.gsub!(/([!\{\}:;>+\(\[,])\s+/, '\1')
81
+ css.gsub!('___PSEUDOCLASSCOLON___', ':')
82
+
83
+ # special case for IE
84
+ css.gsub!(/:first-(line|letter)(\{|,)/, ':first-\1 \2')
85
+
86
+ # no space after the end of a preserved comment
87
+ css.gsub!(/\*\/ /, '*/')
88
+
89
+ # If there is a @charset, then only allow one, and push to the top of the file.
90
+ css.gsub!(/^(.*)(@charset "[^"]*";)/i, '\2\1')
91
+ css.gsub!(/^(\s*@charset [^;]+;\s*)+/i, '\1')
92
+
93
+ # Put the space back in some cases, to support stuff like
94
+ # @media screen and (-webkit-min-device-pixel-ratio:0){
95
+ css.gsub!(/\band\(/i, "and (")
96
+
97
+ # remove unnecessary semicolons
98
+ css.gsub!(/;+\}/, '}')
99
+
100
+ # Replace 0(%, em, ex, px, in, cm, mm, pt, pc) with just 0.
101
+ css.gsub!(/([\s:])([+-]?0)(?:%|em|ex|px|in|cm|mm|pt|pc)/i, '\1\2')
102
+
103
+ # Replace 0 0 0 0; with 0.
104
+ css.gsub!(/:(?:0 )+0(;|\})/, ':0\1')
105
+
106
+ # Restore background-position:0 0; if required
107
+ css.gsub!(/background-position:0(;|\})/i, 'background-position:0 0\1')
108
+
109
+ # Replace 0.6 with .6, but only when preceded by : or a space.
110
+ css.gsub!(/(:|\s)0+\.(\d+)/, '\1.\2')
111
+
112
+ # Shorten colors from rgb(51,102,153) to #336699
113
+ # This makes it more likely that it'll get further compressed in the next step.
114
+ css.gsub!(/rgb\s*\(\s*([0-9,\s]+)\s*\)/) do |match|
115
+ '#' << $1.scan(/\d+/).map{|n| n.to_i.to_s(16).rjust(2, '0') }.join
116
+ end
117
+
118
+ # Shorten colors from #AABBCC to #ABC. Note that we want to make sure
119
+ # the color is not preceded by either ", " or =. Indeed, the property
120
+ # filter: chroma(color="#FFFFFF");
121
+ # would become
122
+ # filter: chroma(color="#FFF");
123
+ # which makes the filter break in IE.
124
+ css.gsub!(/([^"'=\s])(\s?)\s*#([0-9a-f])\3([0-9a-f])\4([0-9a-f])\5/i, '\1\2#\3\4\5')
125
+
126
+ # shorter opacity IE filter
127
+ css.gsub!(/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/i, "alpha(opacity=")
128
+
129
+ # Remove empty rules.
130
+ css.gsub!(/[^\};\{\/]+\{\}/, '')
131
+
132
+ if (line_length > 0)
133
+ # Some source control tools don't like it when files containing lines longer
134
+ # than, say 8000 characters, are checked in. The linebreak option is used in
135
+ # that case to split long lines after a specific column.
136
+ startIndex = 0
137
+ index = 0
138
+ length = css.length
139
+ while (index < length)
140
+ index += 1
141
+ if (css[index - 1,1] === '}' && index - startIndex > line_length)
142
+ css = css.slice(0, index) + "\n" + css.slice(index, length)
143
+ startIndex = index
144
+ end
145
+ end
146
+ end
147
+
148
+ # Replace multiple semi-colons in a row by a single one
149
+ # See SF bug #1980989
150
+ css.gsub!(/[;]+/, ';')
151
+
152
+ #restore preserved comments and strings
153
+ css = restore_preserved_comments_and_strings(css)
154
+
155
+ # top and tail whitespace
156
+ css.strip!
157
+
158
+ @output_size = css.length
159
+ css
160
+ end
161
+
162
+ private
163
+
164
+ # Process comments (preserve special comments, nuke the rest) and strings
165
+ # (preserve them).
166
+ def process_comments_and_strings(css_text)
167
+ css = css_text.clone
168
+
169
+ startIndex = 0
170
+ endIndex = 0
171
+ i = 0
172
+ max = 0
173
+ token = ''
174
+ totallen = css.length
175
+ placeholder = ''
176
+
177
+ # collect all comment blocks
178
+ while (startIndex = css.index(/\/\*/, startIndex))
179
+ endIndex = css.index(/\*\//, startIndex + 2)
180
+ unless endIndex
181
+ endIndex = totallen
182
+ end
183
+ token = css.slice(startIndex+2..endIndex-1)
184
+ @comments.push(token)
185
+ css = css.slice(0..startIndex+1).to_s + "___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_" + (@comments.length - 1).to_s + "___" + css.slice(endIndex, totallen).to_s
186
+ startIndex += 2
187
+ end
188
+
189
+ # preserve strings so their content doesn't get accidentally minified
190
+ css.gsub!(/("([^\\"]|\\.|\\)*")|('([^\\']|\\.|\\)*')/) do |match|
191
+ quote = match[0,1]
192
+ string = match.slice(1..-2)
193
+
194
+ # maybe the string contains a comment-like substring?
195
+ # one, maybe more? put'em back then
196
+ if string =~ /___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_/
197
+ @comments.each_index do |index|
198
+ string.gsub!(/___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_#{index.to_s}___/, @comments[index])
199
+ end
200
+ end
201
+
202
+ # minify alpha opacity in filter strings
203
+ string.gsub!(/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/i, "alpha(opacity=")
204
+ @preservedTokens.push(string)
205
+
206
+ quote + "___YUICSSMIN_PRESERVED_TOKEN_" + (@preservedTokens.length - 1).to_s + "___" + quote
207
+ end
208
+
209
+ # used to jump one index in loop
210
+ ie5_hack = false
211
+ # strings are safe, now wrestle the comments
212
+ @comments.each_index do |index|
213
+ if ie5_hack
214
+ ie5_hack = false
215
+ next
216
+ end
217
+
218
+ token = @comments[index]
219
+ placeholder = "___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_" + index.to_s + "___"
220
+
221
+ # ! in the first position of the comment means preserve
222
+ # so push to the preserved tokens keeping the !
223
+ if (token[0,1] === "!")
224
+ @preservedTokens.push(token)
225
+ css.gsub!( /#{placeholder}/i, "___YUICSSMIN_PRESERVED_TOKEN_" + (@preservedTokens.length - 1).to_s + "___")
226
+ next
227
+ end
228
+
229
+ # \ in the last position looks like hack for Mac/IE5
230
+ # shorten that to /*\*/ and the next one to /**/
231
+ if (token[-1,1] === "\\")
232
+ @preservedTokens.push("\\")
233
+ css.gsub!( /#{placeholder}/, "___YUICSSMIN_PRESERVED_TOKEN_" + (@preservedTokens.length - 1).to_s + "___")
234
+ # keep the next comment but remove its content
235
+ @preservedTokens.push("")
236
+ css.gsub!(/___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_#{index+1}___/, "___YUICSSMIN_PRESERVED_TOKEN_" + (@preservedTokens.length - 1).to_s + "___")
237
+ ie5_hack = true
238
+ next
239
+ end
240
+
241
+ # keep empty comments after child selectors (IE7 hack)
242
+ # e.g. html >/**/ body
243
+ if ((token.length === 0) && (startIndex = css.index( /#{placeholder}/)))
244
+ if (startIndex > 2)
245
+ if (css[startIndex - 3,1] === '>')
246
+ @preservedTokens.push("")
247
+ css.gsub!(/#{placeholder}/, "___YUICSSMIN_PRESERVED_TOKEN_" + (@preservedTokens.length - 1).to_s + "___")
248
+ end
249
+ end
250
+ end
251
+
252
+ # in all other cases kill the comment
253
+ css.gsub!( /\/\*#{placeholder}\*\//, "")
254
+ end
255
+
256
+ css
257
+ end
258
+
259
+ # Restore @preservedTokens back in to the css.
260
+ def restore_preserved_comments_and_strings(clean_css)
261
+ css = clean_css.clone
262
+ css_length = css.length
263
+ @preservedTokens.each_index do |index|
264
+ # slice these back into place rather than regex, because
265
+ # complex nested strings cause the replacement to fail
266
+ placeholder = "___YUICSSMIN_PRESERVED_TOKEN_#{index}___"
267
+ startIndex = css.index(placeholder, 0)
268
+ next unless startIndex # skip if nil
269
+ endIndex = startIndex + placeholder.length
270
+
271
+ css = css.slice(0..startIndex-1).to_s + @preservedTokens[index] + css.slice(endIndex, css_length).to_s
272
+ end
273
+
274
+ css
275
+ end
276
+ end
277
+ end
278
+
279
+ end
@@ -0,0 +1,141 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "rapper_lite"
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Tyson Tate"]
12
+ s.date = "2011-10-01"
13
+ s.description = "Simple static asset packaging. Compresses files only when they're updated."
14
+ s.email = "tyson@tysontate.com"
15
+ s.executables = ["rapper_lite"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.markdown"
19
+ ]
20
+ s.files = [
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.markdown",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "bin/rapper_lite",
28
+ "lib/rapper_lite.rb",
29
+ "lib/rapper_lite/compressors.rb",
30
+ "lib/rapper_lite/config.rb",
31
+ "lib/rapper_lite/utils.rb",
32
+ "lib/rapper_lite/versioning.rb",
33
+ "lib/tasks.rb",
34
+ "lib/yui/css_compressor.rb",
35
+ "rapper_lite.gemspec",
36
+ "spec/fixtures/src/simple_1.css",
37
+ "spec/fixtures/src/simple_1.js",
38
+ "spec/fixtures/src/simple_2.css",
39
+ "spec/fixtures/src/subfolder/simple_2.js",
40
+ "spec/fixtures/testcases/combination/expected/base.css",
41
+ "spec/fixtures/testcases/combination/expected/base.js",
42
+ "spec/fixtures/testcases/combination/expected/base_combined.css",
43
+ "spec/fixtures/testcases/combination/expected/base_combined.js",
44
+ "spec/fixtures/testcases/combination/rapper.yml",
45
+ "spec/fixtures/testcases/concatenation/expected/base.css",
46
+ "spec/fixtures/testcases/concatenation/expected/base.js",
47
+ "spec/fixtures/testcases/concatenation/expected/base_combined.css",
48
+ "spec/fixtures/testcases/concatenation/expected/base_combined.js",
49
+ "spec/fixtures/testcases/concatenation/rapper.yml",
50
+ "spec/fixtures/yui_css/background-position.css",
51
+ "spec/fixtures/yui_css/background-position.css.min",
52
+ "spec/fixtures/yui_css/box-model-hack.css",
53
+ "spec/fixtures/yui_css/box-model-hack.css.min",
54
+ "spec/fixtures/yui_css/bug2527974.css",
55
+ "spec/fixtures/yui_css/bug2527974.css.min",
56
+ "spec/fixtures/yui_css/bug2527991.css",
57
+ "spec/fixtures/yui_css/bug2527991.css.min",
58
+ "spec/fixtures/yui_css/bug2527998.css",
59
+ "spec/fixtures/yui_css/bug2527998.css.min",
60
+ "spec/fixtures/yui_css/bug2528034.css",
61
+ "spec/fixtures/yui_css/bug2528034.css.min",
62
+ "spec/fixtures/yui_css/charset-media.css",
63
+ "spec/fixtures/yui_css/charset-media.css.min",
64
+ "spec/fixtures/yui_css/color.css",
65
+ "spec/fixtures/yui_css/color.css.min",
66
+ "spec/fixtures/yui_css/comment.css",
67
+ "spec/fixtures/yui_css/comment.css.min",
68
+ "spec/fixtures/yui_css/concat-charset.css",
69
+ "spec/fixtures/yui_css/concat-charset.css.min",
70
+ "spec/fixtures/yui_css/decimals.css",
71
+ "spec/fixtures/yui_css/decimals.css.min",
72
+ "spec/fixtures/yui_css/dollar-header.css",
73
+ "spec/fixtures/yui_css/dollar-header.css.min",
74
+ "spec/fixtures/yui_css/font-face.css",
75
+ "spec/fixtures/yui_css/font-face.css.min",
76
+ "spec/fixtures/yui_css/ie5mac.css",
77
+ "spec/fixtures/yui_css/ie5mac.css.min",
78
+ "spec/fixtures/yui_css/media-empty-class.css",
79
+ "spec/fixtures/yui_css/media-empty-class.css.min",
80
+ "spec/fixtures/yui_css/media-multi.css",
81
+ "spec/fixtures/yui_css/media-multi.css.min",
82
+ "spec/fixtures/yui_css/media-test.css",
83
+ "spec/fixtures/yui_css/media-test.css.min",
84
+ "spec/fixtures/yui_css/opacity-filter.css",
85
+ "spec/fixtures/yui_css/opacity-filter.css.min",
86
+ "spec/fixtures/yui_css/preserve-new-line.css",
87
+ "spec/fixtures/yui_css/preserve-new-line.css.min",
88
+ "spec/fixtures/yui_css/preserve-strings.css",
89
+ "spec/fixtures/yui_css/preserve-strings.css.min",
90
+ "spec/fixtures/yui_css/preserve_string.css",
91
+ "spec/fixtures/yui_css/preserve_string.css.min",
92
+ "spec/fixtures/yui_css/pseudo-first.css",
93
+ "spec/fixtures/yui_css/pseudo-first.css.min",
94
+ "spec/fixtures/yui_css/pseudo.css",
95
+ "spec/fixtures/yui_css/pseudo.css.min",
96
+ "spec/fixtures/yui_css/special-comments.css",
97
+ "spec/fixtures/yui_css/special-comments.css.min",
98
+ "spec/fixtures/yui_css/star-underscore-hacks.css",
99
+ "spec/fixtures/yui_css/star-underscore-hacks.css.min",
100
+ "spec/fixtures/yui_css/string-in-comment.css",
101
+ "spec/fixtures/yui_css/string-in-comment.css.min",
102
+ "spec/fixtures/yui_css/zeros.css",
103
+ "spec/fixtures/yui_css/zeros.css.min",
104
+ "spec/rapper_lite_spec.rb",
105
+ "spec/spec_helper.rb",
106
+ "spec/vendor_spec.rb"
107
+ ]
108
+ s.homepage = "http://tysontate.github.com/rapper_lite/"
109
+ s.licenses = ["MIT"]
110
+ s.require_paths = ["lib"]
111
+ s.rubygems_version = "1.8.10"
112
+ s.summary = "Simple static asset packaging."
113
+
114
+ if s.respond_to? :specification_version then
115
+ s.specification_version = 3
116
+
117
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
118
+ s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
119
+ s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
120
+ s.add_development_dependency(%q<yard>, [">= 0"])
121
+ s.add_development_dependency(%q<rdiscount>, ["~> 1.6.8"])
122
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
123
+ s.add_development_dependency(%q<yui-compressor>, ["~> 0.9.6"])
124
+ else
125
+ s.add_dependency(%q<rake>, ["~> 0.9.2"])
126
+ s.add_dependency(%q<rspec>, ["~> 1.3.2"])
127
+ s.add_dependency(%q<yard>, [">= 0"])
128
+ s.add_dependency(%q<rdiscount>, ["~> 1.6.8"])
129
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
130
+ s.add_dependency(%q<yui-compressor>, ["~> 0.9.6"])
131
+ end
132
+ else
133
+ s.add_dependency(%q<rake>, ["~> 0.9.2"])
134
+ s.add_dependency(%q<rspec>, ["~> 1.3.2"])
135
+ s.add_dependency(%q<yard>, [">= 0"])
136
+ s.add_dependency(%q<rdiscount>, ["~> 1.6.8"])
137
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
138
+ s.add_dependency(%q<yui-compressor>, ["~> 0.9.6"])
139
+ end
140
+ end
141
+
@@ -0,0 +1,4 @@
1
+ body {
2
+ margin: 0px 0px 0px 0px;
3
+ color: #333333;
4
+ }
@@ -0,0 +1,5 @@
1
+ var x = 1;
2
+ var y = 2;
3
+ function a() {
4
+ return true;
5
+ }
@@ -0,0 +1,4 @@
1
+ * {
2
+ margin: 0px 0px 0px 0px;
3
+ color: #ffffff;
4
+ }
@@ -0,0 +1,5 @@
1
+ a = 1;
2
+ b = 2;
3
+ function b() {
4
+ return false;
5
+ }
@@ -0,0 +1 @@
1
+ body{margin:0;color:#333}*{margin:0;color:#fff}
@@ -0,0 +1 @@
1
+ var x=1;var y=2;function a(){return true}a=1;b=2;function b(){return false};
@@ -0,0 +1 @@
1
+ body{margin:0;color:#333}*{margin:0;color:#fff}body{margin:0;color:#333}
@@ -0,0 +1 @@
1
+ a=1;b=2;function b(){return false}var x=1;var y=2;function a(){return true}a=1;b=2;function b(){return false};
@@ -0,0 +1,26 @@
1
+ --- !omap
2
+ - root: spec/fixtures/src/
3
+ - destination: tmp
4
+ - compress: true
5
+ - css: !omap
6
+ - base: !omap
7
+ - files:
8
+ - simple_1
9
+ - simple_2
10
+ - version: 683e
11
+ - base_combined: !omap
12
+ - files:
13
+ - +base
14
+ - simple_1
15
+ - version: 0bb9
16
+ - js: !omap
17
+ - base: !omap
18
+ - files:
19
+ - simple_1
20
+ - subfolder/simple_2
21
+ - version: f3d9
22
+ - base_combined: !omap
23
+ - files:
24
+ - subfolder/simple_2
25
+ - +base
26
+ - version: ccfc
@@ -0,0 +1,8 @@
1
+ body {
2
+ margin: 0px 0px 0px 0px;
3
+ color: #333333;
4
+ }
5
+ * {
6
+ margin: 0px 0px 0px 0px;
7
+ color: #ffffff;
8
+ }
@@ -0,0 +1,10 @@
1
+ var x = 1;
2
+ var y = 2;
3
+ function a() {
4
+ return true;
5
+ }
6
+ a = 1;
7
+ b = 2;
8
+ function b() {
9
+ return false;
10
+ }
@@ -0,0 +1,12 @@
1
+ body {
2
+ margin: 0px 0px 0px 0px;
3
+ color: #333333;
4
+ }
5
+ * {
6
+ margin: 0px 0px 0px 0px;
7
+ color: #ffffff;
8
+ }
9
+ body {
10
+ margin: 0px 0px 0px 0px;
11
+ color: #333333;
12
+ }
@@ -0,0 +1,15 @@
1
+ a = 1;
2
+ b = 2;
3
+ function b() {
4
+ return false;
5
+ }
6
+ var x = 1;
7
+ var y = 2;
8
+ function a() {
9
+ return true;
10
+ }
11
+ a = 1;
12
+ b = 2;
13
+ function b() {
14
+ return false;
15
+ }
@@ -0,0 +1,26 @@
1
+ --- !omap
2
+ - root: spec/fixtures/src/
3
+ - destination: tmp
4
+ - compress: false
5
+ - css: !omap
6
+ - base: !omap
7
+ - files:
8
+ - simple_1
9
+ - simple_2
10
+ - version: 683e
11
+ - base_combined: !omap
12
+ - files:
13
+ - +base
14
+ - simple_1
15
+ - version: 0bb9
16
+ - js: !omap
17
+ - base: !omap
18
+ - files:
19
+ - simple_1
20
+ - subfolder/simple_2
21
+ - version: f3d9
22
+ - base_combined: !omap
23
+ - files:
24
+ - subfolder/simple_2
25
+ - +base
26
+ - version: ccfc
@@ -0,0 +1,2 @@
1
+ a {background-position: 0 0 0 0;}
2
+ b {BACKGROUND-POSITION: 0 0;}
@@ -0,0 +1 @@
1
+ a{background-position:0 0}b{background-position:0 0}
@@ -0,0 +1,9 @@
1
+ #elem {
2
+ width: 100px;
3
+ voice-family: "\"}\"";
4
+ voice-family:inherit;
5
+ width: 200px;
6
+ }
7
+ html>body #elem {
8
+ width: 200px;
9
+ }
@@ -0,0 +1 @@
1
+ #elem{width:100px;voice-family:"\"}\"";voice-family:inherit;width:200px}html>body #elem{width:200px}
@@ -0,0 +1,9 @@
1
+ /* this file contains no css, it exists purely to put the revision number into the
2
+ combined css before uploading it to SiteManager. The exclaimation at the start
3
+ of the comment informs yuicompressor not to strip the comment out */
4
+
5
+ /*! $LastChangedRevision: 81 $ $LastChangedDate: 2009-05-27 17:41:02 +0100 (Wed, 27 May 2009) $ */
6
+
7
+ body {
8
+ yo: cats;
9
+ }
@@ -0,0 +1 @@
1
+ /*! $LastChangedRevision: 81 $ $LastChangedDate: 2009-05-27 17:41:02 +0100 (Wed, 27 May 2009) $ */body{yo:cats}
@@ -0,0 +1,19 @@
1
+ @media screen and/*!YUI-Compresser */(-webkit-min-device-pixel-ratio:0) {
2
+ a{
3
+ b: 1;
4
+ }
5
+ }
6
+
7
+
8
+ @media screen and/*! */ /*! */(-webkit-min-device-pixel-ratio:0) {
9
+ a{
10
+ b: 1;
11
+ }
12
+ }
13
+
14
+
15
+ @media -webkit-min-device-pixel-ratio:0 {
16
+ a{
17
+ b: 1;
18
+ }
19
+ }
@@ -0,0 +1 @@
1
+ @media screen and/*!YUI-Compresser */(-webkit-min-device-pixel-ratio:0){a{b:1}}@media screen and/*! *//*! */(-webkit-min-device-pixel-ratio:0){a{b:1}}@media -webkit-min-device-pixel-ratio:0{a{b:1}}
@@ -0,0 +1,4 @@
1
+ /*! special */
2
+ body {
3
+
4
+ }
@@ -0,0 +1 @@
1
+ /*! special */
@@ -0,0 +1,5 @@
1
+ a[href$="/test/"] span:first-child { b:1; }
2
+ a[href$="/test/"] span:first-child { }
3
+
4
+
5
+
@@ -0,0 +1 @@
1
+ a[href$="/test/"] span:first-child{b:1}
@@ -0,0 +1,9 @@
1
+ /* re: 2495387 */
2
+ @charset 'utf-8';
3
+ @media all {
4
+ body {
5
+ }
6
+ body {
7
+ background-color: gold;
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ @charset 'utf-8';@media all{body{background-color:gold}}
@@ -0,0 +1,7 @@
1
+ .color {
2
+ me: rgb(123, 123, 123);
3
+ impressed: #ffeedd;
4
+ filter: chroma(color="#FFFFFF");
5
+ background: none repeat scroll 0 0 rgb(255, 255,0);
6
+ alpha: rgba(1, 2, 3, 4);
7
+ }
@@ -0,0 +1 @@
1
+ .color{me:#7b7b7b;impressed:#fed;filter:chroma(color="#FFFFFF");background:none repeat scroll 0 0 #ff0;alpha:rgba(1,2,3,4)}