nanoc-sprockets-filter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nanoc/filters/sprockets.rb +1 -1
- data/lib/nanoc/helpers/sprockets.rb +16 -2
- metadata +3 -3
@@ -12,8 +12,8 @@ module Nanoc
|
|
12
12
|
module ModuleMethods
|
13
13
|
|
14
14
|
def asset_path(item_or_filename, options = {})
|
15
|
-
if item_or_filename.is_a?(Nanoc::Item)
|
16
|
-
filename = item_or_filename
|
15
|
+
if item_or_filename.is_a?(::Nanoc::Item)
|
16
|
+
filename = item_or_filename[:filename]
|
17
17
|
else
|
18
18
|
filename = item_or_filename
|
19
19
|
end
|
@@ -35,6 +35,20 @@ module Nanoc
|
|
35
35
|
base.send :include, ModuleMethods
|
36
36
|
end
|
37
37
|
|
38
|
+
def self.method_missing(method, *args)
|
39
|
+
if ::Sprockets::Helpers.respond_to?(method)
|
40
|
+
if block_given?
|
41
|
+
::Sprockets::Helpers.send(method, *args) do |*block_args|
|
42
|
+
yield *block_args
|
43
|
+
end
|
44
|
+
else
|
45
|
+
::Sprockets::Helpers.send(method, *args)
|
46
|
+
end
|
47
|
+
else
|
48
|
+
super
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
38
52
|
def method_missing(method, *args)
|
39
53
|
if ::Sprockets::Helpers.respond_to?(method)
|
40
54
|
if block_given?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-sprockets-filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash: -
|
109
|
+
hash: -1833548163494978094
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash: -
|
118
|
+
hash: -1833548163494978094
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
121
|
rubygems_version: 1.8.24
|