asset 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/asset.gemspec +2 -2
- data/lib/assets/router.rb +1 -2
- data/lib/assets/util.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f834010e80a10840bf6589574d20d91d65b9e67
|
4
|
+
data.tar.gz: d91f555db8a3259627c9737231764ce376038c97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ec326df9133c08d7a4c1694f5e1f80f2cb5cfa7fb22210de27792f610362aaeca3cfb320ba96f07d6d7eabf36e09a1a7b54ce8ad841f006e8fd1b93a1f2e06
|
7
|
+
data.tar.gz: 20b2c66545006996f4bfc1a6ed6363533ac15c945c9a1aaf945306fb32adb2b5900214f4fa3ef5cb07f3e5b7b95a47fbac7b0bab9469469e2d01411b1524fdd1
|
data/CHANGELOG.md
CHANGED
data/asset.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'asset'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2017-01-
|
3
|
+
s.version = '0.1.12'
|
4
|
+
s.date = '2017-01-26'
|
5
5
|
s.summary = "Compress and serve your CSS and JS assets automatically"
|
6
6
|
s.description = "The only thing you need for your assets."
|
7
7
|
s.authors = ["Fugroup Limited"]
|
data/lib/assets/router.rb
CHANGED
@@ -52,8 +52,7 @@ module Asset
|
|
52
52
|
# Found
|
53
53
|
def found(item)
|
54
54
|
content = item.content(!!@key)
|
55
|
-
[ 200, {
|
56
|
-
'Content-Type' => MIME[item.type],
|
55
|
+
[ 200, {'Content-Type' => MIME[item.type],
|
57
56
|
'Content-Length' => content.size,
|
58
57
|
'Cache-Control' => 'max-age=86400, public',
|
59
58
|
'Expires' => (Time.now + 86400*30).utc.rfc2822,
|
data/lib/assets/util.rb
CHANGED
@@ -35,7 +35,7 @@ module Asset
|
|
35
35
|
def self.load_manifest
|
36
36
|
manifest = []
|
37
37
|
|
38
|
-
Dir["#{Asset.path}/{css,js}
|
38
|
+
Dir["#{Asset.path}/{css,js}/**/*.{css,js}"].each do |file|
|
39
39
|
# Extract type and name
|
40
40
|
file =~ /(js|css)\/(.+)$/; type, name = $1, $2
|
41
41
|
|
@@ -64,10 +64,10 @@ module Asset
|
|
64
64
|
# Load images into memory
|
65
65
|
def self.load_images
|
66
66
|
# Store the path and the timestamp
|
67
|
-
|
67
|
+
img = Dir["#{::Asset.path}/images/**/*.*"].map do |i|
|
68
68
|
i =~ /\/images\/(.+)/; [$1, mtime("images/#{$1}").to_i]
|
69
69
|
end
|
70
|
-
Hash[*
|
70
|
+
Hash[*img.flatten]
|
71
71
|
end
|
72
72
|
|
73
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fugroup Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|