haml_coffee_assets 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/haml_coffee_assets/version.rb +1 -1
- data/lib/js/haml_coffee_assets.js +6 -2
- metadata +2 -2
@@ -78,10 +78,14 @@ var HamlCoffeeAssets = (function(){
|
|
78
78
|
}
|
79
79
|
|
80
80
|
if (context !== '' && context !== false) {
|
81
|
-
|
81
|
+
// With AMD we replace the context function with the one from the hamlcoffee AMD module if not set explicit
|
82
|
+
if (placement === 'amd' && context === 'window.HAML.context' && /^hamlcoffee/.test(dependencies['hc'])) {
|
82
83
|
context = 'hc.context';
|
83
84
|
}
|
84
|
-
|
85
|
+
// Only add the global template context for global placement, or when amd with the hamlcoffe module context
|
86
|
+
if (placement === 'global' || (placement === 'amd' && context == 'hc.context')) {
|
87
|
+
template = template.replace('.call(context);', '.call(' + context + '(context));');
|
88
|
+
}
|
85
89
|
}
|
86
90
|
|
87
91
|
return template;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_coffee_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash:
|
112
|
+
hash: -4027659886031373096
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|