handlebars_assets 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- handlebars_assets (0.1.3)
4
+ handlebars_assets (0.1.4)
5
5
  execjs (>= 1.2.9)
6
6
  tilt
7
7
 
data/README.md CHANGED
@@ -8,10 +8,11 @@ Yea, I think so too. That is why I wrote **handlebars_assets**. Give your Handle
8
8
 
9
9
  ## Installation
10
10
 
11
- Load `handlebars_assets` and `execjs` in your `Gemfile`
11
+ Load `handlebars_assets` in your `Gemfile` as part of the `assets` group
12
12
 
13
- gem 'handlebars_assets'
14
- gem 'execjs'
13
+ group :assets do
14
+ gem 'handlebars_assets'
15
+ end
15
16
 
16
17
  Require `handlebars.vm.js` in your Javascript manifest (i.e. `application.js`)
17
18
 
@@ -23,9 +24,15 @@ If you need to compile your Javascript templates in the browser as well, you sho
23
24
 
24
25
  # Compiling your Javascript templates in the asset pipeline
25
26
 
27
+ ## Precompiling
28
+
29
+ `handlebars_assets` also works when you are precompiling your assets. If you are deploying to Heroku, be sure to read the [Rails guide](http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets) and in your `config/application.rb` set:
30
+
31
+ config.assets.initialize_on_precompile = false
32
+
26
33
  ## Templates directory
27
34
 
28
- You should located your templates under `app/assets/templates`. In your Javascript manifest file, use `require_tree`
35
+ You should locate your templates with your other assets, for example `app/assets/templates`. In your Javascript manifest file, use `require_tree` to pull in the templates
29
36
 
30
37
  //= require_tree ../templates
31
38
 
@@ -90,5 +97,6 @@ Once you've made your great commits
90
97
 
91
98
  # Contributors
92
99
 
93
- * Matt Burke (@spraints) : execjs support
94
- * (@kendagriff) : 1.8.7 compatibility
100
+ * Matt Burke (@spraints) : execjs support
101
+ * (@kendagriff) : 1.8.7 compatibility
102
+ * Thorben Schröder (@walski) : 3.1 asset group for precompile
@@ -1,6 +1,6 @@
1
1
  module HandlebarsAssets
2
2
  class Engine < ::Rails::Engine
3
- initializer "sprockets.handlebars", :after => "sprockets.environment" do |app|
3
+ initializer "sprockets.handlebars", :after => "sprockets.environment", :group => :all do |app|
4
4
  next unless app.assets
5
5
  app.assets.register_engine('.hbs', TiltHandlebars)
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module HandlebarsAssets
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handlebars_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-25 00:00:00.000000000Z
12
+ date: 2011-11-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: execjs
16
- requirement: &70325628173200 !ruby/object:Gem::Requirement
16
+ requirement: &70322385407880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.2.9
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70325628173200
24
+ version_requirements: *70322385407880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: tilt
27
- requirement: &70325628172760 !ruby/object:Gem::Requirement
27
+ requirement: &70322385407460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70325628172760
35
+ version_requirements: *70322385407460
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
- requirement: &70325628172220 !ruby/object:Gem::Requirement
38
+ requirement: &70322385406920 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.1.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70325628172220
46
+ version_requirements: *70322385406920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: therubyracer
49
- requirement: &70325628171760 !ruby/object:Gem::Requirement
49
+ requirement: &70322385406500 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70325628171760
57
+ version_requirements: *70322385406500
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70325628171280 !ruby/object:Gem::Requirement
60
+ requirement: &70322385406020 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70325628171280
68
+ version_requirements: *70322385406020
69
69
  description: Compile Handlebars templates in the Rails asset pipeline.
70
70
  email:
71
71
  - leshill@gmail.com