haml_coffee_assets 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module HamlCoffeeAssets
4
- VERSION = '1.3.0' unless defined?(HamlCoffeeAssets::VERSION)
4
+ VERSION = '1.4.0' unless defined?(HamlCoffeeAssets::VERSION)
5
5
  end
@@ -33,4 +33,23 @@ module HamlCoffeeAssets
33
33
  @config ||= ::HamlCoffeeAssets::Configuration.new
34
34
  end
35
35
 
36
+ # Get the Haml Coffee Assets helper file
37
+ #
38
+ # @param [Boolean] compile whether to compile the CS helpers or not
39
+ # @return [String] the helpers content
40
+ #
41
+ def self.helpers(compile=true)
42
+ require 'erb'
43
+
44
+ content = File.read(File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'assets', 'javascripts', 'hamlcoffee.js.coffee.erb')))
45
+ script = ERB.new(content).result(binding)
46
+
47
+ if compile
48
+ require 'coffee-script'
49
+ script = CoffeeScript.compile(script)
50
+ end
51
+
52
+ script
53
+ end
54
+
36
55
  end
data/lib/js/hamlcoffee.js CHANGED
@@ -363,7 +363,7 @@ require.define("/haml-coffee.js", function (require, module, exports, __dirname,
363
363
 
364
364
  module.exports = HamlCoffee = (function() {
365
365
 
366
- HamlCoffee.VERSION = '1.3.0';
366
+ HamlCoffee.VERSION = '1.4.1';
367
367
 
368
368
  function HamlCoffee(options) {
369
369
  var _base, _base1, _base2, _base3, _base4, _base5, _base6, _base7, _base8, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
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.3.0
4
+ version: 1.4.0
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-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-05 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: 3865159740158855570
112
+ hash: 292652876955478117
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  none: false
115
115
  requirements: