sprockets-dotjs 2.0.3 → 2.1.0

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/.gitignore CHANGED
@@ -16,3 +16,4 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
+ *.iml
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Sprockets::Dotjs
2
2
 
3
- TODO: Write a gem description
3
+ Compile doT.JS templates (`jst.djs` extension) into rails `JST` env variable
4
+
5
+ Supports doT.JS partial feature by using Sprocket's `depend_on` directive
4
6
 
5
7
  ## Installation
6
8
 
@@ -12,13 +14,9 @@ And then execute:
12
14
 
13
15
  $ bundle
14
16
 
15
- Or install it yourself as:
16
-
17
- $ gem install sprockets-dotjs
18
-
19
17
  ## Usage
20
18
 
21
- TODO: Write usage instructions here
19
+ Put doT.js template files inside the `assets/javascript` directory and generate them by calling `JST["#{file_path}"]()`
22
20
 
23
21
  ## Contributing
24
22
 
@@ -1,6 +1,6 @@
1
1
  function encodeHTMLSource() {
2
- var encodeHTMLRules = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': '&#34;', "'": '&#39;', "/": '&#47;' },
3
- matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
2
+ var encodeHTMLRules = { "&": "&#38;", "<": "&#60;", ">": "&#62;", '"': '&#34;', "'": '&#39;', "/": '&#47;', "\n": '<br>' },
3
+ matchHTML = /&(?!#?\w+;)|<|>|"|'|\/\n/g;
4
4
  return function() {
5
5
  return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : this;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Dotjs
3
- VERSION = "2.0.3"
3
+ VERSION = "2.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-dotjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.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: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 1.8.24
169
+ rubygems_version: 1.8.25
170
170
  signing_key:
171
171
  specification_version: 3
172
172
  summary: Compile dot.js template into javascript