handlebars_assets 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +14 -6
- data/lib/handlebars_assets.rb +6 -0
- data/lib/handlebars_assets/handlebars.rb +2 -2
- data/lib/handlebars_assets/version.rb +1 -1
- data/test/test_helper.rb +1 -0
- metadata +9 -8
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -28,6 +28,15 @@ Load `handlebars_assets` in your `Gemfile`
|
|
28
28
|
|
29
29
|
gem 'handlebars_assets'
|
30
30
|
|
31
|
+
Add the `HandlebarsAssets.path` to your `Sprockets::Environment` instance. This
|
32
|
+
lets Sprockets know where the Handlebars JavaScript files are and is required
|
33
|
+
for the next steps to work.
|
34
|
+
|
35
|
+
env = Sprockets::Environment.new
|
36
|
+
|
37
|
+
require 'handlebars_assets'
|
38
|
+
env.append_path HandlebarsAssets.path
|
39
|
+
|
31
40
|
|
32
41
|
# Compiling your Javascript templates in the Rails asset pipeline
|
33
42
|
|
@@ -97,8 +106,6 @@ If you begin the name of the template with an underscore, it will be recognized
|
|
97
106
|
todos/
|
98
107
|
_form.hbs
|
99
108
|
|
100
|
-
## TODO document Sinatra setup
|
101
|
-
|
102
109
|
# Thanks
|
103
110
|
|
104
111
|
This gem is standing on the shoulders of giants.
|
@@ -123,7 +130,8 @@ Once you've made your great commits
|
|
123
130
|
|
124
131
|
# Contributors
|
125
132
|
|
126
|
-
* Matt Burke
|
127
|
-
*
|
128
|
-
* Thorben Schröder
|
129
|
-
* Erwan Barrier
|
133
|
+
* Matt Burke (@spraints) : execjs support
|
134
|
+
* (@kendagriff) : 1.8.7 compatibility
|
135
|
+
* Thorben Schröder (@walski) : 3.1 asset group for precompile
|
136
|
+
* Erwan Barrier (@erwanb) : Support for plain sprockets
|
137
|
+
* Brendan Loudermilk (@bloudermilk) : HandlebarsAssets.path
|
data/lib/handlebars_assets.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require "handlebars_assets/version"
|
2
2
|
|
3
3
|
module HandlebarsAssets
|
4
|
+
PATH = File.expand_path("../../vendor/assets/javascripts", __FILE__)
|
5
|
+
|
6
|
+
def self.path
|
7
|
+
PATH
|
8
|
+
end
|
9
|
+
|
4
10
|
autoload(:Handlebars, 'handlebars_assets/handlebars')
|
5
11
|
autoload(:TiltHandlebars, 'handlebars_assets/tilt_handlebars')
|
6
12
|
|
@@ -20,11 +20,11 @@ module HandlebarsAssets
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def path
|
23
|
-
@path ||= assets_path.join('
|
23
|
+
@path ||= assets_path.join('handlebars.js')
|
24
24
|
end
|
25
25
|
|
26
26
|
def assets_path
|
27
|
-
@assets_path ||= Pathname(
|
27
|
+
@assets_path ||= Pathname(HandlebarsAssets.path)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
data/test/test_helper.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.1
|
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:
|
12
|
+
date: 2012-02-20 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: execjs
|
16
|
-
requirement: &
|
16
|
+
requirement: &70119801084460 !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: *
|
24
|
+
version_requirements: *70119801084460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: tilt
|
27
|
-
requirement: &
|
27
|
+
requirement: &70119801083540 !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: *
|
35
|
+
version_requirements: *70119801083540
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sprockets
|
38
|
-
requirement: &
|
38
|
+
requirement: &70119801082800 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.0.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70119801082800
|
47
47
|
description: Compile Handlebars templates in the Rails asset pipeline.
|
48
48
|
email:
|
49
49
|
- leshill@gmail.com
|
@@ -96,3 +96,4 @@ summary: Compile Handlebars templates in the Rails asset pipeline.
|
|
96
96
|
test_files:
|
97
97
|
- test/handlebars_assets/tilt_handlebars_test.rb
|
98
98
|
- test/test_helper.rb
|
99
|
+
has_rdoc:
|