jt-partial 0.0.3 → 0.0.4

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.
data/lib/jt-partial/js.rb CHANGED
@@ -7,7 +7,8 @@ end
7
7
  def include_js
8
8
  template_path = File.expand_path('../', __FILE__)
9
9
  template = ""
10
- Dir.glob "js/*.js" do |file|
10
+ js_files = File.join("js","**", "*.js")
11
+ Dir.glob js_files do |file|
11
12
  if ! base_js file
12
13
  template += haml_render "#{template_path}/_js_script_tag.haml", {js_file_path: file}
13
14
  end
@@ -4,6 +4,10 @@ def render(partial)
4
4
  haml_render(partial_path)
5
5
  end
6
6
 
7
+ def html(partial)
8
+ File.read(partial)
9
+ end
10
+
7
11
  def generate(template_name)
8
12
  template_path = "_#{template_name}.haml"
9
13
  output = haml_render(template_path)
@@ -1,5 +1,5 @@
1
1
  module Jt
2
2
  module Partial
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
data/lib/jt-partial.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "jt-partial/version"
2
2
 
3
- require "jt-partial/haml_toolkit.rb"
4
- require "jt-partial/js.rb"
5
- require "jt-partial/page_context.rb"
6
- require "jt-partial/partial.rb"
3
+ require "jt-partial/haml_toolkit"
4
+ require "jt-partial/js"
5
+ require "jt-partial/page_context"
6
+ require "jt-partial/partial"
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.3
4
+ version: 0.0.4
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-19 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: generate one page application html
15
15
  email:
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project:
54
- rubygems_version: 1.8.24
54
+ rubygems_version: 1.8.23
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: partial for haml