jeremyboles-smart-asset-helper 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/asset_manager.rb +3 -3
- data/lib/smart_asset_helper.rb +5 -2
- data/lib/smarter_asset_tag_helper.rb +1 -1
- metadata +2 -2
data/lib/asset_manager.rb
CHANGED
@@ -51,7 +51,7 @@ class AssetManager
|
|
51
51
|
file_path = "#{ASSET_DIR[asset_type]}/#{asset_path}"
|
52
52
|
files << path if File.exists?(file_path)
|
53
53
|
end
|
54
|
-
files += auto_find(asset_type, request_params) if auto
|
54
|
+
files += auto_find(asset_type, request_params, extra) if auto
|
55
55
|
files
|
56
56
|
end
|
57
57
|
|
@@ -64,8 +64,8 @@ protected
|
|
64
64
|
path = prefix + path
|
65
65
|
asset_path = "#{path}#{extra}.#{asset_type}"
|
66
66
|
file_path = "#{ASSET_DIR[asset_type]}/#{asset_path}"
|
67
|
-
|
68
|
-
files << path if File.exists?(file_path)
|
67
|
+
|
68
|
+
files << path + extra if File.exists?(file_path)
|
69
69
|
prefix = path + '/'
|
70
70
|
end
|
71
71
|
files
|
data/lib/smart_asset_helper.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'asset_manager'
|
2
|
+
require 'smarter_asset_tag_helper'
|
2
3
|
|
3
4
|
module SmartAssetHelper
|
4
5
|
|
@@ -19,7 +20,8 @@ module SmartAssetHelper
|
|
19
20
|
# Print required javascript
|
20
21
|
def include_javascript(*args)
|
21
22
|
options = extract_options(args)
|
22
|
-
|
23
|
+
assets = include_assets(:js, args, options)
|
24
|
+
javascript = javascript_include_tag(*assets)
|
23
25
|
javascript += ie_assets(:js, args, options[:auto], params) if options[:ie]
|
24
26
|
javascript.gsub("\n", '')
|
25
27
|
end
|
@@ -27,7 +29,8 @@ module SmartAssetHelper
|
|
27
29
|
# Print required stylesheets
|
28
30
|
def include_stylesheets(*args)
|
29
31
|
options = extract_options(args)
|
30
|
-
|
32
|
+
assets = include_assets(:css, args, options)
|
33
|
+
stylesheets = stylesheet_link_tag(*assets)
|
31
34
|
stylesheets += ie_assets(:css, args, options[:auto], params) if options[:ie]
|
32
35
|
stylesheets.gsub("\n", '')
|
33
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeremyboles-smart-asset-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Boles
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-20 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|