dassets 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dassets/server/response.rb +1 -0
- data/lib/dassets/version.rb +1 -1
- data/test/system/rack_tests.rb +22 -0
- metadata +4 -4
data/lib/dassets/version.rb
CHANGED
data/test/system/rack_tests.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'assert'
|
2
2
|
require 'assert-rack-test'
|
3
|
+
require 'fileutils'
|
3
4
|
require 'test/support/app'
|
4
5
|
require 'dassets/server'
|
5
6
|
|
@@ -37,6 +38,27 @@ module Dassets
|
|
37
38
|
|
38
39
|
end
|
39
40
|
|
41
|
+
class DigestTests < SuccessTests
|
42
|
+
setup do
|
43
|
+
Dassets.config.file_store = 'public'
|
44
|
+
@url = 'file1-daa05c683a4913b268653f7a7e36a5b4.txt'
|
45
|
+
@url_file = Dassets.config.file_store.store_path(@url)
|
46
|
+
FileUtils.rm(@url_file)
|
47
|
+
end
|
48
|
+
teardown do
|
49
|
+
Dassets.config.file_store = NullFileStore.new
|
50
|
+
end
|
51
|
+
|
52
|
+
should "digest the asset" do
|
53
|
+
assert_not_file_exists @url_file
|
54
|
+
|
55
|
+
resp = get "/#{@url}"
|
56
|
+
assert_equal 200, resp.status
|
57
|
+
assert_file_exists @url_file
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
40
62
|
class NotModifiedTests < RackTests
|
41
63
|
desc "requesting an existing asset file that has not been modified"
|
42
64
|
setup do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dassets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-05-
|
19
|
+
date: 2013-05-02 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: assert
|