sinatra-assetpack 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +13 -3
- data/lib/sinatra/assetpack/buster_helpers.rb +2 -1
- data/lib/sinatra/assetpack/class_methods.rb +1 -1
- data/lib/sinatra/assetpack/version.rb +1 -1
- data/sinatra-assetpack.gemspec +2 -1
- data/test/headers_test.rb +21 -0
- metadata +6 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c378d50e90ff9951fd36094821ce63447303069
|
4
|
+
data.tar.gz: 9139010b8da5ebdf69c6977cb701245d0eb0b0ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a6f7cc4c382eefe9f2402f03f647121f1b8d2e3eb3f6240244b6cd5e57891624710514760ada8f439ea93f289b9c4a58463bc0d680dcdb27feedd6c36de6e2d
|
7
|
+
data.tar.gz: f619ae206a4917fda73d64765cd3421631a9df930fc3268629618604e1f3e939570db7fa70db69dea2856cb2c7d145573a60000f785dd4d612f7ab32b0195224
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sinatra-assetpack (0.2.
|
4
|
+
sinatra-assetpack (0.2.5)
|
5
5
|
backports
|
6
6
|
jsmin
|
7
7
|
rack-test
|
@@ -15,13 +15,21 @@ GEM
|
|
15
15
|
Platform (>= 0.4.0)
|
16
16
|
open4
|
17
17
|
Platform (0.4.0)
|
18
|
+
awesome_print (1.1.0)
|
18
19
|
backports (3.3.1)
|
19
20
|
coffee-script (2.2.0)
|
20
21
|
coffee-script-source
|
21
22
|
execjs
|
22
23
|
coffee-script-source (1.6.1)
|
24
|
+
columnize (0.3.6)
|
23
25
|
commonjs (0.2.6)
|
24
26
|
contest (0.1.3)
|
27
|
+
debugger (1.6.0)
|
28
|
+
columnize (>= 0.3.1)
|
29
|
+
debugger-linecache (~> 1.2.0)
|
30
|
+
debugger-ruby_core_source (~> 1.2.1)
|
31
|
+
debugger-linecache (1.2.0)
|
32
|
+
debugger-ruby_core_source (1.2.2)
|
25
33
|
execjs (1.4.0)
|
26
34
|
multi_json (~> 1.0)
|
27
35
|
gem-release (0.6.0)
|
@@ -42,8 +50,8 @@ GEM
|
|
42
50
|
rack (>= 1.0)
|
43
51
|
rake (10.0.3)
|
44
52
|
sass (3.2.7)
|
45
|
-
sinatra (1.4.
|
46
|
-
rack (~> 1.
|
53
|
+
sinatra (1.4.3)
|
54
|
+
rack (~> 1.4)
|
47
55
|
rack-protection (~> 1.4)
|
48
56
|
tilt (~> 1.3, >= 1.3.4)
|
49
57
|
stylus (0.7.1)
|
@@ -62,8 +70,10 @@ PLATFORMS
|
|
62
70
|
ruby
|
63
71
|
|
64
72
|
DEPENDENCIES
|
73
|
+
awesome_print
|
65
74
|
coffee-script
|
66
75
|
contest
|
76
|
+
debugger
|
67
77
|
gem-release
|
68
78
|
haml
|
69
79
|
less
|
@@ -13,7 +13,8 @@ module Sinatra
|
|
13
13
|
# Returns the maximum mtime for a given list of files.
|
14
14
|
# It will return nil if none of them are found.
|
15
15
|
def mtime_for(files)
|
16
|
-
files.map { |f| File.mtime(f).to_i
|
16
|
+
time = files.map { |f| File.mtime(f).to_i if f.is_a?(String) && File.file?(f) }.compact.max
|
17
|
+
Time.at(time) if time
|
17
18
|
end
|
18
19
|
|
19
20
|
# Adds a cache buster for the given path.
|
data/sinatra-assetpack.gemspec
CHANGED
@@ -5,7 +5,8 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.version = Sinatra::AssetPack::VERSION
|
6
6
|
s.summary = %{Asset packager for Sinatra.}
|
7
7
|
s.description = %Q{Package your assets for Sinatra.}
|
8
|
-
s.authors = ['Rico Sta. Cruz']
|
8
|
+
s.authors = ['Rico Sta. Cruz', 'Jean-Philippe Doyle']
|
9
|
+
s.licenses = ['MIT']
|
9
10
|
s.email = ['rico@sinefunc.com']
|
10
11
|
s.homepage = 'http://github.com/rstacruz/sinatra-assetpack'
|
11
12
|
s.files = `git ls-files`.strip.split("\n")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path('../test_helper', __FILE__)
|
2
|
+
|
3
|
+
class HeadersTest < UnitTest
|
4
|
+
setup do
|
5
|
+
app.set :reload_templates, true
|
6
|
+
|
7
|
+
@file = File.join(app.root, 'app', 'packages', 'a_package', 'package.js')
|
8
|
+
FileUtils.touch(@file)
|
9
|
+
@httpdate = File.mtime(@file).httpdate
|
10
|
+
end
|
11
|
+
|
12
|
+
test "individual route" do
|
13
|
+
get '/packages/a_package/package.js'
|
14
|
+
assert_equal @httpdate, last_response.headers['Last-Modified']
|
15
|
+
end
|
16
|
+
|
17
|
+
test "package route" do
|
18
|
+
get '/packages/a_package.b1946ac92492d2347c6235b4d2611184.js'
|
19
|
+
assert_equal @httpdate, last_response.headers['Last-Modified']
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-assetpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rico Sta. Cruz
|
8
|
+
- Jean-Philippe Doyle
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain:
|
@@ -29,7 +30,7 @@ cert_chain:
|
|
29
30
|
kzgF4O2OL+8O23we4E1LvfRn5gV77Dij6s9V4HHzMBuLwnNb8T+6lOnUWbtiIddD
|
30
31
|
e8c8i7PlrzhVJ/8sXUJsCkyE8d2MyRyjlxM=
|
31
32
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-06-
|
33
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
33
34
|
dependencies:
|
34
35
|
- !ruby/object:Gem::Dependency
|
35
36
|
name: backports
|
@@ -367,6 +368,7 @@ files:
|
|
367
368
|
- test/combined_test.rb
|
368
369
|
- test/compressed_test.rb
|
369
370
|
- test/glob_test.rb
|
371
|
+
- test/headers_test.rb
|
370
372
|
- test/helpers_test.rb
|
371
373
|
- test/ignore_test.rb
|
372
374
|
- test/img_test.rb
|
@@ -389,7 +391,8 @@ files:
|
|
389
391
|
- test/unit_test.rb
|
390
392
|
- test/yui_test.rb
|
391
393
|
homepage: http://github.com/rstacruz/sinatra-assetpack
|
392
|
-
licenses:
|
394
|
+
licenses:
|
395
|
+
- MIT
|
393
396
|
metadata: {}
|
394
397
|
post_install_message:
|
395
398
|
rdoc_options: []
|
metadata.gz.sig
CHANGED
Binary file
|