rasputin 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -19,8 +19,22 @@ javascript assets folder with extention handlebars will be availabel in sproutco
19
19
 
20
20
  Examples :
21
21
 
22
- todos/templates/item.handlebars >> SC.TEMPLATES['todos_item']
23
- todos/ui/templates/stats.handlebars >> SC.TEMPLATES['todos_ui_stats']
22
+ todos/templates/item.handlebars >> SC.TEMPLATES['todos/item']
23
+ todos/ui/templates/stats.handlebars >> SC.TEMPLATES['todos/ui/stats']
24
+ todos/templates/collection.hbs >> SC.TEMPLATES['todos/collection']
25
+
26
+ If you want to keep using old naming scheme, put this in your rails configuration block :
27
+
28
+ config.rasputin.template_name_separator = '_'
29
+
30
+ The new default is '/'
31
+
32
+ Precompilation :
33
+
34
+ Starting with 0.9.0 release, Rasputin will precompile your handlebars templates.
35
+ If you do not want this behavior you can tourn it off in your rails configuration block :
36
+
37
+ config.rasputin.precompile_handlebars = false
24
38
 
25
39
  Install
26
40
  -------
@@ -49,6 +63,17 @@ In your stylesheet asset manifest (app/assets/stylesheets/application.css) add t
49
63
  ChangeLog
50
64
  ----------
51
65
 
66
+ 0.9.1
67
+
68
+ * you can change templates naming scheme in your configuration
69
+ * add .hbs extention support
70
+
71
+ 0.9.0
72
+
73
+ * add support for Handlebars precompilation (thanks to @SlexAxton)
74
+ * add slim filter
75
+ * change templates naming scheme, use '/' instead of '_'
76
+
52
77
  0.8.2
53
78
 
54
79
  * rails 3.1 support
data/lib/rasputin.rb CHANGED
@@ -11,9 +11,11 @@ module Rasputin
11
11
  class Engine < ::Rails::Engine
12
12
  config.rasputin = ActiveSupport::OrderedOptions.new
13
13
  config.rasputin.precompile_handlebars = true
14
+ config.rasputin.template_name_separator = '/'
14
15
 
15
16
  initializer :setup_rasputin do |app|
16
17
  app.assets.register_engine '.handlebars', Rasputin::HandlebarsTemplate
18
+ app.assets.register_engine '.hbs', Rasputin::HandlebarsTemplate
17
19
  end
18
20
  end
19
21
  end
@@ -20,7 +20,7 @@ module Rasputin
20
20
  def template_path(path)
21
21
  path = path.split('/')
22
22
  path.delete('templates')
23
- path.join('/')
23
+ path.join(Rails.configuration.rasputin.template_name_separator)
24
24
  end
25
25
 
26
26
  def indent(string)
@@ -1,3 +1,3 @@
1
1
  module Rasputin
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rasputin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70149605754100 !ruby/object:Gem::Requirement
16
+ requirement: &70267515770540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70149605754100
24
+ version_requirements: *70267515770540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: actionpack
27
- requirement: &70149605753320 !ruby/object:Gem::Requirement
27
+ requirement: &70267515769780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70149605753320
35
+ version_requirements: *70267515769780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sprockets
38
- requirement: &70149605752480 !ruby/object:Gem::Requirement
38
+ requirement: &70267515768980 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 2.0.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70149605752480
46
+ version_requirements: *70267515768980
47
47
  description: SproutCore 2.0 for the Rails asset pipeline.
48
48
  email:
49
49
  - paul@chavard.net