jt-partial 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,3 @@
1
- require "haml"
2
- require 'action_pack'
3
- require 'action_controller'
4
- require 'action_view'
5
-
6
- require 'rails'
7
-
8
- require "haml/helpers/action_view_mods"
9
-
10
- require 'haml/template'
11
-
12
1
  #haml toolkit
13
2
 
14
3
  def haml_render(template_path, args = {})
@@ -16,8 +5,8 @@ def haml_render(template_path, args = {})
16
5
  end
17
6
 
18
7
 
19
- def container name, path, &block
20
- #puts path
21
- base = ActionView::Base::new(path)
22
- base.render :layout => name, &block
8
+ def container template_path, args, &block
9
+ Haml::Engine.new(File.read(template_path)).render Object.new, args do
10
+ capture_haml( &block )
11
+ end
23
12
  end
@@ -1,7 +1,7 @@
1
1
  #page_context
2
2
  @@page_context = {}
3
3
 
4
- def page page_name
4
+ def load_page page_name
5
5
  @@page_context[:name] = page_name
6
6
  page_path = "pages/_#{page_name}.haml"
7
7
  haml_render page_path
@@ -1,5 +1,5 @@
1
1
  module Jt
2
2
  module Partial
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-partial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: generate one page application html
15
15
  email: