haml_coffee_assets 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -107,10 +107,25 @@ You can clear the Sprockets cache with:
107
107
  rake assets:clean
108
108
  ```
109
109
 
110
- For Rails, you can set the configuration options in `config/application.rb` by accessing `config.hamlcoffee`, whereas
110
+ For Rails, you can set the configuration options in your environment by accessing `config.hamlcoffee`, whereas
111
111
  if you just use the Tilt template you can access the configuration with `HamlCoffeeAssets.config`. All the following
112
112
  examples use the Rails way.
113
113
 
114
+ **Please note:** When you put Haml Coffee Assets into the `:assets` group within your `Gemfile` and precompile the
115
+ assets (the default Rails behaviour), then Haml Coffee Assets is not loaded in production and you can't set any
116
+ configuration at `config.hamlcoffee` in both `config/application.rb` and `config/environments/production.rb`.
117
+
118
+ You can simply add a condition around the configuration:
119
+
120
+ ```Ruby
121
+ if defined? ::HamlCoffeeAssets
122
+ config.hamlcoffee.awesome = true
123
+ end
124
+ ```
125
+
126
+ or move your configuration to `config/environments/development.rb` (and `config/environments/test.rb`, depending on your
127
+ JavaScript testing setup).
128
+
114
129
  ### Document format
115
130
 
116
131
  By default all Haml Coffee templates are rendered to a HTML5 document. You can choose between the following output
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module HamlCoffeeAssets
4
- VERSION = '0.9.2' unless defined?(HamlCoffeeAssets::VERSION)
4
+ VERSION = '0.9.3' unless defined?(HamlCoffeeAssets::VERSION)
5
5
  end
@@ -1243,10 +1243,12 @@ require.define("/nodes/haml.js", function (require, module, exports, __dirname,
1243
1243
  var attributes, dataAttribute, key, keyValue, keys, pairs, quoted, type, value, _ref, _ref1;
1244
1244
  attributes = {};
1245
1245
  type = exp.substring(0, 1);
1246
+ exp = exp.replace(/(=|:|=>)\s*('([^\\']|\\\\|\\')*'|"([^\\"]|\\\\|\\")*")/g, function(match, type, value) {
1247
+ return type + (value != null ? value.replace(/(:|=|=>)/, '\u0090$1') : void 0);
1248
+ });
1246
1249
  switch (type) {
1247
1250
  case '(':
1248
1251
  keys = /\(\s*([-\w]+[\w:-]*\w?)\s*=|\s+([-\w]+[\w:-]*\w?)\s*=|\(\s*('\w+[\w:-]*\w?')\s*=|\s+('\w+[\w:-]*\w?')\s*=|\(\s*("\w+[\w:-]*\w?")\s*=|\s+("\w+[\w:-]*\w?")\s*=/g;
1249
- exp = exp.replace(/\=\s*"([^"]*?)=([^"]*?)"/g, '="$1\u0090=$2"').replace(/\=\s*'([^']*?)=([^']*?)'/g, '=\'$1\u0090=$2\'');
1250
1252
  break;
1251
1253
  case '{':
1252
1254
  keys = /[{,]\s*(\w+[\w:-]*\w?):|[{,]\s*('[-\w]+[\w:-]*\w?'):|[{,]\s*("[-\w]+[\w:-]*\w?"):|[{,]\s*:(\w+[\w:-]*\w?)\s*=>|[{,]\s*:?'([-\w]+[\w:-]*\w?)'\s*=>|[{,]\s*:?"([-\w]+[\w:-]*\w?)"\s*=>/g;
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: 0.9.2
4
+ version: 0.9.3
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-05-21 00:00:00.000000000 Z
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  segments:
111
111
  - 0
112
- hash: -3525235316450724060
112
+ hash: 3411691356072830988
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements: