rapper 0.0.1
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/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +24 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +140 -0
- data/Rakefile +45 -0
- data/VERSION +1 -0
- data/lib/rapper.rb +66 -0
- data/lib/rapper/compressors.rb +47 -0
- data/lib/rapper/config.rb +95 -0
- data/lib/rapper/errors.rb +23 -0
- data/lib/rapper/logging.rb +35 -0
- data/lib/rapper/utils.rb +106 -0
- data/lib/rapper/versioning.rb +37 -0
- data/lib/yui/css_compressor.rb +279 -0
- data/rapper.gemspec +167 -0
- data/spec/fixtures/config/assets.yml +25 -0
- data/spec/fixtures/config/assets/base/javascripts.yml +12 -0
- data/spec/fixtures/config/assets/base/stylesheets.yml +10 -0
- data/spec/fixtures/config/assets/base/validators.yml +9 -0
- data/spec/fixtures/javascripts/simple_1.js +5 -0
- data/spec/fixtures/javascripts/simple_2.js +5 -0
- data/spec/fixtures/stylesheets/simple_1.css +4 -0
- data/spec/fixtures/stylesheets/simple_2.css +4 -0
- data/spec/fixtures/test_cases/concatenation/assets.yml +5 -0
- data/spec/fixtures/test_cases/concatenation/definitions/css.yml +15 -0
- data/spec/fixtures/test_cases/concatenation/definitions/js.yml +15 -0
- data/spec/fixtures/test_cases/concatenation/expected/base.css +8 -0
- data/spec/fixtures/test_cases/concatenation/expected/base.js +10 -0
- data/spec/fixtures/test_cases/concatenation/expected/base_reversed.css +8 -0
- data/spec/fixtures/test_cases/concatenation/expected/base_reversed.js +10 -0
- data/spec/fixtures/yui_css/background-position.css +2 -0
- data/spec/fixtures/yui_css/background-position.css.min +1 -0
- data/spec/fixtures/yui_css/box-model-hack.css +9 -0
- data/spec/fixtures/yui_css/box-model-hack.css.min +1 -0
- data/spec/fixtures/yui_css/bug2527974.css +9 -0
- data/spec/fixtures/yui_css/bug2527974.css.min +1 -0
- data/spec/fixtures/yui_css/bug2527991.css +19 -0
- data/spec/fixtures/yui_css/bug2527991.css.min +1 -0
- data/spec/fixtures/yui_css/bug2527998.css +4 -0
- data/spec/fixtures/yui_css/bug2527998.css.min +1 -0
- data/spec/fixtures/yui_css/bug2528034.css +5 -0
- data/spec/fixtures/yui_css/bug2528034.css.min +1 -0
- data/spec/fixtures/yui_css/charset-media.css +9 -0
- data/spec/fixtures/yui_css/charset-media.css.min +1 -0
- data/spec/fixtures/yui_css/color.css +7 -0
- data/spec/fixtures/yui_css/color.css.min +1 -0
- data/spec/fixtures/yui_css/comment.css +3 -0
- data/spec/fixtures/yui_css/comment.css.min +1 -0
- data/spec/fixtures/yui_css/concat-charset.css +15 -0
- data/spec/fixtures/yui_css/concat-charset.css.min +1 -0
- data/spec/fixtures/yui_css/decimals.css +3 -0
- data/spec/fixtures/yui_css/decimals.css.min +1 -0
- data/spec/fixtures/yui_css/dollar-header.css +7 -0
- data/spec/fixtures/yui_css/dollar-header.css.min +3 -0
- data/spec/fixtures/yui_css/font-face.css +6 -0
- data/spec/fixtures/yui_css/font-face.css.min +1 -0
- data/spec/fixtures/yui_css/ie5mac.css +5 -0
- data/spec/fixtures/yui_css/ie5mac.css.min +1 -0
- data/spec/fixtures/yui_css/media-empty-class.css +16 -0
- data/spec/fixtures/yui_css/media-empty-class.css.min +1 -0
- data/spec/fixtures/yui_css/media-multi.css +5 -0
- data/spec/fixtures/yui_css/media-multi.css.min +1 -0
- data/spec/fixtures/yui_css/media-test.css +5 -0
- data/spec/fixtures/yui_css/media-test.css.min +1 -0
- data/spec/fixtures/yui_css/opacity-filter.css +14 -0
- data/spec/fixtures/yui_css/opacity-filter.css.min +1 -0
- data/spec/fixtures/yui_css/preserve-new-line.css +6 -0
- data/spec/fixtures/yui_css/preserve-new-line.css.min +3 -0
- data/spec/fixtures/yui_css/preserve-strings.css +7 -0
- data/spec/fixtures/yui_css/preserve-strings.css.min +1 -0
- data/spec/fixtures/yui_css/preserve_string.css +7 -0
- data/spec/fixtures/yui_css/preserve_string.css.min +1 -0
- data/spec/fixtures/yui_css/pseudo-first.css +16 -0
- data/spec/fixtures/yui_css/pseudo-first.css.min +1 -0
- data/spec/fixtures/yui_css/pseudo.css +4 -0
- data/spec/fixtures/yui_css/pseudo.css.min +1 -0
- data/spec/fixtures/yui_css/special-comments.css +13 -0
- data/spec/fixtures/yui_css/special-comments.css.min +9 -0
- data/spec/fixtures/yui_css/star-underscore-hacks.css +5 -0
- data/spec/fixtures/yui_css/star-underscore-hacks.css.min +1 -0
- data/spec/fixtures/yui_css/string-in-comment.css +8 -0
- data/spec/fixtures/yui_css/string-in-comment.css.min +1 -0
- data/spec/fixtures/yui_css/zeros.css +6 -0
- data/spec/fixtures/yui_css/zeros.css.min +1 -0
- data/spec/rapper_spec.rb +139 -0
- data/spec/spec_helper.rb +57 -0
- data/spec/vendor_spec.rb +36 -0
- metadata +349 -0
data/rapper.gemspec
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
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 = %q{rapper}
|
|
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 = %q{2011-02-04}
|
|
13
|
+
s.description = %q{Static asset packager and compressor with versioning and built-in view helpers. Easy to configure, easy to use, and easy to ignore when you want to. No crazy JavaScript comment DSLs, either.}
|
|
14
|
+
s.email = %q{tyson@tysontate.com}
|
|
15
|
+
s.extra_rdoc_files = [
|
|
16
|
+
"LICENSE.txt",
|
|
17
|
+
"README.markdown"
|
|
18
|
+
]
|
|
19
|
+
s.files = [
|
|
20
|
+
".document",
|
|
21
|
+
".rspec",
|
|
22
|
+
"Gemfile",
|
|
23
|
+
"Gemfile.lock",
|
|
24
|
+
"LICENSE.txt",
|
|
25
|
+
"README.markdown",
|
|
26
|
+
"Rakefile",
|
|
27
|
+
"VERSION",
|
|
28
|
+
"lib/rapper.rb",
|
|
29
|
+
"lib/rapper/compressors.rb",
|
|
30
|
+
"lib/rapper/config.rb",
|
|
31
|
+
"lib/rapper/errors.rb",
|
|
32
|
+
"lib/rapper/logging.rb",
|
|
33
|
+
"lib/rapper/utils.rb",
|
|
34
|
+
"lib/rapper/versioning.rb",
|
|
35
|
+
"lib/yui/css_compressor.rb",
|
|
36
|
+
"rapper.gemspec",
|
|
37
|
+
"spec/fixtures/config/assets.yml",
|
|
38
|
+
"spec/fixtures/config/assets/base/javascripts.yml",
|
|
39
|
+
"spec/fixtures/config/assets/base/stylesheets.yml",
|
|
40
|
+
"spec/fixtures/config/assets/base/validators.yml",
|
|
41
|
+
"spec/fixtures/javascripts/simple_1.js",
|
|
42
|
+
"spec/fixtures/javascripts/simple_2.js",
|
|
43
|
+
"spec/fixtures/stylesheets/simple_1.css",
|
|
44
|
+
"spec/fixtures/stylesheets/simple_2.css",
|
|
45
|
+
"spec/fixtures/test_cases/concatenation/assets.yml",
|
|
46
|
+
"spec/fixtures/test_cases/concatenation/definitions/css.yml",
|
|
47
|
+
"spec/fixtures/test_cases/concatenation/definitions/js.yml",
|
|
48
|
+
"spec/fixtures/test_cases/concatenation/expected/base.css",
|
|
49
|
+
"spec/fixtures/test_cases/concatenation/expected/base.js",
|
|
50
|
+
"spec/fixtures/test_cases/concatenation/expected/base_reversed.css",
|
|
51
|
+
"spec/fixtures/test_cases/concatenation/expected/base_reversed.js",
|
|
52
|
+
"spec/fixtures/yui_css/background-position.css",
|
|
53
|
+
"spec/fixtures/yui_css/background-position.css.min",
|
|
54
|
+
"spec/fixtures/yui_css/box-model-hack.css",
|
|
55
|
+
"spec/fixtures/yui_css/box-model-hack.css.min",
|
|
56
|
+
"spec/fixtures/yui_css/bug2527974.css",
|
|
57
|
+
"spec/fixtures/yui_css/bug2527974.css.min",
|
|
58
|
+
"spec/fixtures/yui_css/bug2527991.css",
|
|
59
|
+
"spec/fixtures/yui_css/bug2527991.css.min",
|
|
60
|
+
"spec/fixtures/yui_css/bug2527998.css",
|
|
61
|
+
"spec/fixtures/yui_css/bug2527998.css.min",
|
|
62
|
+
"spec/fixtures/yui_css/bug2528034.css",
|
|
63
|
+
"spec/fixtures/yui_css/bug2528034.css.min",
|
|
64
|
+
"spec/fixtures/yui_css/charset-media.css",
|
|
65
|
+
"spec/fixtures/yui_css/charset-media.css.min",
|
|
66
|
+
"spec/fixtures/yui_css/color.css",
|
|
67
|
+
"spec/fixtures/yui_css/color.css.min",
|
|
68
|
+
"spec/fixtures/yui_css/comment.css",
|
|
69
|
+
"spec/fixtures/yui_css/comment.css.min",
|
|
70
|
+
"spec/fixtures/yui_css/concat-charset.css",
|
|
71
|
+
"spec/fixtures/yui_css/concat-charset.css.min",
|
|
72
|
+
"spec/fixtures/yui_css/decimals.css",
|
|
73
|
+
"spec/fixtures/yui_css/decimals.css.min",
|
|
74
|
+
"spec/fixtures/yui_css/dollar-header.css",
|
|
75
|
+
"spec/fixtures/yui_css/dollar-header.css.min",
|
|
76
|
+
"spec/fixtures/yui_css/font-face.css",
|
|
77
|
+
"spec/fixtures/yui_css/font-face.css.min",
|
|
78
|
+
"spec/fixtures/yui_css/ie5mac.css",
|
|
79
|
+
"spec/fixtures/yui_css/ie5mac.css.min",
|
|
80
|
+
"spec/fixtures/yui_css/media-empty-class.css",
|
|
81
|
+
"spec/fixtures/yui_css/media-empty-class.css.min",
|
|
82
|
+
"spec/fixtures/yui_css/media-multi.css",
|
|
83
|
+
"spec/fixtures/yui_css/media-multi.css.min",
|
|
84
|
+
"spec/fixtures/yui_css/media-test.css",
|
|
85
|
+
"spec/fixtures/yui_css/media-test.css.min",
|
|
86
|
+
"spec/fixtures/yui_css/opacity-filter.css",
|
|
87
|
+
"spec/fixtures/yui_css/opacity-filter.css.min",
|
|
88
|
+
"spec/fixtures/yui_css/preserve-new-line.css",
|
|
89
|
+
"spec/fixtures/yui_css/preserve-new-line.css.min",
|
|
90
|
+
"spec/fixtures/yui_css/preserve-strings.css",
|
|
91
|
+
"spec/fixtures/yui_css/preserve-strings.css.min",
|
|
92
|
+
"spec/fixtures/yui_css/preserve_string.css",
|
|
93
|
+
"spec/fixtures/yui_css/preserve_string.css.min",
|
|
94
|
+
"spec/fixtures/yui_css/pseudo-first.css",
|
|
95
|
+
"spec/fixtures/yui_css/pseudo-first.css.min",
|
|
96
|
+
"spec/fixtures/yui_css/pseudo.css",
|
|
97
|
+
"spec/fixtures/yui_css/pseudo.css.min",
|
|
98
|
+
"spec/fixtures/yui_css/special-comments.css",
|
|
99
|
+
"spec/fixtures/yui_css/special-comments.css.min",
|
|
100
|
+
"spec/fixtures/yui_css/star-underscore-hacks.css",
|
|
101
|
+
"spec/fixtures/yui_css/star-underscore-hacks.css.min",
|
|
102
|
+
"spec/fixtures/yui_css/string-in-comment.css",
|
|
103
|
+
"spec/fixtures/yui_css/string-in-comment.css.min",
|
|
104
|
+
"spec/fixtures/yui_css/zeros.css",
|
|
105
|
+
"spec/fixtures/yui_css/zeros.css.min",
|
|
106
|
+
"spec/rapper_spec.rb",
|
|
107
|
+
"spec/spec_helper.rb",
|
|
108
|
+
"spec/vendor_spec.rb"
|
|
109
|
+
]
|
|
110
|
+
s.homepage = %q{http://tysontate.github.com/rapper/}
|
|
111
|
+
s.licenses = ["MIT"]
|
|
112
|
+
s.require_paths = ["lib"]
|
|
113
|
+
s.rubygems_version = %q{1.3.7}
|
|
114
|
+
s.summary = %q{Static asset packager and compressor with versioning and built-in view helpers.}
|
|
115
|
+
s.test_files = [
|
|
116
|
+
"spec/rapper_spec.rb",
|
|
117
|
+
"spec/spec_helper.rb",
|
|
118
|
+
"spec/vendor_spec.rb"
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
if s.respond_to? :specification_version then
|
|
122
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
123
|
+
s.specification_version = 3
|
|
124
|
+
|
|
125
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
126
|
+
s.add_runtime_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
127
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
128
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.4"])
|
|
129
|
+
s.add_development_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
130
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
131
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
132
|
+
s.add_runtime_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
133
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
134
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.4"])
|
|
135
|
+
s.add_development_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
136
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
137
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
138
|
+
else
|
|
139
|
+
s.add_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
140
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
141
|
+
s.add_dependency(%q<yard>, ["~> 0.6.4"])
|
|
142
|
+
s.add_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
143
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
144
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
145
|
+
s.add_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
146
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
147
|
+
s.add_dependency(%q<yard>, ["~> 0.6.4"])
|
|
148
|
+
s.add_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
149
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
150
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
151
|
+
end
|
|
152
|
+
else
|
|
153
|
+
s.add_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
154
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
155
|
+
s.add_dependency(%q<yard>, ["~> 0.6.4"])
|
|
156
|
+
s.add_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
157
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
158
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
159
|
+
s.add_dependency(%q<closure-compiler>, ["~> 1.0.0"])
|
|
160
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
|
161
|
+
s.add_dependency(%q<yard>, ["~> 0.6.4"])
|
|
162
|
+
s.add_dependency(%q<bluecloth>, ["~> 2.0.10"])
|
|
163
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
|
164
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
base: &base
|
|
2
|
+
definition_root: spec/fixtures/config/assets/base
|
|
3
|
+
test:
|
|
4
|
+
<<: *base
|
|
5
|
+
bundle: true
|
|
6
|
+
compress: true
|
|
7
|
+
tag_style: html
|
|
8
|
+
versions: false
|
|
9
|
+
closure_compiler:
|
|
10
|
+
compilation_level: ADVANCED_OPTIMIZATIONS
|
|
11
|
+
formatting: pretty_print
|
|
12
|
+
test_empty:
|
|
13
|
+
<<: *base
|
|
14
|
+
test_no_definition_root:
|
|
15
|
+
log: stdout
|
|
16
|
+
test_logging_stdout:
|
|
17
|
+
<<: *base
|
|
18
|
+
log: stdout
|
|
19
|
+
test_logging_verbose:
|
|
20
|
+
<<: *base
|
|
21
|
+
log: stdout
|
|
22
|
+
log_verbose: true
|
|
23
|
+
test_logging_file:
|
|
24
|
+
<<: *base
|
|
25
|
+
log: tmp/test_logging_file.log
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
--- !omap
|
|
2
|
+
- source_root: spec/fixtures/stylesheets
|
|
3
|
+
- destination_root: tmp
|
|
4
|
+
- suffix: css
|
|
5
|
+
- assets:
|
|
6
|
+
- base:
|
|
7
|
+
- files:
|
|
8
|
+
- simple_1
|
|
9
|
+
- simple_2
|
|
10
|
+
- version: 683e
|
|
11
|
+
- base_reversed:
|
|
12
|
+
- files:
|
|
13
|
+
- simple_2
|
|
14
|
+
- simple_1
|
|
15
|
+
- version: 4a04
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a{background-position:0 0}b{background-position:0 0}
|
|
@@ -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 @@
|
|
|
1
|
+
/*! special */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a[href$="/test/"] span:first-child{b:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset 'utf-8';@media all{body{background-color:gold}}
|