sinatra-bundles 0.2.0 → 0.3.0
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/README.md +4 -2
- data/VERSION +1 -1
- data/lib/sinatra/bundles.rb +30 -25
- data/lib/sinatra/bundles/bundle.rb +12 -8
- data/lib/sinatra/bundles/helpers.rb +3 -3
- data/lib/sinatra/bundles/javascript_bundle.rb +4 -3
- data/lib/sinatra/bundles/stylesheet_bundle.rb +7 -7
- data/sinatra-bundles.gemspec +6 -4
- data/spec/custom_app.rb +15 -0
- data/spec/sinatra-bundles_spec.rb +79 -8
- metadata +81 -33
data/README.md
CHANGED
@@ -114,8 +114,10 @@ Thanks!
|
|
114
114
|
-------
|
115
115
|
|
116
116
|
* [Patrick Hogan](http://github.com/pbhogan)
|
117
|
-
|
118
|
-
|
117
|
+
* Etag support (with specs!)
|
118
|
+
* Wildcard globbing
|
119
|
+
* [docunext](http://github.com/docunext)
|
120
|
+
* Custom path prefixes for bundles (instead of 'javascripts' and 'stylesheets')
|
119
121
|
|
120
122
|
Copyright
|
121
123
|
---------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/lib/sinatra/bundles.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
module Sinatra
|
2
2
|
# Main Bundles Module
|
3
3
|
module Bundles
|
4
|
-
|
5
|
-
autoload :
|
6
|
-
autoload :
|
7
|
-
autoload :
|
4
|
+
mypath = File.dirname(__FILE__)
|
5
|
+
autoload :Helpers, "#{mypath}/bundles/helpers"
|
6
|
+
autoload :Bundle, "#{mypath}/bundles/bundle"
|
7
|
+
autoload :JavascriptBundle, "#{mypath}/bundles/javascript_bundle"
|
8
|
+
autoload :StylesheetBundle, "#{mypath}/bundles/stylesheet_bundle"
|
8
9
|
|
9
10
|
# Set a Javascript bundle
|
10
11
|
# javascript_bundle(:all, %w(jquery lightbox))
|
@@ -25,43 +26,47 @@ module Sinatra
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def self.registered(app)
|
28
|
-
# Setup empty bundle containers
|
29
|
-
app.set(:javascript_bundles, {})
|
30
|
-
app.set(:stylesheet_bundles, {})
|
31
|
-
|
32
29
|
# Setup defaults
|
33
|
-
app.set(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
app.set({
|
31
|
+
:javascript_bundles => {},
|
32
|
+
:stylesheet_bundles => {},
|
33
|
+
:bundle_cache_time => 60 * 60 * 24 * 365,
|
34
|
+
:stylesheets => lambda { app.respond_to?(:css) ? app.css : 'stylesheets' },
|
35
|
+
:javascripts => lambda { app.respond_to?(:js) ? app.js : 'javascripts' },
|
36
|
+
:compress_bundles => false,
|
37
|
+
:cache_bundles => false,
|
38
|
+
:stamp_bundles => true,
|
39
|
+
:warm_bundle_cache => true
|
40
|
+
})
|
38
41
|
|
39
42
|
# Production defaults
|
40
43
|
app.configure :production do
|
41
|
-
app.
|
42
|
-
|
44
|
+
app.set({
|
45
|
+
:compress_bundles => true,
|
46
|
+
:cache_bundles => true
|
47
|
+
})
|
43
48
|
end
|
44
49
|
|
45
50
|
app.helpers(Helpers)
|
46
51
|
|
47
|
-
app.get(
|
52
|
+
app.get(%r{/#{Regexp.quote(app.stylesheets)}/bundles/(\w+)(?:/(\d+))?\.css}) do |bundle, stamp| # Don't really care about the stamp.
|
48
53
|
content_type('text/css')
|
49
54
|
headers['Vary'] = 'Accept-Encoding'
|
50
|
-
if
|
51
|
-
expires(
|
52
|
-
etag(
|
55
|
+
if settings.cache_bundles
|
56
|
+
expires(settings.bundle_cache_time, :public, :must_revalidate)
|
57
|
+
etag(settings.stylesheet_bundles[bundle.intern].etag)
|
53
58
|
end
|
54
|
-
|
59
|
+
settings.stylesheet_bundles[bundle.intern].content
|
55
60
|
end
|
56
61
|
|
57
|
-
app.get(
|
62
|
+
app.get(%r{/#{Regexp.quote(app.javascripts)}/bundles/(\w+)(?:/(\d+))?\.js}) do |bundle, stamp| # Don't really care about the stamp.
|
58
63
|
content_type('text/javascript; charset=utf-8')
|
59
64
|
headers['Vary'] = 'Accept-Encoding'
|
60
|
-
if
|
61
|
-
expires(
|
62
|
-
etag(
|
65
|
+
if settings.cache_bundles
|
66
|
+
expires(settings.bundle_cache_time, :public, :must_revalidate)
|
67
|
+
etag(settings.javascript_bundles[bundle.intern].etag)
|
63
68
|
end
|
64
|
-
|
69
|
+
settings.javascript_bundles[bundle.intern].content
|
65
70
|
end
|
66
71
|
end
|
67
72
|
end
|
@@ -10,14 +10,13 @@ module Sinatra
|
|
10
10
|
|
11
11
|
def initialize(app, files = nil)
|
12
12
|
@app = app
|
13
|
-
@files =
|
13
|
+
@files = []
|
14
14
|
files ||= ['**/*']
|
15
15
|
files.each do |f|
|
16
16
|
full_path = path(f)
|
17
17
|
if File.file?(full_path)
|
18
18
|
@files << f
|
19
19
|
else
|
20
|
-
dir = File.dirname(full_path)
|
21
20
|
ext = File.extname(full_path)
|
22
21
|
Dir[full_path].each do |file|
|
23
22
|
if File.exists?(file)
|
@@ -60,25 +59,30 @@ module Sinatra
|
|
60
59
|
# Returns true if the content needs to be rebundled
|
61
60
|
def needs_rebundle?
|
62
61
|
# Right now compression is the only option that requires rebundling
|
63
|
-
@options_hash !=
|
62
|
+
@options_hash != options_hash.hash
|
64
63
|
end
|
65
64
|
|
66
65
|
# Clear local variable caches effectively causing rebundling
|
67
66
|
def rebundle
|
68
67
|
@content = nil
|
69
68
|
@etag = nil
|
70
|
-
@options_hash =
|
69
|
+
@options_hash = options_hash.hash
|
71
70
|
end
|
72
71
|
|
73
72
|
private
|
73
|
+
def options_hash
|
74
|
+
{
|
75
|
+
:compress => @app.compress_bundles,
|
76
|
+
:stamp => stamp
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
74
80
|
# The timestamp of the bundle, which is the newest file in the bundle.
|
75
81
|
#
|
76
82
|
# @return [Integer] The timestamp of the bundle
|
77
83
|
def stamp
|
78
|
-
@files.map
|
79
|
-
File.mtime(path(f))
|
80
|
-
end.sort.first.to_i
|
84
|
+
@files.map { |f| File.mtime(path(f)) }.sort.last.to_i
|
81
85
|
end
|
82
86
|
end
|
83
87
|
end
|
84
|
-
end
|
88
|
+
end
|
@@ -7,15 +7,15 @@ module Sinatra
|
|
7
7
|
# @param [Symbol,String] bundle The bundle name
|
8
8
|
# @return [String] HTML script tag
|
9
9
|
def javascript_bundle_include_tag(bundle)
|
10
|
-
|
10
|
+
settings.javascript_bundles[bundle].to_html(bundle)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Emit a script tag for a stylesheet bundle
|
14
14
|
#
|
15
15
|
# @param [Symbol,String] bundle The bundle name
|
16
16
|
# @return [String] HTML link tag
|
17
|
-
def stylesheet_bundle_link_tag(bundle, media =
|
18
|
-
|
17
|
+
def stylesheet_bundle_link_tag(bundle, media = :all)
|
18
|
+
settings.stylesheet_bundles[bundle].to_html(bundle, media)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'sinatra/bundles/bundle'
|
2
1
|
require 'packr'
|
3
2
|
|
4
3
|
module Sinatra
|
@@ -10,14 +9,16 @@ module Sinatra
|
|
10
9
|
# @param [String] name The name of a bundle
|
11
10
|
# @return [String] The HTML that can be inserted into the doc
|
12
11
|
def to_html(name)
|
13
|
-
|
12
|
+
prefix = "/#{@app.javascripts}/bundles"
|
13
|
+
src = @app.stamp_bundles ? "#{prefix}/#{name}/#{stamp}.js" : "#{prefix}/#{name}.js"
|
14
|
+
"<script type='text/javascript' src='#{src}'></script>"
|
14
15
|
end
|
15
16
|
|
16
17
|
protected
|
17
18
|
|
18
19
|
# The root of these bundles, for path purposes
|
19
20
|
def root
|
20
|
-
File.join(@app.public,
|
21
|
+
File.join(@app.public, @app.javascripts)
|
21
22
|
end
|
22
23
|
|
23
24
|
# Compress Javascript
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'sinatra/bundles/bundle'
|
2
1
|
require 'rainpress'
|
3
2
|
|
4
3
|
module Sinatra
|
@@ -9,17 +8,18 @@ module Sinatra
|
|
9
8
|
#
|
10
9
|
# @param [String] name The name of a bundle
|
11
10
|
# @return [String] The HTML that can be inserted into the doc
|
12
|
-
def to_html(name, media =
|
13
|
-
media
|
14
|
-
|
15
|
-
|
11
|
+
def to_html(name, media = :all)
|
12
|
+
media = media.join(', ') if media.is_a? Array
|
13
|
+
prefix = "/#{@app.stylesheets}/bundles"
|
14
|
+
href = @app.stamp_bundles ? "#{prefix}/#{name}/#{stamp}.css" : "#{prefix}/#{name}.css"
|
15
|
+
"<link type='text/css' href='#{href}' rel='stylesheet' media='#{media}' />"
|
16
16
|
end
|
17
17
|
|
18
18
|
protected
|
19
19
|
|
20
20
|
# The root of these bundles, for path purposes
|
21
21
|
def root
|
22
|
-
File.join(@app.public,
|
22
|
+
File.join(@app.public, @app.stylesheets)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Compress CSS
|
@@ -36,7 +36,7 @@ module Sinatra
|
|
36
36
|
# assumed to be in the public directory, under 'stylesheets'
|
37
37
|
# @return [String] The full path to the file
|
38
38
|
def path(filename)
|
39
|
-
File.join(
|
39
|
+
File.join(root, "#{filename}.css")
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/sinatra-bundles.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sinatra-bundles}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Huckstep"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-01}
|
13
13
|
s.description = %q{Bundle CSS and Javascript assets to a single file, compress, and cache them for snappier web experiences.}
|
14
14
|
s.email = %q{darkhelmet@darkhelmetlive.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"lib/sinatra/bundles/stylesheet_bundle.rb",
|
31
31
|
"sinatra-bundles.gemspec",
|
32
32
|
"spec/app.rb",
|
33
|
+
"spec/custom_app.rb",
|
33
34
|
"spec/production_app.rb",
|
34
35
|
"spec/public/javascripts/eval.js",
|
35
36
|
"spec/public/javascripts/splat/splat.js",
|
@@ -44,10 +45,11 @@ Gem::Specification.new do |s|
|
|
44
45
|
s.homepage = %q{http://github.com/darkhelmet/sinatra-bundles}
|
45
46
|
s.rdoc_options = ["--charset=UTF-8"]
|
46
47
|
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version = %q{1.3.
|
48
|
+
s.rubygems_version = %q{1.3.7}
|
48
49
|
s.summary = %q{Easy asset bundling for sinatra}
|
49
50
|
s.test_files = [
|
50
51
|
"spec/app.rb",
|
52
|
+
"spec/custom_app.rb",
|
51
53
|
"spec/production_app.rb",
|
52
54
|
"spec/sinatra-bundles_spec.rb",
|
53
55
|
"spec/spec_helper.rb"
|
@@ -57,7 +59,7 @@ Gem::Specification.new do |s|
|
|
57
59
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
58
60
|
s.specification_version = 3
|
59
61
|
|
60
|
-
if Gem::Version.new(Gem::
|
62
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
61
63
|
s.add_runtime_dependency(%q<rainpress>, [">= 0"])
|
62
64
|
s.add_runtime_dependency(%q<packr>, [">= 0"])
|
63
65
|
s.add_runtime_dependency(%q<rack>, [">= 1.0"])
|
data/spec/custom_app.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
class CustomApp < Sinatra::Base
|
2
|
+
configure do
|
3
|
+
set(:environment, :test)
|
4
|
+
set(:js, 's/js')
|
5
|
+
set(:css, 's/css')
|
6
|
+
set(:root, File.dirname(__FILE__))
|
7
|
+
end
|
8
|
+
|
9
|
+
register Sinatra::Bundles
|
10
|
+
|
11
|
+
stylesheet_bundle(:test, %w(test1 test2))
|
12
|
+
javascript_bundle(:test, %w(eval test1 test2))
|
13
|
+
javascript_bundle(:test2, %w(test*))
|
14
|
+
javascript_bundle(:all)
|
15
|
+
end
|
@@ -1,12 +1,16 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
require 'fileutils'
|
2
3
|
require 'app'
|
3
4
|
require 'production_app'
|
5
|
+
require 'custom_app'
|
4
6
|
|
5
7
|
describe 'sinatra-bundles' do
|
6
8
|
def app(env = :test)
|
7
9
|
case env
|
8
10
|
when :production
|
9
11
|
ProductionApp
|
12
|
+
when :custom
|
13
|
+
CustomApp
|
10
14
|
else
|
11
15
|
TestApp
|
12
16
|
end
|
@@ -15,9 +19,7 @@ describe 'sinatra-bundles' do
|
|
15
19
|
def stamp(type, ext, names)
|
16
20
|
names.map do |name|
|
17
21
|
File.expand_path(File.join(File.dirname(__FILE__), 'public', type, "#{name}.#{ext}"))
|
18
|
-
end.map
|
19
|
-
File.mtime(path)
|
20
|
-
end.sort.first.to_i
|
22
|
+
end.map { |path| File.mtime(path) }.sort.last.to_i
|
21
23
|
end
|
22
24
|
|
23
25
|
def js_stamp(names)
|
@@ -88,14 +90,23 @@ describe 'sinatra-bundles' do
|
|
88
90
|
end.should == "<script type='text/javascript' src='/javascripts/bundles/test.js'></script>"
|
89
91
|
end
|
90
92
|
|
93
|
+
it 'should create cusomized tag if path is CUSTOM' do
|
94
|
+
app(:custom).new.instance_eval do
|
95
|
+
options.disable(:stamp_bundles)
|
96
|
+
javascript_bundle_include_tag(:test)
|
97
|
+
end.should == "<script type='text/javascript' src='/s/js/bundles/test.js'></script>"
|
98
|
+
end
|
99
|
+
|
91
100
|
it 'should stamp bundles with the timestamp of the newest file in the bundle' do
|
92
101
|
app.new.instance_eval do
|
93
102
|
javascript_bundle_include_tag(:test)
|
94
|
-
end.should == "<script type='text/javascript' src='/javascripts/bundles/test
|
103
|
+
end.should == "<script type='text/javascript' src='/javascripts/bundles/test/#{js_stamp(%w(eval test1 test2))}.js'></script>"
|
95
104
|
end
|
96
105
|
|
97
106
|
it 'should serve bundles' do
|
98
|
-
get
|
107
|
+
get '/javascripts/bundles/test.js'
|
108
|
+
# Bogus stamp
|
109
|
+
get '/javascripts/bundles/test/987654.js'
|
99
110
|
last_response.should be_ok
|
100
111
|
end
|
101
112
|
|
@@ -126,13 +137,40 @@ describe 'sinatra-bundles' do
|
|
126
137
|
get '/javascripts/bundles/test2.js'
|
127
138
|
last_response.should be_ok
|
128
139
|
last_response.body.include?('eval').should be_false
|
129
|
-
last_response.body.should == @scripts.reject { |s| s.match(/eval|splat/) }.map { |path| File.read(path) }.join("\n") + "\n"
|
140
|
+
last_response.body.should == @scripts.reject { |s| s.match(/eval|splat/) }.sort.map { |path| File.read(path) }.join("\n") + "\n"
|
130
141
|
end
|
131
142
|
|
132
143
|
it 'should handle the all scripts wildcard' do
|
133
144
|
get '/javascripts/bundles/all.js'
|
134
145
|
last_response.should be_ok
|
135
|
-
last_response.body.should == @scripts.map { |path| File.read(path) }.join("\n") + "\n"
|
146
|
+
last_response.body.should == @scripts.sort.map { |path| File.read(path) }.join("\n") + "\n"
|
147
|
+
end
|
148
|
+
|
149
|
+
it 'should handle the all scripts wildcard CUSTOM' do
|
150
|
+
def app(env = :custom)
|
151
|
+
CustomApp
|
152
|
+
end
|
153
|
+
|
154
|
+
get '/s/js/bundles/all.js'
|
155
|
+
last_response.should be_ok
|
156
|
+
last_response.body.should == @scripts.sort.map { |path| File.read(path) }.join("\n") + "\n"
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'should need rebundle when the value of compress_bundles changes' do
|
160
|
+
app.warm_bundle_cache.should be_true
|
161
|
+
app.compress_bundles.should be_false
|
162
|
+
app.javascript_bundles.each_value { |bundle| bundle.rebundle }
|
163
|
+
app.javascript_bundles[:test].needs_rebundle?.should be_false
|
164
|
+
app.compress_bundles = true
|
165
|
+
app.javascript_bundles[:test].needs_rebundle?.should be_true
|
166
|
+
end
|
167
|
+
|
168
|
+
it 'should need rebundle when the stamp of the bundle changes' do
|
169
|
+
app.warm_bundle_cache.should be_true
|
170
|
+
app.javascript_bundles.each_value { |bundle| bundle.rebundle }
|
171
|
+
app.javascript_bundles[:test].needs_rebundle?.should be_false
|
172
|
+
FileUtils.touch(app.javascript_bundles[:test].instance_eval { path(@files.first) })
|
173
|
+
app.javascript_bundles[:test].needs_rebundle?.should be_true
|
136
174
|
end
|
137
175
|
end
|
138
176
|
|
@@ -150,10 +188,17 @@ describe 'sinatra-bundles' do
|
|
150
188
|
end.should == "<link type='text/css' href='/stylesheets/bundles/test.css' rel='stylesheet' media='all' />"
|
151
189
|
end
|
152
190
|
|
191
|
+
it 'should create a tag without a stamp if stamps are disabled CUSTOM' do
|
192
|
+
app(:custom).new.instance_eval do
|
193
|
+
options.disable(:stamp_bundles)
|
194
|
+
stylesheet_bundle_link_tag(:test)
|
195
|
+
end.should == "<link type='text/css' href='/s/css/bundles/test.css' rel='stylesheet' media='all' />"
|
196
|
+
end
|
197
|
+
|
153
198
|
it 'should stamp bundles with the timestamp of the newest file in the bundle' do
|
154
199
|
app.new.instance_eval do
|
155
200
|
stylesheet_bundle_link_tag(:test)
|
156
|
-
end.should == "<link type='text/css' href='/stylesheets/bundles/test
|
201
|
+
end.should == "<link type='text/css' href='/stylesheets/bundles/test/#{css_stamp(%w(test1 test2))}.css' rel='stylesheet' media='all' />"
|
157
202
|
end
|
158
203
|
|
159
204
|
it 'should create a tag with default media attribute set to all' do
|
@@ -178,6 +223,15 @@ describe 'sinatra-bundles' do
|
|
178
223
|
last_response.body.should == @styles.map { |path| File.read(path) }.join("\n") + "\n"
|
179
224
|
end
|
180
225
|
|
226
|
+
it 'should concat files in order with newlines including one at the end CUSTOM' do
|
227
|
+
def app(env = :custom)
|
228
|
+
CustomApp
|
229
|
+
end
|
230
|
+
|
231
|
+
get '/s/css/bundles/test.css'
|
232
|
+
last_response.body.should == @styles.map { |path| File.read(path) }.join("\n") + "\n"
|
233
|
+
end
|
234
|
+
|
181
235
|
it 'should set cache headers' do
|
182
236
|
app.enable(:cache_bundles)
|
183
237
|
get '/stylesheets/bundles/test.css'
|
@@ -186,5 +240,22 @@ describe 'sinatra-bundles' do
|
|
186
240
|
last_response.headers['Cache-Control'].should == 'public, must-revalidate, max-age=31536000'
|
187
241
|
last_response.headers['Etag'].should == '"6ecd0946412b76dcd1eaa341cdfefa8b"'
|
188
242
|
end
|
243
|
+
|
244
|
+
it 'should need rebundle when the value of compress_bundles changes' do
|
245
|
+
app.warm_bundle_cache.should be_true
|
246
|
+
app.compress_bundles.should be_false
|
247
|
+
app.stylesheet_bundles.each_value { |bundle| bundle.rebundle }
|
248
|
+
app.stylesheet_bundles[:test].needs_rebundle?.should be_false
|
249
|
+
app.compress_bundles = true
|
250
|
+
app.stylesheet_bundles[:test].needs_rebundle?.should be_true
|
251
|
+
end
|
252
|
+
|
253
|
+
it 'should need rebundle when the stamp of the bundle changes' do
|
254
|
+
app.warm_bundle_cache.should be_true
|
255
|
+
app.stylesheet_bundles.each_value { |bundle| bundle.rebundle }
|
256
|
+
app.stylesheet_bundles[:test].needs_rebundle?.should be_false
|
257
|
+
FileUtils.touch(app.stylesheet_bundles[:test].instance_eval { path(@files.first) })
|
258
|
+
app.stylesheet_bundles[:test].needs_rebundle?.should be_true
|
259
|
+
end
|
189
260
|
end
|
190
261
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-bundles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Daniel Huckstep
|
@@ -9,79 +15,113 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-07-01 00:00:00 -06:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: rainpress
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: packr
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
33
46
|
version: "0"
|
34
|
-
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
35
49
|
- !ruby/object:Gem::Dependency
|
36
50
|
name: rack
|
37
|
-
|
38
|
-
|
39
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
40
54
|
requirements:
|
41
55
|
- - ">="
|
42
56
|
- !ruby/object:Gem::Version
|
57
|
+
hash: 15
|
58
|
+
segments:
|
59
|
+
- 1
|
60
|
+
- 0
|
43
61
|
version: "1.0"
|
44
|
-
|
62
|
+
type: :runtime
|
63
|
+
version_requirements: *id003
|
45
64
|
- !ruby/object:Gem::Dependency
|
46
65
|
name: sinatra
|
47
|
-
|
48
|
-
|
49
|
-
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
50
69
|
requirements:
|
51
70
|
- - ">="
|
52
71
|
- !ruby/object:Gem::Version
|
72
|
+
hash: 15
|
73
|
+
segments:
|
74
|
+
- 1
|
75
|
+
- 0
|
53
76
|
version: "1.0"
|
54
|
-
|
77
|
+
type: :runtime
|
78
|
+
version_requirements: *id004
|
55
79
|
- !ruby/object:Gem::Dependency
|
56
80
|
name: rspec
|
57
|
-
|
58
|
-
|
59
|
-
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
60
84
|
requirements:
|
61
85
|
- - ">="
|
62
86
|
- !ruby/object:Gem::Version
|
87
|
+
hash: 13
|
88
|
+
segments:
|
89
|
+
- 1
|
90
|
+
- 2
|
91
|
+
- 9
|
63
92
|
version: 1.2.9
|
64
|
-
|
93
|
+
type: :development
|
94
|
+
version_requirements: *id005
|
65
95
|
- !ruby/object:Gem::Dependency
|
66
96
|
name: rack-test
|
67
|
-
|
68
|
-
|
69
|
-
|
97
|
+
prerelease: false
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
70
100
|
requirements:
|
71
101
|
- - ">="
|
72
102
|
- !ruby/object:Gem::Version
|
103
|
+
hash: 13
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
- 5
|
107
|
+
- 3
|
73
108
|
version: 0.5.3
|
74
|
-
|
109
|
+
type: :development
|
110
|
+
version_requirements: *id006
|
75
111
|
- !ruby/object:Gem::Dependency
|
76
112
|
name: yard
|
77
|
-
|
78
|
-
|
79
|
-
|
113
|
+
prerelease: false
|
114
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
80
116
|
requirements:
|
81
117
|
- - ">="
|
82
118
|
- !ruby/object:Gem::Version
|
119
|
+
hash: 3
|
120
|
+
segments:
|
121
|
+
- 0
|
83
122
|
version: "0"
|
84
|
-
|
123
|
+
type: :development
|
124
|
+
version_requirements: *id007
|
85
125
|
description: Bundle CSS and Javascript assets to a single file, compress, and cache them for snappier web experiences.
|
86
126
|
email: darkhelmet@darkhelmetlive.com
|
87
127
|
executables: []
|
@@ -105,6 +145,7 @@ files:
|
|
105
145
|
- lib/sinatra/bundles/stylesheet_bundle.rb
|
106
146
|
- sinatra-bundles.gemspec
|
107
147
|
- spec/app.rb
|
148
|
+
- spec/custom_app.rb
|
108
149
|
- spec/production_app.rb
|
109
150
|
- spec/public/javascripts/eval.js
|
110
151
|
- spec/public/javascripts/splat/splat.js
|
@@ -125,26 +166,33 @@ rdoc_options:
|
|
125
166
|
require_paths:
|
126
167
|
- lib
|
127
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
128
170
|
requirements:
|
129
171
|
- - ">="
|
130
172
|
- !ruby/object:Gem::Version
|
173
|
+
hash: 3
|
174
|
+
segments:
|
175
|
+
- 0
|
131
176
|
version: "0"
|
132
|
-
version:
|
133
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
134
179
|
requirements:
|
135
180
|
- - ">="
|
136
181
|
- !ruby/object:Gem::Version
|
182
|
+
hash: 3
|
183
|
+
segments:
|
184
|
+
- 0
|
137
185
|
version: "0"
|
138
|
-
version:
|
139
186
|
requirements: []
|
140
187
|
|
141
188
|
rubyforge_project:
|
142
|
-
rubygems_version: 1.3.
|
189
|
+
rubygems_version: 1.3.7
|
143
190
|
signing_key:
|
144
191
|
specification_version: 3
|
145
192
|
summary: Easy asset bundling for sinatra
|
146
193
|
test_files:
|
147
194
|
- spec/app.rb
|
195
|
+
- spec/custom_app.rb
|
148
196
|
- spec/production_app.rb
|
149
197
|
- spec/sinatra-bundles_spec.rb
|
150
198
|
- spec/spec_helper.rb
|