haml_coffee_assets 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/haml_coffee_assets/version.rb +1 -1
- data/lib/js/haml_coffee_assets.js +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -367,7 +367,7 @@ statement. But when you're using Haml Coffee Assets, then you can have the scope
|
|
367
367
|
with the context by enable it in the configuration:
|
368
368
|
|
369
369
|
```ruby
|
370
|
-
config.hamlcoffee.
|
370
|
+
config.hamlcoffee.extendScope = true
|
371
371
|
```
|
372
372
|
|
373
373
|
With this option enabled, you don't need to use `@` or `this` to reference context data:
|
@@ -71,9 +71,9 @@ var HamlCoffeeAssets = (function(){
|
|
71
71
|
var hamlc = CoffeeScript.compile(compiler.precompile(), { bare: true });
|
72
72
|
|
73
73
|
if (extendScope) {
|
74
|
-
template = '(function(context) {\n with(context || {}) {\n return (function() {\n' + hamlc.replace(/^(.*)$/mg, ' $1') + '\n }
|
74
|
+
template = '(function(context) {\n with(context || {}) {\n return (function() {\n' + hamlc.replace(/^(.*)\n$/mg, ' $1') + '\n }).call(context);\n };\n});\n';
|
75
75
|
} else {
|
76
|
-
template = '(function(context) {\n return (function() {\n' + hamlc.replace(/^(.*)$/mg, ' $1') + '\n }).call(context);\n})
|
76
|
+
template = '(function(context) {\n return (function() {\n' + hamlc.replace(/^(.*)\n$/mg, ' $1') + '\n }).call(context);\n});\n';
|
77
77
|
}
|
78
78
|
}
|
79
79
|
|
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.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coffee-script
|
@@ -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: -2052490778007529054
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
none: false
|
115
115
|
requirements:
|