handlebar_wax 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/.gitignore +0 -0
- data/app/assets/javascripts/handlebar_wax.js +2 -0
- data/app/assets/javascripts/handlebars.js +1417 -0
- data/lib/handlebar_wax.rb +3 -13
- data/lib/handlebar_wax/engine.rb +6 -0
- data/lib/handlebar_wax/middleware.rb +0 -4
- data/lib/handlebar_wax/railtie.rb +0 -1
- data/lib/handlebar_wax/version.rb +1 -1
- metadata +8 -4
data/lib/handlebar_wax.rb
CHANGED
@@ -1,29 +1,19 @@
|
|
1
1
|
require 'handlebar_wax/template_handler'
|
2
2
|
require 'handlebar_wax/railtie'
|
3
|
+
require 'handlebar_wax/engine'
|
3
4
|
require 'yajl'
|
4
5
|
|
5
6
|
module HandlebarWax
|
6
7
|
|
7
8
|
autoload :Middleware, "handlebar_wax/middleware"
|
8
9
|
|
9
|
-
def self.register_expansion(timestamp=nil)
|
10
|
-
querystring = "?#{timestamp.to_i}" if timestamp
|
11
|
-
expansions = {
|
12
|
-
:handlebar_wax => [
|
13
|
-
"/javascripts/handlebars.js",
|
14
|
-
"/javascripts/handlebars_templates.js#{querystring}"
|
15
|
-
]
|
16
|
-
}
|
17
|
-
ActionView::Helpers::AssetTagHelper.register_javascript_expansion(expansions)
|
18
|
-
end
|
19
|
-
|
20
10
|
def self.template_files
|
21
11
|
Dir[File.join(%w(app views), '**', '*.hbs')]
|
22
12
|
end
|
23
13
|
|
24
14
|
def self.output_path
|
25
|
-
|
26
|
-
"#{
|
15
|
+
assets = File.join(File.dirname(__FILE__),'..','app','assets')
|
16
|
+
"#{assets}/javascripts/handlebars_templates.js"
|
27
17
|
end
|
28
18
|
|
29
19
|
def self.generate_templates
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handlebar_wax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Burke Libbey
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-06 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -123,8 +123,12 @@ files:
|
|
123
123
|
- LICENSE.txt
|
124
124
|
- README.rdoc
|
125
125
|
- Rakefile
|
126
|
+
- app/assets/javascripts/.gitignore
|
127
|
+
- app/assets/javascripts/handlebar_wax.js
|
128
|
+
- app/assets/javascripts/handlebars.js
|
126
129
|
- handlebar_wax.gemspec
|
127
130
|
- lib/handlebar_wax.rb
|
131
|
+
- lib/handlebar_wax/engine.rb
|
128
132
|
- lib/handlebar_wax/middleware.rb
|
129
133
|
- lib/handlebar_wax/railtie.rb
|
130
134
|
- lib/handlebar_wax/template_handler.rb
|