asset-resource 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ private ######################################################################
|
|
58
58
|
|
59
59
|
def files_for(type)
|
60
60
|
Dir.glob(File.expand_path(File.join(base_path, type, "**", "*"))).select do |file|
|
61
|
-
File.exist?(file) && file[0..0] != "_"
|
61
|
+
File.exist?(file) && File.basename(file)[0..0] != "_"
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
data/lib/asset_resource.rb
CHANGED
@@ -33,8 +33,8 @@ describe AssetResource::Middleware do
|
|
33
33
|
|
34
34
|
it "serves styles" do
|
35
35
|
data = RestClient.get("http://localhost/assets/styles.css")
|
36
|
-
data.should include "
|
37
|
-
data.should include "
|
36
|
+
data.should include "#1e5500"
|
37
|
+
data.should include "#5a5500"
|
38
38
|
end
|
39
39
|
|
40
40
|
it "serves scripts with the proper mime type" do
|
@@ -47,4 +47,9 @@ describe AssetResource::Middleware do
|
|
47
47
|
response.headers[:content_type].should == "text/css"
|
48
48
|
end
|
49
49
|
|
50
|
+
it "should not serve a file that begins with an underscore" do
|
51
|
+
data = RestClient.get("http://localhost/assets/styles.css")
|
52
|
+
data.should_not include "#c55000"
|
53
|
+
end
|
54
|
+
|
50
55
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Dollar
|