hamlbars 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -6
- data/lib/hamlbars/ext/compiler.rb +1 -1
- data/lib/hamlbars/version.rb +1 -1
- metadata +4 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12daf1a69be2ba4c31e4dff0a8290aa3e68dc281
|
4
|
+
data.tar.gz: 1efc6726ec1c13fb6184d5219c691c2c7fd67a8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3348713452e9fe95ad9dc700684c7f935fa731de10c6d14858712d966b1b85d1453cfc846897983f6384aa64371cc66faec314a32d2680aa9f804e4d07d825
|
7
|
+
data.tar.gz: 1625031cf6db0de922b0c9b9eea5c0179fa364700fa6dbc3145fe2e628e13477295d88d9422603c442b71b487dbade9006b8828db1e70fe10f4914906cbc8618
|
data/README.md
CHANGED
@@ -15,27 +15,31 @@ you to easily generate [Handlebars](http://handlebarsjs.com) templates using
|
|
15
15
|
Add the following line to your Gemfile (on Rails, inside the `:assets` group):
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem 'hamlbars', '~> 2.
|
18
|
+
gem 'hamlbars', '~> 2.1'
|
19
19
|
```
|
20
20
|
|
21
21
|
# DEPRECATION WARNING
|
22
22
|
|
23
|
-
As of version 2.0 Hamlbars simply outputs raw Handlebars templates, and you will need to
|
23
|
+
As of version 2.0 Hamlbars simply outputs raw Handlebars templates, and you will need to
|
24
24
|
use the precompiler of your choice to compile the assets for your usage.
|
25
25
|
|
26
|
-
If you're using [Ember.js](http://emberjs.com) then you will need the
|
26
|
+
If you're using [Ember.js](http://emberjs.com) then you will need the
|
27
27
|
[ember-rails](http://rubygems.org/gems/ember-rails) gem. If you're just using
|
28
|
-
Handlebars templates on their own then you need to use
|
28
|
+
Handlebars templates on their own then you need to use
|
29
29
|
[handlebars_assets](http://rubygems.org/gems/handlebars_assets) to precompile
|
30
30
|
for your framework.
|
31
31
|
|
32
|
-
Be sure to take a look at Hamlbars' sister project
|
32
|
+
Be sure to take a look at Hamlbars' sister project
|
33
33
|
[FlavourSaver](http://rubygems.org/gems/flavour_saver) for pure-ruby server-side
|
34
34
|
rendering of Handlebars templates.
|
35
35
|
|
36
|
+
As of version 2.1 Hamlbars emits `bind-attr` instead of `bindAttr` for bound
|
37
|
+
element attributes. If you are running an older version of Ember, then keep
|
38
|
+
your Gemfile pinned to `~> 2.0` until you upgrade.
|
39
|
+
|
36
40
|
# Chaining compilation using the Rails asset pipeline
|
37
41
|
|
38
|
-
When using the `handlebars_assets` or `ember-rails` gems you need to add an
|
42
|
+
When using the `handlebars_assets` or `ember-rails` gems you need to add an
|
39
43
|
extra file extension so that the asset pipeline knows to take the output of
|
40
44
|
Hamlbars and send it into the template compiler of your choice. Luckily
|
41
45
|
both gems register the `hbs` extension, so you can enable asset compilation
|
@@ -33,7 +33,7 @@ module Hamlbars
|
|
33
33
|
handlebars_rendered_attributes = []
|
34
34
|
|
35
35
|
if bind = attributes.delete('bind')
|
36
|
-
handlebars_rendered_attributes << Hamlbars::Ext::Compiler.handlebars_attributes('
|
36
|
+
handlebars_rendered_attributes << Hamlbars::Ext::Compiler.handlebars_attributes('bind-attr', bind)
|
37
37
|
end
|
38
38
|
|
39
39
|
if hb = attributes.delete('hb')
|
data/lib/hamlbars/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hamlbars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Harton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -128,29 +128,7 @@ files:
|
|
128
128
|
homepage: https://github.com/jamesotron/hamlbars
|
129
129
|
licenses: []
|
130
130
|
metadata: {}
|
131
|
-
post_install_message:
|
132
|
-
DEPRECATION WARNING: Hamlbars 2.0 removes asset compilation!
|
133
|
-
|
134
|
-
Template compilation in Hamlbars was a major source of confusion and bugs
|
135
|
-
since roughly half of its users are using Handlebars.js in their apps and
|
136
|
-
the other half are using Handlebars as part of Ember.js.
|
137
|
-
|
138
|
-
Hamlbars now simply outputs the rendered HTML marked up with Handlebars
|
139
|
-
sections. It is up to you to choose the Handlebars compiler that works
|
140
|
-
for you.
|
141
|
-
|
142
|
-
If you're using Ember.js I would suggest adding ember-rails to your
|
143
|
-
Gemfile.
|
144
|
-
|
145
|
-
If you're using Handlebars.js then I would suggest adding handlebars_assets
|
146
|
-
to your Gemfile.
|
147
|
-
|
148
|
-
For both of the above gems you may need to rename your templates to
|
149
|
-
`mytemplate.js.hbs.hamlbars` in order for the output of Hamlbars to be sent
|
150
|
-
into the correct compiler.
|
151
|
-
|
152
|
-
Thanks for using Hamlbars. You're awesome.
|
153
|
-
@jamesotron
|
131
|
+
post_install_message:
|
154
132
|
rdoc_options: []
|
155
133
|
require_paths:
|
156
134
|
- lib
|
@@ -166,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
144
|
version: '0'
|
167
145
|
requirements: []
|
168
146
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
147
|
+
rubygems_version: 2.1.11
|
170
148
|
signing_key:
|
171
149
|
specification_version: 4
|
172
150
|
summary: Extensions to Haml to allow creation of handlebars expressions.
|