haml_coffee_assets 1.7.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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.extendContext = true
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:
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module HamlCoffeeAssets
4
- VERSION = '1.7.1' unless defined?(HamlCoffeeAssets::VERSION)
4
+ VERSION = '1.7.2' unless defined?(HamlCoffeeAssets::VERSION)
5
5
  end
@@ -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 };\n }).call(context);\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.1
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-02 00:00:00.000000000 Z
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: -4027659886031373096
112
+ hash: -2052490778007529054
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements: