asset 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/asset.gemspec +1 -1
- data/lib/assets/helpers.rb +2 -2
- data/lib/assets/item.rb +7 -2
- data/lib/assets/router.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e2cdcf6a4a6b0f479b75196656f1dee83cbdc03
|
4
|
+
data.tar.gz: caac933ea274c7b56d577326feeafe7e7a97ecc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48635c80768eab2b81e8aef4bd299025d5d3feae593043363f23a7e1cc1acb441303f23a3ee3d4b8a70ebb554bbc521954a3c4b2b64db46cf2eddfdbd8bfec13
|
7
|
+
data.tar.gz: bad81f56d84f5f77fe103591be8721a0d66bbaceccd7aa45e107aa62142c2a57654a350158d4dbcf5bc2df960864c67d785825747baa74079ed4971dbfe35e06
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
**Version 0.1.3** - *2017-01-18*
|
2
|
+
|
3
|
+
- Added more greedy regex for files with dashes
|
4
|
+
|
5
|
+
**Version 0.1.2** - *2017-01-18*
|
6
|
+
|
7
|
+
- Removed old options, manifest is now only for bundle
|
8
|
+
|
1
9
|
**Version 0.1.1** - *2017-01-16*
|
2
10
|
|
3
11
|
- Moved image timestamps to startup
|
data/asset.gemspec
CHANGED
data/lib/assets/helpers.rb
CHANGED
@@ -25,7 +25,7 @@ module Asset
|
|
25
25
|
b = ::Asset.images[path] rescue nil
|
26
26
|
# Just slip through if the path starts with http(s) or //
|
27
27
|
src = path =~ /^(http[s]?)?:?\/\// ? path : %{/assets/images/#{path}}
|
28
|
-
%{<img src="#{src}#{b ? "?#{b}" : ''}">}
|
28
|
+
%{<img src="#{src}#{b ? "?#{b}" : ''}">}
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
@@ -37,7 +37,7 @@ module Asset
|
|
37
37
|
item = ::Asset.manifest.find{|i| i.path == path}
|
38
38
|
|
39
39
|
# Src is same as path if item not found
|
40
|
-
item ? item.
|
40
|
+
item ? item.sources.map{|f| yield(asset_url(f))} : yield(path)
|
41
41
|
end.flatten.join("\n")
|
42
42
|
end
|
43
43
|
|
data/lib/assets/item.rb
CHANGED
@@ -12,8 +12,13 @@ module Asset
|
|
12
12
|
end
|
13
13
|
|
14
14
|
# Get the files for this item
|
15
|
-
def files
|
16
|
-
(@app and
|
15
|
+
def files(bundle = true)
|
16
|
+
(@app and bundle) ? bundle_files : [@path]
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get the sources for this item
|
20
|
+
def sources
|
21
|
+
files(!p?)
|
17
22
|
end
|
18
23
|
|
19
24
|
# Get the full path
|
data/lib/assets/router.rb
CHANGED