barber 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +1 -0
- data/Gemfile +1 -0
- data/README.md +2 -0
- data/lib/barber/precompiler.rb +3 -1
- data/lib/barber/version.rb +1 -1
- data/test/ember/precompiler_test.rb +1 -1
- data/test/precompiler_test.rb +9 -0
- metadata +40 -62
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e03b6182bb8347d84976b8dd36439d689f40a641
|
4
|
+
data.tar.gz: 026ba331c8bce76ebfd87001c7fa1fd7d8f63f0b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 756b5ad6a8196a767676fd2b54c4a9e41acda2d3cb9deccb7be287d4c8dc95958feb2f8d10214a894b6c5446313f1c74908d8c5d6e62ee804d0e183adf8a76a2
|
7
|
+
data.tar.gz: 0644b3877d5dee7299da51d8a5c4c1fc8af5580d4a89535652282034d4ff3d6f672a995447c7174ea21d63d0d36d35bbf69bd1642d0166d5b4388ae5278d1d9b
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -83,6 +83,8 @@ subsituted for procs/lambda where needed. Here's how you can get
|
|
83
83
|
precompilation of your ember templates with rake-pipeline-web-filters:
|
84
84
|
|
85
85
|
```ruby
|
86
|
+
require 'barber'
|
87
|
+
|
86
88
|
match "**/*.handlebars" do
|
87
89
|
handlebars :wrapper_proc => Barber::Ember::FilePrecompiler
|
88
90
|
end
|
data/lib/barber/precompiler.rb
CHANGED
data/lib/barber/version.rb
CHANGED
@@ -4,7 +4,7 @@ class EmberPrecompilerTest < MiniTest::Unit::TestCase
|
|
4
4
|
def test_calls_the_ember_handlebars_precompiler
|
5
5
|
result = compile "Hello {{name}}"
|
6
6
|
assert result
|
7
|
-
assert_match
|
7
|
+
assert_match /Ember\.Handlebars/, result
|
8
8
|
end
|
9
9
|
|
10
10
|
def test_is_a_precompiler
|
data/test/precompiler_test.rb
CHANGED
@@ -25,6 +25,11 @@ class PrecompilerTest < MiniTest::Unit::TestCase
|
|
25
25
|
assert result
|
26
26
|
end
|
27
27
|
|
28
|
+
def test_handles_coffeescript_strings_with_qoutes_in_helpers
|
29
|
+
result = compile template_with_coffeescript_qoutes_in_helpers
|
30
|
+
assert result
|
31
|
+
end
|
32
|
+
|
28
33
|
def test_handles_prescaped_JSON_strings
|
29
34
|
result = compile template_with_prescaped_JSON_strings
|
30
35
|
assert result
|
@@ -102,6 +107,10 @@ class PrecompilerTest < MiniTest::Unit::TestCase
|
|
102
107
|
'<h2>{{unbound view.title}}</h2>\n<ul>\n {{#each view.content}}\n {{view view.resultItemView\n contentBinding="this"\n selectedItemBinding="view.selectedItem"}}\n {{/each}}\n</ul>'
|
103
108
|
end
|
104
109
|
|
110
|
+
def template_with_coffeescript_qoutes_in_helpers
|
111
|
+
'<li {{action showContextMenu this target=\"view\"}}Foo</li>'
|
112
|
+
end
|
113
|
+
|
105
114
|
def sanitized_template_with_multiline_coffeescript_strings
|
106
115
|
"<h2>{{unbound view.title}}</h2>\n<ul>\n {{#each view.content}}\n {{view view.resultItemView\n contentBinding=\"this\"\n selectedItemBinding=\"view.selectedItem\"}}\n {{/each}}\n</ul>"
|
107
116
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.4.1
|
4
|
+
version: 0.4.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- tchak
|
@@ -10,118 +9,104 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-04-06 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
|
-
type: :runtime
|
17
|
-
version_requirements: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
|
-
requirements:
|
20
|
-
- - ! '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0'
|
23
15
|
name: execjs
|
24
|
-
prerelease: false
|
25
16
|
requirement: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
17
|
requirements:
|
28
|
-
- -
|
18
|
+
- - '>='
|
29
19
|
- !ruby/object:Gem::Version
|
30
20
|
version: '0'
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
21
|
type: :runtime
|
22
|
+
prerelease: false
|
33
23
|
version_requirements: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
24
|
requirements:
|
36
|
-
- -
|
25
|
+
- - '>='
|
37
26
|
- !ruby/object:Gem::Version
|
38
27
|
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
39
29
|
name: handlebars-source
|
40
|
-
prerelease: false
|
41
30
|
requirement: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
31
|
requirements:
|
44
|
-
- -
|
32
|
+
- - '>='
|
45
33
|
- !ruby/object:Gem::Version
|
46
34
|
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
35
|
type: :runtime
|
36
|
+
prerelease: false
|
49
37
|
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
38
|
requirements:
|
52
|
-
- -
|
39
|
+
- - '>='
|
53
40
|
- !ruby/object:Gem::Version
|
54
41
|
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
55
43
|
name: ember-source
|
56
|
-
prerelease: false
|
57
44
|
requirement: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
45
|
requirements:
|
60
|
-
- -
|
46
|
+
- - '>='
|
61
47
|
- !ruby/object:Gem::Version
|
62
48
|
version: '0'
|
63
|
-
|
64
|
-
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
65
51
|
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
52
|
requirements:
|
68
|
-
- -
|
53
|
+
- - '>='
|
69
54
|
- !ruby/object:Gem::Version
|
70
55
|
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
71
57
|
name: rake
|
72
|
-
prerelease: false
|
73
58
|
requirement: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
59
|
requirements:
|
76
|
-
- -
|
60
|
+
- - '>='
|
77
61
|
- !ruby/object:Gem::Version
|
78
62
|
version: '0'
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
63
|
type: :development
|
64
|
+
prerelease: false
|
81
65
|
version_requirements: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
66
|
requirements:
|
84
|
-
- -
|
67
|
+
- - '>='
|
85
68
|
- !ruby/object:Gem::Version
|
86
69
|
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
87
71
|
name: simplecov
|
88
|
-
prerelease: false
|
89
72
|
requirement: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
73
|
requirements:
|
92
|
-
- -
|
74
|
+
- - '>='
|
93
75
|
- !ruby/object:Gem::Version
|
94
76
|
version: '0'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
77
|
type: :development
|
78
|
+
prerelease: false
|
97
79
|
version_requirements: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
80
|
requirements:
|
100
|
-
- -
|
81
|
+
- - '>='
|
101
82
|
- !ruby/object:Gem::Version
|
102
83
|
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
103
85
|
name: mocha
|
104
|
-
prerelease: false
|
105
86
|
requirement: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
87
|
requirements:
|
108
|
-
- -
|
88
|
+
- - '>='
|
109
89
|
- !ruby/object:Gem::Version
|
110
90
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
91
|
type: :development
|
92
|
+
prerelease: false
|
113
93
|
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
94
|
requirements:
|
116
|
-
- -
|
95
|
+
- - '>='
|
117
96
|
- !ruby/object:Gem::Version
|
118
97
|
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
119
99
|
name: appraisal
|
120
|
-
prerelease: false
|
121
100
|
requirement: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
101
|
requirements:
|
124
|
-
- -
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
125
110
|
- !ruby/object:Gem::Version
|
126
111
|
version: '0'
|
127
112
|
description: Handlebars precompilation
|
@@ -159,33 +144,26 @@ files:
|
|
159
144
|
- test/test_helper.rb
|
160
145
|
homepage: https://github.com/tchak/barber
|
161
146
|
licenses: []
|
147
|
+
metadata: {}
|
162
148
|
post_install_message:
|
163
149
|
rdoc_options: []
|
164
150
|
require_paths:
|
165
151
|
- lib
|
166
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
153
|
requirements:
|
169
|
-
- -
|
154
|
+
- - '>='
|
170
155
|
- !ruby/object:Gem::Version
|
171
|
-
segments:
|
172
|
-
- 0
|
173
|
-
hash: -4435128510147276208
|
174
156
|
version: '0'
|
175
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
-
none: false
|
177
158
|
requirements:
|
178
|
-
- -
|
159
|
+
- - '>='
|
179
160
|
- !ruby/object:Gem::Version
|
180
|
-
segments:
|
181
|
-
- 0
|
182
|
-
hash: -4435128510147276208
|
183
161
|
version: '0'
|
184
162
|
requirements: []
|
185
163
|
rubyforge_project:
|
186
|
-
rubygems_version:
|
164
|
+
rubygems_version: 2.0.3
|
187
165
|
signing_key:
|
188
|
-
specification_version:
|
166
|
+
specification_version: 4
|
189
167
|
summary: Handlebars precompilation toolkit
|
190
168
|
test_files:
|
191
169
|
- test/ember/precompiler_test.rb
|